Skip to content
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

Merged
merged 9 commits into from
Jan 24, 2019
Merged

[DO NOT MERGE] Add software update specs #4950

merged 9 commits into from
Jan 24, 2019

Conversation

abhinav-ghai
Copy link
Member

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:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@openapi-portal-comment
Copy link

If you're a MSFT employee, click this link
to view this PR's validation status on our new OpenAPI Hub spec management tool.

@AutorestCI
Copy link

AutorestCI commented Dec 20, 2018

Automation for azure-sdk-for-js

Nothing to generate for azure-sdk-for-js

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@AutorestCI
Copy link

AutorestCI commented Dec 20, 2018

Automation for azure-sdk-for-go

Nothing to generate for azure-sdk-for-go

@AutorestCI
Copy link

AutorestCI commented Dec 20, 2018

Automation for azure-sdk-for-ruby

Nothing to generate for azure-sdk-for-ruby

@AutorestCI
Copy link

AutorestCI commented Dec 20, 2018

Automation for azure-sdk-for-python

Nothing to generate for azure-sdk-for-python

@AutorestCI
Copy link

AutorestCI commented Dec 20, 2018

Automation for azure-sdk-for-node

Nothing to generate for azure-sdk-for-node

@AutorestCI
Copy link

AutorestCI commented Dec 20, 2018

Automation for azure-sdk-for-java

Nothing to generate for azure-sdk-for-java

@azuresdkci
Copy link
Contributor

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

"securityCount": "0",
"otherCount": "0",
"approvalSource": "",
"latestAssessmentTimeTaken": "2018-10-30T17:31:02Z",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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",
Copy link
Contributor

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.

Copy link
Member Author

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.",
Copy link
Contributor

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.

Copy link
Member Author

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",
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inherited from proxy now

@ravbhatnagar ravbhatnagar added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Jan 14, 2019
@abhinav-ghai abhinav-ghai changed the title Add software update specs [DO NOT MERGE] Add software update specs Jan 14, 2019
Copy link
Contributor

@ravbhatnagar ravbhatnagar left a 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": {
Copy link
Contributor

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.

Copy link
Member Author

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": {
Copy link
Contributor

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.

Copy link
Member Author

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": {
Copy link
Contributor

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.

Copy link
Member Author

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": {
Copy link
Contributor

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.

Copy link
Member Author

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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format date-time

Copy link
Member Author

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": {
Copy link
Contributor

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.

Copy link
Member Author

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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date-time

Copy link
Member Author

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": {
Copy link
Contributor

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"

Copy link
Member Author

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": {
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referenced from Proxy now

Copy link
Member Author

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": {
Copy link
Contributor

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"

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done where possible

@KrisBash KrisBash added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Jan 16, 2019
"resourceGroupName": "myResourceGroupName",
"vmName": "myVMName",
"api-version": "2018-06-30-preview"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing parameter profileName

Copy link
Member Author

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": "",
Copy link
Contributor

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

Copy link
Member Author

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": ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Member Author

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"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing parameter softwareUpdateId.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@ravbhatnagar
Copy link
Contributor

Looks good. Signing off from ARM side.

@ravbhatnagar ravbhatnagar added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jan 23, 2019
@jianghaolu jianghaolu merged commit b131e9e into Azure:master Jan 24, 2019
@jianghaolu
Copy link
Contributor

Sorry I missed the do not merge notice. Reverting.

jianghaolu added a commit that referenced this pull request Jan 24, 2019
praries880 pushed a commit that referenced this pull request Jan 25, 2019
TalluriAnusha pushed a commit to AsrOneSdk/azure-rest-api-specs that referenced this pull request Feb 6, 2019
* 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
TalluriAnusha pushed a commit to AsrOneSdk/azure-rest-api-specs that referenced this pull request Feb 6, 2019
mccleanp pushed a commit that referenced this pull request Mar 23, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants