public static async Task <ServicesResponse> RemoveVm(Adapter adapter, string vmId) { ServicesResponse servicesResponse = await ApiService.DeleteRequest(adapter, typeof(Action), $"ovirt-engine/api/vms/{vmId}"); Action action = (Action)servicesResponse.resultObject; servicesResponse.resultObject = action.Status; return(servicesResponse); }
public static async Task <ServicesResponse> ChangeState(Adapter adapter, string vmId, string shutOrStart) { Action action = new Action(); ServicesResponse servicesResponse = await ApiService.PostRequest <Action>(adapter, action, $"ovirt-engine/api/vms/{vmId}/{shutOrStart}"); action = (Action)servicesResponse.resultObject; servicesResponse.resultObject = action.Status; return(servicesResponse); }