示例#1
0
        /// <summary>
        /// Update device details for a device by passing the updated details themselves.
        /// </summary>
        /// <param name="updatedDetails">The new state of DeviceDetails for the device.</param>
        /// <returns></returns>
        public TaskStatusInfo UpdateDeviceDetails(DeviceDetails updatedDetails)
        {
            var request = new DeviceDetailsRequest();

            MiscUtils.CopyProperties(updatedDetails, request);
            var taskStatusInfo = this.GetStorSimpleClient().DeviceDetails.UpdateDeviceDetails(request, this.GetCustomRequestHeaders());

            return(taskStatusInfo);
        }
示例#2
0
        /// <summary>
        /// Update device details for specified device given the specified data
        /// </summary>
        /// <param name="deviceDetails">Current device details for the device.</param>
        /// <param name="newName">New friendly name for the device. Null if its not to be changed</param>
        /// <param name="timeZone">New timeZone value for the device. Null if its not to be changed</param>
        /// <param name="secondaryDnsServer">New Secondary DNS Server address for the device. Null if its not to be changed</param>
        /// <param name="networkConfigs">An array or NetworkConfig objects for different interfaces. Null if its not to be changed</param>
        /// <returns></returns>
        public TaskStatusInfo UpdateDeviceDetails(DeviceDetails deviceDetails, string newName, TimeZoneInfo timeZone, IPAddress secondaryDnsServer, NetworkConfig[] networkConfigs)
        {
            // Update the object
            this.UpdateDeviceDetailsObject(deviceDetails, newName, timeZone, secondaryDnsServer, networkConfigs);
            // Copy stuff over from the DeviceDetails object into a new DeviceDetailsRequest object.
            var request = new DeviceDetailsRequest();

            MiscUtils.CopyProperties(deviceDetails, request);
            var taskStatusInfo = this.GetStorSimpleClient().DeviceDetails.UpdateDeviceDetails(request, this.GetCustomRequestHeaders());

            return(taskStatusInfo);
        }