-
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
[Not Swagger] API profile map for the profile version 2017-03-09-profile #2895
Conversation
Automation for azure-sdk-for-nodeUnable to detect any generation context from this PR. |
Automation for azure-sdk-for-pythonUnable to detect any generation context from this PR. |
Automation for azure-libraries-for-javaUnable to detect any generation context from this PR. |
Automation for azure-sdk-for-goUnable to detect any generation context from this PR. |
api-profiles/2017-03-09-profile.json
Outdated
"types": {} | ||
}, | ||
"microsoft.subscription": { | ||
"version": "2016-02-01" |
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 is subscription section under microsoft.resources
with the different API version. Aren't they gona conflict?
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.
Its a mistake. I am fixing. Subscriptions is not a resource type under resources namespace. Going to remove from here. Thanks for taking a look. I am going to send a mail after adding a readme.md on the structure
api-profiles/2017-03-09-profile.json
Outdated
"version": "2016-02-01", | ||
"types": { | ||
"links": "2016-09-01", | ||
"subscriptions": "2016-06-01" |
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.
subscriptions is not a RT under microsoft.resources
api-profiles/2017-03-09-profile.json
Outdated
@@ -0,0 +1,48 @@ | |||
{ |
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.
The file should probably get in to the existing profiles folder
profile/2017-03-09-profile.json
Outdated
}, | ||
"microsoft.compute": { | ||
"version": "2016-03-30", | ||
"types": {} |
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.
Do we need to mandate specifying empty types: {}
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 is no schema for the profile AFAIK. What docs did you use to create this file?
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 dont have schema yet. This is just a result of internal discussion with SDK team
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.
@hovsepm this PR will by default define the schema. I'm +1 on allowing skipping empty properties.
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.
Keeping empty types{} could be helpful for easy parsing , Im keeping it for now. we can discuss this in our meeting
@joshgav could you review this PR? |
profile/readme.md
Outdated
An API profile represents a map of resource provider namespaces and their API versions. It is a representation of an Azure Platform declaring a set of APIs to be supported across all our clouds.Instead of specifying individual api-versions for each resource type across each namespace, the developer can just align the application to a profile and the tools/SDKs will themselves revert to the right api-versions as directed by the profile. With API Profiles developers can specify a profile version that applies to an entire template and, at runtime, ARM will pick the right versions of the resources. This way, the customers don’t have to worry about which are the right resource versions to specific clouds. | ||
|
||
|
||
<<Insert detailed documentation link 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.
this seems to be temporary placeholders. Could you add the actual link?
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 the link
profile/readme.md
Outdated
| | +---"version":"xxxx-xx-xx", | ||
| | +---"types":{ | ||
| | +---"resourcetype3":"xxxx-xx-xx", | ||
| | +---"resourcetype4":"xxxx-xx-xx" |
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.
How do we handle nested resource type supporting a different api-version than the parent resource type? This is not a concern for now, but our format should be able to handle this
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.
Should use the syntax of the providers call:
"resourceType": "storageAccounts/services/metricDefinitions"
profile/2017-03-09-profile.json
Outdated
}, | ||
"microsoft.network": { | ||
"version": "2015-06-15", | ||
"types": {} |
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 would rather be more verbose than less. List out the individual resource types here explicitly.
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.
Personally I fine to be less explicit, for the point I made here just after.
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 expect this map to be used to create the schemas that Visual Studio can consume and aid (intellisense, etc) in authoring templates within the IDE, along with SDKs generation. I want this to be a generic map which could serve multiple uses. In that case, if it is not explicitly verbose, i.e., if all the resource types and corresponding API versions are not listed, I am not sure how useful this is.
Also, if sometime down the line ARM decides to provide an API to retrieve cloud capabilities based on profile versions, this map could serve as a starting manifest or this in itself could become a manifest.
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.
Either way is okay with me, people looking to this file for guidance can learn to skip or minimize those sections. For purposes of excluding types, though, as discussed below, it may be best to list them all minus the excluded ones.
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 Open Issue 1
@joshgav added 2018-03-01-hybrid json |
profile/2018-03-01-hybrid.json
Outdated
"version": "2018-02-01", | ||
"types": { | ||
"extensionsMetadata": "2015-01-01", | ||
"offers": "2015-01-01" |
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.
/offers is specific to azurestack and i do not think we need to include it here since we dont have swaggers yet
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.
Endpoint availability and Swagger are two differents things. If offers
exists, and then this file is an accurate description of the endpoint, it's nice to have it here. Swagger can come later, and will match that.
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 without swagger, it is not goign to be meaningful to keep it here as SDKs would refer this json and likely fail as it is not goign to find a swagger?
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.
They are not supposed to fail if the Swagger doesn't exist. It depends how this file is interpreted, and again, what is the purpose of this file. Is this a Stack only file? A generic file? 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.
Profiles on the whole are generic, though the two in this PR are only for use with Stack. There will be others not intended for Stack soon. The purpose of profile specs is to provide a canonical definition which all downstream things can turn to - e.g. SDKs and docs.
profile/2017-03-09-profile.json
Outdated
}, | ||
"microsoft.network": { | ||
"version": "2015-06-15", | ||
"types": {} |
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.
How do we handle the Not supported resource type in an api-version? e.g though azurestack supports 2015-06-15 api version for microsoft.network, it does not support applicationGateway resource type
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 depends how you interpret this file IMHO. Is this a Stack only file or not?
If not, and we're saying "Everything that is under Microsoft.Network should be called with 2015-06-15" and that's fine for Public Azure. Stack gateway will complain that the RT doesn't exist, and it's a fine error as well.
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 someone builds an app on this profile it should work with both Stack and Azure - that's the promise of profiles. Profiles themselves are generic, Stack happens to snap to a specific profile.
An app developer might build an app with a profile on public Azure, then expect it to run on Stack. For that case I think we need to somehow spec that a resource type isn't supported in a given profile; that's only part of the problem though, the SDKs aren't designed to exclude use of certain types I don't think.
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 an Open issue 2
@devigned could you please review the profile map and provide feedback. |
profile/2017-03-09-profile.json
Outdated
}, | ||
"microsoft.compute": { | ||
"version": "2016-03-30", | ||
"types": {} |
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 must have virtualMachineScaleSets
here with 2015-06-15 (the Network ApiVersion). This file should not replicate the Swagger mistake of considering that virtualMachineScaleSets
is a Network RP.
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 retract that comment, after discussing with @johanste
profile/2017-03-09-profile.json
Outdated
"version": "2016-01-01", | ||
"types": {} | ||
}, | ||
"microsoft.subscription": { |
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 false, Microsoft.Subscription
exists, but it's not what you mean here:
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json#L19
This is tough because the URL is https://management.azure.com/subscriptions?api-version=2016-06-01
that does not involve RP.
When we list providers, how this one is listed?
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 you do az provider list
, you get:
"namespace": "Microsoft.Resources",
...
"apiVersions": [
"2018-02-01",
"2018-01-01",
"2017-08-01",
"2017-06-01",
"2017-05-10",
"2017-05-01",
"2017-03-01",
"2016-09-01",
"2016-07-01",
"2016-06-01",
"2016-02-01",
"2015-11-01",
"2015-01-01",
"2014-04-01-preview"
],
"locations": [],
"properties": null,
"resourceType": "subscriptions"
which is probably what I would use for consistency
Microsoft.Subscription
is REALLY something else:
"namespace": "Microsoft.Subscription",
"registrationState": "NotRegistered",
"resourceTypes": [
{
"aliases": null,
"apiVersions": [
"2017-11-01-preview"
],
"locations": [
"West US"
],
"properties": null,
"resourceType": "SubscriptionDefinitions"
},
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 am going to remove microsoft.subscription from this list and we should model Subscription as a resource type under Microsoft.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.
thanks @bganapa
profile/2018-03-01-hybrid.json
Outdated
"version": "2018-02-01", | ||
"types": { | ||
"extensionsMetadata": "2015-01-01", | ||
"offers": "2015-01-01" |
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.
Endpoint availability and Swagger are two differents things. If offers
exists, and then this file is an accurate description of the endpoint, it's nice to have it here. Swagger can come later, and will match that.
profile/readme.md
Outdated
| | +---"version":"xxxx-xx-xx", | ||
| | +---"types":{ | ||
| | +---"resourcetype3":"xxxx-xx-xx", | ||
| | +---"resourcetype4":"xxxx-xx-xx" |
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.
Should use the syntax of the providers call:
"resourceType": "storageAccounts/services/metricDefinitions"
@@ -0,0 +1,47 @@ | |||
{ |
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'd like to see a metadata property in this object, to remove any semantics from the name of this file/structure of the repository its living in.
For example:
"info":{
"title":"2017-03-09",
"description":"<A brief overview of whom it is that is expected to consume this profile, and under which circumstances.>"
},
"resource-manager":{
...
}
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 wouldn't hurt IMHO. there are probably other properties we'll want here too
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 a info node
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.
Sorry to bother you again, but could you include a title or name property in the info block?
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
profile/2017-03-09-profile.json
Outdated
"locks":"2015-01-01", | ||
"policyassignments": "2015-10-01-preview", | ||
"policydefinitions": "2015-10-01-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.
My interpretation of the API Versions above is that operations not associated with a particular type should be populated from "2015-07-01" and type specific operations should come from the API Version specified. In this case:
- locks -> "2015-01-01"
- policyassignements -> "2015-10-01-preview"
- policydefinitions -> "2015-10-01-preview"
Is my interpretation correct?
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.
Yes, That is correct
profile/readme.md
Outdated
The files in the folder describe the map of each resource provider's resource types and their supported api versions in the api profile. | ||
|
||
## Basics | ||
An API profile represents a map of resource provider namespaces and their API versions. It is a representation of an Azure Platform declaring a set of APIs to be supported across all our clouds.Instead of specifying individual api-versions for each resource type across each namespace, the developer can just align the application to a profile and the tools/SDKs will themselves revert to the right api-versions as directed by the profile. With API Profiles developers can specify a profile version that applies to an entire template and, at runtime, ARM will pick the right versions of the resources. This way, the customers don’t have to worry about which are the right resource versions to specific clouds. |
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 don't like the word "revert" here, it sounds negative. How about "select"?
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
profile/readme.md
Outdated
## File Structure | ||
<<Todo: Define a json schema file if it helps>> | ||
|
||
The profile is an one to one map. The api version specified is a single version for the resource type, although the reource type could support other older api versions as well. |
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.
Grammar: "The profile is a one to one map"
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
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-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.
Approving so that my status isn't blocking, but I'd still like to see a name/title property added.
Automation for azure-sdk-for-rubyUnable to detect any generation context from this PR. |
@joshgav Added the resource types explicitly . Note that this changes the file format quite a bit. we can discuss in today's meeting. This needs another commit as i am yet to update the readme and Microsoft.web resource types, I am also waiting on confiration for the exact set of resource types that we support for the new 2018* profile |
Thanks @bganapa! I just checked the versions referenced in the 2018-03-01 profile and find many of the versions don't exist in the Thank you! FYI @johanste |
profile/2018-03-01-hybrid.json
Outdated
] | ||
}, | ||
"microsoft.resources": { | ||
"2017-10-01": [ |
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.
version doesn't exist
profile/2018-03-01-hybrid.json
Outdated
"subscriptions/tagNames/tagValues", | ||
"tenants" | ||
], | ||
"2015-01-01": [ |
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.
version doesn't exist
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.
decided in f2f meeting that we should remove this version completely since types are only for Stack
remaining: verify Web entries are correct, remove Stack-specific types, and update README. then merge!! |
profile/2018-03-01-hybrid.json
Outdated
"resource-manager": { | ||
"microsoft.authorization": { | ||
"2017-04-01": [ | ||
"locks" |
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 doesn't seem to be a 2017-04-01 version of locks: https://github.com/Azure/azure-rest-api-specs/tree/master/specification/resources/resource-manager
"2016-09-01": [ | ||
"locks" | ||
], | ||
"2015-07-01": [ |
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 don't see this API version here either: https://github.com/Azure/azure-rest-api-specs-pr/tree/master/specification/resources/resource-manager.
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.
if you are looking roleassignments, they are here.
Microsoft.Azuthorization specs are in two different places :( (they are owned by two different teams)
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.
Ahh gotcha. Sorry about the confusion
profile/2018-03-01-hybrid.json
Outdated
"policyAssignments", | ||
"policyDefinitions" | ||
], | ||
"2015-07-01-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.
Not this one either.
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 seems azure team has left out specifying this providerOperations resource type for this api-version. This is not critical resource type and i am removing it from the profile map
profile/2018-03-01-hybrid.json
Outdated
] | ||
}, | ||
"microsoft.web": { | ||
"2015-02-01":[ |
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 cannot find 2015-02-01 here: https://github.com/Azure/azure-rest-api-specs/tree/master/specification/web/resource-manager. Is it somewhere else?
profile/2018-03-01-hybrid.json
Outdated
"providers", | ||
"resourceGroups", | ||
"resources", | ||
"subscriptions", |
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.
subscriptions seem to be in different API versions: https://github.com/Azure/azure-rest-api-specs/tree/master/specification/resources/resource-manager#tag-package-subscriptions-2016-06
…ings under Web, picking up available swagger versions for /subscriptions
@jianghaolu please let me know if you find any other issue. @joshgav This should be good to merge.. |
Thanks @bganapa! Working on merging this now. |
This is not a swagger file. This PR is to discuss the API-Profile map format. Added the map for the existing azure stack specific api-profile 2017-03-09-profile