예제 #1
0
        internal void UpdateFromProxy(Proxy_SR proxy)
        {
            this.uuid               = (proxy.uuid == null) ? null : proxy.uuid;
            this.name_label         = (proxy.name_label == null) ? null : proxy.name_label;
            this.name_description   = (proxy.name_description == null) ? null : proxy.name_description;
            this.allowed_operations = (proxy.allowed_operations == null) ? null : Helper.StringArrayToEnumList <storage_operations>(proxy.allowed_operations);
            this.current_operations = (proxy.current_operations == null) ? null : Maps.convert_from_proxy_string_storage_operations(proxy.current_operations);
            this.VDIs               = (proxy.VDIs == null) ? null : XenRef <VDI> .Create(proxy.VDIs);

            this.PBDs = (proxy.PBDs == null) ? null : XenRef <PBD> .Create(proxy.PBDs);

            this.virtual_allocation   = (proxy.virtual_allocation == null) ? 0L : long.Parse(proxy.virtual_allocation);
            this.physical_utilisation = (proxy.physical_utilisation == null) ? 0L : long.Parse(proxy.physical_utilisation);
            this.physical_size        = (proxy.physical_size == null) ? 0L : long.Parse(proxy.physical_size);
            this.type                = (proxy.type == null) ? null : proxy.type;
            this.content_type        = (proxy.content_type == null) ? null : proxy.content_type;
            this.shared              = proxy.shared;
            this.other_config        = (proxy.other_config == null) ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
            this.tags                = (proxy.tags == null) ? new string[0] : proxy.tags;
            this.sm_config           = (proxy.sm_config == null) ? null : Maps.convert_from_proxy_string_string(proxy.sm_config);
            this.blobs               = (proxy.blobs == null) ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
            this.local_cache_enabled = proxy.local_cache_enabled;
            this.introduced_by       = (proxy.introduced_by == null) ? null : XenRef <DR_task> .Create(proxy.introduced_by);

            this.clustered = proxy.clustered;
        }
예제 #2
0
 public SR(Proxy_SR proxy)
 {
     this.UpdateFromProxy(proxy);
 }