Exemplo n.º 1
0
        internal void UpdateFromProxy(Proxy_Pool_update proxy)
        {
            uuid              = proxy.uuid == null ? null : (string)proxy.uuid;
            name_label        = proxy.name_label == null ? null : (string)proxy.name_label;
            name_description  = proxy.name_description == null ? null : (string)proxy.name_description;
            installation_size = proxy.installation_size == null ? 0 : long.Parse((string)proxy.installation_size);
            key = proxy.key == null ? null : (string)proxy.key;
            after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList <update_after_apply_guidance>(proxy.after_apply_guidance);
            vdi = proxy.vdi == null ? null : XenRef <VDI> .Create(proxy.vdi);

            hosts = proxy.hosts == null ? null : XenRef <Host> .Create(proxy.hosts);
        }
Exemplo n.º 2
0
        public Proxy_Pool_update ToProxy()
        {
            Proxy_Pool_update result_ = new Proxy_Pool_update();

            result_.uuid              = (uuid != null) ? uuid : "";
            result_.name_label        = (name_label != null) ? name_label : "";
            result_.name_description  = (name_description != null) ? name_description : "";
            result_.installation_size = installation_size.ToString();
            result_.key = (key != null) ? key : "";
            result_.after_apply_guidance = (after_apply_guidance != null) ? Helper.ObjectListToStringArray(after_apply_guidance) : new string[] {};
            result_.vdi   = (vdi != null) ? vdi : "";
            result_.hosts = (hosts != null) ? Helper.RefListToStringArray(hosts) : new string[] {};
            return(result_);
        }
Exemplo n.º 3
0
        internal void UpdateFromProxy(Proxy_Pool_update proxy)
        {
            uuid              = proxy.uuid == null ? null : (string)proxy.uuid;
            name_label        = proxy.name_label == null ? null : (string)proxy.name_label;
            name_description  = proxy.name_description == null ? null : (string)proxy.name_description;
            version           = proxy.version == null ? null : (string)proxy.version;
            installation_size = proxy.installation_size == null ? 0 : long.Parse((string)proxy.installation_size);
            key = proxy.key == null ? null : (string)proxy.key;
            after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList <update_after_apply_guidance>(proxy.after_apply_guidance);
            vdi = proxy.vdi == null ? null : XenRef <VDI> .Create(proxy.vdi);

            hosts = proxy.hosts == null ? null : XenRef <Host> .Create(proxy.hosts);

            other_config        = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
            enforce_homogeneity = (bool)proxy.enforce_homogeneity;
        }
Exemplo n.º 4
0
        public Proxy_Pool_update ToProxy()
        {
            Proxy_Pool_update result_ = new Proxy_Pool_update();

            result_.uuid              = uuid ?? "";
            result_.name_label        = name_label ?? "";
            result_.name_description  = name_description ?? "";
            result_.version           = version ?? "";
            result_.installation_size = installation_size.ToString();
            result_.key = key ?? "";
            result_.after_apply_guidance = (after_apply_guidance != null) ? Helper.ObjectListToStringArray(after_apply_guidance) : new string[] {};
            result_.vdi                 = vdi ?? "";
            result_.hosts               = (hosts != null) ? Helper.RefListToStringArray(hosts) : new string[] {};
            result_.other_config        = Maps.convert_to_proxy_string_string(other_config);
            result_.enforce_homogeneity = enforce_homogeneity;
            return(result_);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Creates a new Pool_update from a Proxy_Pool_update.
 /// </summary>
 /// <param name="proxy"></param>
 public Pool_update(Proxy_Pool_update proxy)
 {
     this.UpdateFromProxy(proxy);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Creates a new Pool_update from a Proxy_Pool_update.
 /// </summary>
 /// <param name="proxy"></param>
 public Pool_update(Proxy_Pool_update proxy)
 {
     UpdateFrom(proxy);
 }