public JobInstance[] GetAllJobs() { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); int timeout = this.m_proxy.Timeout; this.m_proxy.Timeout = this.m_requestCompositeTimeout; JobInstance[] allJobs = this.m_proxy.GetAllJobs(cred); this.m_proxy.Timeout = timeout; return(allJobs); }
public NetworkInstance[] GetHypervisorNetworks(ServerInfo source) { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); int timeout = this.m_proxy.Timeout; this.m_proxy.Timeout = this.m_requestCompositeTimeout; NetworkInstance[] hypervisorNetworks = this.m_proxy.GetHypervisorNetworks(cred, source); this.m_proxy.Timeout = timeout; return(hypervisorNetworks); }
public VmInstance[] GetVirtualMachines(ServerInfo source) { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); int timeout = this.m_proxy.Timeout; this.m_proxy.Timeout = this.m_requestCompositeTimeout; VmInstance[] virtualMachines = this.m_proxy.GetVirtualMachines(cred, source); this.m_proxy.Timeout = timeout; return(virtualMachines); }
public string GetLog() { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); int timeout = this.m_proxy.Timeout; this.m_proxy.Timeout = this.m_requestCompositeTimeout; string log = this.m_proxy.GetLog(cred); this.m_proxy.Timeout = timeout; return(log); }
public void Connect(ServerInfo hostInfo) { if (((hostInfo.Hostname.Length == 0) || (hostInfo.Username.Length == 0)) || (hostInfo.Password.Length == 0)) { throw new ArgumentException("Host info is empty"); } Dictionary <string, string> xenServerVersionInfo = this.GetXenServerVersionInfo(hostInfo); if ((xenServerVersionInfo != null) && (xenServerVersionInfo.Count == 3)) { IsTampaOrGreater(xenServerVersionInfo); } this.m_hostInfo = hostInfo; this.m_serviceUrl = GetServiceUrl(hostInfo); LOG.Info(string.Format("Conversion info: service={0}", this.m_serviceUrl)); this.m_proxy = this.CreateProxy(this.m_serviceUrl, this.m_requestRegularTimeout); ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); string msg = string.Format("ConversionClient version={0}, Application version={1}", Assembly.GetExecutingAssembly().GetName().Version.ToString(), Assembly.GetCallingAssembly().GetName().Version.ToString()); this.m_proxy.LogMessage(cred, 6, msg); }
public void DeleteJob(string jobId) { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); this.m_proxy.DeleteJob(cred, jobId); }
public JobInstance CreateJob(JobInfo jobInfo) { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); return(this.m_proxy.CreateJob(cred, jobInfo)); }
public void ClearJobs() { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); this.m_proxy.ClearJobs(cred); }
public long GetReservedDiskSpace(string sruuid) { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); return(this.m_proxy.GetReservedDiskSpace(cred, sruuid)); }
public JobInstance GetJob(string jobId) { ServiceCred cred = new ServiceCred(this.m_hostInfo.Username, this.m_hostInfo.Password); return(this.m_proxy.GetJob(cred, jobId)); }