public int StartDeployingAgent(AgentDeploymentSettings settings) { AgentDeployer.log.Debug((object)"StartDeployingAgent entered"); AgentDeploymentWatcher instance = AgentDeploymentWatcher.GetInstance(this.agentInfoDal); instance.Start(); int agentId = this.DeployAgent(settings); instance.AddOrUpdateDeploymentInfo(AgentDeploymentInfo.Calculate(new AgentManager(this.agentInfoDal).GetAgentInfo(agentId), (IEnumerable <string>)settings.get_RequiredPlugins(), (string)null)); this.DeployMissingPlugins(agentId, (IEnumerable <string>)settings.get_RequiredPlugins()); return(agentId); }
// Token: 0x06000901 RID: 2305 RVA: 0x00040F7C File Offset: 0x0003F17C public int StartDeployingAgent(AgentDeploymentSettings settings) { AgentDeployer.log.Debug("StartDeployingAgent entered"); AgentDeploymentWatcher instance = AgentDeploymentWatcher.GetInstance(this.agentInfoDal); instance.Start(); int num = this.DeployAgent(settings); AgentInfo agentInfo = new AgentManager(this.agentInfoDal).GetAgentInfo(num); instance.AddOrUpdateDeploymentInfo(AgentDeploymentInfo.Calculate(agentInfo, settings.RequiredPlugins, null)); this.DeployMissingPlugins(num, settings.RequiredPlugins); return(num); }
// Token: 0x06000902 RID: 2306 RVA: 0x00040FE4 File Offset: 0x0003F1E4 public void StartDeployingPlugins(int agentId, IEnumerable <string> requiredPlugins, Action <AgentDeploymentStatus> onFinishedCallback = null) { AgentDeployer.log.Debug("StartDeployingPlugins entered"); AgentDeploymentInfo agentDeploymentInfo = AgentDeploymentInfo.Calculate(new AgentManager(this.agentInfoDal).GetAgentInfo(agentId), requiredPlugins, null); agentDeploymentInfo.StatusInfo = new AgentDeploymentStatusInfo(agentId, AgentDeploymentStatus.InProgress); AgentDeploymentWatcher instance = AgentDeploymentWatcher.GetInstance(this.agentInfoDal); instance.AddOrUpdateDeploymentInfo(agentDeploymentInfo); if (onFinishedCallback != null) { instance.SetOnFinishedCallback(agentId, onFinishedCallback); } this.DeployMissingPlugins(agentId, requiredPlugins); }
private AgentDeploymentInfo LoadAgentDeploymentInfo(int agentId) { AgentInfo agentInfo1 = new AgentManager(this.AgentInfoDal).GetAgentInfo(agentId); if (agentInfo1 != null) { string[] discoveryPluginIds = DiscoveryHelper.GetAgentDiscoveryPluginIds(); return(AgentDeploymentInfo.Calculate(agentInfo1, (IEnumerable <string>)discoveryPluginIds, (string)null)); } AgentDeploymentInfo agentDeploymentInfo = new AgentDeploymentInfo(); AgentInfo agentInfo2 = new AgentInfo(); agentInfo2.set_AgentId(agentId); agentDeploymentInfo.set_Agent(agentInfo2); agentDeploymentInfo.set_StatusInfo(new AgentDeploymentStatusInfo(agentId, (AgentDeploymentStatus)2, "Agent not found.")); return(agentDeploymentInfo); }
// Token: 0x06000917 RID: 2327 RVA: 0x00041AB0 File Offset: 0x0003FCB0 private AgentDeploymentInfo LoadAgentDeploymentInfo(int agentId) { AgentInfo agentInfo = new AgentManager(this.AgentInfoDal).GetAgentInfo(agentId); if (agentInfo != null) { string[] agentDiscoveryPluginIds = DiscoveryHelper.GetAgentDiscoveryPluginIds(); return(AgentDeploymentInfo.Calculate(agentInfo, agentDiscoveryPluginIds, null)); } return(new AgentDeploymentInfo { Agent = new AgentInfo { AgentId = agentId }, StatusInfo = new AgentDeploymentStatusInfo(agentId, AgentDeploymentStatus.Failed, "Agent not found.") }); }