Пример #1
0
 private ResourceModel GetResourceModel()
 {
     return(DevicesOperationsExtensions.Get(
                this.DataBoxEdgeManagementClient.Devices,
                this.Name,
                this.ResourceGroupName));
 }
 private PSDataBoxEdgeUpdateSummary GetUpdatedSummary()
 {
     return(new PSDataBoxEdgeUpdateSummary(DevicesOperationsExtensions.GetUpdateSummary(
                                               this.DataBoxEdgeManagementClient.Devices,
                                               this.Name,
                                               this.ResourceGroupName)));
 }
 private PSDataBoxEdgeDeviceExtendedInfo GetExtendedInfo()
 {
     return(new PSDataBoxEdgeDeviceExtendedInfo(DevicesOperationsExtensions.GetExtendedInformation(
                                                    this.DataBoxEdgeManagementClient.Devices,
                                                    this.Name,
                                                    this.ResourceGroupName)));
 }
 private bool InstallUpdates()
 {
     DevicesOperationsExtensions.InstallUpdates(
         this.DataBoxEdgeManagementClient.Devices,
         this.Name,
         this.ResourceGroupName);
     return(true);
 }
 private bool Remove()
 {
     DevicesOperationsExtensions.Delete(
         this.StackEdgeManagementClient.Devices,
         this.Name,
         this.ResourceGroupName);
     return(true);
 }
        private IList <PSDataBoxEdgeNetworkAdapter> GetNetworkSettings()
        {
            var networkSettings = new PSDataBoxEdgeNetworkSetting(DevicesOperationsExtensions.GetNetworkSettings(
                                                                      this.DataBoxEdgeManagementClient.Devices,
                                                                      this.Name,
                                                                      this.ResourceGroupName));

            return(networkSettings.NetworkAdapters);
        }
        private IPage <ResourceModel> ListResourceModel()
        {
            if (!string.IsNullOrEmpty(this.ResourceGroupName))
            {
                return(DevicesOperationsExtensions.ListByResourceGroup(
                           this.DataBoxEdgeManagementClient.Devices,
                           this.ResourceGroupName));
            }

            return(DevicesOperationsExtensions.ListBySubscription(
                       this.DataBoxEdgeManagementClient.Devices));
        }
Пример #8
0
        private PSResourceModel CreateResourceModel()
        {
            var dbe = new DataBoxEdgeDevice {
                Sku = new Sku(this.Sku), Location = this.Location
            };

            var device = new PSResourceModel(
                DevicesOperationsExtensions.CreateOrUpdate(
                    this.DataBoxEdgeManagementClient.Devices,
                    this.Name,
                    dbe,
                    this.ResourceGroupName));

            return(device);
        }