Skip to content

Commit 894bbb4

Browse files
committed
Merge pull request Azure#681 from hyonholee/dev
AzureRT update
2 parents ff3bb79 + be3831a commit 894bbb4

File tree

65 files changed

+1399
-213
lines changed

Some content is hidden

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

65 files changed

+1399
-213
lines changed

src/Common/Commands.Common.Test/Commands.Common.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
108108
</Reference>
109109
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
110-
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
110+
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
111111
</Reference>
112112
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
113113
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>

src/Common/Commands.Common.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
19-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
19+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2121
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
2222
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />

src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@
102102
<Reference Include="Microsoft.WindowsAzure.Management">
103103
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
104104
</Reference>
105-
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
106-
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
105+
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
106+
<SpecificVersion>False</SpecificVersion>
107+
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
107108
</Reference>
108109
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
109110
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>

src/Common/Commands.ScenarioTest/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
20-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
20+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.0" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2323
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.2-prerelease" targetFramework="net45" />

src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</Reference>
102102
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
103103
<SpecificVersion>False</SpecificVersion>
104-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
104+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
105105
</Reference>
106106
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
107107
<SpecificVersion>False</SpecificVersion>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.14.201151115" targetFramework="net45" />
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
18-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
18+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2020
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
2121
<package id="xunit" version="1.9.2" targetFramework="net45" />

src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</Reference>
102102
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
103103
<SpecificVersion>False</SpecificVersion>
104-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
104+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
105105
</Reference>
106106
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
107107
<SpecificVersion>False</SpecificVersion>

src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.14.201151115" targetFramework="net45" />
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
18-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
18+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2020
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
2121
<package id="xunit" version="1.9.2" targetFramework="net45" />

src/ResourceManager/Compute/Commands.Compute/Extension/CustomScript/SetAzureVMCustomScriptExtensionCommand.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using Microsoft.Azure.Common.Authentication;
1516
using Microsoft.Azure.Common.Authentication.Models;
1617
using Microsoft.Azure.Commands.Compute.Common;
1718
using Microsoft.Azure.Commands.Compute.Models;
@@ -208,14 +209,7 @@ public override void ExecuteCmdlet()
208209
Hashtable publicSettings = new Hashtable();
209210
publicSettings.Add(commandToExecuteKey, commandToExecute ?? "");
210211
publicSettings.Add(fileUrisKey, FileUri ?? new string[] { });
211-
212-
Hashtable privateSettings = new Hashtable();
213-
privateSettings.Add(storageAccountNameKey, StorageAccountName ?? "");
214-
privateSettings.Add(storageAccountKeyKey, StorageAccountKey ?? "");
215-
216212
var SettingString = JsonConvert.SerializeObject(publicSettings);
217-
var ProtectedSettingString = JsonConvert.SerializeObject(privateSettings);
218-
219213

220214
var parameters = new VirtualMachineExtension
221215
{
@@ -226,7 +220,7 @@ public override void ExecuteCmdlet()
226220
ExtensionType = VirtualMachineCustomScriptExtensionContext.ExtensionDefaultName,
227221
TypeHandlerVersion = (this.TypeHandlerVersion) ?? VirtualMachineCustomScriptExtensionContext.ExtensionDefaultVersion,
228222
Settings = SettingString,
229-
ProtectedSettings = ProtectedSettingString,
223+
ProtectedSettings = GetPrivateConfiguration(),
230224
};
231225

232226
var op = this.VirtualMachineExtensionClient.CreateOrUpdate(
@@ -292,5 +286,19 @@ protected string GetSasUrlStr(string storageName, string storageKey, string cont
292286
return cloudBlob.Uri + sasToken;
293287
}
294288

289+
protected string GetPrivateConfiguration()
290+
{
291+
if (string.IsNullOrEmpty(this.StorageAccountName) || string.IsNullOrEmpty(this.StorageAccountKey))
292+
{
293+
return string.Empty;
294+
}
295+
else
296+
{
297+
var privateSettings = new Hashtable();
298+
privateSettings.Add(storageAccountNameKey, StorageAccountName);
299+
privateSettings.Add(storageAccountKeyKey, StorageAccountKey);
300+
return JsonUtilities.TryFormatJson(JsonConvert.SerializeObject(privateSettings));
301+
}
302+
}
295303
}
296304
}

src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@
7979
<Reference Include="Microsoft.WindowsAzure.Management">
8080
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
8181
</Reference>
82-
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
83-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
82+
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
83+
<SpecificVersion>False</SpecificVersion>
84+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
8485
</Reference>
8586
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
8687
<SpecificVersion>False</SpecificVersion>

src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.14.201151115" targetFramework="net45" />
1212
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1313
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
14-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
14+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
1515
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
1616
<package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net45" />
1717
</packages>

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
113113
</Reference>
114114
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
115-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
115+
<SpecificVersion>False</SpecificVersion>
116+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
116117
</Reference>
117118
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
118119
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
@@ -163,6 +164,7 @@
163164
<Compile Include="ImagePublishing\RemoveAzurePlatformVMImage.cs" />
164165
<Compile Include="ImagePublishing\GetAzurePlatformVMImage.cs" />
165166
<Compile Include="ImagePublishing\SetAzurePlatformVMImage.cs" />
167+
<Compile Include="Model\ExtensionInstanceInputEndpoint.cs" />
166168
<Compile Include="Model\ExtensionInternalEndpoint.cs" />
167169
<Compile Include="Model\ExtensionInputEndpoint.cs" />
168170
<Compile Include="Model\ExtensionLocalResourceConfig.cs" />

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionCertificateConfig.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,23 @@ public class NewAzurePlatformExtensionCertificateConfigCommand : PSCmdlet
3939
public string StoreLocation { get; set; }
4040

4141
[Parameter(
42-
Mandatory = true,
42+
Mandatory = false,
4343
Position = 1,
4444
ValueFromPipelineByPropertyName = true,
4545
HelpMessage = "The Extension Certificate Store Name.")]
46+
[ValidateNotNullOrEmpty]
4647
public string StoreName { get; set; }
4748

4849
[Parameter(
49-
Mandatory = true,
50+
Mandatory = false,
5051
Position = 2,
5152
ValueFromPipelineByPropertyName = true,
5253
HelpMessage = "The Extension Certificate Thumbprint Algorithm.")]
54+
[ValidateNotNullOrEmpty]
5355
public string ThumbprintAlgorithm { get; set; }
5456

5557
[Parameter(
56-
Mandatory = true,
58+
Mandatory = false,
5759
Position = 3,
5860
ValueFromPipelineByPropertyName = true,
5961
HelpMessage = "The Extension Certificate Thumbprint Requirement.")]

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,23 @@ public class PublishAzurePlatformExtensionCommand : ServiceManagementBaseCmdlet
200200
[ValidateNotNullOrEmpty]
201201
public string SupportedOS { get; set; }
202202

203+
[Parameter(
204+
Mandatory = false,
205+
Position = 22,
206+
HelpMessage = "To force the registration operation.")]
207+
public string Regions { get; set; }
208+
203209
[Parameter(
204210
Mandatory = false,
205-
Position = 22,
211+
Position = 23,
206212
HelpMessage = "To force the registration operation.")]
207213
public SwitchParameter Force { get; set; }
208214

215+
[Parameter(
216+
Mandatory = false,
217+
Position = 24,
218+
HelpMessage = "To force the registration operation.")]
219+
[ValidateSet(PublicModeStr, InternalModeStr, IgnoreCase = true)]
209220
public string ExtensionMode { get; set; }
210221

211222
protected override void OnProcessRecord()
@@ -225,9 +236,7 @@ protected override void OnProcessRecord()
225236
var upgradeCnfm = Resources.ExtensionUpgradingConfirmation;
226237
var upgradeCptn = Resources.ExtensionUpgradingCaption;
227238

228-
this.IsInternalExtension = string.Equals(this.ExtensionMode, PublicModeStr) ? false
229-
: string.Equals(this.ExtensionMode, InternalModeStr) ? true
230-
: true;
239+
this.IsInternalExtension = ! this.ExtensionMode.Equals(PublicModeStr, StringComparison.InvariantCultureIgnoreCase);
231240

232241
if (found && (this.Force.IsPresent || this.ShouldContinue(upgradeCnfm, upgradeCptn)))
233242
{

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionEndpoint.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class RemoveAzurePlatformExtensionEndpointCommand : PSCmdlet
3232
protected const string AzurePlatformExtensionEndpointCommandNoun = "AzurePlatformExtensionEndpoint";
3333
protected const string InputEndpointParamSetStr = "InputEndpoint";
3434
protected const string InternalEndpointParamSetStr = "InternalEndpoint";
35+
protected const string InstanceInputEndpointParamSetStr = "InstanceInputEndpoint";
3536

3637
[Parameter(
3738
Mandatory = true,
@@ -56,6 +57,14 @@ public class RemoveAzurePlatformExtensionEndpointCommand : PSCmdlet
5657
HelpMessage = "The Internal Endpoint Name.")]
5758
public string InternalEndpointName { get; set; }
5859

60+
[Parameter(
61+
ParameterSetName = InstanceInputEndpointParamSetStr,
62+
Mandatory = true,
63+
Position = 1,
64+
ValueFromPipelineByPropertyName = true,
65+
HelpMessage = "The Instance Input Endpoint Name.")]
66+
public string InstanceInputEndpointName { get; set; }
67+
5968
protected override void ProcessRecord()
6069
{
6170
if (this.EndpointConfig != null)

0 commit comments

Comments
 (0)