[Compute] Extended location for Compute RP#17522
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.
Why a fixed type here? Service only supports the type now?
There was a problem hiding this comment.
--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.
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.
edge_zone can be any string?
There was a problem hiding this comment.
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.
why do you need to ignore the variable here?
There was a problem hiding this comment.
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.
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
and the exposed parameter is extended location not edge zone.There was a problem hiding this comment.
OK. I removed it from core.
Juliehzl
left a comment
There was a problem hiding this comment.
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.
|
@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.