/*
* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using Newtonsoft.Json;
namespace XenAPI
{
[JsonConverter(typeof(vm_operationsConverter))]
public enum vm_operations
{
///
/// refers to the operation "snapshot"
///
snapshot,
///
/// refers to the operation "clone"
///
clone,
///
/// refers to the operation "copy"
///
copy,
///
/// refers to the operation "create_template"
///
create_template,
///
/// refers to the operation "revert"
///
revert,
///
/// refers to the operation "checkpoint"
///
checkpoint,
///
/// refers to the operation "snapshot_with_quiesce"
///
snapshot_with_quiesce,
///
/// refers to the operation "provision"
///
provision,
///
/// refers to the operation "start"
///
start,
///
/// refers to the operation "start_on"
///
start_on,
///
/// refers to the operation "pause"
///
pause,
///
/// refers to the operation "unpause"
///
unpause,
///
/// refers to the operation "clean_shutdown"
///
clean_shutdown,
///
/// refers to the operation "clean_reboot"
///
clean_reboot,
///
/// refers to the operation "hard_shutdown"
///
hard_shutdown,
///
/// refers to the operation "power_state_reset"
///
power_state_reset,
///
/// refers to the operation "hard_reboot"
///
hard_reboot,
///
/// refers to the operation "suspend"
///
suspend,
///
/// refers to the operation "csvm"
///
csvm,
///
/// refers to the operation "resume"
///
resume,
///
/// refers to the operation "resume_on"
///
resume_on,
///
/// refers to the operation "pool_migrate"
///
pool_migrate,
///
/// refers to the operation "migrate_send"
///
migrate_send,
///
/// refers to the operation "get_boot_record"
///
get_boot_record,
///
/// refers to the operation "send_sysrq"
///
send_sysrq,
///
/// refers to the operation "send_trigger"
///
send_trigger,
///
/// refers to the operation "query_services"
///
query_services,
///
/// refers to the operation "shutdown"
///
shutdown,
///
/// refers to the operation "call_plugin"
///
call_plugin,
///
/// Changing the memory settings
///
changing_memory_live,
///
/// Waiting for the memory settings to change
///
awaiting_memory_live,
///
/// Changing the memory dynamic range
///
changing_dynamic_range,
///
/// Changing the memory static range
///
changing_static_range,
///
/// Changing the memory limits
///
changing_memory_limits,
///
/// Changing the shadow memory for a halted VM.
///
changing_shadow_memory,
///
/// Changing the shadow memory for a running VM.
///
changing_shadow_memory_live,
///
/// Changing VCPU settings for a halted VM.
///
changing_VCPUs,
///
/// Changing VCPU settings for a running VM.
///
changing_VCPUs_live,
///
/// Changing NVRAM for a halted VM.
///
changing_NVRAM,
///
///
///
assert_operation_valid,
///
/// Add, remove, query or list data sources
///
data_source_op,
///
///
///
update_allowed_operations,
///
/// Turning this VM into a template
///
make_into_template,
///
/// importing a VM from a network stream
///
import,
///
/// exporting a VM to a network stream
///
export,
///
/// exporting VM metadata to a network stream
///
metadata_export,
///
/// Reverting the VM to a previous snapshotted state
///
reverting,
///
/// refers to the act of uninstalling the VM
///
destroy,
unknown
}
public static class vm_operations_helper
{
public static string ToString(vm_operations x)
{
return x.StringOf();
}
}
public static partial class EnumExt
{
public static string StringOf(this vm_operations x)
{
switch (x)
{
case vm_operations.snapshot:
return "snapshot";
case vm_operations.clone:
return "clone";
case vm_operations.copy:
return "copy";
case vm_operations.create_template:
return "create_template";
case vm_operations.revert:
return "revert";
case vm_operations.checkpoint:
return "checkpoint";
case vm_operations.snapshot_with_quiesce:
return "snapshot_with_quiesce";
case vm_operations.provision:
return "provision";
case vm_operations.start:
return "start";
case vm_operations.start_on:
return "start_on";
case vm_operations.pause:
return "pause";
case vm_operations.unpause:
return "unpause";
case vm_operations.clean_shutdown:
return "clean_shutdown";
case vm_operations.clean_reboot:
return "clean_reboot";
case vm_operations.hard_shutdown:
return "hard_shutdown";
case vm_operations.power_state_reset:
return "power_state_reset";
case vm_operations.hard_reboot:
return "hard_reboot";
case vm_operations.suspend:
return "suspend";
case vm_operations.csvm:
return "csvm";
case vm_operations.resume:
return "resume";
case vm_operations.resume_on:
return "resume_on";
case vm_operations.pool_migrate:
return "pool_migrate";
case vm_operations.migrate_send:
return "migrate_send";
case vm_operations.get_boot_record:
return "get_boot_record";
case vm_operations.send_sysrq:
return "send_sysrq";
case vm_operations.send_trigger:
return "send_trigger";
case vm_operations.query_services:
return "query_services";
case vm_operations.shutdown:
return "shutdown";
case vm_operations.call_plugin:
return "call_plugin";
case vm_operations.changing_memory_live:
return "changing_memory_live";
case vm_operations.awaiting_memory_live:
return "awaiting_memory_live";
case vm_operations.changing_dynamic_range:
return "changing_dynamic_range";
case vm_operations.changing_static_range:
return "changing_static_range";
case vm_operations.changing_memory_limits:
return "changing_memory_limits";
case vm_operations.changing_shadow_memory:
return "changing_shadow_memory";
case vm_operations.changing_shadow_memory_live:
return "changing_shadow_memory_live";
case vm_operations.changing_VCPUs:
return "changing_VCPUs";
case vm_operations.changing_VCPUs_live:
return "changing_VCPUs_live";
case vm_operations.changing_NVRAM:
return "changing_NVRAM";
case vm_operations.assert_operation_valid:
return "assert_operation_valid";
case vm_operations.data_source_op:
return "data_source_op";
case vm_operations.update_allowed_operations:
return "update_allowed_operations";
case vm_operations.make_into_template:
return "make_into_template";
case vm_operations.import:
return "import";
case vm_operations.export:
return "export";
case vm_operations.metadata_export:
return "metadata_export";
case vm_operations.reverting:
return "reverting";
case vm_operations.destroy:
return "destroy";
default:
return "unknown";
}
}
}
internal class vm_operationsConverter : XenEnumConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteValue(((vm_operations)value).StringOf());
}
}
}