Skip to content

Commit 05eac20

Browse files
committed
Fix on-demand job failures.
1 parent 202503a commit 05eac20

File tree

6 files changed

+1951
-3116
lines changed

6 files changed

+1951
-3116
lines changed

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Utilities/TemplateUtility.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ private static Type GetParameterType(string resourceParameterType)
174174
const string intType = "int";
175175
const string boolType = "bool";
176176
const string secureStringType = "SecureString";
177+
const string objectType = "object";
178+
const string secureObjectType = "secureObject";
179+
const string arrayType = "array";
177180
Type typeObject = typeof(object);
178181

179182
if (resourceParameterType.Equals(stringType, StringComparison.OrdinalIgnoreCase))
@@ -192,8 +195,18 @@ private static Type GetParameterType(string resourceParameterType)
192195
{
193196
typeObject = typeof(bool);
194197
}
198+
else if (resourceParameterType.Equals(objectType, StringComparison.OrdinalIgnoreCase)
199+
|| resourceParameterType.Equals(secureObjectType, StringComparison.OrdinalIgnoreCase))
200+
{
201+
typeObject = typeof(Hashtable);
202+
}
203+
else if (resourceParameterType.Equals(arrayType, StringComparison.OrdinalIgnoreCase))
204+
{
205+
typeObject = typeof(object[]);
206+
}
195207

196208
return typeObject;
209+
197210
}
198211

199212
internal static RuntimeDefinedParameter ConstructDynamicParameter(string[] staticParameters, KeyValuePair<string, TemplateFileParameterV1> parameter)

src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@
8181
<SpecificVersion>False</SpecificVersion>
8282
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5945.28173-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
8383
</Reference>
84-
<Reference Include="Microsoft.Azure.Test.HttpRecorder">
85-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5945.28173-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
84+
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
85+
<SpecificVersion>False</SpecificVersion>
86+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.0-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
87+
<Private>True</Private>
8688
</Reference>
8789
<Reference Include="Microsoft.Data.Edm">
8890
<SpecificVersion>False</SpecificVersion>
@@ -117,7 +119,7 @@
117119
</Reference>
118120
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
119121
<SpecificVersion>False</SpecificVersion>
120-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.2.0-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
122+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.2.1-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
121123
</Reference>
122124
<Reference Include="Microsoft.Threading.Tasks">
123125
<SpecificVersion>False</SpecificVersion>
@@ -140,8 +142,10 @@
140142
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
141143
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
142144
</Reference>
143-
<Reference Include="Microsoft.WindowsAzure.Storage">
144-
<HintPath>..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
145+
<Reference Include="Microsoft.WindowsAzure.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
146+
<SpecificVersion>False</SpecificVersion>
147+
<HintPath>..\..\..\packages\WindowsAzure.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
148+
<Private>True</Private>
145149
</Reference>
146150
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
147151
<SpecificVersion>False</SpecificVersion>

0 commit comments

Comments
 (0)