public async Task <Job> CreateJobForOrganizationAsync(string organizationId, string repositoryId, string name, string description, BackupType backupType, SchedulePolicy schedulePolicy, JobItemCollection selectedItems, string proxyId, bool runNow, CancellationToken ct = default) { ParameterValidator.ValidateNotNull(organizationId, nameof(organizationId)); var bodyParameters = new BodyParameters() .AddOptionalParameter("Name", name) .AddOptionalParameter("Description", description) .AddOptionalParameter("BackupType", backupType) .AddOptionalParameter("SchedulePolicy", schedulePolicy) .AddOptionalParameter("SelectedItems", selectedItems) .AddOptionalParameter("ProxyId", proxyId) .AddMandatoryParameter("RepositoryId", repositoryId) .AddOptionalParameter("RunNow", runNow); var url = $"organizations/{organizationId}/jobs"; return(await _baseClient.PostAsync <Job>(url, bodyParameters, ct)); }
public override void Validate() { base.Validate(); SchedulePolicy.Validate(); RetentionPolicy.Validate(); }
public void InitScheduleMethod(SimulationCarrier carrier, DLCarrierTag tag, SchedulePolicy policy) { this.m_currentCarrier = carrier; this.tag = tag; this.policy = policy; this.method = AllotMethodFactory.CreateAllotMethod(carrier.IsDlIcicOn); this.method.InitAllotMethod(carrier, tag); }
public RemoteConfigLongPollService() { m_longPollFailSchedulePolicyInSecond = new ExponentialSchedulePolicy(1, 120); //in second m_longPollSuccessSchedulePolicyInMS = new ExponentialSchedulePolicy(100, 1000); //in millisecond m_longPollingStarted = new ThreadSafe.Boolean(false); m_longPollingStopped = new ThreadSafe.Boolean(false); m_longPollNamespaces = new ConcurrentDictionary <string, ISet <RemoteConfigRepository> >(); m_notifications = new ConcurrentDictionary <string, long?>(); }
public static IQueueBuilder GetSemiPersistQueueBuilder(SchedulePolicy policy) { if (policy == SchedulePolicy.MAX_CI) { return new VoiceMAXCIQueueBuilder(); } if (policy == SchedulePolicy.PF) { return new VoicePFQueueBuilder(); } return new VoiceRRQueueBuilder(); }
public static IQueueBuilder GetBEQueueBuilder(SchedulePolicy policy) { if (policy == SchedulePolicy.MAX_CI) { return new DataMAXCIQueueBuilder(); } if (policy == SchedulePolicy.PF) { return new DataPFQueueBuilder(); } return new DataRRQueueBuilder(); }
public void InitCarrierTag(SimulationCarrier carrier, SchedulePolicy policy) { this.m_Carrier = carrier.Carrier; this.m_maxPower = SimulationTools.ConvertdBToLine(this.m_Carrier.MaxPower); this.m_bchPower = SimulationTools.ConvertdBToLine(carrier.BCHPower); this.m_schPower = SimulationTools.ConvertdBToLine(carrier.SCHPower); this.m_rsPower = SimulationTools.ConvertdBToLine(carrier.RSPower); this.m_bchRePower = this.m_bchPower / 20f; this.m_schRePower = this.m_schPower / 10f; this.m_voiceScheduler.InitScheduleMethod(carrier, this, policy); this.m_dataScheduler.InitScheduleMethod(carrier, this, policy); this.m_DataFrequencySelectMethod.InitScheduleMethod(carrier, this, carrier.SchedulePolicy); }
public override void ExecuteCmdlet() { ExecutionBlock(() => { base.ExecuteCmdlet(); ResourceIdentifier resourceIdentifier = new ResourceIdentifier(VaultId); string vaultName = resourceIdentifier.ResourceName; string resourceGroupName = resourceIdentifier.ResourceGroupName; bool isMUAOperation = false; if (ParameterSetName == ModifyPolicyParamSet) { isMUAOperation = true; } WriteDebug(string.Format("Input params - Policy: {0}" + "RetentionPolicy:{1}, SchedulePolicy:{2}", Policy == null ? "NULL" : Policy.ToString(), RetentionPolicy == null ? "NULL" : RetentionPolicy.ToString(), SchedulePolicy == null ? "NULL" : SchedulePolicy.ToString())); // Validate policy name PolicyCmdletHelpers.ValidateProtectionPolicyName(Policy.Name); // Validate if policy already exists ProtectionPolicyResource servicePolicy = PolicyCmdletHelpers.GetProtectionPolicyByName( Policy.Name, ServiceClientAdapter, vaultName: vaultName, resourceGroupName: resourceGroupName); if (servicePolicy == null) { throw new ArgumentException(string.Format(Resources.PolicyNotFoundException, Policy.Name)); } PsBackupProviderManager providerManager = new PsBackupProviderManager( new Dictionary <System.Enum, object>() { { VaultParams.VaultName, vaultName }, { VaultParams.ResourceGroupName, resourceGroupName }, { PolicyParams.ProtectionPolicy, Policy }, { PolicyParams.RetentionPolicy, RetentionPolicy }, { PolicyParams.SchedulePolicy, SchedulePolicy }, { PolicyParams.FixForInconsistentItems, FixForInconsistentItems.IsPresent }, { ResourceGuardParams.Token, Token }, { ResourceGuardParams.IsMUAOperation, isMUAOperation }, { PolicyParams.ExistingPolicy, servicePolicy } }, ServiceClientAdapter); IPsBackupProvider psBackupProvider = providerManager.GetProviderInstance( Policy.WorkloadType, Policy.BackupManagementType); AzureOperationResponse <ProtectionPolicyResource> policyResponse = psBackupProvider.ModifyPolicy(); WriteDebug("ModifyPolicy http response from service: " + policyResponse.Response.StatusCode.ToString()); if (policyResponse.Response.StatusCode == System.Net.HttpStatusCode.Accepted) { // Track OperationStatus URL for operation completion string policyName = Policy.Name; ServiceClientModel.OperationStatus operationStatus = TrackingHelpers.GetOperationStatus( policyResponse, operationId => ServiceClientAdapter.GetProtectionPolicyOperationStatus( policyName, operationId, vaultName: vaultName, resourceGroupName: resourceGroupName)); WriteDebug("Final operation status: " + operationStatus.Status); if (operationStatus.Properties != null && ((OperationStatusJobsExtendedInfo)operationStatus.Properties) .JobIds != null) { // get list of jobIds and return jobResponses WriteObject(GetJobObject( ((OperationStatusJobsExtendedInfo)operationStatus.Properties).JobIds, vaultName: vaultName, resourceGroupName: resourceGroupName)); } if (operationStatus.Status == OperationStatusValues.Failed) { // if operation failed, then trace error and throw exception if (operationStatus.Error != null) { WriteDebug(string.Format( "OperationStatus Error: {0} " + "OperationStatus Code: {1}", operationStatus.Error.Message, operationStatus.Error.Code)); } } } else { // ServiceClient will return OK if NO datasources are associated with this policy WriteDebug("No datasources are associated with Policy, http response code: " + policyResponse.Response.StatusCode.ToString()); } }, ShouldProcess(Policy.Name, VerbsCommon.Set)); }
public static IUserQueueFactory CreateQueueFactory(SchedulePolicy schedulePolicy) { switch (schedulePolicy) { case SchedulePolicy.PF: return new PFUserQueueFactory(); case SchedulePolicy.MAX_CI: return new MaxCIUserQueueFactory(); } return new RRUserQueueFactory(); }
//Todo``` public void CopyFrom(RelayCell cell) { m_Ams = cell.Ams; m_AmsThreshold = cell.AmsThreshold; base.CopyFrom(cell); this.m_TAC = cell.TAC; m_PhyID = cell.PhyID; m_RCToCellAnt = cell.RCToCellAnt; m_CellToUEAnt = cell.CellToUEAnt; m_RelayUEPropModelConfig = cell.RelayUEPropModelConfig; m_SchedulePolicy = cell.SchedulePolicy; m_HighSpeed = cell.HighSpeed; //m_parentRN = cell.ParentRN; m_RSPower = cell.RSPower; m_CellRadius = cell.CellRadius; m_DlActualTxPower = cell.DlActualTxPower; m_BCHPoffset = cell.BCHPoffset; m_BCHPower = cell.BCHPower; m_BestStartFrequency = cell.BestStartFrequency; m_RCellPriority = cell.RCellPriority; m_RCellRadius = cell.RCellRadius; m_PCFICHPoffset = cell.PCFICHPoffset; m_PDCCHPoffset = cell.PDCCHPoffset; m_PHICHPoffset = cell.PHICHPoffset; ; m_SCHPoffset = cell.SCHPoffset; m_SCHPower = cell.SCHPower; m_UlActualIoT = cell.UlActualIoT; m_RPUCCHPower = cell.RPUCCHPower; //Cal m_RPUSCHPower = cell.RPUSCHPower; //add by xg 20100224 m_RelayAlgParameter = cell.RelayAlgParameter; m_PB = cell.PB; m_ActualDlLoad = cell.ActualDlLoad; m_ActualUlLoad = cell.ActualUlLoad; m_PowerBias = cell.PowerBias; m_IsIndoor = cell.m_IsIndoor; m_DLRsSinrAccessThreshold = cell.DLRsSinrAccessThreshold; }
public RelayCell() { m_tran = new Transceiver(); base.SetDefaultValue(NetWorkType.LTE); m_TAC = 0; m_PhyID = 0; m_RCToCellAnt = new AntConfig(); m_CellToUEAnt = new AntConfig(); m_CellToUEAnt.Height = 5f; m_RelayUEPropModelConfig = new PropModelConfig(); m_SchedulePolicy = SchedulePolicy.PF; m_HighSpeed = HighSpeedType.LowSpeed; m_RSPower = 15f; m_RelayAlgParameter = new LteAlgParam(); m_BCHPoffset = 0f; if (base.FreqBand != null) { this.m_BestStartFrequency = base.FreqBand.DLFrequency; } else { this.m_BestStartFrequency = 0f; } m_DlActualTxPower = 44.927f; m_RCellPriority = 0; m_RCellRadius = 0f; m_PCFICHPoffset = 0f; m_PDCCHPoffset = 0f; m_PHICHPoffset = 0f; m_SCHPoffset = 0f; m_UlActualIoT = 2f; m_RPUCCHPower = 0f; m_RPUSCHPower = 0f; m_AntList = new List<AntConfig>(); m_AntList.Add(m_RCToCellAnt); m_AntList.Add(m_CellToUEAnt); m_PowerBias = 0f; m_IsIndoor = false; m_DLRsSinrAccessThreshold = -20f; this.m_ActualUlLoad = base.UlTargetLoad; this.m_ActualDlLoad = base.DlTargetLoad; }
/// <summary> /// 更新用户优先级值 /// </summary> /// <param name="policy"></param> /// <param name="userList"></param> /// <param name="TTI"></param> public static void UpdatePriorityGene(SchedulePolicy policy, List<ISimulationUser> userList, int TTI) { if (policy == SchedulePolicy.PF) { foreach (ISimulationUser user in userList) { IUlScheduleUser user2 = user as IUlScheduleUser; ScheduleUser ulScheduleUserTag = user2.UlScheduleUserTag as ScheduleUser; if (user2.PreScheduleTime == (TTI - 1)) { ulScheduleUserTag.PriorityGene = ((1f - SimulationConstant.UL_RTT_ALPHA) * ulScheduleUserTag.PriorityGene) + ((SimulationConstant.UL_RTT_ALPHA * user2.MacTBS) * 1000f); } else { ulScheduleUserTag.PriorityGene = (1f - SimulationConstant.UL_RTT_ALPHA) * ulScheduleUserTag.PriorityGene; } } } }
//Ôö¼Órelay¶ÓÁÐ public static RNQueueBuilder GetRNQueueBuilder(SchedulePolicy schedulePolicy) { return new RNQueueBuilder(); }