Merge pull request #1042 from kc284/master

Latest API bindings, including definition of dundee-plus release...
This commit is contained in:
Mihaela Stoica 2016-06-28 13:09:36 +01:00 committed by GitHub
commit 20cb3b4df1
17 changed files with 94 additions and 37 deletions

View File

@ -51,8 +51,8 @@ namespace XenAdmin.Controls
private Host affinity;
private SrPickerItem LastSelectedItem;
public event EventHandler ItemSelectionNull;
public event EventHandler ItemSelectionNotNull;
public event Action ItemSelectionNull;
public event Action ItemSelectionNotNull;
public event EventHandler DoubleClickOnRow;
public long DiskSize = 0;
public long? OverridenInitialAllocationRate = null;
@ -167,13 +167,12 @@ namespace XenAdmin.Controls
if (item == null || !item.Enabled)
{
if (ItemSelectionNull != null)
ItemSelectionNull(null, null);
ItemSelectionNull();
return;
}
else if (ItemSelectionNotNull != null)
{
ItemSelectionNotNull(null, null);
}
if (ItemSelectionNotNull != null)
ItemSelectionNotNull();
if (!item.Enabled && LastSelectedItem != null && LastSelectedItem.TheSR.opaque_ref != item.TheSR.opaque_ref)
srListBox.SelectedItem = LastSelectedItem;
@ -369,7 +368,7 @@ namespace XenAdmin.Controls
}
if (ItemSelectionNull != null)
ItemSelectionNull(null, null);
ItemSelectionNull();
}
internal void selectDefaultSROrAny()
@ -387,7 +386,7 @@ namespace XenAdmin.Controls
}
}
if (ItemSelectionNull != null)
ItemSelectionNull(null, null);
ItemSelectionNull();
}
public void selectSRorDefaultorAny(SR sr)

View File

@ -60,8 +60,8 @@ namespace XenAdmin.Dialogs
IsRealVm = !vm.is_a_template;
TheVM = vm;
srPicker1.Usage = SrPicker.SRPickerType.MoveOrCopy;
srPicker1.ItemSelectionNotNull += new EventHandler(srPicker1_ItemSelectionNotNull);
srPicker1.ItemSelectionNull += new EventHandler(srPicker1_ItemSelectionNull);
srPicker1.ItemSelectionNotNull += srPicker1_ItemSelectionNotNull;
srPicker1.ItemSelectionNull += srPicker1_ItemSelectionNull;
Host affinity = TheVM.Home();
srPicker1.Connection = TheVM.Connection;
srPicker1.DiskSize = vm.TotalVMSize;
@ -104,12 +104,12 @@ namespace XenAdmin.Dialogs
srPicker1.selectDefaultSROrAny();
}
private void srPicker1_ItemSelectionNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNull()
{
EnableMoveButton();
}
private void srPicker1_ItemSelectionNotNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNotNull()
{
EnableMoveButton();
}

View File

@ -85,12 +85,12 @@ namespace XenAdmin.Dialogs
get { return srPicker1; }
}
private void srPicker1_ItemSelectionNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNull()
{
updateButtons();
}
private void srPicker1_ItemSelectionNotNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNotNull()
{
updateButtons();
}

View File

@ -79,8 +79,8 @@ namespace XenAdmin.Dialogs
// Add events
NameTextBox.Text = GetDefaultVDIName();
SrListBox.srListBox.SelectedIndexChanged += new EventHandler(srListBox_SelectedIndexChanged);
SrListBox.ItemSelectionNotNull += new EventHandler(SrListBox_ItemSelectionNotNull);
SrListBox.ItemSelectionNull += new EventHandler(SrListBox_ItemSelectionNull);
SrListBox.ItemSelectionNotNull += SrListBox_ItemSelectionNotNull;
SrListBox.ItemSelectionNull += SrListBox_ItemSelectionNull;
srListBox_SelectedIndexChanged(null, null);
DiskSizeNumericUpDown.TextChanged += new EventHandler(DiskSizeNumericUpDown_TextChanged);
@ -178,12 +178,12 @@ namespace XenAdmin.Dialogs
return Helpers.MakeUniqueName(Messages.DEFAULT_VDI_NAME, usedNames);
}
void SrListBox_ItemSelectionNull(object sender, EventArgs e)
void SrListBox_ItemSelectionNull()
{
SelectionNull = true;
}
void SrListBox_ItemSelectionNotNull(object sender, EventArgs e)
void SrListBox_ItemSelectionNotNull()
{
SelectionNull = false;
}

View File

@ -92,12 +92,12 @@ namespace XenAdmin.Dialogs.VMDialogs
buttonMove.Enabled = srPicker1.SR != null;
}
private void srPicker1_ItemSelectionNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNull()
{
EnableMoveButton();
}
private void srPicker1_ItemSelectionNotNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNotNull()
{
EnableMoveButton();
}

View File

@ -18,7 +18,7 @@
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff618" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" is_a_template="false" name__label="Victor Rodriguez" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dc8" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff618" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Software test engineer" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Halted" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff619" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" is_a_template="false" name__label="Sarah Vallieres" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dc7" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff619" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Technical author" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Halted" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff620" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ec" is_a_template="false" name__label="Mihaela Stoica" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dc6" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff614" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Software development engineer" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Running" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff621" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ec" is_a_template="false" name__label="&#922;&#969;&#957;&#963;&#964;&#945;&#957;&#964;&#953;&#769;&#957;&#945; &#935;&#961;&#949;&#769;&#956;&#956;&#959;&#965; (Konstantina Chremmou)" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dd3" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff614" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Software development engineer" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Halted" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff621" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ec" is_a_template="false" name__label="&#922;&#969;&#957;&#963;&#964;&#945;&#957;&#964;&#953;&#769;&#957;&#945; &#935;&#961;&#949;&#769;&#956;&#956;&#959;&#965; (Konstantina Chremmou)" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dd3" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff614" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Software development engineer" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Running" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff622" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" is_a_template="false" name__label="&#2352;&#2357;&#2367;&#2344; &#2325;&#2366;&#2352;&#2381;&#2325;&#2368; (Rabin Karki)" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dd4" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff622" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Software development engineer" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Halted" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff623" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ec" is_a_template="false" name__label="G&#225;bor Ap&#225;ti-Nagy" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dc5" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff614" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Software development engineer" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Running" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>
<row ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff624" PV__args="" PV__bootloader_args="" actions__after_shutdown="destroy" resident_on="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" is_a_template="false" name__label="Chris Harding" ha_restart_priority="" snapshot_of="OpaqueRef:NULL" tags="()" PV__ramdisk="" memory__dynamic_min="536870912" user_version="1" HVM__boot_params="(('order' 'dc'))" uuid="6b7d7e58-d915-1a02-388a-cbf92b669dd5" PV__legacy_args="" last_boot_CPU_flags="()" metrics="OpaqueRef:5b4b36d2-422e-8649-7a72-3b67bf3fa9b2" PV__bootloader="" memory__target="268435456" current_operations="()" blobs="()" HVM__boot_policy="BIOS order" VCPUs__max="1" domid="9" other_config="(('last_shutdown_time' '20090505T17:10:33Z') ('last_shutdown_action' 'Destroy') ('last_shutdown_initiator' 'external') ('last_shutdown_reason' 'halted') ('install-methods' 'cdrom') ('mac_seed' '021c8736-06a9-04ca-dfec-213484813516'))" xenstore_data="()" recommendations="" _ref="OpaqueRef:d8c4b5b1-86d8-40f8-ac93-3ed24d4ff624" scheduled_to_be_resident_on="OpaqueRef:NULL" memory__dynamic_max="536870912" name__description="Software development engineer" allowed_operations="('pool_migrate' 'changing_VCPUs_live' 'suspend' 'hard_reboot' 'hard_shutdown' 'clean_reboot' 'clean_shutdown' 'pause' 'snapshot')" blocked_operations="()" is_a_snapshot="false" snapshot_time="19700101T00:00:00Z" ha_always_run="false" memory__static_min="16777216" affinity="OpaqueRef:95de2421-c5ef-26ee-0eff-53f3429421ed" VCPUs__at_startup="1" actions__after_reboot="restart" is_control_domain="false" PCI_bus="" HVM__shadow_multiplier="1" last_booted_record="" transportable_snapshot_id="" actions__after_crash="restart" power_state="Halted" platform="(('timeoffset' '2') ('nx' 'false') ('acpi' 'true') ('apic' 'true') ('pae' 'true') ('viridian' 'true'))" suspend_VDI="OpaqueRef:NULL" domarch="hvm" guest_metrics="OpaqueRef:82982a7f-1a56-9491-45f0-6e221e4edc51" memory__static_max="536870912" VCPUs__params="()" PV__kernel=""/>

View File

@ -85,8 +85,8 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
public override void PopulatePage()
{
srPicker1.Usage = SrPicker.SRPickerType.MoveOrCopy;
srPicker1.ItemSelectionNotNull += new EventHandler(srPicker1_ItemSelectionNotNull);
srPicker1.ItemSelectionNull += new EventHandler(srPicker1_ItemSelectionNull);
srPicker1.ItemSelectionNotNull += srPicker1_ItemSelectionNotNull;
srPicker1.ItemSelectionNull += srPicker1_ItemSelectionNull;
Host affinity = TheVM.Home();
srPicker1.Connection = TheVM.Connection;
srPicker1.DiskSize = TheVM.TotalVMSize;
@ -167,12 +167,12 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
OnPageUpdated();
}
private void srPicker1_ItemSelectionNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNull()
{
EnableMoveButton();
}
private void srPicker1_ItemSelectionNotNull(object sender, EventArgs e)
private void srPicker1_ItemSelectionNotNull()
{
EnableMoveButton();
}

View File

@ -37,8 +37,8 @@
this.m_srPicker.Connection = null;
resources.ApplyResources(this.m_srPicker, "m_srPicker");
this.m_srPicker.Name = "m_srPicker";
this.m_srPicker.ItemSelectionNull += new System.EventHandler(this.m_srPicker_ItemSelectionNull);
this.m_srPicker.ItemSelectionNotNull += new System.EventHandler(this.m_srPicker_ItemSelectionNotNull);
this.m_srPicker.ItemSelectionNull += new System.Action(this.m_srPicker_ItemSelectionNull);
this.m_srPicker.ItemSelectionNotNull += new System.Action(this.m_srPicker_ItemSelectionNotNull);
//
// StoragePickerPage
//

View File

@ -301,7 +301,7 @@ namespace XenAdmin.Wizards.ImportWizard
});
}
private void m_srPicker_ItemSelectionNotNull(object sender, EventArgs e)
private void m_srPicker_ItemSelectionNotNull()
{
if (ImportInProgress())
return;
@ -310,7 +310,7 @@ namespace XenAdmin.Wizards.ImportWizard
IsDirty = true;
}
private void m_srPicker_ItemSelectionNull(object sender, EventArgs e)
private void m_srPicker_ItemSelectionNull()
{
if (ImportInProgress())
return;

View File

@ -412,6 +412,11 @@ namespace XenAdmin.Core
return conn == null || conn.Session == null || conn.Session.APIVersion >= API_Version.API_2_4;
}
public static bool DundeePlusOrGreater(IXenConnection conn)
{
return conn == null || conn.Session == null || conn.Session.APIVersion >= API_Version.API_2_6;
}
/// Clearwater is ver. 1.7.0
/// <param name="conn">May be null, in which case true is returned.</param>
public static bool IsClearwater(IXenConnection conn)

View File

@ -53,7 +53,8 @@ namespace XenAPI
API_2_3 = 14, // XenServer Creedence
API_2_4 = 15, // XenServer Cream
API_2_5 = 16, // XenServer Dundee
LATEST = 16,
API_2_6 = 17, // XenServer Dundee Plus
LATEST = 17,
// Don't forget to change LATEST above, and APIVersionString below.
UNKNOWN = 99
}
@ -98,6 +99,8 @@ namespace XenAPI
return "2.4";
case API_Version.API_2_5:
return "2.5";
case API_Version.API_2_6:
return "2.6";
default:
return "Unknown";
}

View File

@ -98,7 +98,8 @@ namespace XenAPI
bool ssl_legacy,
Dictionary<string, string> guest_VCPUs_params,
host_display display,
long[] virtual_hardware_platform_versions)
long[] virtual_hardware_platform_versions,
XenRef<VM> control_domain)
{
this.uuid = uuid;
this.name_label = name_label;
@ -151,6 +152,7 @@ namespace XenAPI
this.guest_VCPUs_params = guest_VCPUs_params;
this.display = display;
this.virtual_hardware_platform_versions = virtual_hardware_platform_versions;
this.control_domain = control_domain;
}
/// <summary>
@ -215,6 +217,7 @@ namespace XenAPI
guest_VCPUs_params = update.guest_VCPUs_params;
display = update.display;
virtual_hardware_platform_versions = update.virtual_hardware_platform_versions;
control_domain = update.control_domain;
}
internal void UpdateFromProxy(Proxy_Host proxy)
@ -270,6 +273,7 @@ namespace XenAPI
guest_VCPUs_params = proxy.guest_VCPUs_params == null ? null : Maps.convert_from_proxy_string_string(proxy.guest_VCPUs_params);
display = proxy.display == null ? (host_display) 0 : (host_display)Helper.EnumParseDefault(typeof(host_display), (string)proxy.display);
virtual_hardware_platform_versions = proxy.virtual_hardware_platform_versions == null ? null : Helper.StringArrayToLongArray(proxy.virtual_hardware_platform_versions);
control_domain = proxy.control_domain == null ? null : XenRef<VM>.Create(proxy.control_domain);
}
public Proxy_Host ToProxy()
@ -326,6 +330,7 @@ namespace XenAPI
result_.guest_VCPUs_params = Maps.convert_to_proxy_string_string(guest_VCPUs_params);
result_.display = host_display_helper.ToString(display);
result_.virtual_hardware_platform_versions = (virtual_hardware_platform_versions != null) ? Helper.LongArrayToStringArray(virtual_hardware_platform_versions) : new string[] {};
result_.control_domain = (control_domain != null) ? control_domain : "";
return result_;
}
@ -386,6 +391,7 @@ namespace XenAPI
guest_VCPUs_params = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "guest_VCPUs_params"));
display = (host_display)Helper.EnumParseDefault(typeof(host_display), Marshalling.ParseString(table, "display"));
virtual_hardware_platform_versions = Marshalling.ParseLongArray(table, "virtual_hardware_platform_versions");
control_domain = Marshalling.ParseRef<VM>(table, "control_domain");
}
public bool DeepEquals(Host other, bool ignoreCurrentOperations)
@ -447,7 +453,8 @@ namespace XenAPI
Helper.AreEqual2(this._ssl_legacy, other._ssl_legacy) &&
Helper.AreEqual2(this._guest_VCPUs_params, other._guest_VCPUs_params) &&
Helper.AreEqual2(this._display, other._display) &&
Helper.AreEqual2(this._virtual_hardware_platform_versions, other._virtual_hardware_platform_versions);
Helper.AreEqual2(this._virtual_hardware_platform_versions, other._virtual_hardware_platform_versions) &&
Helper.AreEqual2(this._control_domain, other._control_domain);
}
public override string SaveChanges(Session session, string opaqueRef, Host server)
@ -507,6 +514,10 @@ namespace XenAPI
{
Host.set_display(session, opaqueRef, _display);
}
if (!Helper.AreEqual2(_ssl_legacy, server._ssl_legacy))
{
Host.set_ssl_legacy(session, opaqueRef, _ssl_legacy);
}
return null;
}
@ -1105,6 +1116,17 @@ namespace XenAPI
return Helper.StringArrayToLongArray(session.proxy.host_get_virtual_hardware_platform_versions(session.uuid, (_host != null) ? _host : "").parse());
}
/// <summary>
/// Get the control_domain field of the given host.
/// First published in .
/// </summary>
/// <param name="session">The session</param>
/// <param name="_host">The opaque_ref of the given host</param>
public static XenRef<VM> get_control_domain(Session session, string _host)
{
return XenRef<VM>.Create(session.proxy.host_get_control_domain(session.uuid, (_host != null) ? _host : "").parse());
}
/// <summary>
/// Set the name/label field of the given host.
/// First published in XenServer 4.0.
@ -3426,5 +3448,24 @@ namespace XenAPI
}
}
private long[] _virtual_hardware_platform_versions;
/// <summary>
/// The control domain (domain 0)
/// First published in .
/// </summary>
public virtual XenRef<VM> control_domain
{
get { return _control_domain; }
set
{
if (!Helper.AreEqual(value, _control_domain))
{
_control_domain = value;
Changed = true;
NotifyPropertyChanged("control_domain");
}
}
}
private XenRef<VM> _control_domain;
}
}

View File

@ -2956,6 +2956,10 @@ namespace XenAPI
Response<string []>
host_get_virtual_hardware_platform_versions(string session, string _host);
[XmlRpcMethod("host.get_control_domain")]
Response<string>
host_get_control_domain(string session, string _host);
[XmlRpcMethod("host.set_name_label")]
Response<string>
host_set_name_label(string session, string _host, string _label);
@ -7194,6 +7198,7 @@ namespace XenAPI
public Object guest_VCPUs_params;
public string display;
public string [] virtual_hardware_platform_versions;
public string control_domain;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]

View File

@ -4068,7 +4068,7 @@ namespace XenAPI
private XenRef<Host> _resident_on;
/// <summary>
/// a host which the VM has some affinity for (or NULL). This is used as a hint to the start call when it decides where to run the VM. Implementations are free to ignore this field.
/// A host which the VM has some affinity for (or NULL). This is used as a hint to the start call when it decides where to run the VM. Resource constraints may cause the VM to be started elsewhere.
/// </summary>
public virtual XenRef<Host> affinity
{

View File

@ -146,7 +146,7 @@ namespace XenAPI
return opaqueRef.GetHashCode();
}
// convert an opaqueRef to a string
// convert to an opaqueRef
public static implicit operator string(XenRef<T> xenRef)
{
return xenRef == null ? null : xenRef.opaque_ref;

View File

@ -37,7 +37,7 @@ namespace XenAPI
{
public enum storage_operations
{
scan, destroy, forget, plug, unplug, update, vdi_create, vdi_introduce, vdi_destroy, vdi_resize, vdi_clone, vdi_snapshot, pbd_create, pbd_destroy, unknown
scan, destroy, forget, plug, unplug, update, vdi_create, vdi_introduce, vdi_destroy, vdi_resize, vdi_clone, vdi_snapshot, vdi_mirror, pbd_create, pbd_destroy, unknown
}
public static class storage_operations_helper
@ -70,6 +70,8 @@ namespace XenAPI
return "vdi_clone";
case storage_operations.vdi_snapshot:
return "vdi_snapshot";
case storage_operations.vdi_mirror:
return "vdi_mirror";
case storage_operations.pbd_create:
return "pbd_create";
case storage_operations.pbd_destroy:

View File

@ -37,7 +37,7 @@ namespace XenAPI
{
public enum vdi_operations
{
scan, clone, copy, resize, resize_online, snapshot, destroy, forget, update, force_unlock, generate_config, blocked, unknown
scan, clone, copy, resize, resize_online, snapshot, mirror, destroy, forget, update, force_unlock, generate_config, blocked, unknown
}
public static class vdi_operations_helper
@ -58,6 +58,8 @@ namespace XenAPI
return "resize_online";
case vdi_operations.snapshot:
return "snapshot";
case vdi_operations.mirror:
return "mirror";
case vdi_operations.destroy:
return "destroy";
case vdi_operations.forget: