/* * 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 System; using System.Collections; using System.Collections.Generic; using CookComputing.XmlRpc; namespace XenAPI { public partial interface Proxy : IXmlRpcProxy { #region pre-6.2 compatibility [XmlRpcMethod("session.login_with_password")] Response session_login_with_password(string _uname, string _pwd, string _version); #endregion #region pre-6.1 compatibility [XmlRpcMethod("Bond.create")] Response bond_create(string session, string _network, string[] _members, string _mac, string _mode); [XmlRpcMethod("Async.Bond.create")] Response async_bond_create(string session, string _network, string[] _members, string _mac, string _mode); [XmlRpcMethod("pool.create_new_blob")] Response pool_create_new_blob(string session, string _pool, string _name, string _mime_type); [XmlRpcMethod("Async.pool.create_new_blob")] Response async_pool_create_new_blob(string session, string _pool, string _name, string _mime_type); [XmlRpcMethod("VM.create_new_blob")] Response vm_create_new_blob(string session, string _vm, string _name, string _mime_type); [XmlRpcMethod("Async.VM.create_new_blob")] Response async_vm_create_new_blob(string session, string _vm, string _name, string _mime_type); [XmlRpcMethod("host.create_new_blob")] Response host_create_new_blob(string session, string _host, string _name, string _mime_type); [XmlRpcMethod("Async.host.create_new_blob")] Response async_host_create_new_blob(string session, string _host, string _name, string _mime_type); [XmlRpcMethod("network.create_new_blob")] Response network_create_new_blob(string session, string _network, string _name, string _mime_type); [XmlRpcMethod("Async.network.create_new_blob")] Response async_network_create_new_blob(string session, string _network, string _name, string _mime_type); [XmlRpcMethod("PIF.db_introduce")] Response pif_db_introduce(string session, string _device, string _network, string _host, string _mac, string _mtu, string _vlan, bool _physical, string _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Object _other_config, bool _disallow_unplug); [XmlRpcMethod("Async.PIF.db_introduce")] Response async_pif_db_introduce(string session, string _device, string _network, string _host, string _mac, string _mtu, string _vlan, bool _physical, string _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Object _other_config, bool _disallow_unplug); [XmlRpcMethod("SR.create_new_blob")] Response sr_create_new_blob(string session, string _sr, string _name, string _mime_type); [XmlRpcMethod("Async.SR.create_new_blob")] Response async_sr_create_new_blob(string session, string _sr, string _name, string _mime_type); [XmlRpcMethod("VDI.introduce")] Response vdi_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config); [XmlRpcMethod("Async.VDI.introduce")] Response async_vdi_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config); [XmlRpcMethod("VDI.db_introduce")] Response vdi_db_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config); [XmlRpcMethod("Async.VDI.db_introduce")] Response async_vdi_db_introduce(string session, string _uuid, string _name_label, string _name_description, string _sr, string _type, bool _sharable, bool _read_only, Object _other_config, string _location, Object _xenstore_data, Object _sm_config); [XmlRpcMethod("blob.create")] Response blob_create(string session, string _mime_type); #endregion #region pre-6.0 compatibility [XmlRpcMethod("Bond.create")] Response bond_create(string session, string _network, string[] _members, string _mac); [XmlRpcMethod("Async.Bond.create")] Response async_bond_create(string session, string _network, string[] _members, string _mac); #endregion } public partial class Blob { /// /// Backward compatibility for Blob.create in XenServer 6.0. /// public static XenRef create(Session session, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.blob_create(session.uuid, (_mime_type != null) ? _mime_type : "").parse()); } } public partial class Bond { // Backward compatibility for Bond.create in XenServer 5.x. public static XenRef create(Session session, string _network, List> _members, string _mac) { if (Helper.APIVersionMeets(session, API_Version.API_1_9)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.0 or newer."); return XenRef.Create(session.proxy.bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "").parse()); } public static XenRef async_create(Session session, string _network, List> _members, string _mac) { if (Helper.APIVersionMeets(session, API_Version.API_1_9)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.0 or newer."); return XenRef.Create(session.proxy.async_bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "").parse()); } // Backward compatibility for Bond.create in XenServer 6.0. public static XenRef create(Session session, string _network, List> _members, string _mac, bond_mode _mode) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "", bond_mode_helper.ToString(_mode)).parse()); } public static XenRef async_create(Session session, string _network, List> _members, string _mac, bond_mode _mode) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_bond_create(session.uuid, (_network != null) ? _network : "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] { }, (_mac != null) ? _mac : "", bond_mode_helper.ToString(_mode)).parse()); } } public partial class Host { /// /// Backward compatibility for Host.create_new_blob in XenServer 6.0. /// public static XenRef create_new_blob(Session session, string _host, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } /// /// Backward compatibility for Host.async_create_new_blob in XenServer 6.0. /// public static XenRef async_create_new_blob(Session session, string _host, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_host_create_new_blob(session.uuid, (_host != null) ? _host : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } } public partial class Network { /// /// Backward compatibility for Network.create_new_blob in XenServer 6.0. /// public static XenRef create_new_blob(Session session, string _network, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.network_create_new_blob(session.uuid, (_network != null) ? _network : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } /// /// Backward compatibility for Network.async_create_new_blob in XenServer 6.0. /// public static XenRef async_create_new_blob(Session session, string _network, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_network_create_new_blob(session.uuid, (_network != null) ? _network : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } } public partial class PIF { /// /// Backward compatibility for PIF.db_introduce in XenServer 6.0. /// public static XenRef db_introduce(Session session, string _device, string _network, string _host, string _mac, long _mtu, long _vlan, bool _physical, ip_configuration_mode _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Dictionary _other_config, bool _disallow_unplug) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.pif_db_introduce(session.uuid, (_device != null) ? _device : "", (_network != null) ? _network : "", (_host != null) ? _host : "", (_mac != null) ? _mac : "", _mtu.ToString(), _vlan.ToString(), _physical, ip_configuration_mode_helper.ToString(_ip_configuration_mode), (_ip != null) ? _ip : "", (_netmask != null) ? _netmask : "", (_gateway != null) ? _gateway : "", (_dns != null) ? _dns : "", (_bond_slave_of != null) ? _bond_slave_of : "", (_vlan_master_of != null) ? _vlan_master_of : "", _management, Maps.convert_to_proxy_string_string(_other_config), _disallow_unplug).parse()); } /// /// Backward compatibility for PIF.async_db_introduce in XenServer 6.0. /// public static XenRef async_db_introduce(Session session, string _device, string _network, string _host, string _mac, long _mtu, long _vlan, bool _physical, ip_configuration_mode _ip_configuration_mode, string _ip, string _netmask, string _gateway, string _dns, string _bond_slave_of, string _vlan_master_of, bool _management, Dictionary _other_config, bool _disallow_unplug) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_pif_db_introduce(session.uuid, (_device != null) ? _device : "", (_network != null) ? _network : "", (_host != null) ? _host : "", (_mac != null) ? _mac : "", _mtu.ToString(), _vlan.ToString(), _physical, ip_configuration_mode_helper.ToString(_ip_configuration_mode), (_ip != null) ? _ip : "", (_netmask != null) ? _netmask : "", (_gateway != null) ? _gateway : "", (_dns != null) ? _dns : "", (_bond_slave_of != null) ? _bond_slave_of : "", (_vlan_master_of != null) ? _vlan_master_of : "", _management, Maps.convert_to_proxy_string_string(_other_config), _disallow_unplug).parse()); } } public partial class Pool : XenObject { /// /// Backward compatibility for Pool.create_new_blob in XenServer 6.0. /// public static XenRef create_new_blob(Session session, string _pool, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.pool_create_new_blob(session.uuid, (_pool != null) ? _pool : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } /// /// Backward compatibility for Pool.async_create_new_blob in XenServer 6.0. /// public static XenRef async_create_new_blob(Session session, string _pool, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_pool_create_new_blob(session.uuid, (_pool != null) ? _pool : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } } public partial class SR { /// /// Backward compatibility for SR.create_new_blob in XenServer 6.0. /// public static XenRef create_new_blob(Session session, string _sr, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.sr_create_new_blob(session.uuid, (_sr != null) ? _sr : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } /// /// Backward compatibility for SR.async_create_new_blob in XenServer 6.0. /// public static XenRef async_create_new_blob(Session session, string _sr, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_sr_create_new_blob(session.uuid, (_sr != null) ? _sr : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } } public partial class VDI { /// /// Backward compatibility for VDI.introduce in XenServer 6.0. /// public static XenRef introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary _other_config, string _location, Dictionary _xenstore_data, Dictionary _sm_config) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.vdi_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse()); } /// /// Backward compatibility for VDI.async_introduce in XenServer 6.0. /// public static XenRef async_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary _other_config, string _location, Dictionary _xenstore_data, Dictionary _sm_config) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_vdi_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse()); } /// /// Backward compatibility for VDI.db_introduce in XenServer 6.0. /// public static XenRef db_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary _other_config, string _location, Dictionary _xenstore_data, Dictionary _sm_config) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.vdi_db_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse()); } /// /// Backward compatibility for VDI.async_db_introduce in XenServer 6.0. /// public static XenRef async_db_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary _other_config, string _location, Dictionary _xenstore_data, Dictionary _sm_config) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_vdi_db_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse()); } } public partial class VM { /// /// Backward compatibility for VM.create_new_blob in XenServer 6.0. /// public static XenRef create_new_blob(Session session, string _vm, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.vm_create_new_blob(session.uuid, (_vm != null) ? _vm : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } /// /// Backward compatibility for VM.async_create_new_blob in XenServer 6.0. /// public static XenRef async_create_new_blob(Session session, string _vm, string _name, string _mime_type) { if (Helper.APIVersionMeets(session, API_Version.API_1_10)) System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer."); return XenRef.Create(session.proxy.async_vm_create_new_blob(session.uuid, (_vm != null) ? _vm : "", (_name != null) ? _name : "", (_mime_type != null) ? _mime_type : "").parse()); } } }