public HostBackupRestoreAction(Host host, HostBackupRestoreType type, string filename) : base(host.Connection, type == HostBackupRestoreType.backup ? string.Format(Messages.BACKINGUP_HOST, host.Name) : string.Format(Messages.RESTORING_HOST, host.Name)) { #region RBAC Dependencies switch (type) { case HostBackupRestoreType.backup: ApiMethodsToRoleCheck.Add("http/get_host_backup"); break; case HostBackupRestoreType.restore: ApiMethodsToRoleCheck.Add("http/put_host_restore"); break; } ApiMethodsToRoleCheck.AddRange(Role.CommonTaskApiList); #endregion Host = host; this.filename = filename; this.type = type; if (type == HostBackupRestoreType.backup) { this.ShowProgress = false; // CA-13065, CA-66475 } }
public HostBackupRestoreAction(Host host, HostBackupRestoreType type, string filename) : base(host.Connection, type == HostBackupRestoreType.backup ? string.Format(Messages.BACKINGUP_HOST, host.Name) : string.Format(Messages.RESTORING_HOST, host.Name)) { #region RBAC Dependencies switch (type) { case HostBackupRestoreType.backup: ApiMethodsToRoleCheck.Add("http/get_host_backup"); break; case HostBackupRestoreType.restore: ApiMethodsToRoleCheck.Add("http/put_host_restore"); break; } ApiMethodsToRoleCheck.AddRange(Role.CommonTaskApiList); #endregion Host = host; this.filename = filename; this.type = type; if (type == HostBackupRestoreType.backup) this.ShowProgress = false; // CA-13065, CA-66475 }