-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[DO NOT MERGE] Add software update specs #4950
Conversation
Merge from master
Merge from upstream Azure
If you're a MSFT employee, click this link |
Automation for azure-sdk-for-jsNothing to generate for azure-sdk-for-js |
Can one of the admins verify this patch? |
Automation for azure-sdk-for-goNothing to generate for azure-sdk-for-go |
Automation for azure-sdk-for-rubyNothing to generate for azure-sdk-for-ruby |
Automation for azure-sdk-for-pythonNothing to generate for azure-sdk-for-python |
Automation for azure-sdk-for-nodeNothing to generate for azure-sdk-for-node |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
Hello!! The Rest API Specs team wishes everyone a happy holiday and would like to kindly inform you that responses and review to Pull request will be delayed during the holiday period (now -> 2nds of January) to allow for Awesome reviewers to have an awesome time with their families during the holidays! Thanks and Have a WONDERFUL HOLIDAY |
...ger/Microsoft.GuestConfiguration/preview/2018-06-30-preview/examples/getSoftwareUpdates.json
Outdated
Show resolved
Hide resolved
...crosoft.GuestConfiguration/preview/2018-06-30-preview/examples/getSoftwareUpdateProfile.json
Show resolved
Hide resolved
...crosoft.GuestConfiguration/preview/2018-06-30-preview/examples/getSoftwareUpdateProfile.json
Show resolved
Hide resolved
...ger/Microsoft.GuestConfiguration/preview/2018-06-30-preview/examples/getSoftwareUpdates.json
Outdated
Show resolved
Hide resolved
"securityCount": "0", | ||
"otherCount": "0", | ||
"approvalSource": "", | ||
"latestAssessmentTimeTaken": "2018-10-30T17:31:02Z", |
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.
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.
Same for SoftwareUpdateProfile. GuestConfig RP is the source of truth.
https://msazure.visualstudio.com/One/_git/Mgmt-Automation-GuestConfiguration?path=%2Fsrc%2FGuestConfiguration.ViewModel%2FSoftwareUpdateProfileV1.cs&version=GBmaster
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.
Task applies here too.
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"name": "softwareUpdateId", |
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.
This parameter does not exist in the path.
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.
Fixed
@@ -852,6 +1013,323 @@ | |||
} | |||
}, | |||
"description": "Reason and code for the compliance of the guest configuration assignment resource." | |||
}, | |||
"SoftwareUpdateProfile": { | |||
"description": "The profile of the computer in the context of software updates.", |
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.
Please fix the indentations to indent 2 spaces all the way to line 1171.
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.
Fixed
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/softwareUpdateProfile/default", |
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.
SoftwareUpdateProfile defined here: https://github.com/Azure/azure-rest-api-specs/pull/4950/files#diff-e53a4ef9e8ceed16b91a1997e37815e6R1017 does not have properties "id", "name", "type". Did you forget to inherit it from Resource?
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.
Inherited from Proxy resource now
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.
Inherited from proxy now
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.
@abhinav-ghai please take a look at some minor comments.
"SoftwareUpdateProperties": { | ||
"description": "Properties of the software update object.", | ||
"properties": { | ||
"updateState": { |
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.
lets make this as an enum. will work better.
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.
Done
"readOnly": true, | ||
"description": "Needed / Installed" | ||
}, | ||
"availableOnComputerSince": { |
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.
i think this should be ISO 8601 compliant, please add format property with value as date-time.
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.
Done
"readOnly": true, | ||
"description": "Point in time when this update was first seen on this computer" | ||
}, | ||
"approved": { |
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.
string enums work much better than bools in the longer run. May be call it "status" with values as approved, rejected etc.
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.
OS specific, might be empty for certain cases. Keeping it string.
"readOnly": true, | ||
"description": "Superseded Update Ids" | ||
}, | ||
"isSupercededUpdate": { |
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.
this is modeled as a string but looks like you wanted a bool. If yes, same comment as above about bools. string enum will work better.
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.
Done
"readOnly": true, | ||
"description": "KB revision number" | ||
}, | ||
"publishedDate": { |
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.
format date-time
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.
Done
"readOnly": true, | ||
"description": "Reboot behavior" | ||
}, | ||
"optional": { |
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.
did you intend this to be a bool? string enum works better.
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.
OS specific, might be empty for certain cases. Keeping it string.
"readOnly": true, | ||
"description": "Browse only" | ||
}, | ||
"lastRefreshDate": { |
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.
date-time
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.
Done
@@ -369,6 +369,167 @@ | |||
"application/json" | |||
] | |||
} | |||
}, | |||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/softwareUpdateProfile": { |
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.
if this is a singleton, add a segment to the URL as below
.../softwareUpdateProfile/{profileName}. Now profileName can be made as an enum with just one possible value which can be called "default". So the name of this singleton would be "default"
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.
Done
@@ -852,6 +1013,323 @@ | |||
} | |||
}, | |||
"description": "Reason and code for the compliance of the guest configuration assignment resource." | |||
}, | |||
"SoftwareUpdateProfile": { |
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.
id, name and type top level properties missing. Did you miss a reference to ProxyResource?
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.
Referenced from Proxy now
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.
Added Proxy reference now
@@ -852,6 +1013,323 @@ | |||
} | |||
}, | |||
"description": "Reason and code for the compliance of the guest configuration assignment resource." | |||
}, | |||
"SoftwareUpdateProfile": { |
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.
in the properties, any property which can take a value from a fixed set should be modeled as an enum. Any bools should be modeled as string enum. And and dates, should have "format": "date-time"
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.
date-time reference added where possible, enums considered where possible
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.
Done where possible
"resourceGroupName": "myResourceGroupName", | ||
"vmName": "myVMName", | ||
"api-version": "2018-06-30-preview" | ||
}, |
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.
Missing parameter profileName
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.
Added
"assessmentRuntime": "2018-10-30T17:31:02Z", | ||
"oldestMissingSecurityUpdateInDays": "35", | ||
"oldestMissingSecurityUpdateBucket": "30 days ago", | ||
"lastUpdateApplied": "", |
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.
"" is not a valid value for a date-time
property
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.
Removed date-time format for this property because this can actually not be a valid date-time in the when updates have never been applied to VM.
"lastUpdateApplied": "", | ||
"updateAssessmentErrors": "The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (Exception from HRESULT: 0x80070422)", | ||
"updateAssessmentErrorStackTrace": "System.Runtime.InteropServices.COMException (0x80070422): ... at Microsoft.EnterpriseManagement.Mom.Modules.ChangeTracking.WUA.UpdateInstallerClass.get_IsBusy() at .....acknowledgeImmediately)", | ||
"lastRefreshDate": "" |
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.
Same here
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.
Fixed
"vmName": "myVMName", | ||
"updateId": "35428702-5784-4ba4-a6e0-5222258b5411", | ||
"api-version": "2018-06-30-preview" | ||
}, |
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.
Missing parameter softwareUpdateId
.
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.
Fixed
Looks good. Signing off from ARM side. |
Sorry I missed the do not merge notice. Reverting. |
This reverts commit b131e9e.
* Add list and get software to GuestConfiguration * Use newer API version for software * Revert software Swagger spec since these are private preview only * Add specs for software update and software profile * Address comments for property type and proxy reference * Address comments for softwareUpdateProfile * Address comments for softwareUpdate
* Onboarding OEP * Fixing CI error * Fixing Prettier * Fixing Linter * Fixing Linter * Fixing Linter issues * Fixing prettier for oep.json * Fixing delete example * Prettier fix * Deleting * Adding * Updating readme.go.md * updated dataPartitionNames with list (#4950) * Review comments * Review comment * Tracked Resource update * Tracked resource name update * Fixing Update Example * Review comment Co-authored-by: ankurrawat66 <91181916+ankurrawat66@users.noreply.github.com>
Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Contribution checklist:
ARM API Review Checklist
Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.
Please follow the link to find more details on API review process.