Skip to content

Commit 30b5c07

Browse files
Martin SawickiHovsep
Martin Sawicki
authored and
Hovsep
committed
adjusting this sample because Compute appears to have just changed the way VM capture results are returned in a breaking way (#2727)
1 parent fba8a8c commit 30b5c07

File tree

1 file changed

+2
-2
lines changed
  • Samples/ResourceManagement/Compute/CreateVMsUsingCustomImageOrSpecializedVHD

1 file changed

+2
-2
lines changed

Samples/ResourceManagement/Compute/CreateVMsUsingCustomImageOrSpecializedVHD/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ public static void Main(string[] args)
118118
//=============================================================
119119
// Create a Linux VM using captured image (Generalized image)
120120
JObject o = JObject.Parse(capturedResultJson);
121-
JToken resourceToken = o.SelectToken("$.resources[?(@.properties.storageprofile.osDisk.image.uri != null)]");
121+
JToken resourceToken = o.SelectToken("$.resources[?(@.properties.storageProfile.osDisk.image.uri != null)]");
122122
if (resourceToken == null)
123123
{
124124
throw new Exception("Could not locate image uri under expected section in the capture result -" + capturedResultJson);
125125
}
126-
string capturedImageUri = (string)(resourceToken["properties"]["storageprofile"]["osDisk"]["image"]["uri"]);
126+
string capturedImageUri = (string)(resourceToken["properties"]["storageProfile"]["osDisk"]["image"]["uri"]);
127127

128128
Console.WriteLine("Creating a Linux VM using captured image - " + capturedImageUri);
129129

0 commit comments

Comments
 (0)