Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CloudService] Update cloudservice #14360

Merged
merged 8 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update cloudservice
  • Loading branch information
wyunchi-ms committed Mar 2, 2021
commit 769f97902a8f10f6e48236a84465be582c517261
4 changes: 2 additions & 2 deletions src/CloudService/Az.CloudService.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 2020-12-02
# Generated on: 2021-03-02
#

@{
Expand Down Expand Up @@ -127,7 +127,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* First preview release for module Az.CloudService.'
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''
Expand Down
10 changes: 5 additions & 5 deletions src/CloudService/Az.CloudService.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
}
}
if(-not $accountsModule) {
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
if($hasAdequateVersion) {
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
}
}
}

if(-not $accountsModule) {
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
} elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
}
Write-Information "Loaded Module '$($accountsModule.Name)'"

Expand Down
2 changes: 1 addition & 1 deletion src/CloudService/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder

if($NoDocs) {
Write-Host -ForegroundColor Green 'Creating exports...'
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
} else {
Write-Host -ForegroundColor Green 'Creating exports and docs...'
$moduleDescription = 'Microsoft Azure PowerShell: CloudService cmdlets'
Expand Down
4 changes: 2 additions & 2 deletions src/CloudService/check-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
}

DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'

$tools = Join-Path $PSScriptRoot 'tools'
Expand All @@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS
if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
Set-Location $resourceDir
$null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
$null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
$null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
Set-Location $HOME/.PSSharedModules/Resources
$null = .\build-module.ps1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Get the network interfaces of a cloud service.
.Description
Get the network interfaces of a cloud service.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-AzCloudServiceNetworkInterfaces
https://docs.microsoft.com/powershell/module/az.cloudservice/get-AzCloudServiceNetworkInterfaces
#>

function Get-AzCloudServiceNetworkInterfaces {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Get the public IP address of a cloud service.
.Description
Get the public IP address of a cloud service.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-AzCloudServicePublicIPAddress
https://docs.microsoft.com/powershell/module/az.cloudservice/get-AzCloudServicePublicIPAddress
#>
function Get-AzCloudServicePublicIPAddress {
param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Create a in-memory object for Diagnostics Extension

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.Extension
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/new-azcloudservicediagnosticsextension
#>

function New-AzCloudServiceDiagnosticsExtension {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Create a in-memory object for Extension
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.Extension
.Link
https://docs.microsoft.com/en-us/powershell/module/az.CloudService/new-AzCloudServiceExtensionObject
https://docs.microsoft.com/powershell/module/az.CloudService/new-AzCloudServiceExtensionObject
#>
function New-AzCloudServiceExtensionObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.Extension')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Create a in-memory object for LoadBalancerConfiguration
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.LoadBalancerConfiguration
.Link
https://docs.microsoft.com/en-us/powershell/module/az.CloudService/new-AzCloudServiceLoadBalancerConfigurationObject
https://docs.microsoft.com/powershell/module/az.CloudService/new-AzCloudServiceLoadBalancerConfigurationObject
#>
function New-AzCloudServiceLoadBalancerConfigurationObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.LoadBalancerConfiguration')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Create a in-memory object for LoadBalancerFrontendIPConfiguration
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.LoadBalancerFrontendIPConfiguration
.Link
https://docs.microsoft.com/en-us/powershell/module/az.CloudService/new-AzCloudServiceLoadBalancerFrontendIPConfigurationObject
https://docs.microsoft.com/powershell/module/az.CloudService/new-AzCloudServiceLoadBalancerFrontendIPConfigurationObject
#>
function New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.LoadBalancerFrontendIPConfiguration')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
Create a in-memory object for Remote Desktop Extension
.Description
Create a in-memory object for Remote Desktop Extension

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.Extension
.Link
https://docs.microsoft.com/en-us/powershell/module/az.CloudService/new-azcloudserviceremotedesktopextensionobject
#>

function New-AzCloudServiceRemoteDesktopExtensionObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Create a in-memory object for CloudServiceRoleProfileProperties
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.CloudServiceRoleProfileProperties
.Link
https://docs.microsoft.com/en-us/powershell/module/az.CloudService/new-AzCloudServiceRoleProfilePropertiesObject
https://docs.microsoft.com/powershell/module/az.CloudService/new-AzCloudServiceRoleProfilePropertiesObject
#>
function New-AzCloudServiceRoleProfilePropertiesObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.CloudServiceRoleProfileProperties')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Create a in-memory object for Secret Group
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.CloudServiceVaultSecretGroup
.Link
https://docs.microsoft.com/en-us/powershell/module/az.CloudService/new-AzCloudServiceVaultSecretGroupObject
https://docs.microsoft.com/powershell/module/az.CloudService/new-AzCloudServiceVaultSecretGroupObject
#>

function New-AzCloudServiceVaultSecretGroupObject {
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/CloudService/custom/Switch-AzCloudService.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Swaps VIPs between two cloud service (extended support) load balancers.
Swaps VIPs between two cloud service (extended support) load balancers.

.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/Switch-AzCloudService
https://docs.microsoft.com/powershell/module/az.cloudservice/Switch-AzCloudService

#>
function Switch-AzCloudService {
Expand Down
8 changes: 4 additions & 4 deletions src/CloudService/custom/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ These provide functionality to our HTTP pipeline and other useful features. In s

### Attributes
For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.DescriptionAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.DescriptionAttribute`
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.DoNotExportAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.CloudService`.
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.InternalExportAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.InternalExportAttribute`
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.CloudService`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ProfileAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.CloudService.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
2 changes: 1 addition & 1 deletion src/CloudService/exports/Get-AzCloudService.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ INPUTOBJECT <ICloudServiceIdentity>: Identity Parameter
[SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
[UpdateDomain <Int32?>]: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-azcloudservice
https://docs.microsoft.com/powershell/module/az.cloudservice/get-azcloudservice
#>
function Get-AzCloudService {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.ICloudService])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ PS C:\>$cloudServiceInstanceView.ToJsonString()
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.ICloudServiceInstanceView
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-azcloudserviceinstanceview
https://docs.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceinstanceview
#>
function Get-AzCloudServiceInstanceView {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.ICloudServiceInstanceView])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ CLOUDSERVICE <CloudService>: CloudService instance.
[(Any) <String>]: This indicates any property can be added to this object.
[UpgradeMode <CloudServiceUpgradeMode?>]: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br /> If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-AzCloudServiceNetworkInterfaces
https://docs.microsoft.com/powershell/module/az.cloudservice/get-AzCloudServiceNetworkInterfaces
#>
function Get-AzCloudServiceNetworkInterfaces {
[CmdletBinding(DefaultParameterSetName='CloudServiceName', PositionalBinding=$false)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CLOUDSERVICE <CloudService>: CloudService instance.
[(Any) <String>]: This indicates any property can be added to this object.
[UpgradeMode <CloudServiceUpgradeMode?>]: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br /> If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-AzCloudServicePublicIPAddress
https://docs.microsoft.com/powershell/module/az.cloudservice/get-AzCloudServicePublicIPAddress
#>
function Get-AzCloudServicePublicIPAddress {
[CmdletBinding(DefaultParameterSetName='CloudServiceName', PositionalBinding=$false)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ INPUTOBJECT <ICloudServiceIdentity>: Identity Parameter
[SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
[UpdateDomain <Int32?>]: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-azcloudserviceroleinstance
https://docs.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstance
#>
function Get-AzCloudServiceRoleInstance {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.IRoleInstance])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PS C:\> Get-AzCloudServiceRoleInstanceRemoteDesktopFile -ResourceGroupName "Cont
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceremotedesktopfile
https://docs.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceremotedesktopfile
#>
function Get-AzCloudServiceRoleInstanceRemoteDesktopFile {
[OutputType([System.Boolean])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Statuses PlatformFaultDomain PlatformUpdateDomain
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.IRoleInstanceView
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceview
https://docs.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceview
#>
function Get-AzCloudServiceRoleInstanceView {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.IRoleInstanceView])]
Expand Down
2 changes: 1 addition & 1 deletion src/CloudService/exports/Invoke-AzCloudServiceRebuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ INPUTOBJECT <ICloudServiceIdentity>: Identity Parameter
[SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
[UpdateDomain <Int32?>]: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/invoke-azcloudservicerebuild
https://docs.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudservicerebuild
#>
function Invoke-AzCloudServiceRebuild {
[OutputType([System.Boolean])]
Expand Down
2 changes: 1 addition & 1 deletion src/CloudService/exports/Invoke-AzCloudServiceReimage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ INPUTOBJECT <ICloudServiceIdentity>: Identity Parameter
[SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
[UpdateDomain <Int32?>]: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.cloudservice/invoke-azcloudservicereimage
https://docs.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudservicereimage
#>
function Invoke-AzCloudServiceReimage {
[OutputType([System.Boolean])]
Expand Down
Loading