示例#1
0
        public bool DeepEquals(Bond other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._master, other._master) &&
                   Helper.AreEqual2(this._slaves, other._slaves) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._primary_slave, other._primary_slave) &&
                   Helper.AreEqual2(this._mode, other._mode) &&
                   Helper.AreEqual2(this._properties, other._properties) &&
                   Helper.AreEqual2(this._links_up, other._links_up));
        }
示例#2
0
文件: PCI.cs 项目: ryu2048/xenadmin
        public bool DeepEquals(PCI other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._class_name, other._class_name) &&
                   Helper.AreEqual2(this._vendor_name, other._vendor_name) &&
                   Helper.AreEqual2(this._device_name, other._device_name) &&
                   Helper.AreEqual2(this._host, other._host) &&
                   Helper.AreEqual2(this._pci_id, other._pci_id) &&
                   Helper.AreEqual2(this._dependencies, other._dependencies) &&
                   Helper.AreEqual2(this._other_config, other._other_config));
        }
示例#3
0
文件: VGPU.cs 项目: ryu2048/xenadmin
        public bool DeepEquals(VGPU other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._VM, other._VM) &&
                   Helper.AreEqual2(this._GPU_group, other._GPU_group) &&
                   Helper.AreEqual2(this._device, other._device) &&
                   Helper.AreEqual2(this._currently_attached, other._currently_attached) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._type, other._type) &&
                   Helper.AreEqual2(this._resident_on, other._resident_on));
        }
示例#4
0
        public override string SaveChanges(Session session, string opaqueRef, VMSS server)
        {
            if (opaqueRef == null)
            {
                Proxy_VMSS p = this.ToProxy();
                return(session.proxy.vmss_create(session.uuid, p).parse());
            }
            else
            {
                if (!Helper.AreEqual2(_name_label, server._name_label))
                {
                    VMSS.set_name_label(session, opaqueRef, _name_label);
                }
                if (!Helper.AreEqual2(_name_description, server._name_description))
                {
                    VMSS.set_name_description(session, opaqueRef, _name_description);
                }
                if (!Helper.AreEqual2(_enabled, server._enabled))
                {
                    VMSS.set_enabled(session, opaqueRef, _enabled);
                }
                if (!Helper.AreEqual2(_type, server._type))
                {
                    VMSS.set_type(session, opaqueRef, _type);
                }
                if (!Helper.AreEqual2(_retained_snapshots, server._retained_snapshots))
                {
                    VMSS.set_retained_snapshots(session, opaqueRef, _retained_snapshots);
                }
                if (!Helper.AreEqual2(_frequency, server._frequency))
                {
                    VMSS.set_frequency(session, opaqueRef, _frequency);
                }
                if (!Helper.AreEqual2(_schedule, server._schedule))
                {
                    VMSS.set_schedule(session, opaqueRef, _schedule);
                }

                return(null);
            }
        }
示例#5
0
        public override string SaveChanges(Session session, string opaqueRef, VMSS server)
        {
            if (opaqueRef == null)
            {
                var reference = create(session, this);
                return(reference == null ? null : reference.opaque_ref);
            }
            else
            {
                if (!Helper.AreEqual2(_name_label, server._name_label))
                {
                    VMSS.set_name_label(session, opaqueRef, _name_label);
                }
                if (!Helper.AreEqual2(_name_description, server._name_description))
                {
                    VMSS.set_name_description(session, opaqueRef, _name_description);
                }
                if (!Helper.AreEqual2(_enabled, server._enabled))
                {
                    VMSS.set_enabled(session, opaqueRef, _enabled);
                }
                if (!Helper.AreEqual2(_type, server._type))
                {
                    VMSS.set_type(session, opaqueRef, _type);
                }
                if (!Helper.AreEqual2(_retained_snapshots, server._retained_snapshots))
                {
                    VMSS.set_retained_snapshots(session, opaqueRef, _retained_snapshots);
                }
                if (!Helper.AreEqual2(_frequency, server._frequency))
                {
                    VMSS.set_frequency(session, opaqueRef, _frequency);
                }
                if (!Helper.AreEqual2(_schedule, server._schedule))
                {
                    VMSS.set_schedule(session, opaqueRef, _schedule);
                }

                return(null);
            }
        }
示例#6
0
        public override string SaveChanges(Session session, string opaqueRef, VM_appliance server)
        {
            if (opaqueRef == null)
            {
                Proxy_VM_appliance p = this.ToProxy();
                return(session.proxy.vm_appliance_create(session.uuid, p).parse());
            }
            else
            {
                if (!Helper.AreEqual2(_name_label, server._name_label))
                {
                    VM_appliance.set_name_label(session, opaqueRef, _name_label);
                }
                if (!Helper.AreEqual2(_name_description, server._name_description))
                {
                    VM_appliance.set_name_description(session, opaqueRef, _name_description);
                }

                return(null);
            }
        }
示例#7
0
        public bool DeepEquals(Pool_update other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._name_label, other._name_label) &&
                   Helper.AreEqual2(this._name_description, other._name_description) &&
                   Helper.AreEqual2(this._version, other._version) &&
                   Helper.AreEqual2(this._installation_size, other._installation_size) &&
                   Helper.AreEqual2(this._key, other._key) &&
                   Helper.AreEqual2(this._after_apply_guidance, other._after_apply_guidance) &&
                   Helper.AreEqual2(this._vdi, other._vdi) &&
                   Helper.AreEqual2(this._hosts, other._hosts));
        }
示例#8
0
        public bool DeepEquals(PGPU other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._PCI, other._PCI) &&
                   Helper.AreEqual2(this._GPU_group, other._GPU_group) &&
                   Helper.AreEqual2(this._host, other._host) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._supported_VGPU_types, other._supported_VGPU_types) &&
                   Helper.AreEqual2(this._enabled_VGPU_types, other._enabled_VGPU_types) &&
                   Helper.AreEqual2(this._resident_VGPUs, other._resident_VGPUs) &&
                   Helper.AreEqual2(this._supported_VGPU_max_capacities, other._supported_VGPU_max_capacities));
        }
示例#9
0
        public override string SaveChanges(Session session, string opaqueRef, Secret server)
        {
            if (opaqueRef == null)
            {
                Proxy_Secret p = this.ToProxy();
                return(session.proxy.secret_create(session.uuid, p).parse());
            }
            else
            {
                if (!Helper.AreEqual2(_value, server._value))
                {
                    Secret.set_value(session, opaqueRef, _value);
                }
                if (!Helper.AreEqual2(_other_config, server._other_config))
                {
                    Secret.set_other_config(session, opaqueRef, _other_config);
                }

                return(null);
            }
        }
示例#10
0
文件: User.cs 项目: hl10502/XenCenter
        public override string SaveChanges(Session session, string opaqueRef, User server)
        {
            if (opaqueRef == null)
            {
                Proxy_User p = this.ToProxy();
                return(session.proxy.user_create(session.uuid, p).parse());
            }
            else
            {
                if (!Helper.AreEqual2(_fullname, server._fullname))
                {
                    User.set_fullname(session, opaqueRef, _fullname);
                }
                if (!Helper.AreEqual2(_other_config, server._other_config))
                {
                    User.set_other_config(session, opaqueRef, _other_config);
                }

                return(null);
            }
        }
示例#11
0
        public override string SaveChanges(Session session, string opaqueRef, Blob server)
        {
            if (opaqueRef == null)
            {
                System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
                return("");
            }
            else
            {
                if (!Helper.AreEqual2(_name_label, server._name_label))
                {
                    Blob.set_name_label(session, opaqueRef, _name_label);
                }
                if (!Helper.AreEqual2(_name_description, server._name_description))
                {
                    Blob.set_name_description(session, opaqueRef, _name_description);
                }

                return(null);
            }
        }
示例#12
0
        public override string SaveChanges(Session session, string opaqueRef, VM_appliance server)
        {
            if (opaqueRef == null)
            {
                var reference = create(session, this);
                return(reference == null ? null : reference.opaque_ref);
            }
            else
            {
                if (!Helper.AreEqual2(_name_label, server._name_label))
                {
                    VM_appliance.set_name_label(session, opaqueRef, _name_label);
                }
                if (!Helper.AreEqual2(_name_description, server._name_description))
                {
                    VM_appliance.set_name_description(session, opaqueRef, _name_description);
                }

                return(null);
            }
        }
示例#13
0
文件: Tunnel.cs 项目: borzel/xenadmin
        public override string SaveChanges(Session session, string opaqueRef, Tunnel server)
        {
            if (opaqueRef == null)
            {
                System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
                return("");
            }
            else
            {
                if (!Helper.AreEqual2(_status, server._status))
                {
                    Tunnel.set_status(session, opaqueRef, _status);
                }
                if (!Helper.AreEqual2(_other_config, server._other_config))
                {
                    Tunnel.set_other_config(session, opaqueRef, _other_config);
                }

                return(null);
            }
        }
示例#14
0
        public bool DeepEquals(Pool_patch other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._name_label, other._name_label) &&
                   Helper.AreEqual2(this._name_description, other._name_description) &&
                   Helper.AreEqual2(this._version, other._version) &&
                   Helper.AreEqual2(this._size, other._size) &&
                   Helper.AreEqual2(this._pool_applied, other._pool_applied) &&
                   Helper.AreEqual2(this._host_patches, other._host_patches) &&
                   Helper.AreEqual2(this._after_apply_guidance, other._after_apply_guidance) &&
                   Helper.AreEqual2(this._other_config, other._other_config));
        }
示例#15
0
        public override string SaveChanges(Session session, string opaqueRef, User server)
        {
            if (opaqueRef == null)
            {
                var reference = create(session, this);
                return(reference == null ? null : reference.opaque_ref);
            }
            else
            {
                if (!Helper.AreEqual2(_fullname, server._fullname))
                {
                    User.set_fullname(session, opaqueRef, _fullname);
                }
                if (!Helper.AreEqual2(_other_config, server._other_config))
                {
                    User.set_other_config(session, opaqueRef, _other_config);
                }

                return(null);
            }
        }
示例#16
0
文件: PBD.cs 项目: hl10502/XenCenter
        public override string SaveChanges(Session session, string opaqueRef, PBD server)
        {
            if (opaqueRef == null)
            {
                Proxy_PBD p = this.ToProxy();
                return(session.proxy.pbd_create(session.uuid, p).parse());
            }
            else
            {
                if (!Helper.AreEqual2(_other_config, server._other_config))
                {
                    PBD.set_other_config(session, opaqueRef, _other_config);
                }
                if (!Helper.AreEqual2(_device_config, server._device_config))
                {
                    PBD.set_device_config(session, opaqueRef, _device_config);
                }

                return(null);
            }
        }
示例#17
0
        public bool DeepEquals(PIF other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._device, other._device) &&
                   Helper.AreEqual2(this._network, other._network) &&
                   Helper.AreEqual2(this._host, other._host) &&
                   Helper.AreEqual2(this._MAC, other._MAC) &&
                   Helper.AreEqual2(this._MTU, other._MTU) &&
                   Helper.AreEqual2(this._VLAN, other._VLAN) &&
                   Helper.AreEqual2(this._metrics, other._metrics) &&
                   Helper.AreEqual2(this._physical, other._physical) &&
                   Helper.AreEqual2(this._currently_attached, other._currently_attached) &&
                   Helper.AreEqual2(this._ip_configuration_mode, other._ip_configuration_mode) &&
                   Helper.AreEqual2(this._IP, other._IP) &&
                   Helper.AreEqual2(this._netmask, other._netmask) &&
                   Helper.AreEqual2(this._gateway, other._gateway) &&
                   Helper.AreEqual2(this._DNS, other._DNS) &&
                   Helper.AreEqual2(this._bond_slave_of, other._bond_slave_of) &&
                   Helper.AreEqual2(this._bond_master_of, other._bond_master_of) &&
                   Helper.AreEqual2(this._VLAN_master_of, other._VLAN_master_of) &&
                   Helper.AreEqual2(this._VLAN_slave_of, other._VLAN_slave_of) &&
                   Helper.AreEqual2(this._management, other._management) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._disallow_unplug, other._disallow_unplug) &&
                   Helper.AreEqual2(this._tunnel_access_PIF_of, other._tunnel_access_PIF_of) &&
                   Helper.AreEqual2(this._tunnel_transport_PIF_of, other._tunnel_transport_PIF_of) &&
                   Helper.AreEqual2(this._ipv6_configuration_mode, other._ipv6_configuration_mode) &&
                   Helper.AreEqual2(this._IPv6, other._IPv6) &&
                   Helper.AreEqual2(this._ipv6_gateway, other._ipv6_gateway) &&
                   Helper.AreEqual2(this._primary_address_type, other._primary_address_type));
        }
示例#18
0
        public bool DeepEquals(VM_appliance other, bool ignoreCurrentOperations)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (!ignoreCurrentOperations && !Helper.AreEqual2(this.current_operations, other.current_operations))
            {
                return(false);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._name_label, other._name_label) &&
                   Helper.AreEqual2(this._name_description, other._name_description) &&
                   Helper.AreEqual2(this._allowed_operations, other._allowed_operations) &&
                   Helper.AreEqual2(this._VMs, other._VMs));
        }
示例#19
0
        public bool DeepEquals(GPU_group other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._name_label, other._name_label) &&
                   Helper.AreEqual2(this._name_description, other._name_description) &&
                   Helper.AreEqual2(this._PGPUs, other._PGPUs) &&
                   Helper.AreEqual2(this._VGPUs, other._VGPUs) &&
                   Helper.AreEqual2(this._GPU_types, other._GPU_types) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._allocation_algorithm, other._allocation_algorithm) &&
                   Helper.AreEqual2(this._supported_VGPU_types, other._supported_VGPU_types) &&
                   Helper.AreEqual2(this._enabled_VGPU_types, other._enabled_VGPU_types));
        }
示例#20
0
        public bool DeepEquals(VMSS other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._name_label, other._name_label) &&
                   Helper.AreEqual2(this._name_description, other._name_description) &&
                   Helper.AreEqual2(this._enabled, other._enabled) &&
                   Helper.AreEqual2(this._type, other._type) &&
                   Helper.AreEqual2(this._retained_snapshots, other._retained_snapshots) &&
                   Helper.AreEqual2(this._frequency, other._frequency) &&
                   Helper.AreEqual2(this._schedule, other._schedule) &&
                   Helper.AreEqual2(this._last_run_time, other._last_run_time) &&
                   Helper.AreEqual2(this._VMs, other._VMs));
        }
示例#21
0
        public bool DeepEquals(Cluster_host other, bool ignoreCurrentOperations)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (!ignoreCurrentOperations && !Helper.AreEqual2(this.current_operations, other.current_operations))
            {
                return(false);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._cluster, other._cluster) &&
                   Helper.AreEqual2(this._host, other._host) &&
                   Helper.AreEqual2(this._enabled, other._enabled) &&
                   Helper.AreEqual2(this._allowed_operations, other._allowed_operations) &&
                   Helper.AreEqual2(this._other_config, other._other_config));
        }
示例#22
0
        public bool DeepEquals(VM_guest_metrics other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._os_version, other._os_version) &&
                   Helper.AreEqual2(this._PV_drivers_version, other._PV_drivers_version) &&
                   Helper.AreEqual2(this._PV_drivers_up_to_date, other._PV_drivers_up_to_date) &&
                   Helper.AreEqual2(this._memory, other._memory) &&
                   Helper.AreEqual2(this._disks, other._disks) &&
                   Helper.AreEqual2(this._networks, other._networks) &&
                   Helper.AreEqual2(this._other, other._other) &&
                   Helper.AreEqual2(this._last_updated, other._last_updated) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._live, other._live));
        }
示例#23
0
文件: VGPU.cs 项目: paitha28/xenadmin
        public bool DeepEquals(VGPU other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._VM, other._VM) &&
                   Helper.AreEqual2(this._GPU_group, other._GPU_group) &&
                   Helper.AreEqual2(this._device, other._device) &&
                   Helper.AreEqual2(this._currently_attached, other._currently_attached) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._type, other._type) &&
                   Helper.AreEqual2(this._resident_on, other._resident_on) &&
                   Helper.AreEqual2(this._scheduled_to_be_resident_on, other._scheduled_to_be_resident_on) &&
                   Helper.AreEqual2(this._compatibility_metadata, other._compatibility_metadata) &&
                   Helper.AreEqual2(this._extra_args, other._extra_args));
        }
示例#24
0
文件: VUSB.cs 项目: ywwseu/xenadmin
        public bool DeepEquals(VUSB other, bool ignoreCurrentOperations)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (!ignoreCurrentOperations && !Helper.AreEqual2(this.current_operations, other.current_operations))
            {
                return(false);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._allowed_operations, other._allowed_operations) &&
                   Helper.AreEqual2(this._VM, other._VM) &&
                   Helper.AreEqual2(this._USB_group, other._USB_group) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._currently_attached, other._currently_attached));
        }
示例#25
0
        public bool DeepEquals(VGPU_type other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._vendor_name, other._vendor_name) &&
                   Helper.AreEqual2(this._model_name, other._model_name) &&
                   Helper.AreEqual2(this._framebuffer_size, other._framebuffer_size) &&
                   Helper.AreEqual2(this._max_heads, other._max_heads) &&
                   Helper.AreEqual2(this._max_resolution_x, other._max_resolution_x) &&
                   Helper.AreEqual2(this._max_resolution_y, other._max_resolution_y) &&
                   Helper.AreEqual2(this._supported_on_PGPUs, other._supported_on_PGPUs) &&
                   Helper.AreEqual2(this._enabled_on_PGPUs, other._enabled_on_PGPUs) &&
                   Helper.AreEqual2(this._VGPUs, other._VGPUs) &&
                   Helper.AreEqual2(this._supported_on_GPU_groups, other._supported_on_GPU_groups) &&
                   Helper.AreEqual2(this._enabled_on_GPU_groups, other._enabled_on_GPU_groups));
        }
示例#26
0
文件: PGPU.cs 项目: ywwseu/xenadmin
        public bool DeepEquals(PGPU other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._PCI, other._PCI) &&
                   Helper.AreEqual2(this._GPU_group, other._GPU_group) &&
                   Helper.AreEqual2(this._host, other._host) &&
                   Helper.AreEqual2(this._other_config, other._other_config) &&
                   Helper.AreEqual2(this._supported_VGPU_types, other._supported_VGPU_types) &&
                   Helper.AreEqual2(this._enabled_VGPU_types, other._enabled_VGPU_types) &&
                   Helper.AreEqual2(this._resident_VGPUs, other._resident_VGPUs) &&
                   Helper.AreEqual2(this._supported_VGPU_max_capacities, other._supported_VGPU_max_capacities) &&
                   Helper.AreEqual2(this._dom0_access, other._dom0_access) &&
                   Helper.AreEqual2(this._is_system_display_device, other._is_system_display_device) &&
                   Helper.AreEqual2(this._compatibility_metadata, other._compatibility_metadata));
        }
示例#27
0
        public bool DeepEquals(VM_metrics other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Helper.AreEqual2(this._uuid, other._uuid) &&
                   Helper.AreEqual2(this._memory_actual, other._memory_actual) &&
                   Helper.AreEqual2(this._VCPUs_number, other._VCPUs_number) &&
                   Helper.AreEqual2(this._VCPUs_utilisation, other._VCPUs_utilisation) &&
                   Helper.AreEqual2(this._VCPUs_CPU, other._VCPUs_CPU) &&
                   Helper.AreEqual2(this._VCPUs_params, other._VCPUs_params) &&
                   Helper.AreEqual2(this._VCPUs_flags, other._VCPUs_flags) &&
                   Helper.AreEqual2(this._state, other._state) &&
                   Helper.AreEqual2(this._start_time, other._start_time) &&
                   Helper.AreEqual2(this._install_time, other._install_time) &&
                   Helper.AreEqual2(this._last_updated, other._last_updated) &&
                   Helper.AreEqual2(this._other_config, other._other_config));
        }
示例#28
0
文件: VMPP.cs 项目: ryu2048/xenadmin
        public override string SaveChanges(Session session, string opaqueRef, VMPP server)
        {
            if (opaqueRef == null)
            {
                Proxy_VMPP p = this.ToProxy();
                return(session.proxy.vmpp_create(session.uuid, p).parse());
            }
            else
            {
                if (!Helper.AreEqual2(_name_label, server._name_label))
                {
                    VMPP.set_name_label(session, opaqueRef, _name_label);
                }
                if (!Helper.AreEqual2(_name_description, server._name_description))
                {
                    VMPP.set_name_description(session, opaqueRef, _name_description);
                }
                if (!Helper.AreEqual2(_is_policy_enabled, server._is_policy_enabled))
                {
                    VMPP.set_is_policy_enabled(session, opaqueRef, _is_policy_enabled);
                }
                if (!Helper.AreEqual2(_backup_type, server._backup_type))
                {
                    VMPP.set_backup_type(session, opaqueRef, _backup_type);
                }
                if (!Helper.AreEqual2(_backup_retention_value, server._backup_retention_value))
                {
                    VMPP.set_backup_retention_value(session, opaqueRef, _backup_retention_value);
                }
                if (!Helper.AreEqual2(_backup_frequency, server._backup_frequency))
                {
                    VMPP.set_backup_frequency(session, opaqueRef, _backup_frequency);
                }
                if (!Helper.AreEqual2(_backup_schedule, server._backup_schedule))
                {
                    VMPP.set_backup_schedule(session, opaqueRef, _backup_schedule);
                }
                if (!Helper.AreEqual2(_archive_target_type, server._archive_target_type))
                {
                    VMPP.set_archive_target_type(session, opaqueRef, _archive_target_type);
                }
                if (!Helper.AreEqual2(_archive_target_config, server._archive_target_config))
                {
                    VMPP.set_archive_target_config(session, opaqueRef, _archive_target_config);
                }
                if (!Helper.AreEqual2(_archive_frequency, server._archive_frequency))
                {
                    VMPP.set_archive_frequency(session, opaqueRef, _archive_frequency);
                }
                if (!Helper.AreEqual2(_archive_schedule, server._archive_schedule))
                {
                    VMPP.set_archive_schedule(session, opaqueRef, _archive_schedule);
                }
                if (!Helper.AreEqual2(_is_alarm_enabled, server._is_alarm_enabled))
                {
                    VMPP.set_is_alarm_enabled(session, opaqueRef, _is_alarm_enabled);
                }
                if (!Helper.AreEqual2(_alarm_config, server._alarm_config))
                {
                    VMPP.set_alarm_config(session, opaqueRef, _alarm_config);
                }

                return(null);
            }
        }