-
Notifications
You must be signed in to change notification settings - Fork 0
FeatureManagement CLI Part 1 #1
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
FeatureManagement initial code setup and implementation of "show feature" and "set feature" commands
| self.description = description | ||
| self.conditions = conditions | ||
| self.last_modified = None | ||
| self.locked = None |
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 we can't initialize last modified and locked in ctor #Resolved
|
|
||
| def __str__(self): | ||
| featureflagdisplay = { | ||
| "Key": self.key, |
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.
Key [](start = 13, length = 3)
Do we want to call it key or name? In the design doc, it is called name. I am fine to both. #Resolved
| key_value = azconfig_client.get_keyvalue(key, query_option) | ||
| if key_value is None: | ||
| raise CLIError("The Feature Flag does not 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.
nit: Add details for this error message like "The feature flag '{}' does not exist".format(key) #Resolved
|
|
||
|
|
||
| def map_featureflag_value_to_display(featureflagvalue): | ||
| state = models.FeatureState.OFF |
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 shouldn't add new models/mappers in data plane sdk. From sdk perspective, everything is key value. The concept of feature flag lives in a convenient layer. In our case, we should put these models in under /appconfig instead of /appconfig/_azconfig. #Resolved
| raise CLIError("The Feature Flag does not exist.") | ||
|
|
||
| feature_flag_value = mapper.map_json_to_featureflagvalue(json.loads(key_value.value)) | ||
| feature_flag_display = mapper.map_featureflag_value_to_display(feature_flag_value) |
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 should catch json error here, feature flag key prefix and content type won't guarantee the value is a valid json. So the value can just be a plain string or an invalid json as customers can modify key-value.
Think it a little further, we don't need feature flag model here. We can just pass in key_value.value and map to feature_flag_display. Error out for unexpected format. #Resolved
| partial_ff = {} | ||
| for field in fields: | ||
| partial_ff[field.name.lower()] = feature_flag_display.__dict__[field.name.lower()] | ||
| return partial_ff |
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.
use getattr() to get the attribute by name. You can define if error out or set a default value if attribute is not found. #Resolved
| nargs='+', | ||
| help='Customize output fields.', | ||
| validator=validate_query_fields, | ||
| arg_type=get_enum_type(['key', 'value', 'label', 'content_type', 'etag', 'locked', 'last_modified']) |
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.
get_enum_type [](start = 17, length = 13)
I think we miss tags here. Would you mind to add it in your pr? #Resolved
| az appconfig kv list --key color --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --label v1.* | ||
| - name: List all keys with any labels and query only key, value and tags. | ||
| - name: List all keys with any labels and query only key and value. | ||
| text: |
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 can leave the example. There is a bug in _params.py, tags is not added as a valid field. #Resolved
| feature_flag_display.last_modified = set_kv.last_modified | ||
| entry = json.dumps(feature_flag_display.__dict__, indent=2, sort_keys=True) | ||
| confirmation_message = "Are you sure you want to set the key: \n" + entry + "\n" | ||
| user_confirmation(confirmation_message, yes) |
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: maybe the message should be Are you sure you want to set the feature flag.... #Resolved
| correlation_request_id=None): | ||
| correlation_request_id=None, | ||
| content_type=None): | ||
| self.label = label |
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 support query by content_type. Currently we can only query kv by key/label/fields/datetime #Resolved
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.
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| import json | ||
| import azure.cli.command_modules.appconfig._azconfig.models as models |
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 can revert changes in this module. #Resolved
| state = FeatureState.ON | ||
|
|
||
| default_conditions = {} | ||
| default_conditions['client_filters'] = [] |
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: default_conditions = {'client_filters':[]}
Actually we don't need default_conditions['client_filters'] = [] #Resolved
| # if conditions["client_filters"] list is not empty, make state conditional | ||
| # generalizing for conditions["server_filters"] in future | ||
| for value in conditions.values(): | ||
| if value and state == FeatureState.ON: |
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.
No need for the for loop since this is a dict. As conditions can contains any keys not only client_filters, server_filters, we should explicitly check.
filters = conditions.get("client_filter", [])
if filters and state == FeatureState.ON: #Resolved
| feature_name = featurename[len(FEATURE_FLAG_PREFIX):] | ||
| except AttributeError as exception: | ||
| logger.error("Could not find 'key' attribute in the Key-Value data.") | ||
| raise CLIError(str(exception)) |
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 keyvalue in the error message. Also for this helper method, we should wrap the exception to be CLI error. Just throw as it is and let caller to deal with errors. #Resolved
| raise CLIError(str(exception)) | ||
|
|
||
| feature_flag_display = FeatureFlagDisplay(feature_name, | ||
| getattr(keyvalue, 'label', ""), |
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 should validate feature flag schema and error out if mismatch. So when we deserialize conditions from value, it must contains fields like id, enabled, conditions.... #Resolved
| partial_ff = {} | ||
| for field in fields: | ||
| partial_ff[field.name.lower()] = getattr(feature_flag_display, field.name.lower(), "") | ||
| return partial_ff |
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 we validate the user input fields and in map_keyvalue_to_featureflagdisplay() we should also make sure the schema matches. So if in feaure_flag_display, the filed in not found. we should throw exception. #Resolved
| user_confirmation(confirmation_message, yes) | ||
|
|
||
| try: | ||
| retrieved_keyvalues = __list_all_keyvalues( cmd, |
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.
[](start = 51, length = 1)
nit: remove the white space. #Resolved
|
|
||
| try: | ||
| retrieved_keyvalues = __list_all_keyvalues( cmd, | ||
| feature=feature, |
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 also want to support feature name filter for delete? #Resolved
| retrieved_kv = azconfig_client.get_keyvalue(key, query_options) | ||
| try: | ||
| if retrieved_kv is None: | ||
| set_kv = KeyValue(key, json.dumps(value, indent=2), label, tags, content_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.
json.dumps(value, indent=2) [](start = 39, length = 27)
No need to add indent here. #Resolved
|
|
||
| # Convert KeyValue object to required Feature Flag Display format | ||
| feature_flag_display = map_keyvalue_to_featureflagdisplay(set_kv, show_conditions=True) | ||
| entry = json.dumps(feature_flag_display.__dict__, indent=2, sort_keys=True) |
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.
dict [](start = 52, length = 8)
Do we need to call dict here? #Resolved
|
|
||
| except ValueError as exception: | ||
| raise CLIError(str(exception)) | ||
|
|
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.
customize error message. #Resolved
| """ | ||
|
|
||
| helps['appconfig feature list'] = """ | ||
| type: command |
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 help for feature lock/unlock/enable/disable #Resolved
| c.argument('label', help="If no label specified, list all labels. Support star sign as filters, for instance abc* means labels with abc as prefix. Similarly, *abc and *abc* are also supported.") | ||
|
|
||
| with self.argument_context('appconfig feature show') as c: | ||
| c.argument('feature', help='Name of the Feature flag to be retrieved') |
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 argument context for lock/unlock/enable/disable #Resolved
| feature_flag_value = {} | ||
|
|
||
| # Key attribute not found should always raise error | ||
| try: |
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.
Since we pass the keyvalue object, and key is alreayd required, we don't need to check getattr "key" here. #Resolved
| # Make sure value json has all the fields we support in the backend | ||
| valid_fields = {'id', 'description', 'enabled', 'label', 'conditions'} | ||
| if valid_fields != feature_flag_value.keys(): | ||
| error_msg = f"This feature flag cannot be processed because it is missing required values or it contains unsupported values.\n" |
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.
feature_flag_value is a dict and doesn't preserve order. Instead of directly compare two lists here, we can do
for field in fields:
if field not in feature_flag_value:
error out the specific missing field #Resolved
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.
Here we are comparing two sets, so order doesn't matter. Also, feature_flag_value dict is guaranteed to have only unique keys. So this comparison should work.
In reply to: 326753124 [](ancestors = 326753124)
| return feature_flag_display | ||
|
|
||
|
|
||
| def validate_and_map_valuestr_to_valuedict(keyvalue): |
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.
validate_and_map_valuestr_to_valuedict [](start = 4, length = 38)
nit: we can still cal it map_valuestr_to_valuedict. you can add exceptions it may raise in comments like:
Raises: exception name: explanation.... #Resolved
| except ValueError as exception: | ||
| error_msg = f"Unable to decode the following JSON value: \n{valuestr}. \nFull Exception: \n{str(exception)}" | ||
| raise InvalidJsonException(f"Feature flag {feature_name} contains invalid value. " + error_msg) | ||
|
|
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.
consider log error message here instead of put it in InvalidJsonException message. Since the caller will catch these exceptions and create it own error message. #Resolved
|
|
||
|
|
||
| def list_feature(cmd, | ||
| feature, |
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.
feature [](start = 16, length = 7)
feature is not required for list. if user didn't specify feature, it means list all feature flags #Resolved
| value = map_valuestr_to_valuedict(retrieved_kv) | ||
| except (UnsupportedValuesException, InvalidJsonException) as exception: | ||
| raise ValueError(f"Invalid Value found for Feature '{feature}'. Aborting operation\n" + str(exception)) | ||
|
|
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: Invalid value found for feature....
| } | ||
|
|
||
| # Feature Flag object structures | ||
| """ |
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 you want to keep this for just reviewing?
| not_deleted_ff_display = [] | ||
| for failed_kv in not_deleted_kv: | ||
| failed_ff = map_keyvalue_to_featureflagdisplay(failed_kv, show_conditions=False) | ||
| not_deleted_ff_display.append(failed_ff) |
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.
failed_kv in this case is a dict not a keyvalue object, then map_keyvalue_to_featureflagdisplay() will always throw error. So in line 194, we should just do not_deleted_kv.append(entry)
| ALL = KEY | LABEL | LAST_MODIFIED | LOCKED | STATE | DESCRIPTION | CONDITIONS | ||
|
|
||
|
|
||
| class FeatureFlagDisplay(object): |
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.
FeatureFlagDisplay [](start = 6, length = 18)
rename it to just FeatureFlag, along with several helper method, variable name. No need to call it display
| return feature_flag_display | ||
|
|
||
|
|
||
| def map_valuestr_to_valuedict(keyvalue): |
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.
map_valuestr_to_valuedict [](start = 4, length = 25)
it doesn't make sense to pass in a keyvalue object but the method name is map valuestr to dict. We should just pass kv.value in. This helper method should have no knowledge about the feature flag name. It can still throw exceptions.
| updated_key_value = __update_existing_key_value(cmd, | ||
| retrieved_kv=retrieved_kv, | ||
| updated_value=updated_value, | ||
| name=name, |
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: updated_value = json.dumps(value) and remove line 405
|
|
||
| value['enabled']=True | ||
| updated_value = json.dumps(value) | ||
| confirmation_message = "Are you sure you want to Enable this Feature '{}' ?".format(feature) |
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.
Enable this Feature [](start = 65, length = 20)
nit: enable this feature
| confirmation_message = "Are you sure you want to Enable this Feature '{}' ?".format(feature) | ||
| user_confirmation(confirmation_message, yes) | ||
|
|
||
| updated_key_value = __update_existing_key_value(cmd, |
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.
__update_existing_key_value [](start = 36, length = 27)
these two helper method, __get_key_value and __update_exisiting_key_value are a little over generic. As it has to fetch the connection string twice, which is very time consuming. It has to talk to ARM to get the string back. Maybe we can do the connection fetch in this method and directly pass in to helper methods.
|
|
||
| except AttributeError as exception: | ||
| raise AttributeError("Could not find 'key' or 'content_type' attribute in the retrieved Key-Value data.\n" + str(exception)) | ||
|
|
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.
Key attribute won't be missing.
* FeatureManagement CLI Part 1 (#1) * FeatureManagement CLI Part 1 FeatureManagement initial code setup and implementation of "show feature" and "set feature" commands * Adding "delete" and "list" feature commands * Adding "set" and "show" feature commands * Add "enable", "disable", "lock", "unlock" commands * Final changes for feature management CLI (#2) * FeatureManagement CLI Part 1 FeatureManagement initial code setup and implementation of "show feature" and "set feature" commands * Adding "delete" and "list" feature commands * Resolving Comments * Add "enable", "disable", "lock", "unlock" commands * Resolving comments * Resolving comments * setup for filter commands * Adding filter commands * Adding Unit Tests * Fix styling issues * test recordings * Update release history * resolving comments * resolving comments * Minor change * Add FeatureFlagValue Model * Validate filter parameters * Fix formatting of _params.py * Change variable names * Log warning when delete filter index mismatch * Resolving comments * Fix styling issues * String formatting for python 2.7 compatibility * Python 2.7 compatibility for unit tests * fix id attribute for feature flag value * Modify list feature default label behavior * Check content type for features * CLI team's suggested changes * Update test recordings * Changing commands to custom_commands * changed empty label behavior for delete feature * Change warning message * Removing label from FeatureFlagValue * Use shell_safe_json_parse for deserialiization
* FeatureManagement CLI Part 1 (#1) * FeatureManagement CLI Part 1 FeatureManagement initial code setup and implementation of "show feature" and "set feature" commands * Adding "delete" and "list" feature commands * Adding "set" and "show" feature commands * Add "enable", "disable", "lock", "unlock" commands * Final changes for feature management CLI (#2) * FeatureManagement CLI Part 1 FeatureManagement initial code setup and implementation of "show feature" and "set feature" commands * Adding "delete" and "list" feature commands * Resolving Comments * Add "enable", "disable", "lock", "unlock" commands * Resolving comments * Resolving comments * setup for filter commands * Adding filter commands * Adding Unit Tests * Fix styling issues * test recordings * Update release history * resolving comments * resolving comments * Minor change * Add FeatureFlagValue Model * Validate filter parameters * Fix formatting of _params.py * Change variable names * Log warning when delete filter index mismatch * Resolving comments * Fix styling issues * String formatting for python 2.7 compatibility * Python 2.7 compatibility for unit tests * fix id attribute for feature flag value * Modify list feature default label behavior * Check content type for features * CLI team's suggested changes * Update test recordings * Changing commands to custom_commands * Stop reading dest file contents during export * History file update * Merge with latest code * changed empty label behavior for delete feature * Change warning message * Removing label from FeatureFlagValue * Use shell_safe_json_parse for deserialiization * Updating export for feature flags * Feature export scenario updates * Import feature flags from json format * Adding test * Fix styling * Fix Styling * UPdate history file * Add sample commands * improving help messages * Split print preview of features and kv * Support alternate json format for ON/OFF features * Adding more tests * fix styling * Use knack logger and enum arg type * refactoring * disabling ensure_ascii for json dumps * Resolving comments * Refactoring export command * Resolvong CLI side comments * Resolving comments * Update test recordings * Rename default_value variable * fix history file * change separator for history file
…for omsagent (Container monitoring)(#1) (Azure#12100)
…data protection volumes and added replication operations (Azure#12173) * ANF-448 additions for 2019-10-01 API * ANF-448 additions for 2019-10-01 API * update azure-mgmt-network to correct value * Fix versions * linter and style fixes * Updated list mount targest recording * updated test recordings * recodings python update * [netappfiles] Anf 448 cli for 2019 10 01 sync upstream (Azure#6) * {Misc.} Update CODEOWNERS (Azure#12149) * {Packaging} Update version management policy (Azure#12095) * [AppConfig]Add customer managed key when updating stores. (Azure#12102) * {Network} Connection Monitor V2 feature (Azure#12140) * [Compute] BREAKING CHANGE: Fix Azure#10728: `az vm create`: create subnet automatically if vnet is specified and subnet not exists (Azure#12115) * [Compute] Fix Azure#10728: `az vm create`: create subnet automatically if vnet is specified and subnet not exists * {Compute} update test_vm_commands to fix merge conflict * {Compute} fix test recording file for profile hybrid_2018_03_01 & hybrid_2019_03_01 * {Compute} update subnet help message & fail to create error message * {Compute} update fail to create subnet error message * {Compute} update test recording due to merge conflict * [Aladdin] Parse generated examples into commands' _help.py (Azure#11716) * [Compute] Increase robustness of vm image list (Azure#12134) * {KeyVault} Modify command group name `private-endpoint` to `private-endpoint-connection` (Azure#12151) * {Compute} Add missing parameter to attach disk example command (Azure#12045) attaching unmanaged disk without --name will cause error fix the example by adding `--name MyDataDisk` * [AppService] Add support for v3 function apps and node 12. (Azure#11987) * [functionapp] Add support for v3 function apps and node 12. * Changed --version to --functions-version to help clarify version flags. Added functions version to invalid runtime version error. * Fixed styling. * [AppService] az webapp list-runtimes: Fix the bug for list-runtimes (Azure#12172) * fix positional argument * add test for test_webapp_runtimes * {Packaging} Get rid of psutil dependency (Azure#11665) * {Release} Auto generate history notes (Azure#12098) * [AppService] az webapp|functionapp config ssl create: Add new commands to support create certificate (Azure#11955) * Support for Managed Certificate * Adding slot support * Added unit test * History change * Remove history - part of PR description now * Block calls for Free and Shared tier * Update unit test * Rename command to create * Fix to error text * {Packaging} Remove Python 2 in setup and doc (Azure#12155) * {Core} use caseless matching for provisioning_state (Azure#12154) * Fix az group deployment create has an error when using large parameters.json file (Azure#12047) * [ACR] `az acr login`: Throw a CLIError if there are errors returned by docker command (Azure#12156) * [Backup] Fix for item level recovery flow in OLR (Azure#12118) * Fix for item level recovery flow in OLR * style fix * [Backup] az backup recoveryconfig show: Add more parameters to support restoring as files for SQL/SAP Hana (Azure#12116) * initial commit * updated tests * updated history.rst * cli style fix * {Release} Upgrade to Azure CLI 2.1.0 (Azure#12195) * update azure-cli version to 2.1.0 * Update HISTORY.rst * {Package} remove requirements.py of python2 * Update commands.py Co-authored-by: Xiaojian Xu <[email protected]> * [ARM] az resource: Improve the examples of the resource module (Azure#11981) * {CI} Remove files related to Travis only (Azure#12203) * {Monitor} az monitor autoscale create: add example for custom rule based on guest os. (Azure#12205) * {azdev} Remove urllib3==1.24.2 from requirements.txt (Azure#12211) * [AKS] fix the aks browse in cloud shell. (Azure#12174) * {Storage} az storage share-rm: Add process_resource_group for resource group (Azure#12232) * add validator=process_resource_group * refine storage account validator * add more validate * [AKS] az aks: Fix monitoring addon and agentpool NoneType errors. (Azure#12250) * {SignalR} Fix show command fails with unexpected error when the resource doesn't exist (Azure#12266) * Do not copy tests dirs in docker image (Azure#12208) * [Storage] az storage blob delete-batch: Misbehaving `--dryrun` flag (Azure#12162) * [Storage] az storage blob delete-batch: Misbehaving `--dryrun` flag * [Storage] az storage blob delete-batch: Misbehaving `--dryrun` flag * [ACR] Fix: `az acr login` wrongly raise error (Azure#12282) * [Network] az network application-gateway rewrite-rule create: support url configuration (Azure#12277) * [Network] az network dns zone import: --zone-name will be case insensitive in the future. (Azure#12264) * fix (Azure#12300) * [AppService] Fix Azure#2258: Fixing issue where trying to create a webapp with certain runtimes was failing (Azure#12260) * Fixing issue where trying to create a webapp with certain runtimes was failing updating history Upating to make sure NODE works as well when trying to set app_Settings Pylint fixes * Adding test & re-recording * Removing the formatting changes to keep the changes to just the bug fix * {Network} Supplemnt help message of --source-address-prefixes and --destination-address-prefixes for nsg rule creation (Azure#12321) * {doc} Add Import Directive from docutils.parsers.rst for old API deprecation (Azure#12295) sphinx.util.compat is deprecated since 1.6 and removed in 1.7. * {Document} update install troubleshooting (Azure#12230) * {Network} Fix wrong import ZoneType of DNS (Azure#12322) * update codeowners (Azure#12201) * {Storage} Change api version range for storage account kind (Azure#12265) * change min_api * change test * [CosmosDB] Add Sql stored procedure, udf and trigger cmdlets (Azure#11999) * Added cosmosDB sql stored procedure, udf and trigger cmdlets * added help, fixed indentation, fixed wrong code * fixed a typo * indentation fix * flake8 issues fixed * PR comments * changed help accordingly * style fix * change in help msg * [ACS] (BREAKING CHANGE:) (az aks:) support msi changes for GF and BF for omsagent (Container monitoring)(#1) (Azure#12100) * [ARM] az policy assignment list: Support listing policy assignments at Management Group scope (Azure#12086) * Support listing policy assignments at MG scope * Fix test recording * Fix bug and add test case * {Packaging/Ubuntu} remove cosmic packaging (Azure#12330) * {Container monitoring} - Add case insensitive string compare for msi string (Azure#12341) * [KeyVault] keyvault create: enable soft-delete by default (Azure#12204) * make PE and PLS GA (Azure#12326) * [Network]az network bastion: support bastion (Azure#12331) * [AKS] az aks use-dev-spaces: Adding endpoint type option to use-dev-spaces command to customize the endpoint created on a controller (Azure#12028) * [AKS] add tag for nodepool (Azure#12145) * {Packaging/Homebrew} Remove patch when upgrade (Azure#12344) * {Find} az find: Remove EUII (Azure#12349) * delete azure-cli-extension (Azure#12362) * [Compute] sig image-version: add --data-snapshot-luns (Azure#12303) * [AppService] functionapp: Added error message to deployment command if resource group/function name invalid (Azure#12318) * [AppService] fixing flag cited in warning message (Azure#12364) * [ARM] Refactor deployment commands (Azure#10751) * update SDK version. * Refactor az deployment commands. * record tests. * test recordings. * [ACR] Add new command `az acr helm install-cli` (Azure#12336) * [Network] az network vnet list-available-ips: support list available ips in a vnet (Azure#12371) * Validate ip-address parameter + tests (Azure#12312) * [AppService] functionapp: Updated container image configuration for Linux apps (Azure#12317) * Updated linuxFxVersion configuration for linux apps. * Fixed HISTORY.rst, improved error message for invalid runtimes. * Changed how linuxFxVersion is handled for dotnet. Renamed constants for increased clarity. * [Network] Add new commands to manage flow-log and deprecate old configure command (Azure#12350) * {Packaging/windows pip} Use local python for az.bat (Azure#12323) * [Storage] az storage account network-rule add (bug fix): add operation should be idempotent (Azure#12327) * [Storage] az storage account network-rule add (bug fix): add operation should be idempotent * [Storage] az storage account network-rule add (bug fix): add operation should be idempotent * [Storage] az storage account network-rule add (bug fix): add operation should be idempotent * [Storage] az storage account network-rule add (bug fix): add operation should be idempotent * [AKS] Add support of creating private cluster (Azure#12353) * [SQL] Sql midb Add: list-deleted, show-deleted, update-retention, show-retention (Azure#12033) * Adding support for short term retention and deleted database for MI * Fixing help file * Fixing help file * Updating tests * Adressing comments * Fixing style errors * Fixing help files * Fixing help files * Resyncing required for tests * Chaning deletion-time to deleted-time * More details in description on retention_days * Adressing comments * {KeyVault} Fix the case sensitive issue while running commands without specifying resource group name (Azure#12405) * {Storage} az storage file copy start: add examples for snapshot Azure#12410 * {Documentation}Command guideline for private endpoint connection and private link resource (Azure#12403) * [AKS] add support for creation time node labels (Azure#12418) * move propagate_env_change.exe to storage account (Azure#12401) * {Telemetry} Disable telemetry for some clouds (Azure#12400) * [Storage] az storage account create/update: Add Routing Preference support (Azure#12309) * add routing preferences * add test * fix style and rerun test * add tests and refine code * Add test for false * {Monitor}show command should return 3 (Azure#12404) * {Find} Suppress old find extension (Azure#12432) * [Storage] Upgrade azure-mgmt-storage version to 8.0.0 (Azure#12437) * [ACR]: private link and CMK support (Azure#12381) * [AppService] Fix Azure#12251 app settings race condition during zip deploy (Azure#12262) * Acr: remove private .wheel file (Azure#12450) * [RDBMS] Support Private Endpoint Connections (Azure#12394) * [Compute] ppg show: add --colocation-status to Enable fetching the colocation status of all the resources in the proximity placement group (Azure#12248) * [Compute] vm/vmss/availability-set update: add --ppg to allowing updating ProximityPlacementGroup * stage * add test * Add help; Support translataion from name to ID * [Compute] ppg show: add --colocation to Enable fetching the colocation status of all the resources in the proximity placement group * Add test * update parameter name * test * revolve some comments * Update parameter * compute 11.0.0 * test * fix test * fix * {Compute} fix none check when list vmss extension. (Azure#11914) * [AKS] add missing / in the dashboard url. (Azure#12411) * add allowProtectedAppendWrite (Azure#12448) * [Monitor] az monitor metrics alert create: support `~` in `--condition`. (Azure#12439) * update codeowners (Azure#12453) * Improve the help of az policy assignment create (Azure#12343) * Fix the bug that automatically generated name of policy assignment exceeds the limit (Azure#12352) * [Cosmos DB] az cosmosdb create: add --key-uri to support adding key vault encryption information (Azure#12417) * adding key-value-key-uri to cosmos db * remove history note * update package in requirements * remove whitespace on blank line * remove whitespace from blank line * add preview flag and update test * re-running tests with new API version * rename new parameter * [ARM] az group deployment create: Add parameter `--aux-tenants` to support cross tenants (Azure#11765) (Azure#12221) * Add parameter --aux-tenants to support cross tenants for az group deployment create * Add cross tenant support to the refactored deployment group create * [ACR] add 'private-link-resource list' command (Azure#12454) * {Documentation}fix documenttation (Azure#12435) * [AKS] Support create aks clusters enabling managed identity (Azure#12420) * Support create aks clusters enabling managed identity * Remove 'preview' * Add test case for AKS using managed identity * [CDN] Add CDN WAF commands (Azure#12071) * [Core] az cloud show: add insights telemetry channel endpoint for China/US cloud (Azure#12442) * [Storage] Add support for private link resource (Azure#12383) * initialize privete link for storage * refine command with help * refine help * pass test_storage_account_private_link * add exception handler * add exception handler * pass test * fix style * change list-private-link-resource to private-link-resource list * fix style and linter * apply validator and transform in core * enabled id_part for private linke resource list * remove previous validator and transform in storage * fix style * pass test * add ids for private link resource list * resolve comments * remove --ids to make linter pass * [Compute] az vmss create/update: support automatic repairs (Azure#12374) * [Compute] az vmss create/update: support automatic repairs * {Compute} fix automatic repairs style error * {Compute} update help message for --automatic-repairs-grace-period * {Compute} update validator error message for automatic repairs * {Compute} add automatic repairs arg group in vmss update * {Compute} fix sytle error in _params.py * [AKS] Validate network plugin to be either "azure" or "kubenet". (Azure#12376) * [AppService] Fix #5720946: az webapp backup fails to set name (Azure#11929) * Fix backup name set functionality * Add test for backup * changes to meet checkstyles * add recording * [RBAC] az ad group show: fix --group value treated as regex problem (Azure#12426) * [RBAC] az ad group show: fix --group value treated as regex problem * {RBAC} update syntax error of error message * {RBAC} retrieve domain from az ad signed-in-user show instead of hard code * {RBAC} refactor validate_group function * {RBAC} update recording file for test_graph_group_idempotent * {RBAC} update test_graph * {RBAC} update test_graph to use the right user info Co-authored-by: Xiaojian Xu <[email protected]> * [Storage] Add PITR support (Azure#12372) * add action for blob range * add -t for time_to_restore * add restore_policy properties * rename restore_retention_days to restore_days * try to add test * add support_no_wait * refine test * fix style * enable no wait for restore * pass live test * fix comments and make blob range opetional * fix style * {KeyVault} Modify private link commands to align with storage (Azure#12457) * {Core} Change help example hook (Azure#12431) * [AKS] Add aad session key support. (Azure#12290) * {Release} use pat for github requests (Azure#12474) * {Packaging} bump up pyyaml (Azure#12440) * [RDBMS] Updating RDBMS Private Endpoint Tests (Azure#12475) * [Compute] image builder create: add --image-template\n[Compute] [BREAKING CHANGE] image template: rename template to builder (Azure#11865) * Add test for latest profile * [Compute] image template create: add --customize and --distribute * Add history * Fix style * Update test * rename template to builder * update help * add image_template * --image-template * test * remove --customize and --distribute * try-catch json error * help * fix style * fix a bug; update help * test of local file * Add example * error handle * help * [SQL] az sql server create/update: Add --enable-public-network to support PublicNetworkAccess (Azure#12382) * Add PublicNetworkAccess to Create and Update Server * Fix some styling + rerecorded tests * Fix more CLI style * Cleaned up code according to comments * Change public-network-access to enable-public-network * Bump up azure-mgmt-sql version * Rerecorded a couple of failing tests * Rerecord a couple more tests * Forgot to update test_sql_commands * Rerecord another test * Updating more tests * Small changes + more rerecorded tests * Fix style check errors * Random small change to rerun tests * Replace API versions * Fix style * [SQL DB, SQL MI] Add minimal_tls_version property for MI and SQL DB (Azure#12414) * Managed Instance commands updated with new property * Added enum defs for input parameter and updated Sql Server arg * fix blank line style error * Add minimal_tls_version for sql db server * adding tests * Adding recordings for tests * Re-record mi db test * Bump dependency version on azure-mgmt-sql, fix lint errors * Fix code style/lint errors * re-recorded tests * record tets * reset some of the test fixes and added recordings * reset some of the test fixes and added recordings * retry * style Co-authored-by: ziwa-msft <[email protected]> * [AppConfig] Unblock using appconfig kv set to add keyvault reference and feature flag (Azure#12377) * {Release} Upgrade to Azure CLI 2.2.0 (Azure#12486) * {Document} Fix dead documentation link to Microsoft open source page (Azure#12481) * {Compute} Delay vm image accept-terms expiration (Azure#12487) * {Packaging} Use python3 abspath in az script. (Azure#12467) * add test and fix 12387 (Azure#12518) * {CDN} Delay importing ErrorResponseException (Azure#12535) Co-authored-by: Feng Zhou <[email protected]> Co-authored-by: Shuai Wang <[email protected]> Co-authored-by: Jianhui Harold <[email protected]> Co-authored-by: Xiaojian Xu <[email protected]> Co-authored-by: Feiyue Yu <[email protected]> Co-authored-by: Bin Ma <[email protected]> Co-authored-by: Gao Ruifeng <[email protected]> Co-authored-by: Graham Zuber <[email protected]> Co-authored-by: Zunli Hu <[email protected]> Co-authored-by: Viacheslav Vasilyev <[email protected]> Co-authored-by: Mads Damgård <[email protected]> Co-authored-by: Xing Zhou <[email protected]> Co-authored-by: Lixia (Sylvia) Lei <[email protected]> Co-authored-by: Sambit Rath <[email protected]> Co-authored-by: Azure CLI Bot <[email protected]> Co-authored-by: MyronFanQiu <[email protected]> Co-authored-by: Jiashuo Li <[email protected]> Co-authored-by: Liming Liu <[email protected]> Co-authored-by: Jun Sun <[email protected]> Co-authored-by: stan-sz <[email protected]> Co-authored-by: Sylvain Rabot <[email protected]> Co-authored-by: qianwens <[email protected]> Co-authored-by: Sisira Panchagnula <[email protected]> Co-authored-by: Luca Boccassi <[email protected]> Co-authored-by: Yunge Zhu <[email protected]> Co-authored-by: Meha Kaushik <[email protected]> Co-authored-by: rashmichandrashekar <[email protected]> Co-authored-by: Chris Eggert <[email protected]> Co-authored-by: rakeshvanga <[email protected]> Co-authored-by: Qingqing <[email protected]> Co-authored-by: Matthew Booe <[email protected]> Co-authored-by: Brandon H <[email protected]> Co-authored-by: Tiano2017 <[email protected]> Co-authored-by: Pengfei Ni <[email protected]> Co-authored-by: djnisic <[email protected]> Co-authored-by: Xiaofang Zhang <[email protected]> Co-authored-by: Yugang Wang <[email protected]> Co-authored-by: yonzhan <[email protected]> Co-authored-by: Xiaojian Xu <[email protected]> Co-authored-by: Ramkumar Chandrasekaran <[email protected]> Co-authored-by: emgu-ms <[email protected]> Co-authored-by: Andrija Cicovic <[email protected]> Co-authored-by: ziwa-msft <[email protected]> Co-authored-by: Jacob Bundgaard <[email protected]> Co-authored-by: Matthew Ryan <[email protected]> Co-authored-by: Audunn Baldvinsson <[email protected]> * Changing the Replication command pause to suspend. * Updated help texts Co-authored-by: leonard <[email protected]> Co-authored-by: Audunn Baldvinsson <[email protected]> Co-authored-by: Feng Zhou <[email protected]> Co-authored-by: Shuai Wang <[email protected]> Co-authored-by: Jianhui Harold <[email protected]> Co-authored-by: Xiaojian Xu <[email protected]> Co-authored-by: Feiyue Yu <[email protected]> Co-authored-by: Bin Ma <[email protected]> Co-authored-by: Gao Ruifeng <[email protected]> Co-authored-by: Graham Zuber <[email protected]> Co-authored-by: Zunli Hu <[email protected]> Co-authored-by: Viacheslav Vasilyev <[email protected]> Co-authored-by: Mads Damgård <[email protected]> Co-authored-by: Xing Zhou <[email protected]> Co-authored-by: Lixia (Sylvia) Lei <[email protected]> Co-authored-by: Sambit Rath <[email protected]> Co-authored-by: Azure CLI Bot <[email protected]> Co-authored-by: MyronFanQiu <[email protected]> Co-authored-by: Jiashuo Li <[email protected]> Co-authored-by: Liming Liu <[email protected]> Co-authored-by: Jun Sun <[email protected]> Co-authored-by: stan-sz <[email protected]> Co-authored-by: Sylvain Rabot <[email protected]> Co-authored-by: qianwens <[email protected]> Co-authored-by: Sisira Panchagnula <[email protected]> Co-authored-by: Luca Boccassi <[email protected]> Co-authored-by: Yunge Zhu <[email protected]> Co-authored-by: Meha Kaushik <[email protected]> Co-authored-by: rashmichandrashekar <[email protected]> Co-authored-by: Chris Eggert <[email protected]> Co-authored-by: rakeshvanga <[email protected]> Co-authored-by: Qingqing <[email protected]> Co-authored-by: Matthew Booe <[email protected]> Co-authored-by: Brandon H <[email protected]> Co-authored-by: Tiano2017 <[email protected]> Co-authored-by: Pengfei Ni <[email protected]> Co-authored-by: djnisic <[email protected]> Co-authored-by: Xiaofang Zhang <[email protected]> Co-authored-by: Yugang Wang <[email protected]> Co-authored-by: yonzhan <[email protected]> Co-authored-by: Xiaojian Xu <[email protected]> Co-authored-by: Ramkumar Chandrasekaran <[email protected]> Co-authored-by: emgu-ms <[email protected]> Co-authored-by: Andrija Cicovic <[email protected]> Co-authored-by: ziwa-msft <[email protected]> Co-authored-by: Jacob Bundgaard <[email protected]> Co-authored-by: Matthew Ryan <[email protected]>
FeatureManagement initial code setup and implementation of "show feature" and "set feature" commands
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).
I adhere to the Command Guidelines.