-
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
initial VMware by Virtustream preview swagger spec #6653
Conversation
Automation for azure-sdk-for-goEncountered an unknown error: (azure-sdk-for-go)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout ee9825c58bb9b0677a89122c6e28d1e41ab69fe6
stderr: 'fatal: reference is not a tree: ee9825c58bb9b0677a89122c6e28d1e41ab69fe6' |
Automation for azure-sdk-for-pythonEncountered an unknown error: (azure-sdk-for-python)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout ee9825c58bb9b0677a89122c6e28d1e41ab69fe6
stderr: 'fatal: reference is not a tree: ee9825c58bb9b0677a89122c6e28d1e41ab69fe6' |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
Can one of the admins verify this patch? |
I ran the latest autorest validator and I just fixed one of the seven errors so far. The remaining six are:
|
In Testing, Please Ignore[Logs] (Generated from 285c483, Iteration 33)
|
The README.md file is missing, please see here for an example. If you want to automatically build SDKs for this swagger please also include the README.*.md files for the various languages and I will tag the language owners to review. |
Errors from the autorest validator have all been fixed except for providing x-ms-examples. Can we add those for the next 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.
Add missing README.md file.
Please also provide examples for each operation as they are used for validation and doc generation. See this for an example. |
Looks like our comments crossed regarding examples. For new swaggers, it's a requirement that they include examples before merging, unless this is a time-critical release. |
@ctaggart Has this spec undergone ARM review (in meeting or a prior swagger version)? |
@jhendrixMSFT, I added a readme.md. We use TypeScript, Python, and .NET, so those are are initial targets. |
@KrisBash, it has had some review. Shoot me an email and I'll give you more details. My email is on these commits. It is the standard
Okay, I'll begin putting that together tomorrow. |
@OpenAPIBot sdkautomation rebuild |
@antmarti-microsoft, thanks for the ARM review. I've made all of the swagger updates that I can make and still remain compatible with the version There are several changes that you would like to see that would need to go into a new version of the API. May be we can call it
They need to be pageable.
I'm hoping we can get this merged, which matches the API currently deployed, then address those changes in version |
@antmarti-microsoft What do you think? Can we get this merged? |
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.
@ctaggart - few comments. Please take a look.
...source-manager/Microsoft.VMwareVirtustream/preview/2016-09-01-preview/vmwarevirtustream.json
Show resolved
Hide resolved
"$ref": "#/definitions/PrivateCloudResponse" | ||
} | ||
}, | ||
"202": { |
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.
Just wanted to make sure you want to use the 202 + location header pattern for the long running operations by choice. The pattern we recommend is 201 + non-terminal provisioning State + Azure Async operation header. Details here - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#creating-or-updating-resources
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.
We'll use 201 and follow the recommended pattern for the recommended pattern for the next API version.
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.
#6878 contains this change in the new API version.
], | ||
"responses": { | ||
"200": { | ||
"description": "successful operation", |
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.
It MUST be wrapped in a "value" array even if paging is not supported in v1.
...source-manager/Microsoft.VMwareVirtustream/preview/2016-09-01-preview/vmwarevirtustream.json
Show resolved
Hide resolved
...source-manager/Microsoft.VMwareVirtustream/preview/2016-09-01-preview/vmwarevirtustream.json
Show resolved
Hide resolved
...source-manager/Microsoft.VMwareVirtustream/preview/2016-09-01-preview/vmwarevirtustream.json
Show resolved
Hide resolved
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareVirtustream/privateClouds/{privateCloudName}/deleteAuthorization/{authorizationName}": { |
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 API is updating the property on the privateClouds resource. It should be enabled via a PATCH on privateClouds rather than modeling it as a POST action.
...source-manager/Microsoft.VMwareVirtustream/preview/2016-09-01-preview/vmwarevirtustream.json
Show resolved
Hide resolved
...source-manager/Microsoft.VMwareVirtustream/preview/2016-09-01-preview/vmwarevirtustream.json
Show resolved
Hide resolved
...source-manager/Microsoft.VMwareVirtustream/preview/2016-09-01-preview/vmwarevirtustream.json
Outdated
Show resolved
Hide resolved
This API spec matches the deployed version. Any remaining ARM review issues are breaking changes and will be in a version 2019-08-09-preview due out soon. Are you able to merge this pull request as is? If not, what else is needed? |
{ | ||
"parameters": { | ||
"api-version": "2016-09-01-preview", | ||
"subscriptionId": "{subscription-id}", |
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] find+replace {subscription-id} in these examples with something that resembles real data (random guid)
], | ||
"responses": { | ||
"200": { | ||
"description": "successful operation", |
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.
@ctaggart are you planning on addressing this comment (re wrapping in a "value")?
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareVirtustream/privateClouds/{privateCloudName}/addAuthorization/{authorizationName}": { |
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.
As per these comments ^ the URL shouldn't include the /{authorizationName}
at the end, or ARM will misinterpret this action. https://armwiki.azurewebsites.net/faq/armbasics.html has some information.
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareVirtustream/privateClouds/{privateCloudName}/deleteAuthorization/{authorizationName}": { |
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.
Was a decision reached on PATCH vs POST?
This API version did not pass ARM review. @anthony-c-martin, please review #6878 instead, which is a new version of the API to address all issues brought up in the ARM review so far. |
* swagger spec validation * test latest spec from Azure/azure-rest-api-specs#6653 * update to latest spec in progress * remove operation status and results * easier changes from ARM review * private cloud list will be paged * added default ApiError * remove cluster location * remove privatecloud update * update to 2019-08-09-preview API * no longer gen'd * additional api changes
This is the a initial publish of our preview of our swagger spec. It matches the currently deployed service. The CLI published yesterday at https://github.com/virtustream/azure-vmware-virtustream-cli-extension/releases/tag/0.2.0 used this spec.
.
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.