-
Notifications
You must be signed in to change notification settings - Fork 4k
Parameter typo fix for New-AZAutomationUpdateManagementAzureQuery #9190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
55b6528
fixing typo on the parameter
jemex 7047a52
Merge branch 'master' into parameterBugFix2
markcowl de9bac6
Merge branch 'master' into parameterBugFix2
jemex a90f03b
Adding Alias for Location parameter
jemex c0656ee
Merge branch 'parameterBugFix2' of https://github.com/Azure/azure-pow…
jemex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,5 +117,14 @@ public void TestGetSoftwareUpdateConfigurationRunWithPrePost() | |
TestRunner.RunTestScript("Test-GetSoftwareUpdateConfigurationRunWithPrePost"); | ||
} | ||
|
||
[Fact] | ||
[Trait(Category.Service, Category.Automation)] | ||
[Trait(Category.RunType, Category.LiveOnly)] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
[Trait(Category.AcceptanceType, Category.BVT)] | ||
public void TestGetSoftwareUpdateConfigurationAzureDynamicGroupLocationParameterBackwardCompatiple() | ||
{ | ||
TestRunner.RunTestScript("Test-CreateAndGetSoftwareUpdateConfigurationWithAzureDynamicGroupsWithLocationParameterbackwardCompatiple"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Typo for |
||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,7 +175,7 @@ $query1Scope = @( | |
$azq = New-AzAutomationUpdateManagementAzureQuery -ResourceGroupName $rg ` | ||
-AutomationAccountName $aa ` | ||
-Scope $query1Scope ` | ||
-Locaton $query1Location ` | ||
-Location $query1Location ` | ||
-Tag $tag1 | ||
|
||
|
||
|
@@ -248,7 +248,7 @@ $query1Scope = @( | |
$azq = New-AzAutomationUpdateManagementAzureQuery -ResourceGroupName $rg ` | ||
-AutomationAccountName $aa ` | ||
-Scope $query1Scope ` | ||
-Locaton $query1Location ` | ||
-Location $query1Location ` | ||
-Tag $tag1 | ||
|
||
|
||
|
@@ -295,6 +295,62 @@ Test-CreateAndGetSoftwareUpdateConfigurationWithAzureDynamicGroupsOnlyWithOutTag | |
-StartTime $startTime ` | ||
-ForUpdate | ||
|
||
$query1Scope = @( | ||
"/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus" | ||
) | ||
|
||
$query1Location =@("Japan East", "UK South") | ||
$query1FilterOperator = "All" | ||
|
||
$azq = New-AzAutomationUpdateManagementAzureQuery -ResourceGroupName $rg ` | ||
-AutomationAccountName $aa ` | ||
-Scope $query1Scope ` | ||
-Location $query1Location ` | ||
-FilterOperator $query1FilterOperator | ||
|
||
$AzureQueries = @($azq) | ||
|
||
$suc = New-AzAutomationSoftwareUpdateConfiguration -ResourceGroupName $rg ` | ||
-AutomationAccountName $aa ` | ||
-Schedule $s ` | ||
-Window ` | ||
-Duration (New-TimeSpan -Hours 2) ` | ||
-AzureQuery $AzureQueries ` | ||
-IncludedUpdateClassification Security,Critical | ||
|
||
|
||
Assert-NotNull $suc "New-AzureRmAutomationSoftwareUpdateConfiguration returned null" | ||
Assert-AreEqual $suc.Name $name "Name of created software update configuration didn't match given name" | ||
|
||
$sucGet = Get-AzAutomationSoftwareUpdateConfiguration -ResourceGroupName $rg ` | ||
-AutomationAccountName $aa ` | ||
-Name $name | ||
|
||
Assert-NotNull $sucGet "Get-AzureRmAutomationSoftwareUpdateConfiguration returned null" | ||
Assert-AreEqual $sucGet.Name $name "Name of created software update configuration didn't match given name" | ||
Assert-NotNull $sucGet.UpdateConfiguration "UpdateConfiguration of the software update configuration object is null" | ||
Assert-NotNull $sucGet.UpdateConfiguration.Targets "Update targets object is null" | ||
Assert-NotNull $sucGet.UpdateConfiguration.Targets.AzureQueries "Update targets azureQueries list null" | ||
Assert-AreEqual $sucGet.UpdateConfiguration.Targets.AzureQueries.Count 1 "Update targets doesn't have the correct number of azure queries" | ||
|
||
} | ||
|
||
<# | ||
.SYNOPSIS | ||
Test-CreateAndGetSoftwareUpdateConfigurationWithAzureDynamicGroupsOnlyWithOutTags | ||
#> | ||
function Test-CreateAndGetSoftwareUpdateConfigurationWithAzureDynamicGroupsWithLocationParameterbackwardCompatiple | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Typo for |
||
{ | ||
$name = "DG-suc-04" | ||
$startTime = ([DateTime]::Now).AddMinutes(10) | ||
$s = New-AzAutomationSchedule -ResourceGroupName $rg ` | ||
-AutomationAccountName $aa ` | ||
-Name $name ` | ||
-Description test-OneTime ` | ||
-OneTime ` | ||
-StartTime $startTime ` | ||
-ForUpdate | ||
|
||
$query1Scope = @( | ||
"/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus" | ||
) | ||
|
167 changes: 167 additions & 0 deletions
167
...stGetSoftwareUpdateConfigurationAzureDynamicGroupLocationParameterBackwardCompatiple.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
{ | ||
"Entries": [ | ||
{ | ||
"RequestUri": "/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus/providers/Microsoft.Automation/automationAccounts/JemalOMSAutomation/softwareUpdateConfigurations/DG-suc-04?api-version=2017-05-15-preview", | ||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2Q0NWYyM2ItYjgzMi00ZmE0LWE0MzQtMWJmN2U2ZjE0YTVhL3Jlc291cmNlR3JvdXBzL21tcy13Y3VzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0b21hdGlvbi9hdXRvbWF0aW9uQWNjb3VudHMvSmVtYWxPTVNBdXRvbWF0aW9uL3NvZnR3YXJlVXBkYXRlQ29uZmlndXJhdGlvbnMvREctc3VjLTA0P2FwaS12ZXJzaW9uPTIwMTctMDUtMTUtcHJldmlldw==", | ||
"RequestMethod": "PUT", | ||
"RequestBody": "{\r\n \"properties\": {\r\n \"updateConfiguration\": {\r\n \"operatingSystem\": \"Windows\",\r\n \"windows\": {\r\n \"includedUpdateClassifications\": \"Security,Critical\",\r\n \"rebootSetting\": \"IfRequired\"\r\n },\r\n \"duration\": \"PT2H\",\r\n \"targets\": {\r\n \"azureQueries\": [\r\n {\r\n \"scope\": [\r\n \"/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus\"\r\n ],\r\n \"locations\": [\r\n \"Japan East\",\r\n \"UK South\"\r\n ],\r\n \"tagSettings\": {\r\n \"tags\": {},\r\n \"filterOperator\": \"Any\"\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"scheduleInfo\": {\r\n \"startTime\": \"2019-04-26T16:34:51.9929739-07:00\",\r\n \"expiryTime\": \"9999-12-31T15:59:59.9999999-08:00\",\r\n \"expiryTimeOffsetMinutes\": 0.0,\r\n \"isEnabled\": false,\r\n \"nextRunOffsetMinutes\": 0.0,\r\n \"frequency\": \"Onetime\",\r\n \"creationTime\": \"0001-01-01T00:00:00-08:00\",\r\n \"lastModifiedTime\": \"0001-01-01T00:00:00-08:00\"\r\n },\r\n \"tasks\": {}\r\n }\r\n}", | ||
"RequestHeaders": { | ||
"x-ms-client-request-id": [ | ||
"137754ee-4f5f-4c55-b9a4-95466b7e9cb7" | ||
], | ||
"Accept-Language": [ | ||
"en-US" | ||
], | ||
"User-Agent": [ | ||
"FxVersion/4.6.27129.04", | ||
"OSName/Windows", | ||
"OSVersion/Microsoft.Windows.10.0.17763.", | ||
"Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" | ||
], | ||
"x-ms-activity-id": [ | ||
"42356e59-c15e-4af7-8502-7cd102b9234a" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=utf-8" | ||
], | ||
"Content-Length": [ | ||
"1101" | ||
] | ||
}, | ||
"ResponseHeaders": { | ||
"Cache-Control": [ | ||
"no-cache" | ||
], | ||
"Pragma": [ | ||
"no-cache" | ||
], | ||
"Location": [ | ||
"https://management.azure.com/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus/providers/Microsoft.Automation/automationAccounts/JemalOMSAutomation/softwareUpdateConfigurations/DG-suc-04?api-version=2017-05-15-preview" | ||
], | ||
"x-ms-request-id": [ | ||
"42356e59-c15e-4af7-8502-7cd102b9234a" | ||
], | ||
"x-ms-location": [ | ||
"https://management.azure.com/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus/providers/Microsoft.Automation/automationAccounts/JemalOMSAutomation/softwareUpdateConfigurations/DG-suc-04?api-version=2017-05-15-preview" | ||
], | ||
"ocp-location": [ | ||
"https://management.azure.com/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus/providers/Microsoft.Automation/automationAccounts/JemalOMSAutomation/softwareUpdateConfigurations/DG-suc-04?api-version=2017-05-15-preview" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=31536000; includeSubDomains" | ||
], | ||
"Server": [ | ||
"Microsoft-IIS/10.0" | ||
], | ||
"X-AspNet-Version": [ | ||
"4.0.30319" | ||
], | ||
"X-Powered-By": [ | ||
"ASP.NET" | ||
], | ||
"x-ms-ratelimit-remaining-subscription-writes": [ | ||
"1199" | ||
], | ||
"x-ms-correlation-request-id": [ | ||
"5f893cfa-43ec-411f-93f3-ec97b7e3c7de" | ||
], | ||
"x-ms-routing-request-id": [ | ||
"WESTUS2:20190426T232459Z:5f893cfa-43ec-411f-93f3-ec97b7e3c7de" | ||
], | ||
"X-Content-Type-Options": [ | ||
"nosniff" | ||
], | ||
"Date": [ | ||
"Fri, 26 Apr 2019 23:24:59 GMT" | ||
], | ||
"Content-Length": [ | ||
"1451" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=utf-8" | ||
], | ||
"Expires": [ | ||
"-1" | ||
] | ||
}, | ||
"ResponseBody": "{\r\n \"id\": \"/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus/providers/Microsoft.Automation/automationAccounts/JemalOMSAutomation/softwareUpdateConfigurations/DG-suc-04\",\r\n \"name\": \"DG-suc-04\",\r\n \"type\": null,\r\n \"properties\": {\r\n \"updateConfiguration\": {\r\n \"operatingSystem\": \"Windows\",\r\n \"windows\": {\r\n \"includedUpdateClassifications\": \"Critical, Security\",\r\n \"excludedKbNumbers\": null,\r\n \"includedKbNumbers\": null,\r\n \"rebootSetting\": \"IfRequired\",\r\n \"IsInvalidKbNumbers\": false\r\n },\r\n \"linux\": null,\r\n \"targets\": {\r\n \"azureQueries\": [\r\n {\r\n \"scope\": [\r\n \"/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus\"\r\n ],\r\n \"tagSettings\": {\r\n \"tags\": {},\r\n \"filterOperator\": \"Any\"\r\n },\r\n \"locations\": [\r\n \"Japan East\",\r\n \"UK South\"\r\n ]\r\n }\r\n ],\r\n \"nonAzureQueries\": null\r\n },\r\n \"duration\": \"PT2H\",\r\n \"azureVirtualMachines\": null,\r\n \"nonAzureComputerNames\": null\r\n },\r\n \"scheduleInfo\": {\r\n \"description\": null,\r\n \"startTime\": \"2019-04-26T16:34:00-07:00\",\r\n \"startTimeOffsetMinutes\": 0.0,\r\n \"expiryTime\": \"2019-04-26T16:34:00-07:00\",\r\n \"expiryTimeOffsetMinutes\": 0.0,\r\n \"isEnabled\": true,\r\n \"nextRun\": \"2019-04-26T16:34:00-07:00\",\r\n \"nextRunOffsetMinutes\": 0.0,\r\n \"interval\": null,\r\n \"frequency\": \"OneTime\",\r\n \"creationTime\": \"2019-04-26T16:24:52.7-07:00\",\r\n \"lastModifiedTime\": \"2019-04-26T16:24:52.7-07:00\",\r\n \"timeZone\": \"UTC\",\r\n \"advancedSchedule\": null\r\n },\r\n \"provisioningState\": \"Provisioning\",\r\n \"createdBy\": \"{scrubbed}\",\r\n \"error\": null,\r\n \"tasks\": {\r\n \"preTask\": null,\r\n \"postTask\": null\r\n },\r\n \"creationTime\": \"2019-04-26T16:24:52.7066667-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2019-04-26T16:24:52.7233333-07:00\"\r\n }\r\n}", | ||
"StatusCode": 201 | ||
}, | ||
{ | ||
"RequestUri": "/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus/providers/Microsoft.Automation/automationAccounts/JemalOMSAutomation/softwareUpdateConfigurations/DG-suc-04?api-version=2017-05-15-preview", | ||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2Q0NWYyM2ItYjgzMi00ZmE0LWE0MzQtMWJmN2U2ZjE0YTVhL3Jlc291cmNlR3JvdXBzL21tcy13Y3VzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0b21hdGlvbi9hdXRvbWF0aW9uQWNjb3VudHMvSmVtYWxPTVNBdXRvbWF0aW9uL3NvZnR3YXJlVXBkYXRlQ29uZmlndXJhdGlvbnMvREctc3VjLTA0P2FwaS12ZXJzaW9uPTIwMTctMDUtMTUtcHJldmlldw==", | ||
"RequestMethod": "GET", | ||
"RequestBody": "", | ||
"RequestHeaders": { | ||
"x-ms-client-request-id": [ | ||
"d8c1fb19-2319-48f4-a31d-ffdc350e9ab1" | ||
], | ||
"Accept-Language": [ | ||
"en-US" | ||
], | ||
"User-Agent": [ | ||
"FxVersion/4.6.27129.04", | ||
"OSName/Windows", | ||
"OSVersion/Microsoft.Windows.10.0.17763.", | ||
"Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" | ||
], | ||
"x-ms-activity-id": [ | ||
"4b7d2e6b-4afd-402e-8d39-d548f7daf646" | ||
] | ||
}, | ||
"ResponseHeaders": { | ||
"Cache-Control": [ | ||
"no-cache" | ||
], | ||
"Pragma": [ | ||
"no-cache" | ||
], | ||
"x-ms-request-id": [ | ||
"4b7d2e6b-4afd-402e-8d39-d548f7daf646" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=31536000; includeSubDomains" | ||
], | ||
"Server": [ | ||
"Microsoft-IIS/10.0" | ||
], | ||
"X-AspNet-Version": [ | ||
"4.0.30319" | ||
], | ||
"X-Powered-By": [ | ||
"ASP.NET" | ||
], | ||
"x-ms-ratelimit-remaining-subscription-reads": [ | ||
"11998" | ||
], | ||
"x-ms-correlation-request-id": [ | ||
"d554678b-a483-479f-91e1-86f4f0705936" | ||
], | ||
"x-ms-routing-request-id": [ | ||
"WESTUS2:20190426T232455Z:d554678b-a483-479f-91e1-86f4f0705936" | ||
], | ||
"X-Content-Type-Options": [ | ||
"nosniff" | ||
], | ||
"Date": [ | ||
"Fri, 26 Apr 2019 23:24:55 GMT" | ||
], | ||
"Content-Length": [ | ||
"1448" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=utf-8" | ||
], | ||
"Expires": [ | ||
"-1" | ||
] | ||
}, | ||
"ResponseBody": "{\r\n \"id\": \"/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus/providers/Microsoft.Automation/automationAccounts/JemalOMSAutomation/softwareUpdateConfigurations/DG-suc-04\",\r\n \"name\": \"DG-suc-04\",\r\n \"type\": null,\r\n \"properties\": {\r\n \"updateConfiguration\": {\r\n \"operatingSystem\": \"Windows\",\r\n \"windows\": {\r\n \"includedUpdateClassifications\": \"Critical, Security\",\r\n \"excludedKbNumbers\": null,\r\n \"includedKbNumbers\": null,\r\n \"rebootSetting\": \"IfRequired\",\r\n \"IsInvalidKbNumbers\": false\r\n },\r\n \"linux\": null,\r\n \"targets\": {\r\n \"azureQueries\": [\r\n {\r\n \"scope\": [\r\n \"/subscriptions/cd45f23b-b832-4fa4-a434-1bf7e6f14a5a/resourceGroups/mms-wcus\"\r\n ],\r\n \"tagSettings\": {\r\n \"tags\": {},\r\n \"filterOperator\": \"Any\"\r\n },\r\n \"locations\": [\r\n \"Japan East\",\r\n \"UK South\"\r\n ]\r\n }\r\n ],\r\n \"nonAzureQueries\": null\r\n },\r\n \"duration\": \"PT2H\",\r\n \"azureVirtualMachines\": null,\r\n \"nonAzureComputerNames\": null\r\n },\r\n \"scheduleInfo\": {\r\n \"description\": null,\r\n \"startTime\": \"2019-04-26T16:34:00-07:00\",\r\n \"startTimeOffsetMinutes\": 0.0,\r\n \"expiryTime\": \"2019-04-26T16:34:00-07:00\",\r\n \"expiryTimeOffsetMinutes\": 0.0,\r\n \"isEnabled\": true,\r\n \"nextRun\": \"2019-04-26T16:34:00-07:00\",\r\n \"nextRunOffsetMinutes\": 0.0,\r\n \"interval\": null,\r\n \"frequency\": \"OneTime\",\r\n \"creationTime\": \"2019-04-26T16:24:52.7-07:00\",\r\n \"lastModifiedTime\": \"2019-04-26T16:24:52.7-07:00\",\r\n \"timeZone\": \"UTC\",\r\n \"advancedSchedule\": null\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"createdBy\": \"{scrubbed}\",\r\n \"error\": null,\r\n \"tasks\": {\r\n \"preTask\": null,\r\n \"postTask\": null\r\n },\r\n \"creationTime\": \"2019-04-26T16:24:52.7066667-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2019-04-26T16:24:52.7233333-07:00\"\r\n }\r\n}", | ||
"StatusCode": 200 | ||
} | ||
], | ||
"Names": {}, | ||
"Variables": { | ||
"SubscriptionId": "cd45f23b-b832-4fa4-a434-1bf7e6f14a5a" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Typo for
Compatible