Skip to content

Commit 0ea27fa

Browse files
author
Maddie Clayton
authored
Merge pull request Azure#6562 from Azure/release-2018-06-29
[6.4.0] Merge release --> master
2 parents 90eecf1 + 53e0edb commit 0ea27fa

File tree

3,111 files changed

+577618
-251812
lines changed

Some content is hidden

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

3,111 files changed

+577618
-251812
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ app.config
2626
*.userprefs
2727
*.sln.docstates
2828
.vscode
29+
*.userosscache
2930

3031
# Build results
3132
[Dd]ebug/
@@ -217,6 +218,8 @@ pingme.txt
217218
groupMapping*.json
218219
/tools/index.json
219220
/Package/index.json
221+
/tools/outputtypes.json
222+
/Package/outputtypes.json
220223

221224
*.msi
222225
*.wixpdb

ChangeLog.md

Lines changed: 216 additions & 141 deletions
Large diffs are not rendered by default.

ModuleMappings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
],
7171
"src/ResourceManager/DeviceProvisioningServices/": [
7272
"AzureRM.DeviceProvisioningServices"
73+
],
74+
"src/ResourceManager/DevSpaces/": [
75+
"AzureRM.DevSpaces"
7376
],
7477
"src/ResourceManager/DevTestLabs/": [
7578
"AzureRM.DevTestLabs"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ If there is a feature you would like to see in Azure PowerShell, please use the
156156

157157
If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](https://azure.github.io/guidelines/).
158158

159-
More information about contributing to this repo can be found in [CONTRIBUTING md](https://github.com/Azure/azure-powershell/blob/preview/CONTRIBUTING.md) and the [Azure PowerShell Developer Guide](https://github.com/Azure/azure-powershell/wiki/Azure-Powershell-Developer-Guide) folder.
159+
More information about contributing to this repo can be found in [CONTRIBUTING md](https://github.com/Azure/azure-powershell/blob/preview/CONTRIBUTING.md) and the [Azure PowerShell Developer Guide](https://github.com/Azure/azure-powershell/blob/preview/documentation/development-docs/azure-powershell-developer-guide.md) folder.
160160

161161
## Learn More
162162

TestMappings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
"src/ResourceManager/DeviceProvisioningServices/": [
7777
".\\src\\ResourceManager\\DeviceProvisioningServices\\Commands.DeviceProvisioningServices.Test\\bin\\Debug\\Microsoft.Azure.Commands.DeviceProvisioningServices.dll"
7878
],
79+
"src/ResourceManager/DevSpaces/": [
80+
".\\src\\ResourceManager\\DevSpaces\\Commands.DevSpaces.Test\\bin\\Debug\\Microsoft.Azure.Commands.DevSpaces.Test.dll"
81+
],
7982
"src/ResourceManager/DevTestLabs/": [],
8083
"src/ResourceManager/Dns/": [
8184
".\\src\\ResourceManager\\Dns\\Commands.Dns.Test\\bin\\Debug\\Microsoft.Azure.Commands.Dns.Test.dll"

build.proj

Lines changed: 259 additions & 155 deletions
Large diffs are not rendered by default.

documentation/Debugging-StaticAnalysis-Errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ _Note_: Sometimes the error listed in the .csv file can be a false positive (for
4242
We take breaking changes very seriously, so please be mindful about the violations that you suppress in our repo.
4343

4444
### Signature Issues
45-
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check [this page](https://github.com/Azure/azure-powershell/wiki/PowerShell-Cmdlet-Design-Guidelines) to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
45+
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check [this page](https://github.com/Azure/azure-powershell/blob/preview/documentation/development-docs/azure-powershell-design-guidelines.md) to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
4646

4747
- Download the `SignatureIssues.csv` file from the Jenkins build
4848
- Open the file using a text editor (such as VS Code) and copy each of the errors you'd like to suppress

documentation/breaking-changes/breaking-changes-attribute-help.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ Breaking changes in the cmdlet : Get-SomeObjectA
237237

238238
#### The output return type is changing
239239
```cs
240-
[CmdletOutputBreakingChange(typeof(List<Foo>), ReplacementCmdletOutputTypeName = "Dictionary<String, Foo>")]
241-
[Cmdlet(VerbsCommon.Get, "SomeObjectA"), OutputType(typeof(List<Foo>))]
240+
[CmdletOutputBreakingChange(typeof(Foo), ReplacementCmdletOutputTypeName = "Dictionary<String, Foo>")]
241+
[Cmdlet(VerbsCommon.Get, "SomeObjectA"), OutputType(typeof(Foo))]
242242
public class GetSomeObjectA : AzureRMCmdlet
243243
{
244244
protected override void BeginProcessing()

documentation/breaking-changes/breaking-changes-tool-help.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ When the type of the output is a generic, and one of the arguments of the generi
300300
For example, if we had a cmdlet `Get-SomeObject` that returned a list of `Foo` objects
301301

302302
```cs
303-
[Cmdlet(VerbsCommon.Get, "SomeObject"), OutputType(typeof(List<Foo>))]
303+
[Cmdlet(VerbsCommon.Get, "SomeObject"), OutputType(typeof(Foo))]
304304
public class GetSomeObject : Cmdlet
305305
{
306306
protected override void BeginProcessing()
@@ -313,7 +313,7 @@ public class GetSomeObject : Cmdlet
313313
but it now returns a list of `Bar` objects
314314

315315
```cs
316-
[Cmdlet(VerbsCommon.Get, "SomeObject"), OutputType(typeof(List<Bar>))]
316+
[Cmdlet(VerbsCommon.Get, "SomeObject"), OutputType(typeof(Bar))]
317317
```
318318

319319
the following script will no longer work since we are accessing properties of the `Foo` object that may not be a part of the `Bar` object

documentation/development-docs/generate-format.ps1xml-file.md

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,20 @@ namespace Microsoft.WindowsAzure.Commands.Common.Attributes
136136
All = Table | List,
137137
}
138138

139-
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
139+
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]
140140
public sealed class Ps1XmlAttribute : Attribute
141141
{
142142
public string Label { get; set; }
143143

144144
public ViewControl Target { get; set; } = ViewControl.Table;
145+
146+
public string ScriptBlock { get; set; }
147+
148+
public bool GroupByThis { get; set; }
149+
150+
public uint TableColumnWidth { get; set; }
151+
152+
public uint Position { get; set; } = Ps1XmlConstants.DefaultPosition;
145153
}
146154
}
147155

@@ -151,6 +159,8 @@ With the attribute you can specify for a public property (or field) a target vie
151159

152160
# Ps1XmlAttribute attribute usage.
153161

162+
## Properties of primitive types.
163+
154164
Let's say for our example we want to only show these parameters in the output:
155165
* Id
156166
* Name
@@ -215,6 +225,87 @@ namespace Microsoft.Azure.Commands.Profile.Models
215225

216226
* Since the **Ps1Xml attribute** definition is located in the [Commands.Common](https://github.com/Azure/azure-powershell/tree/preview/src/Common/Commands.Common) project and the Command.Common project is likely referenced from your project - to make the attribute visible - you only need to add ```using Microsoft.WindowsAzure.Commands.Common.Attributes;``` statement.
217227
228+
## Properties of complex types.
229+
230+
If you have a property of a complex type, for example, Account of type IAzureAccount:
231+
```Cs
232+
public class PSAzureContext : IAzureContext
233+
{
234+
// code omitted for brevity
235+
236+
public IAzureAccount Account { get; set; }
237+
238+
// code omitted for brevity
239+
}
240+
241+
```
242+
where the IAzureAccount type has its own properties :
243+
244+
```Cs
245+
public interface IAzureAccount : IExtensibleModel
246+
{
247+
string Id { get; set; }
248+
249+
string Credential { get; set; }
250+
251+
string Type { get; set; }
252+
253+
IDictionary<string, string> TenantMap { get; }
254+
}
255+
```
256+
257+
To specify what goes into the table view - use the **ScriptBlock** attribute property. You can use as many attributes as you need to specify all desired complex type properties:
258+
```Cs
259+
public class PSAzureContext : IAzureContext
260+
{
261+
// code omitted for brevity
262+
263+
[Ps1Xml(Label = "Account Id", Target = ViewControl.Table, ScriptBlock = "$_.Account.Id")]
264+
[Ps1Xml(Label = "Account Type", Target = ViewControl.Table, ScriptBlock = "$_.Account.Type")]
265+
public IAzureAccount Account { get; set; }
266+
267+
// code omitted for brevity
268+
}
269+
270+
```
271+
Note: **$_** symbol in PowerShell means the same as **this** key word means in C#.
272+
273+
These two attribute will result in 2 column in the table view:
274+
```Ps
275+
Account Id Account Type
276+
========== ============
277+
```
278+
## GroupBy a property.
279+
280+
If you need to group by a property - use the **GroupByThis** attribute property like this:
281+
```Cs
282+
public class PSAzureSubscription : IAzureSubscription
283+
{
284+
285+
// code omitted for brevity
286+
287+
[Ps1Xml(Label = "Subscription Id", Target = ViewControl.Table, GroupByThis = true)]
288+
public string Id { get; set; }
289+
290+
// code omitted for brevity
291+
```
292+
## Column order.
293+
294+
The column order in the output table will be the same as the order of the properties in the class. If you need to change this behavior - use the **Position** (zero-based) attribute property like this:
295+
```Cs
296+
public class PSAzureSubscription : IAzureSubscription
297+
{
298+
299+
// code omitted for brevity
300+
301+
[Ps1Xml(Label = "Subscription Name", Target = ViewControl.Table, Position = 0)]
302+
public string Name { get; set; }
303+
304+
// code omitted for brevity
305+
```
306+
307+
This will place the column at the very beginning of the table.
308+
218309

219310
# How to generate format.ps1xml file.
220311

documentation/development-docs/vm-for-partners.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ git config --global user.email "<Your email on GitHub>"
134134
```
135135
git config --global user.name "<Your name>"
136136
```
137-
Next, you will need to follow the steps [here](https://github.com/Azure/azure-powershell/wiki/Azure-Powershell-Developer-Guide#environment-setup) to set up your local fork of Azure/azure-powershell.
137+
Next, you will need to follow the steps [here](https://github.com/Azure/azure-powershell/blob/preview/documentation/development-docs/azure-powershell-developer-guide.md#environment-setup) to set up your local fork of Azure/azure-powershell.
138138
139139
# Building and Running Tests
140-
This image has been set up to build and run tests immediately. To build the project, run msbuild build.proj in the Developer Command Prompt for VS2015. Once this has completed, you can open your module in Visual Studio and start development there. To record tests, follow the instructions [here](https://github.com/Azure/azure-powershell/wiki/Azure-Powershell-Developer-Guide#recordingrunning-tests).
140+
This image has been set up to build and run tests immediately. To build the project, run msbuild build.proj in the Developer Command Prompt for VS2015. Once this has completed, you can open your module in Visual Studio and start development there. To record tests, follow the instructions [here](https://github.com/Azure/azure-powershell/blob/preview/documentation/development-docs/azure-powershell-developer-guide.md#recordingrunning-tests).
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Table of Contents
2+
1. [Summary](#summary)
3+
2. [Breaking changes in subscriptions module](#Breaking-changes-in-subscriptions-module)
4+
3. [Breaking changes in storage admin module](#Breaking-changes-in-storage-admin-module)
5+
6+
## Summary
7+
The module version 1.3.0 of AzureStack brings in many breaking changes. Most of these breaking changes were noted with warnings in the previous releases. Please note that there are no changes in the AzureRM version of the module specific to Azure Stack.
8+
9+
AzureRm.AzureStackAdmin module is replaced with Azs.Subscriptions.Admin and Azs.Subscriptions module
10+
AzureRm.AzureStackStorage module is replaced with Azs.Storage.Admin module
11+
12+
## Breaking changes in subscriptions module
13+
14+
**Prefix Changes**<br>
15+
The prefix *AzureRM* has been deprecated. We have been printing warning that the prefix *AzureRm* will be replaced with *Azs*. We replaced the AzureRm prefix with Azs in the last release with alias support. Now prefix *AzureRm* has been deprecated.The following are the changes.
16+
- *-AzureRmOffer is replaced with *-AzsOffer
17+
- *-AzureRmManagedOffer is replaced with *-AzsManagedOffer
18+
- *-AzureRmPlan is replaced with *-AzsPlan
19+
- *-AzureRmMangedSubscription is replaced with *-AzsUserSubscription
20+
- *-AzureRMTenantSubscription is replaced with *-AzsSubscription
21+
- *-AzureRmManagedLocation is replaced with *-AzsLocation
22+
23+
**Deprecated Cmdlets**
24+
25+
- ```Get-AzureStackToken``` is deprecated. If there is a need to get token, please use the Microsoft.IdentityModel.Clients.ActiveDirectory.dll directly.
26+
27+
- The cmdlets ```*-AzsReourceProviderManifest``` and ```*-AzsUsageConnection``` are deprecated
28+
For any of these usages, template based resource creation is preferred.  For deletion of these resources, deleting the whole resource group is preferred. If needed, you can also use generic cmdlet *-AzureRmResource
29+
30+
**Parameter Changes**<br>
31+
The previous release was printing warnings about the deprecation of the following parameter aliases and they are deprecated now.
32+
- Parameter alias ```PlanName``` has been deprecated in favor of ```Name``` in Plan cmdlets
33+
- Parameter alias ```OfferName``` has been deprecated in favor of ```Name``` in Offer cmdlets
34+
- Parameter alias ```ResourceGroup``` has been deprecated in favor of ```ResourceGroupName``` in all the cmdlets
35+
- Parameter ```Managed``` in Get-AzsPlan has been deprecated. It was not used before
36+
- Parameter ```Managed``` in Get-AzsOffer has been deprecated. Please use Get-AzsManagedOffer instead
37+
38+
**Flattening of Properties** <br>
39+
Properties field of the objects Plan, Offer, Subscription have been removed and the child properties are moved to the top level. If you are having any references to the Properties, this breaking change could be fixed by removing the intermediate Properties reference
40+
41+
**Force Parameter** <br>
42+
43+
Remove-* cmdlets will ask for confirmation before doing the remove action. Please use -Force to avoid the confirmation. The following are the affected cmldets
44+
- Remove-AzsOffer
45+
- Remove-AzsPlan
46+
- Remove-AzsUserSubscription
47+
- Remove-AzsSubscription
48+
49+
<br>
50+
51+
## Breaking Changes in Storage Admin Module
52+
53+
**Globally Removed Parameters**<br>
54+
The parameters ```SkipCertificateValidation``` and ```DefaultProfile``` have been removed from all cmdlets.
55+
56+
The parameters ```TimeGrain```, ```StartTimeInUtc```, ```EndTimInUtc```, ```MetricNames```, ```DetailedOutput```  have been removed for Get-Azs*Metric Cmdlets, please replace with Where-Object and Select-Object.
57+
58+
The pareamters ```MetricNames```, ```DetailedOutput```  have been removed for Get-Azs*MetricDefinition Cmdlets, please replace with Where-Object and Select-Object
59+
60+
**New Parameters**
61+
- The parameter ```ResourceGroupName``` is now an optional for all cmdlets.
62+
- The parameter ```FarmName``` will be required for all Cmdlets that reference nested resources under a farm.  You can get the value using the following
63+
64+
```powershell
65+
        (Get-AzsStorageFarm -ResourceGroupName $rgn).Name
66+
```
67+
Affected cmdlets
68+
- Get-AzsBlobService
69+
- Get-AzsBlobServiceMetric
70+
- Get-AzsBlobServiceMetricDefinition
71+
- Get-AzsStorageFarmMetric
72+
- Get-AzsStorageFarmMetricDefinition
73+
- Get-AzsStorageShare
74+
- Get-AzsStorageShareMetric
75+
- Get-AzsStorageShareMetricDefinition
76+
- Get-AzsTableService
77+
- Get-AzsTableServiceMetric
78+
- Get-AzsTableServiceMetricDefinition
79+
- Start-AzsReclaimStorageCapacity
80+
81+
```ResourceId``` parameter can be used for cmdlets that require ```Name``` . The ReourceId is same as the Id of the resource object that is returned from the Get-* cmdlets. The parameter also has an alias ```Id```.
82+
83+
Affected cmdlets<br>
84+
- Get-AzsStorageQuota
85+
- Get-AzsStorageShare
86+
- Remove-AzsStorageQuota
87+
- Set-AzsStorageQuota
88+
- Stop-AzsContainerMigration
89+
- Restore-AzsStorageAccount 
90+
91+
92+
**Get-AzsStorageAccount**<br>
93+
94+
The parameters ```TenantSubscriptionId```, ```PartialAccountName```, ```StorageAccountStatus``` and ```Detail``` has been removed.  A new parameter called ```Summary``` has been added.
95+
96+
**Get-AzsStorageAcquisition**<br>
97+
The parameters ```TenantSubscriptionId```, ```AccountName```, ```Container```, and ```Detail``` has been removed.  A new parameter called ```Filter``` has been added, this is an ODATA filter.
98+
99+
**Get-AzsStorageContainer**<br>
100+
The parameter ```Intent``` has been removed and Count has been renamed to MaxCount.
101+
102+
**Get-AzsStorageShare**<br>
103+
The parameter ```SourceShareName``` has been replaced with ```FarmName```. The parameter ```Intent``` has been removed.
104+
105+
**Start-AzsStorageContainerMigration**<br>
106+
The parameter ```ContainerToMigrate``` is renamed to ```ContainerName```.  The parameters ```StorageAccountName```, ```ShareName``` and ```FarmName``` have been added.
107+
108+
**Stop-AzsStorageContainerMigration**<br>
109+
This cmdlet has been renamed to ```Stop-AzsContainerMigration```
110+
111+
**Undo-AzsDeletedStorageAccount**<br>
112+
This cmdlet has been renamed to Restore-AzsStorageAccount. The parameters ```NewAccountName```, ```ResourceAdminApiVersion```, ```StorageAccountApiVersion``` have been deprecated.

documentation/testing-docs/using-azure-test-framework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ AZURE_TEST_MODE=Record
157157

158158
## Record or Playback Tests
159159

160-
- [Run the tests](https://github.com/Azure/azure-powershell/wiki/Azure-Powershell-Developer-Guide#running-tests) and make sure that you got a generated `.json` file that matches the test name in the bin folder under the `SessionRecords` folder
160+
- [Run the tests](https://github.com/Azure/azure-powershell/blob/preview/documentation/development-docs/azure-powershell-developer-guide.md#recordingrunning-tests) and make sure that you got a generated `.json` file that matches the test name in the bin folder under the `SessionRecords` folder
161161
- Copy the `SessionRecords` folder inside the test project and add all `*.json` files in Visual Studio setting "Copy to Output Directory" property to "Copy if newer"
162162
- To assure that the records work fine, delete the connection string (default mode is Playback mode) OR change HttpRecorderMode within the connection string to "Playback" and run the tests
163163

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<Import Project="..\..\..\tools\Common.Netcore.Dependencies.targets" />
4+
5+
<PropertyGroup>
6+
<TargetFramework>netcoreapp2.0</TargetFramework>
7+
<AssemblyName>Microsoft.Azure.Commands.Common.Aks</AssemblyName>
8+
<RootNamespace>Microsoft.Azure.Commands.Common.Aks</RootNamespace>
9+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
10+
</PropertyGroup>
11+
12+
13+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
14+
<DelaySign>false</DelaySign>
15+
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
16+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
17+
<WarningsAsErrors />
18+
</PropertyGroup>
19+
20+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
21+
<SignAssembly>true</SignAssembly>
22+
<DelaySign>true</DelaySign>
23+
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
24+
<DefineConstants>TRACE;RELEASE;NETSTANDARD;SIGN</DefineConstants>
25+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
26+
<WarningsAsErrors />
27+
</PropertyGroup>
28+
29+
<ItemGroup>
30+
<ProjectReference Include="..\Commands.Common\Common.Netcore.csproj" />
31+
<ProjectReference Include="..\..\ResourceManager\Common\Commands.ResourceManager.Common\Common.ResourceManager.Netcore.csproj" />
32+
</ItemGroup>
33+
34+
<ItemGroup>
35+
<Compile Update="Properties\Resources.Designer.cs">
36+
<DesignTime>true</DesignTime>
37+
<AutoGen>true</AutoGen>
38+
<DependentUpon>Resources.resx</DependentUpon>
39+
</Compile>
40+
</ItemGroup>
41+
42+
<ItemGroup>
43+
<EmbeddedResource Update="Properties\Resources.resx">
44+
<Generator>ResXFileCodeGenerator</Generator>
45+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
46+
</EmbeddedResource>
47+
</ItemGroup>
48+
49+
50+
</Project>

0 commit comments

Comments
 (0)