Skip to content

Commit c1ef639

Browse files
committed
update
1 parent 49458ea commit c1ef639

File tree

6 files changed

+12
-28
lines changed

6 files changed

+12
-28
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
<SpecificVersion>False</SpecificVersion>
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.0.18.2-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6868
</Reference>
69-
<Reference Include="Microsoft.Azure.Management.Compute, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.6.0.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
69+
<Reference Include="Microsoft.Azure.Management.Compute, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.7.0.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
7171
<Private>True</Private>
7272
</Reference>
7373
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/Compute/Commands.Compute.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.0-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Authorization" version="0.18.2-preview" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Management.Compute" version="6.0.0-preview" targetFramework="net45" />
10+
<package id="Microsoft.Azure.Management.Compute" version="7.0.0-preview" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Network" version="2.0.3-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Management.Resources" version="2.18.0-preview" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Management.Storage" version="2.4.0-preview" targetFramework="net45" />

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
<SpecificVersion>False</SpecificVersion>
7878
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.0.18.2-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
7979
</Reference>
80-
<Reference Include="Microsoft.Azure.Management.Compute, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.6.0.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
80+
<Reference Include="Microsoft.Azure.Management.Compute, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.7.0.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
8282
<Private>True</Private>
8383
</Reference>
8484
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Config/SetAzureVMSourceImage.cs

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,12 @@ namespace Microsoft.Azure.Commands.Compute
2727
public class SetAzureVMSourceImageCommand : AzurePSCmdlet
2828
{
2929
protected const string ImageReferenceParameterSet = "ImageReferenceParameterSet";
30-
protected const string SourceImageParameterSet = "SourceImageParameterSet";
3130

3231
[Alias("VMProfile")]
3332
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
3433
[ValidateNotNullOrEmpty]
3534
public PSVirtualMachine VM { get; set; }
3635

37-
[Alias("SourceImageName", "ImageName")]
38-
[Parameter(ParameterSetName = SourceImageParameterSet, Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true)]
39-
[ValidateNotNullOrEmpty]
40-
public string Name { get; set; }
41-
4236
[Parameter(ParameterSetName = ImageReferenceParameterSet, Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true)]
4337
[ValidateNotNullOrEmpty]
4438
public string PublisherName { get; set; }
@@ -62,23 +56,13 @@ public override void ExecuteCmdlet()
6256
this.VM.StorageProfile = new StorageProfile();
6357
}
6458

65-
if (this.ParameterSetName == SourceImageParameterSet)
66-
{
67-
this.VM.StorageProfile.SourceImage = new SourceImageReference
68-
{
69-
ReferenceUri = this.Name
70-
}.Normalize(this.Profile.Context.Subscription.Id.ToString());
71-
}
72-
else if (this.ParameterSetName == ImageReferenceParameterSet)
59+
this.VM.StorageProfile.ImageReference = new ImageReference
7360
{
74-
this.VM.StorageProfile.ImageReference = new ImageReference
75-
{
76-
Publisher = PublisherName,
77-
Offer = Offer,
78-
Sku = Skus,
79-
Version = Version
80-
};
81-
}
61+
Publisher = PublisherName,
62+
Offer = Offer,
63+
Sku = Skus,
64+
Version = Version
65+
};
8266

8367
WriteObject(this.VM);
8468
}

src/ResourceManager/Compute/Commands.Compute/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.0-preview" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Authorization" version="0.18.2-preview" targetFramework="net45" />
11-
<package id="Microsoft.Azure.Management.Compute" version="6.0.0-preview" targetFramework="net45" />
11+
<package id="Microsoft.Azure.Management.Compute" version="7.0.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Management.Network" version="2.0.3-preview" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Management.Resources" version="2.18.0-preview" targetFramework="net45" />
1414
<package id="Microsoft.Azure.Management.Storage" version="2.4.0-preview" targetFramework="net45" />
Binary file not shown.

0 commit comments

Comments
 (0)