// Token: 0x0600013D RID: 317 RVA: 0x00003E08 File Offset: 0x00002008 public AsynchrTask StartVm(string vmUri) { AsynchrTask asynchrTask = new AsynchrTask(); string uri = vmUri + "/action/start"; string text = RestClientUtil.sendRequest("POST", uri, null, this.bean, "StartVm"); VmResource.log.Info("StartVm result : " + text); return(JsonConvert.DeserializeObject <AsynchrTask>(text)); }
// Token: 0x0600013E RID: 318 RVA: 0x00003E64 File Offset: 0x00002064 public AsynchrTask StopVm(string vmUri, string mode) { AsynchrTask asynchrTask = new AsynchrTask(); ActionModeReq actionModeReq = new ActionModeReq(); actionModeReq.mode = mode; string uri = vmUri + "/action/stop"; string text = RestClientUtil.sendRequest("POST", uri, actionModeReq, this.bean, "StopVm"); VmResource.log.Info("StopVm result : " + text); return(JsonConvert.DeserializeObject <AsynchrTask>(text)); }
// Token: 0x06000144 RID: 324 RVA: 0x000044D4 File Offset: 0x000026D4 public AsynchrTask RemoveVm(string vmUri, int?isReserveDisks, int?isFormat, int?holdTime) { AsynchrTask asynchrTask = new AsynchrTask(); StringBuilder stringBuilder = new StringBuilder(vmUri + "?"); stringBuilder.Append((isReserveDisks == null) ? "" : ("isReserveDisks=" + isReserveDisks + "&")); stringBuilder.Append((isFormat == null) ? "" : ("isFormat=" + isFormat + "&")); stringBuilder.Append((holdTime == null) ? "" : ("holdTime=" + holdTime + "&")); string text = RestClientUtil.sendRequest("DELETE", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "RemoveVm"); VmResource.log.Info("RemoveVm result : " + text); return(JsonConvert.DeserializeObject <AsynchrTask>(text)); }