Skip to content

Commit b24ae96

Browse files
committed
Update Output/Format of Extenion Image Cmdlets
1 parent 9e262ea commit b24ae96

File tree

4 files changed

+138
-11
lines changed

4 files changed

+138
-11
lines changed

src/ResourceManager/Compute/Commands.Compute/ExtensionImages/GetAzureVMExtensionImageCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
namespace Microsoft.Azure.Commands.Compute
2323
{
24-
[Cmdlet(VerbsCommon.Get,
25-
ProfileNouns.VirtualMachineExtensionImage)]
24+
[Cmdlet(VerbsCommon.Get, ProfileNouns.VirtualMachineExtensionImage)]
25+
[OutputType(typeof(PSVirtualMachineExtensionImage))]
2626
[OutputType(typeof(PSVirtualMachineExtensionImageDetails))]
2727
public class GetAzureVMExtensionImageCommand : VirtualMachineExtensionImageBaseCmdlet
2828
{

src/ResourceManager/Compute/Commands.Compute/ExtensionImages/GetAzureVMExtensionImageTypeCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
namespace Microsoft.Azure.Commands.Compute
2323
{
2424
[Cmdlet(VerbsCommon.Get, ProfileNouns.VirtualMachineExtensionImageType)]
25-
[OutputType(typeof(PSVirtualMachineExtensionImage))]
25+
[OutputType(typeof(PSVirtualMachineExtensionImageType))]
2626
public class GetAzureVMExtensionImageTypeCommand : VirtualMachineExtensionImageBaseCmdlet
2727
{
2828
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
@@ -44,7 +44,7 @@ public override void ExecuteCmdlet()
4444
VirtualMachineImageResourceList result = this.VirtualMachineExtensionImageClient.ListTypes(parameters);
4545

4646
var images = from r in result.Resources
47-
select new PSVirtualMachineExtensionImage
47+
select new PSVirtualMachineExtensionImageType
4848
{
4949
RequestId = result.RequestId,
5050
StatusCode = result.StatusCode,

src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.format.ps1xml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,136 @@
111111
</ListEntries>
112112
</ListControl>
113113
</View>-->
114+
<View>
115+
<Name>Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineExtensionImageType</Name>
116+
<ViewSelectedBy>
117+
<TypeName>Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineExtensionImageType</TypeName>
118+
</ViewSelectedBy>
119+
<ListControl>
120+
<ListEntries>
121+
<ListEntry>
122+
<ListItems>
123+
<ListItem>
124+
<Label>Id</Label>
125+
<PropertyName>Id</PropertyName>
126+
</ListItem>
127+
<ListItem>
128+
<Label>Location</Label>
129+
<PropertyName>Location</PropertyName>
130+
</ListItem>
131+
<ListItem>
132+
<Label>PublisherName</Label>
133+
<PropertyName>PublisherName</PropertyName>
134+
</ListItem>
135+
<ListItem>
136+
<Label>Type</Label>
137+
<PropertyName>Type</PropertyName>
138+
</ListItem>
139+
</ListItems>
140+
</ListEntry>
141+
</ListEntries>
142+
</ListControl>
143+
</View>
144+
<View>
145+
<Name>Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineExtensionImage</Name>
146+
<ViewSelectedBy>
147+
<TypeName>Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineExtensionImage</TypeName>
148+
</ViewSelectedBy>
149+
<ListControl>
150+
<ListEntries>
151+
<ListEntry>
152+
<ListItems>
153+
<ListItem>
154+
<Label>Id</Label>
155+
<PropertyName>Id</PropertyName>
156+
</ListItem>
157+
<ListItem>
158+
<Label>Location</Label>
159+
<PropertyName>Location</PropertyName>
160+
</ListItem>
161+
<ListItem>
162+
<Label>PublisherName</Label>
163+
<PropertyName>PublisherName</PropertyName>
164+
</ListItem>
165+
<ListItem>
166+
<Label>Type</Label>
167+
<PropertyName>Type</PropertyName>
168+
</ListItem>
169+
<ListItem>
170+
<Label>Version</Label>
171+
<PropertyName>Version</PropertyName>
172+
</ListItem>
173+
<ListItem>
174+
<Label>FilterExpression</Label>
175+
<PropertyName>FilterExpression</PropertyName>
176+
</ListItem>
177+
</ListItems>
178+
</ListEntry>
179+
</ListEntries>
180+
</ListControl>
181+
</View>
182+
<View>
183+
<Name>Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineExtensionImageDetails</Name>
184+
<ViewSelectedBy>
185+
<TypeName>Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineExtensionImageDetails</TypeName>
186+
</ViewSelectedBy>
187+
<ListControl>
188+
<ListEntries>
189+
<ListEntry>
190+
<ListItems>
191+
<ListItem>
192+
<Label>Id</Label>
193+
<PropertyName>Id</PropertyName>
194+
</ListItem>
195+
<ListItem>
196+
<Label>Location</Label>
197+
<PropertyName>Location</PropertyName>
198+
</ListItem>
199+
<ListItem>
200+
<Label>PublisherName</Label>
201+
<PropertyName>PublisherName</PropertyName>
202+
</ListItem>
203+
<ListItem>
204+
<Label>Type</Label>
205+
<PropertyName>Type</PropertyName>
206+
</ListItem>
207+
<ListItem>
208+
<Label>Version</Label>
209+
<PropertyName>Version</PropertyName>
210+
</ListItem>
211+
<ListItem>
212+
<Label>FilterExpression</Label>
213+
<PropertyName>FilterExpression</PropertyName>
214+
</ListItem>
215+
<ListItem>
216+
<Label>Name</Label>
217+
<PropertyName>Name</PropertyName>
218+
</ListItem>
219+
<ListItem>
220+
<Label>HandlerSchema</Label>
221+
<PropertyName>HandlerSchema</PropertyName>
222+
</ListItem>
223+
<ListItem>
224+
<Label>OperatingSystem</Label>
225+
<PropertyName>OperatingSystem</PropertyName>
226+
</ListItem>
227+
<ListItem>
228+
<Label>ComputeRole</Label>
229+
<PropertyName>ComputeRole</PropertyName>
230+
</ListItem>
231+
<ListItem>
232+
<Label>SupportsMultipleExtensions</Label>
233+
<PropertyName>SupportsMultipleExtensions</PropertyName>
234+
</ListItem>
235+
<ListItem>
236+
<Label>VMScaleSetEnabled</Label>
237+
<PropertyName>VMScaleSetEnabled</PropertyName>
238+
</ListItem>
239+
</ListItems>
240+
</ListEntry>
241+
</ListEntries>
242+
</ListControl>
243+
</View>
114244
<View>
115245
<Name>Microsoft.Azure.Management.Compute.Models.DataDisk</Name>
116246
<ViewSelectedBy>

src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineExtensionImage.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,22 @@
1414

1515
namespace Microsoft.Azure.Commands.Compute.Models
1616
{
17-
public class PSVirtualMachineExtensionImage : PSOperation
17+
public class PSVirtualMachineExtensionImageType : PSVirtualMachineImageResource
1818
{
19-
public string Id { get; set; }
20-
21-
public string Location { get; set; }
22-
2319
public string PublisherName { get; set; }
2420

2521
public string Type { get; set; }
22+
}
2623

24+
public class PSVirtualMachineExtensionImage : PSVirtualMachineExtensionImageType
25+
{
2726
public string Version { get; set; }
2827

2928
public string FilterExpression { get; set; }
3029
}
3130

3231
public class PSVirtualMachineExtensionImageDetails : PSVirtualMachineExtensionImage
3332
{
34-
public string Name { get; set; }
35-
3633
public string HandlerSchema { get; set; }
3734

3835
public string OperatingSystem { get; set; }

0 commit comments

Comments
 (0)