Skip to content

Commit 6952dbd

Browse files
authored
Merge branch 'preview' into common-dependencies
2 parents d42df90 + 6698c3f commit 6952dbd

File tree

194 files changed

+8420
-737
lines changed

Some content is hidden

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

194 files changed

+8420
-737
lines changed

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@
222222
<Compile Include="Extension\SqlServer\SetAzureVMSqlServerExtensionCommand.cs" />
223223
<Compile Include="Extension\SqlServer\VirtualMachineSqlServerExtensionContext.cs" />
224224
<Compile Include="Generated\**\*.cs" />
225+
<Compile Include="Manual\*.cs" />
225226
<Compile Include="Images\GetAzureVMImageCommand.cs" />
226227
<Compile Include="Common\HashTableExtensions.cs" />
227228
<Compile Include="Models\AzureDiskEncryptionStatusContext.cs" />

src/ResourceManager/Compute/Commands.Compute/Generated/AvailabilitySet/AvailabilitySetGetMethod.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22-
using AutoMapper;
2322
using Microsoft.Azure.Commands.Compute.Automation.Models;
2423
using Microsoft.Azure.Management.Compute;
2524
using Microsoft.Azure.Management.Compute.Models;
@@ -83,20 +82,13 @@ protected void ExecuteAvailabilitySetGetMethod(object[] invokeMethodInputParamet
8382
if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(availabilitySetName))
8483
{
8584
var result = AvailabilitySetsClient.Get(resourceGroupName, availabilitySetName);
86-
var psObject = new PSAvailabilitySet();
87-
Mapper.Map<AvailabilitySet, PSAvailabilitySet>(result, psObject);
88-
WriteObject(psObject);
85+
WriteObject(result);
8986
}
9087
else if (!string.IsNullOrEmpty(resourceGroupName))
9188
{
9289
var result = AvailabilitySetsClient.List(resourceGroupName);
9390
var resultList = result.ToList();
94-
var psObject = new List<PSAvailabilitySetList>();
95-
foreach (var r in resultList)
96-
{
97-
psObject.Add(Mapper.Map<AvailabilitySet, PSAvailabilitySetList>(r));
98-
}
99-
WriteObject(psObject, true);
91+
WriteObject(resultList, true);
10092
}
10193
}
10294

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/AddAzureRmContainerServiceAgentPoolProfileCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using Microsoft.Azure.Commands.Compute.Automation.Models;
2223
using Microsoft.Azure.Management.Compute.Models;
2324
using System;
2425
using System.Collections;
@@ -29,15 +30,15 @@
2930
namespace Microsoft.Azure.Commands.Compute.Automation
3031
{
3132
[Cmdlet("Add", "AzureRmContainerServiceAgentPoolProfile", SupportsShouldProcess = true)]
32-
[OutputType(typeof(ContainerService))]
33-
public class AddAzureRmContainerServiceAgentPoolProfileCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
33+
[OutputType(typeof(PSContainerService))]
34+
public partial class AddAzureRmContainerServiceAgentPoolProfileCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3435
{
3536
[Parameter(
3637
Mandatory = true,
3738
Position = 0,
3839
ValueFromPipeline = true,
3940
ValueFromPipelineByPropertyName = true)]
40-
public ContainerService ContainerService { get; set; }
41+
public PSContainerService ContainerService { get; set; }
4142

4243
[Parameter(
4344
Mandatory = false,

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/NewAzureRmContainerServiceConfigCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using Microsoft.Azure.Commands.Compute.Automation.Models;
2223
using Microsoft.Azure.Management.Compute.Models;
2324
using System;
2425
using System.Collections;
@@ -29,8 +30,8 @@
2930
namespace Microsoft.Azure.Commands.Compute.Automation
3031
{
3132
[Cmdlet("New", "AzureRmContainerServiceConfig", SupportsShouldProcess = true)]
32-
[OutputType(typeof(ContainerService))]
33-
public class NewAzureRmContainerServiceConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
33+
[OutputType(typeof(PSContainerService))]
34+
public partial class NewAzureRmContainerServiceConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3435
{
3536
[Parameter(
3637
Mandatory = false,
@@ -260,7 +261,7 @@ private void Run()
260261
vDiagnosticsProfile.VmDiagnostics.Enabled = this.VmDiagnosticsEnabled;
261262

262263

263-
var vContainerService = new ContainerService
264+
var vContainerService = new PSContainerService
264265
{
265266
Location = this.Location,
266267
Tags = (this.Tag == null) ? null : this.Tag.Cast<DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value),

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/RemoveAzureRmContainerServiceAgentPoolProfileCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using Microsoft.Azure.Commands.Compute.Automation.Models;
2223
using Microsoft.Azure.Management.Compute.Models;
2324
using System;
2425
using System.Collections;
@@ -29,15 +30,15 @@
2930
namespace Microsoft.Azure.Commands.Compute.Automation
3031
{
3132
[Cmdlet("Remove", "AzureRmContainerServiceAgentPoolProfile", SupportsShouldProcess = true)]
32-
[OutputType(typeof(ContainerService))]
33-
public class RemoveAzureRmContainerServiceAgentPoolProfileCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
33+
[OutputType(typeof(PSContainerService))]
34+
public partial class RemoveAzureRmContainerServiceAgentPoolProfileCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3435
{
3536
[Parameter(
3637
Mandatory = true,
3738
Position = 0,
3839
ValueFromPipeline = true,
3940
ValueFromPipelineByPropertyName = true)]
40-
public ContainerService ContainerService { get; set; }
41+
public PSContainerService ContainerService { get; set; }
4142

4243
[Parameter(
4344
Mandatory = true,

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceCreateOrUpdateMethod.cs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using AutoMapper;
2223
using Microsoft.Azure.Commands.Compute.Automation.Models;
2324
using Microsoft.Azure.Management.Compute;
2425
using Microsoft.Azure.Management.Compute.Models;
@@ -112,21 +113,25 @@ protected PSArgument[] CreateContainerServiceCreateOrUpdateParameters()
112113
}
113114

114115
[Cmdlet(VerbsCommon.New, "AzureRmContainerService", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
115-
[OutputType(typeof(ContainerService))]
116+
[OutputType(typeof(PSContainerService))]
116117
public partial class NewAzureRmContainerService : ComputeAutomationBaseCmdlet
117118
{
118119
protected override void ProcessRecord()
119120
{
121+
AutoMapper.Mapper.AddProfile<ComputeAutomationAutoMapperProfile>();
120122
ExecuteClientAction(() =>
121123
{
122124
if (ShouldProcess(this.ResourceGroupName, VerbsCommon.New))
123125
{
124126
string resourceGroupName = this.ResourceGroupName;
125127
string containerServiceName = this.Name;
126-
ContainerService parameters = this.ContainerService;
128+
ContainerService parameters = new ContainerService();
129+
Mapper.Map<PSContainerService, ContainerService>(this.ContainerService, parameters);
127130

128131
var result = ContainerServicesClient.CreateOrUpdate(resourceGroupName, containerServiceName, parameters);
129-
WriteObject(result);
132+
var psObject = new PSContainerService();
133+
Mapper.Map<ContainerService, PSContainerService>(result, psObject);
134+
WriteObject(psObject);
130135
}
131136
});
132137
}
@@ -156,25 +161,29 @@ protected override void ProcessRecord()
156161
ValueFromPipelineByPropertyName = false,
157162
ValueFromPipeline = true)]
158163
[AllowNull]
159-
public ContainerService ContainerService { get; set; }
164+
public PSContainerService ContainerService { get; set; }
160165
}
161166

162167
[Cmdlet(VerbsData.Update, "AzureRmContainerService", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
163-
[OutputType(typeof(ContainerService))]
168+
[OutputType(typeof(PSContainerService))]
164169
public partial class UpdateAzureRmContainerService : ComputeAutomationBaseCmdlet
165170
{
166171
protected override void ProcessRecord()
167172
{
173+
AutoMapper.Mapper.AddProfile<ComputeAutomationAutoMapperProfile>();
168174
ExecuteClientAction(() =>
169175
{
170176
if (ShouldProcess(this.ResourceGroupName, VerbsData.Update))
171177
{
172178
string resourceGroupName = this.ResourceGroupName;
173179
string containerServiceName = this.Name;
174-
ContainerService parameters = this.ContainerService;
180+
ContainerService parameters = new ContainerService();
181+
Mapper.Map<PSContainerService, ContainerService>(this.ContainerService, parameters);
175182

176183
var result = ContainerServicesClient.CreateOrUpdate(resourceGroupName, containerServiceName, parameters);
177-
WriteObject(result);
184+
var psObject = new PSContainerService();
185+
Mapper.Map<ContainerService, PSContainerService>(result, psObject);
186+
WriteObject(psObject);
178187
}
179188
});
180189
}
@@ -204,6 +213,6 @@ protected override void ProcessRecord()
204213
ValueFromPipelineByPropertyName = false,
205214
ValueFromPipeline = true)]
206215
[AllowNull]
207-
public ContainerService ContainerService { get; set; }
216+
public PSContainerService ContainerService { get; set; }
208217
}
209218
}

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceDeleteMethod.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using AutoMapper;
2223
using Microsoft.Azure.Commands.Compute.Automation.Models;
2324
using Microsoft.Azure.Management.Compute;
2425
using Microsoft.Azure.Management.Compute.Models;
@@ -102,6 +103,7 @@ public partial class RemoveAzureRmContainerService : ComputeAutomationBaseCmdlet
102103
{
103104
protected override void ProcessRecord()
104105
{
106+
AutoMapper.Mapper.AddProfile<ComputeAutomationAutoMapperProfile>();
105107
ExecuteClientAction(() =>
106108
{
107109
if (ShouldProcess(this.ResourceGroupName, VerbsCommon.Remove)

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceGetMethod.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ protected void ExecuteContainerServiceGetMethod(object[] invokeMethodInputParame
8383
if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(containerServiceName))
8484
{
8585
var result = ContainerServicesClient.Get(resourceGroupName, containerServiceName);
86-
var psObject = new PSContainerService();
87-
Mapper.Map<ContainerService, PSContainerService>(result, psObject);
88-
WriteObject(psObject);
86+
WriteObject(result);
8987
}
9088
else if (!string.IsNullOrEmpty(resourceGroupName))
9189
{
@@ -101,12 +99,7 @@ protected void ExecuteContainerServiceGetMethod(object[] invokeMethodInputParame
10199
}
102100
nextPageLink = pageResult.NextPageLink;
103101
}
104-
var psObject = new List<PSContainerServiceList>();
105-
foreach (var r in resultList)
106-
{
107-
psObject.Add(Mapper.Map<ContainerService, PSContainerServiceList>(r));
108-
}
109-
WriteObject(psObject, true);
102+
WriteObject(resultList, true);
110103
}
111104
else
112105
{
@@ -122,12 +115,7 @@ protected void ExecuteContainerServiceGetMethod(object[] invokeMethodInputParame
122115
}
123116
nextPageLink = pageResult.NextPageLink;
124117
}
125-
var psObject = new List<PSContainerServiceList>();
126-
foreach (var r in resultList)
127-
{
128-
psObject.Add(Mapper.Map<ContainerService, PSContainerServiceList>(r));
129-
}
130-
WriteObject(psObject, true);
118+
WriteObject(resultList, true);
131119
}
132120
}
133121

src/ResourceManager/Compute/Commands.Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using Microsoft.Azure.Commands.Compute.Automation.Models;
2223
using Microsoft.Azure.Management.Compute.Models;
2324
using System;
2425
using System.Collections;
2526
using System.Collections.Generic;
2627
using System.Linq;
2728
using System.Management.Automation;
28-
using Microsoft.Azure.Commands.Compute.Automation.Models;
2929

3030
namespace Microsoft.Azure.Commands.Compute.Automation
3131
{
3232
[Cmdlet("New", "AzureRmDiskConfig", SupportsShouldProcess = true)]
3333
[OutputType(typeof(PSDisk))]
34-
public class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
34+
public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3535
{
3636
[Parameter(
3737
Mandatory = false,

src/ResourceManager/Compute/Commands.Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using Microsoft.Azure.Commands.Compute.Automation.Models;
2223
using Microsoft.Azure.Management.Compute.Models;
2324
using System;
2425
using System.Collections;
2526
using System.Collections.Generic;
2627
using System.Linq;
2728
using System.Management.Automation;
28-
using Microsoft.Azure.Commands.Compute.Automation.Models;
2929

3030
namespace Microsoft.Azure.Commands.Compute.Automation
3131
{
3232
[Cmdlet("New", "AzureRmDiskUpdateConfig", SupportsShouldProcess = true)]
3333
[OutputType(typeof(PSDiskUpdate))]
34-
public class NewAzureRmDiskUpdateConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
34+
public partial class NewAzureRmDiskUpdateConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3535
{
3636
[Parameter(
3737
Mandatory = false,
@@ -58,46 +58,6 @@ public class NewAzureRmDiskUpdateConfigCommand : Microsoft.Azure.Commands.Resour
5858
ValueFromPipelineByPropertyName = true)]
5959
public Hashtable Tag { get; set; }
6060

61-
[Parameter(
62-
Mandatory = false,
63-
ValueFromPipelineByPropertyName = true)]
64-
[Obsolete("This parameter is obsolete. CreateOption cannot be changed during updating a disk." +
65-
"To set CreateOption of a disk, use New-AzureRmDiskConfig command.",
66-
false)]
67-
public DiskCreateOption? CreateOption { get; set; }
68-
69-
[Parameter(
70-
Mandatory = false,
71-
ValueFromPipelineByPropertyName = true)]
72-
[Obsolete("This parameter is obsolete. StorageAccountId cannot be changed during updating a disk." +
73-
"To set StorageAccountId of a disk, use New-AzureRmDiskConfig command.",
74-
false)]
75-
public string StorageAccountId { get; set; }
76-
77-
[Parameter(
78-
Mandatory = false,
79-
ValueFromPipelineByPropertyName = true)]
80-
[Obsolete("This parameter is obsolete. ImageReference cannot be changed during updating a disk." +
81-
"To set ImageReference of a disk, use New-AzureRmDiskConfig command.",
82-
false)]
83-
public ImageDiskReference ImageReference { get; set; }
84-
85-
[Parameter(
86-
Mandatory = false,
87-
ValueFromPipelineByPropertyName = true)]
88-
[Obsolete("This parameter is obsolete. SourceUri cannot be changed during updating a disk." +
89-
"To set SourceUri of a disk, use New-AzureRmDiskConfig command.",
90-
false)]
91-
public string SourceUri { get; set; }
92-
93-
[Parameter(
94-
Mandatory = false,
95-
ValueFromPipelineByPropertyName = true)]
96-
[Obsolete("This parameter is obsolete. SourceResourceId cannot be changed during updating a disk." +
97-
"To set SourceResourceId of a disk, use New-AzureRmDiskConfig command.",
98-
false)]
99-
public string SourceResourceId { get; set; }
100-
10161
[Parameter(
10262
Mandatory = false,
10363
ValueFromPipelineByPropertyName = true)]

src/ResourceManager/Compute/Commands.Compute/Generated/Disk/Config/SetAzureRmDiskDiskEncryptionKeyCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using Microsoft.Azure.Commands.Compute.Automation.Models;
2223
using Microsoft.Azure.Management.Compute.Models;
2324
using System;
2425
using System.Collections;
2526
using System.Collections.Generic;
2627
using System.Linq;
2728
using System.Management.Automation;
28-
using Microsoft.Azure.Commands.Compute.Automation.Models;
2929

3030
namespace Microsoft.Azure.Commands.Compute.Automation
3131
{
3232
[Cmdlet("Set", "AzureRmDiskDiskEncryptionKey", SupportsShouldProcess = true)]
3333
[OutputType(typeof(PSDisk))]
34-
public class SetAzureRmDiskDiskEncryptionKeyCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
34+
public partial class SetAzureRmDiskDiskEncryptionKeyCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3535
{
3636
[Parameter(
3737
Mandatory = true,

src/ResourceManager/Compute/Commands.Compute/Generated/Disk/Config/SetAzureRmDiskImageReferenceCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
// Changes to this file may cause incorrect behavior and will be lost if the
2020
// code is regenerated.
2121

22+
using Microsoft.Azure.Commands.Compute.Automation.Models;
2223
using Microsoft.Azure.Management.Compute.Models;
2324
using System;
2425
using System.Collections;
2526
using System.Collections.Generic;
2627
using System.Linq;
2728
using System.Management.Automation;
28-
using Microsoft.Azure.Commands.Compute.Automation.Models;
2929

3030
namespace Microsoft.Azure.Commands.Compute.Automation
3131
{
3232
[Cmdlet("Set", "AzureRmDiskImageReference", SupportsShouldProcess = true)]
3333
[OutputType(typeof(PSDisk))]
34-
public class SetAzureRmDiskImageReferenceCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
34+
public partial class SetAzureRmDiskImageReferenceCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
3535
{
3636
[Parameter(
3737
Mandatory = true,

0 commit comments

Comments
 (0)