Skip to content

Commit babd00a

Browse files
authored
Merge branch 'preview' into worm-preview
2 parents 2b83dd2 + 8397da2 commit babd00a

File tree

371 files changed

+9240
-53275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+9240
-53275
lines changed

src/ResourceManager/Sql/Commands.Sql/help/Remove-AzureRmSqlServerAuditing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Server identifiers include the **ResourceGroupName** and **ServerName**.
2929

3030
### Example 1: Remove the auditing of an Azure SQL server
3131
```
32-
PS C:\>Remove-AzureRmSqlDatabaseAuditing -ResourceGroupName "ResourceGroup01" -ServerName "Server01"
32+
PS C:\>Remove-AzureRmSqlServerAuditing -ResourceGroupName "ResourceGroup01" -ServerName "Server01"
3333
```
3434

3535
This command removes the auditing of all the databases located on Server01 in resource group.

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Azs.Azurebridge.Admin.psd1

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Licensed under the MIT License. See License.txt in the project root for license
1717
RootModule = 'Azs.Azurebridge.Admin.psm1'
1818

1919
# Version number of this module.
20-
ModuleVersion = '0.1.1'
20+
ModuleVersion = '0.2.0'
2121

2222
# Supported PSEditions
2323
# CompatiblePSEditions = @()
@@ -38,7 +38,7 @@ Licensed under the MIT License. See License.txt in the project root for license
3838
Description = 'AzureBridge Admin Client'
3939

4040
# Minimum version of the Windows PowerShell engine required by this module
41-
# PowerShellVersion = ''
41+
PowerShellVersion = '5.0'
4242

4343
# Name of the Windows PowerShell host required by this module
4444
# PowerShellHostName = ''
@@ -56,8 +56,8 @@ Licensed under the MIT License. See License.txt in the project root for license
5656
# ProcessorArchitecture = ''
5757

5858
# Modules that must be imported into the global environment prior to importing this module
59-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; RequiredVersion = '3.4.1'; },
60-
@{ModuleName = 'AzureRM.Resources'; RequiredVersion = '4.4.1'; })
59+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '5.5.1'; },
60+
@{ModuleName = 'AzureRM.Resources'; ModuleVersion = '6.0.2'; })
6161

6262
# Assemblies that must be loaded prior to importing this module
6363
# RequiredAssemblies = @()
@@ -105,19 +105,28 @@ Licensed under the MIT License. See License.txt in the project root for license
105105
PSData = @{
106106

107107
# Tags applied to this module. These help with module discovery in online galleries.
108-
# Tags = @()
108+
Tags = @('AzureStack', 'AzureBridge', 'Marketplace')
109109

110110
# A URL to the license for this module.
111-
# LicenseUri = ''
111+
LicenseUri = 'https://aka.ms/azps-license'
112112

113113
# A URL to the main website for this project.
114-
# ProjectUri = ''
114+
ProjectUri = 'https://github.com/Azure/azure-powershell'
115115

116116
# A URL to an icon representing this module.
117117
# IconUri = ''
118118

119119
# ReleaseNotes of this module
120-
# ReleaseNotes = ''
120+
ReleaseNotes = '## 2018.8.12
121+
* Module dependencies updated
122+
* AzureRM.Profile
123+
* AzureRM.Resources
124+
* Support handling names of nested resources
125+
* Get-AzsAzureBridgeDownloadedProduct
126+
* Get-AzsAzureBridgeProduct
127+
* Remove-AzsAzureBridgeDownloadedProduct
128+
* Invoke-AzsAzureBridgeDownloadedProduct
129+
'
121130

122131
} # End of PSData hashtable
123132

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Azs.Azurebridge.Admin.psm1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ if (Test-Path -Path $ClrPath -PathType Container) {
2929
. (Join-Path -Path $PSScriptRoot -ChildPath 'Get-ApplicableFilters.ps1')
3030
. (Join-Path -Path $PSScriptRoot -ChildPath 'Test-FilteredResult.ps1')
3131
. (Join-Path -Path $PSScriptRoot -ChildPath 'Get-ArmResourceIdParameterValue.ps1')
32+
. (Join-Path -Path $PSScriptRoot -ChildPath 'Get-ResourceNameSuffix.ps1')
3233
$allPs1FilesPath = Join-Path -Path $PSScriptRoot -ChildPath 'Generated.PowerShell.Commands' | Join-Path -ChildPath '*.ps1'
3334
Get-ChildItem -Path $allPs1FilesPath -Recurse -File | ForEach-Object { . $_.FullName}

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/FormatFiles/Azs.AzureBridge.Admin.Type.ps1xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
<ScriptMethod>
2424
<Name>ToString</Name>
2525
<Script>
26-
$this | fl | Out-String
26+
Write-Output "`n"
27+
Write-Output "Hero : $($this.Hero)`n"
28+
Write-Output "Large : $($this.Large)`n"
29+
Write-Output "Medium : $($this.Medium)`n"
30+
Write-Output "Small : $($this.Small)`n"
2731
</Script>
2832
</ScriptMethod>
2933
</Members>
@@ -34,10 +38,10 @@
3438
<ScriptMethod>
3539
<Name>ToString</Name>
3640
<Script>
37-
$this | fl | Out-String
41+
$this.Version
3842
</Script>
3943
</ScriptMethod>
4044
</Members>
4145
</Type>
42-
46+
4347
</Types>

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsAzureBridgeActivation.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ function Get-AzsAzureBridgeActivation {
8282

8383
Process {
8484

85-
86-
8785
$NewServiceClient_params = @{
8886
FullClientTypeName = 'Microsoft.AzureStack.Management.AzureBridge.Admin.AzureBridgeAdminClient'
8987
}

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsAzureBridgeDownloadedProduct.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ function Get-AzsAzureBridgeDownloadedProduct {
9191

9292
Process {
9393

94-
95-
9694
$NewServiceClient_params = @{
9795
FullClientTypeName = 'Microsoft.AzureStack.Management.AzureBridge.Admin.AzureBridgeAdminClient'
9896
}
@@ -123,6 +121,7 @@ function Get-AzsAzureBridgeDownloadedProduct {
123121
Write-Verbose -Message 'Performing operation ListWithHttpMessagesAsync on $AzureBridgeAdminClient.'
124122
$TaskResult = $AzureBridgeAdminClient.DownloadedProducts.ListWithHttpMessagesAsync($ResourceGroupName, $ActivationName)
125123
} elseif ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
124+
$Name = Get-ResourceNameSuffix -ResourceName $Name
126125
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $AzureBridgeAdminClient.'
127126
$TaskResult = $AzureBridgeAdminClient.DownloadedProducts.GetWithHttpMessagesAsync($ResourceGroupName, $ActivationName, $Name)
128127
} else {

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsAzureBridgeProduct.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ function Get-AzsAzureBridgeProduct {
9191

9292
Process {
9393

94-
95-
9694
$NewServiceClient_params = @{
9795
FullClientTypeName = 'Microsoft.AzureStack.Management.AzureBridge.Admin.AzureBridgeAdminClient'
9896
}
@@ -107,7 +105,6 @@ function Get-AzsAzureBridgeProduct {
107105

108106
$AzureBridgeAdminClient = New-ServiceClient @NewServiceClient_params
109107

110-
111108
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
112109
$GetArmResourceIdParameterValue_params = @{
113110
IdTemplate = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.AzureBridge.Admin/activations/{activationName}/products/{productName}'
@@ -124,6 +121,7 @@ function Get-AzsAzureBridgeProduct {
124121
Write-Verbose -Message 'Performing operation ListWithHttpMessagesAsync on $AzureBridgeAdminClient.'
125122
$TaskResult = $AzureBridgeAdminClient.Products.ListWithHttpMessagesAsync($ResourceGroupName, $ActivationName)
126123
} elseif ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
124+
$Name = Get-ResourceNameSuffix -ResourceName $Name
127125
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $AzureBridgeAdminClient.'
128126
$TaskResult = $AzureBridgeAdminClient.Products.GetWithHttpMessagesAsync($ResourceGroupName, $ActivationName, $Name)
129127
} else {

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Invoke-AzsAzureBridgeProductDownload.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ function Invoke-AzsAzureBridgeProductDownload {
7575

7676
Process {
7777

78-
79-
8078
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8179
$GetArmResourceIdParameterValue_params = @{
8280
IdTemplate = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.AzureBridge.Admin/activations/{activationName}/Products/{productName}'
@@ -87,6 +85,8 @@ function Invoke-AzsAzureBridgeProductDownload {
8785
$ResourceGroupName = $ArmResourceIdParameterValues['resourceGroup']
8886
$activationName = $ArmResourceIdParameterValues['activationName']
8987
$Name = $ArmResourceIdParameterValues['productName']
88+
} else {
89+
$Name = Get-ResourceNameSuffix -ResourceName $Name
9090
}
9191

9292
if ($PSCmdlet.ShouldProcess("$Name" , "Start product download")) {

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Remove-AzsAzureBridgeDownloadedProduct.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ function Remove-AzsAzureBridgeDownloadedProduct {
8080

8181
Process {
8282

83-
84-
8583
if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
8684
$GetArmResourceIdParameterValue_params = @{
8785
IdTemplate = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.AzureBridge.Admin/activations/{activationName}/downloadedProducts/{productName}'
@@ -93,6 +91,8 @@ function Remove-AzsAzureBridgeDownloadedProduct {
9391
$ResourceGroupName = $ArmResourceIdParameterValues['resourceGroup']
9492
$activationName = $ArmResourceIdParameterValues['activationName']
9593
$Name = $ArmResourceIdParameterValues['productName']
94+
} else {
95+
$Name = Get-ResourceNameSuffix -ResourceName $Name
9696
}
9797

9898
if ($PSCmdlet.ShouldProcess("$Name" , "Delete the downloaded product")) {

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Get-ApplicableFilters.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ function Get-ApplicableFilters {
2121
$Filters
2222
)
2323

24-
$ErrorActionPreference = 'Stop'
2524
foreach ($filter in $Filters) {
2625
$res = @{
2726
Filter = $filter
@@ -31,7 +30,7 @@ function Get-ApplicableFilters {
3130
if (Test-WildcardFilter -Filter $filter) {
3231
$res['Strict'] = $true
3332
}
34-
}
33+
}
3534
elseif ($filter.Type -eq 'equalityOperator') {
3635
if (Test-EqualityFilter -Filter $filter) {
3736
$res['Strict'] = $true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
function Get-ResourceNameSuffix {
3+
param(
4+
[string]$ResourceName
5+
)
6+
if ($null -ne $ResourceName -and $ResourceName.Contains('/')) {
7+
$ResourceName = $ResourceName.Split("/")[-1]
8+
}
9+
return $ResourceName
10+
}

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Get-TaskResult.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ function Get-TaskResult {
5959
} catch {
6060
# Catch exception so no output.
6161
} finally {
62-
throw $Exception
62+
Write-Error -Exception $Exception
6363
}
6464
}
6565

66-
$ErrorActionPreference = 'Stop'
6766
$null = $TaskResult.AsyncWaitHandle.WaitOne()
6867
Write-Debug -Message "$($TaskResult | Out-String)"
6968

src/StackAdmin/Azs.AzureBridge.Admin/Module/Azs.AzureBridge.Admin/Test-FilteredResult.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function Test-FilteredResult {
2727
$Filter
2828
)
2929

30-
$ErrorActionPreference = 'Stop'
30+
3131
if ($Filter.Type -eq 'wildcard') {
3232
Test-WildcardFilterOnResult -Filter $Filter -Result $Result
3333
} elseif ($Filter.Type -eq 'equalityOperator') {
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Microsoft.AzureStack.Management.AzureBridge.Admin" version="0.1.0-preview" targetFramework="net45" />
4-
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.6.0" targetFramework="net45" />
5-
</packages>
4+
</packages>

src/StackAdmin/Azs.AzureBridge.Admin/Tests/src/Activation.Tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ InModuleScope Azs.AzureBridge.Admin {
7777
}
7878
}
7979

80+
AfterEach {
81+
$global:Client = $null
82+
}
83+
8084
It "TestListAzsAzureBridgeActivation" -Skip:$('TestListAzsAzureBridgeActivation' -in $global:SkippedTests) {
8185
$global:TestName = "TestListAzsAzureBridgeActivation"
8286
$Activations = Get-AzsAzureBridgeActivation -ResourceGroupName $global:ResourceGroupName

src/StackAdmin/Azs.AzureBridge.Admin/Tests/src/AzureBridgeProduct.Tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ InModuleScope Azs.AzureBridge.Admin {
7676
}
7777
}
7878

79+
AfterEach {
80+
$global:Client = $null
81+
}
82+
7983
Context "Get-AzsAzureBridgeProduct" {
8084

8185
It "TestListAzsAzureBridgeProduct" -Skip:$("TestListAzsAzureBridgeProduct" -in $global:SkippedTests) {

src/StackAdmin/Azs.AzureBridge.Admin/Tests/src/Common.ps1

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
216
# Test Variables
317
$global:SkippedTests = @(
418
"TestDownloadAzsAzureBridgeProductPipeline",
@@ -13,12 +27,17 @@ $global:ResourceGroupName = "azurestack-activation"
1327
$global:ProductName1 = "Canonical.UbuntuServer1710-ARM.1.0.6"
1428
$global:ProductName2 = "microsoft.docker-arm.1.1.0"
1529

30+
$global:Client = $null
31+
1632
# Run using mocked client
17-
if(-not $RunRaw) {
18-
$scriptBlock = {
19-
Get-MockClient -ClassName 'AzureBridgeAdminClient' -TestName $global:TestName -Verbose
20-
}
21-
Mock New-ServiceClient $scriptBlock -ModuleName $global:ModuleName
33+
if (-not $global:RunRaw) {
34+
$scriptBlock = {
35+
if ($null -eq $global:Client) {
36+
$global:Client = Get-MockClient -ClassName 'AzureBridgeAdminClient' -TestName $global:TestName -Verbose
37+
}
38+
return $global:Client
39+
}
40+
Mock New-ServiceClient $scriptBlock -ModuleName $global:ModuleName
2241
}
2342

2443
if (Test-Path "$PSScriptRoot\Override.ps1") {

src/StackAdmin/Azs.Backup.Admin/Help/Azs.Backup.Admin.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ Locale: en-US
88

99
# Azs.Backup.Admin Module
1010
## Description
11-
Preview release of the Backup administrator module that allows administrators to
12-
- Configure where backups are stored
13-
- Perform backups
14-
- List and restore completed backup
11+
{{Manually Enter Description Here}}
1512

1613
## Azs.Backup.Admin Cmdlets
1714
### [Get-AzsBackup](Get-AzsBackup.md)
1815
Returns a backup from a location based on name.
1916

20-
### [Get-AzsBackupLocation](Get-AzsBackupLocation.md)
21-
Returns the list of backup locations.
17+
### [Get-AzsBackupConfiguration](Get-AzsBackupConfiguration.md)
18+
Returns the list of backup configurations.
19+
20+
### [New-AzsEncryptionKeyBase64](New-AzsEncryptionKeyBase64.md)
21+
Generate encryption key for infrastructure backups.
2222

2323
### [Restore-AzsBackup](Restore-AzsBackup.md)
2424
Restore a backup.
2525

26-
### [Set-AzsBackupShare](Set-AzsBackupShare.md)
27-
Create a new backup location.
26+
### [Set-AzsBackupConfiguration](Set-AzsBackupConfiguration.md)
27+
Set the backup configuration at the specified location.
2828

2929
### [Start-AzsBackup](Start-AzsBackup.md)
3030
Back up a specific location.

0 commit comments

Comments
 (0)