Skip to content

Commit 54291b6

Browse files
updates to cmdlets
1 parent 2c6bbff commit 54291b6

File tree

8 files changed

+84
-1
lines changed

8 files changed

+84
-1
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,13 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso
228228
HelpMessage = "True if the image from which the OS disk is created supports accelerated networking.")]
229229
public bool? AcceleratedNetwork { get; set; }
230230

231+
[Parameter(
232+
Mandatory = false,
233+
ValueFromPipelineByPropertyName = true,
234+
HelpMessage = "CPU architecture supported by an OS disk. Possible values are \"X64\" and \"Arm64\".")]
235+
[PSArgumentCompleter("X64", "Arm64")]
236+
public string Architecture { get; set; }
237+
231238
protected override void ProcessRecord()
232239
{
233240
if (ShouldProcess("Disk", "New"))
@@ -418,6 +425,15 @@ private void Run()
418425
vSupportedCapabilities.AcceleratedNetwork = AcceleratedNetwork;
419426
}
420427

428+
if (this.IsParameterBound(c => c.Architecture))
429+
{
430+
if (vSupportedCapabilities == null)
431+
{
432+
vSupportedCapabilities = new SupportedCapabilities();
433+
}
434+
vSupportedCapabilities.Architecture = this.Architecture;
435+
}
436+
421437
var vDisk = new PSDisk
422438
{
423439
Zones = this.IsParameterBound(c => c.Zone) ? this.Zone : null,

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ public partial class NewAzureRmDiskUpdateConfigCommand : Microsoft.Azure.Command
161161
HelpMessage = "True if the image from which the OS disk is created supports accelerated networking.")]
162162
public bool? AcceleratedNetwork { get; set; }
163163

164+
[Parameter(
165+
Mandatory = false,
166+
ValueFromPipelineByPropertyName = true,
167+
HelpMessage = "CPU architecture supported by an OS disk. Possible values are \"X64\" and \"Arm64\".")]
168+
[PSArgumentCompleter("X64", "Arm64")]
169+
public string Architecture { get; set; }
170+
164171

165172
protected override void ProcessRecord()
166173
{
@@ -274,6 +281,15 @@ private void Run()
274281
vSupportedCapabilities.AcceleratedNetwork = AcceleratedNetwork;
275282
}
276283

284+
if (this.IsParameterBound(c => c.Architecture))
285+
{
286+
if (vSupportedCapabilities == null)
287+
{
288+
vSupportedCapabilities = new SupportedCapabilities();
289+
}
290+
vSupportedCapabilities.Architecture = this.Architecture;
291+
}
292+
277293
var vDiskUpdate = new PSDiskUpdate
278294
{
279295
OsType = this.IsParameterBound(c => c.OsType) ? this.OsType : (OperatingSystemTypes?)null,

src/Compute/Compute/Generated/GalleryImage/GalleryImageCreateOrUpdateMethod.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,11 @@ public override void ExecuteCmdlet()
403403
galleryImage.Tags = this.Tag.Cast<DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value);
404404
}
405405

406+
if (this.IsParameterBound(c => c.Architecture))
407+
{
408+
galleryImage.Architecture = this.Architecture;
409+
}
410+
406411
if (this.IsParameterBound(c => c.MinimumVCPU))
407412
{
408413
if (galleryImage.Recommended == null)
@@ -605,6 +610,13 @@ public override void ExecuteCmdlet()
605610
ValueFromPipelineByPropertyName = true)]
606611
public string ReleaseNoteUri { get; set; }
607612

613+
[Parameter(
614+
Mandatory = false,
615+
ValueFromPipelineByPropertyName = true,
616+
HelpMessage = "CPU architecture supported by an OS disk. Possible values are \"X64\" and \"Arm64\".")]
617+
[PSArgumentCompleter("X64", "Arm64")]
618+
public string Architecture { get; set; }
619+
608620
[Parameter(
609621
Mandatory = false,
610622
ValueFromPipelineByPropertyName = true)]

src/Compute/Compute/Generated/Models/PSGalleryImage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public string ResourceGroupName
5959
public string Location { get; set; }
6060
public IDictionary<string, string> Tags { get; set; }
6161
public IList<GalleryImageFeature> Features { get; set; }
62+
public string Architecture { get; set; }
6263

6364
}
6465
}

src/Compute/Compute/Generated/Models/PSSnapshotUpdate.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public partial class PSSnapshotUpdate
3434
public IDictionary<string, string> Tags { get; set; }
3535
public SnapshotSku Sku { get; set; }
3636
public bool? SupportsHibernation { get; set; }
37+
public SupportedCapabilities SupportedCapabilities { get; set; }
3738

3839
//
3940
// Summary:

src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotConfigCommand.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ public partial class NewAzureRmSnapshotConfigCommand : Microsoft.Azure.Commands.
173173
HelpMessage = "True if the image from which the OS disk is created supports accelerated networking.")]
174174
public bool? AcceleratedNetwork { get; set; }
175175

176+
[Parameter(
177+
Mandatory = false,
178+
ValueFromPipelineByPropertyName = true,
179+
HelpMessage = "CPU architecture supported by an OS disk. Possible values are \"X64\" and \"Arm64\".")]
180+
[PSArgumentCompleter("X64", "Arm64")]
181+
public string Architecture { get; set; }
182+
176183
protected override void ProcessRecord()
177184
{
178185
if (ShouldProcess("Snapshot", "New"))
@@ -336,6 +343,15 @@ private void Run()
336343
vSupportedCapabilities.AcceleratedNetwork = AcceleratedNetwork;
337344
}
338345

346+
if (this.IsParameterBound(c => c.Architecture))
347+
{
348+
if (vSupportedCapabilities == null)
349+
{
350+
vSupportedCapabilities = new SupportedCapabilities();
351+
}
352+
vSupportedCapabilities.Architecture = this.Architecture;
353+
}
354+
339355
var vSnapshot = new PSSnapshot
340356
{
341357
OsType = this.IsParameterBound(c => c.OsType) ? this.OsType : (OperatingSystemTypes?)null,

src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotUpdateConfigCommand.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ public partial class NewAzureRmSnapshotUpdateConfigCommand : Microsoft.Azure.Com
101101
[PSArgumentCompleter("Enabled", "Disabled")]
102102
public string PublicNetworkAccess { get; set; }
103103

104+
[Parameter(
105+
Mandatory = false,
106+
ValueFromPipelineByPropertyName = true,
107+
HelpMessage = "CPU architecture supported by an OS disk. Possible values are \"X64\" and \"Arm64\".")]
108+
[PSArgumentCompleter("X64", "Arm64")]
109+
public string Architecture { get; set; }
110+
104111
protected override void ProcessRecord()
105112
{
106113
if (ShouldProcess("SnapshotUpdate", "New"))
@@ -120,6 +127,8 @@ private void Run()
120127
// Sku
121128
SnapshotSku vSku = null;
122129

130+
SupportedCapabilities vSupportedCapabilities = null;
131+
123132
if (this.IsParameterBound(c => c.EncryptionSettingsEnabled))
124133
{
125134
if (vEncryptionSettingsCollection == null)
@@ -193,6 +202,15 @@ private void Run()
193202
vSku.Name = this.SkuName;
194203
}
195204

205+
if (this.IsParameterBound(c => c.Architecture))
206+
{
207+
if (vSupportedCapabilities == null)
208+
{
209+
vSupportedCapabilities = new SupportedCapabilities();
210+
}
211+
vSupportedCapabilities.Architecture = this.Architecture;
212+
}
213+
196214
var vSnapshotUpdate = new PSSnapshotUpdate
197215
{
198216
OsType = this.IsParameterBound(c => c.OsType) ? this.OsType : (OperatingSystemTypes?)null,
@@ -202,7 +220,8 @@ private void Run()
202220
Encryption = vEncryption,
203221
Sku = vSku,
204222
SupportsHibernation = this.IsParameterBound(c => c.SupportsHibernation) ? SupportsHibernation : null,
205-
PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null
223+
PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null,
224+
SupportedCapabilities = vSupportedCapabilities
206225
};
207226

208227
WriteObject(vSnapshotUpdate);

src/Compute/Compute/Models/PSVirtualMachineImage.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,7 @@ public string DataDiskImagesText
8181
}
8282

8383
public AutomaticOSUpgradeProperties AutomaticOSUpgradeProperties { get; set; }
84+
85+
public string Architecture { get; set; }
8486
}
8587
}

0 commit comments

Comments
 (0)