-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Compute] Extended location for Compute RP #17522
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
Conversation
|
Is this feature urgent? I prefer to wait for SDK release to keep consistent experience on all these commands. |
| if namespace.edge_zone: | ||
| namespace.edge_zone = { | ||
| 'name': namespace.edge_zone, | ||
| 'type': 'EdgeZone' |
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.
Why a fixed type here? Service only supports the type 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.
--edge-zone has an implicit meaning of EdgeZone type. The value is name.
| for scope in ['disk create', 'snapshot create']: | ||
| with self.argument_context(scope) as c: | ||
| c.argument('source', help='source to create the disk/snapshot from, including unmanaged blob uri, managed disk id or name, or snapshot id or name') | ||
| c.argument('edge_zone', edge_zone_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.
Are there any pre-defined values of the edge zone? Is any string available?
|
|
||
|
|
||
| def validate_edge_zone(cmd, namespace): # pylint: disable=unused-argument | ||
| if namespace.edge_zone: |
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.
edge_zone can be any string?
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. The definition is a string. In practice, service surely does not allow all strings.
| c.argument('sku', arg_type=snapshot_sku) | ||
| c.argument('incremental', arg_type=get_three_state_flag(), min_api='2019-03-01', | ||
| help='Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed') | ||
| c.ignore('edge_zone') |
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.
why do you need to ignore the variable 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.
Python SDK is not released.
| raise CLIError(error) | ||
|
|
||
|
|
||
| def validate_edge_zone(cmd, namespace): # pylint: disable=unused-argument |
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 think we need to add such global validation here because it is easy to pass edge zone information in your command code as shown in
| params.extended_location = ExtendedLocation(name=edge_zone, |
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.
OK. I removed it from core.
Juliehzl
left a comment
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 feature should be release on 5/4 with storage, network and PSH team. Please not merge it in this sprint.
In addition, the feature is in preview and we need to add preview tag. The global parameter in my PR add such flag globally.
| edge_zone_type = CLIArgumentType(help='The name of edge zone.', is_preview=True) |
|
@Juliehzl OK. I added preview label. OK. Release together. I can test it without error. I thought it was ready. |
Description
Resolve #15988
Extended location for Compute RP
Add a new parameter
--edge-zone.Extended location also applies to Storage and Network.
PR for Storage: #17528
I need 2020-12-01 Python SDK! I even need 2021-03-01 SDK in other features. I plan to iterate fast to avoid potential conflict. It is not necessary to put and merge all features in one PR.Done:
az disk create
az image create
az snapshot create
az vm create
az vmss create
az vm image list-offers
az vm image list-skus
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.