Skip to content
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

[AppConfig] Revise help message to exclude unsupported key/label filter. #12040

Merged
merged 1 commit into from
Feb 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Release History

* az ams is now GA.

**AppConfig**

* Revise help message to exclude unsupported key/label filters.

2.0.81
++++++

Expand Down
32 changes: 16 additions & 16 deletions src/azure-cli/azure/cli/command_modules/appconfig/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ def load_arguments(self, _):
with self.argument_context('appconfig kv import', arg_group='AppConfig') as c:
c.argument('src_name', help='The name of the source App Configuration.')
c.argument('src_connection_string', validator=validate_connection_string, help="Combination of access key and endpoint of the source store.")
c.argument('src_key', help='If no key specified, import all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported. Key filtering not applicable for feature flags. By default, all feature flags with specified label will be imported.')
c.argument('src_label', help="Only keys with this label in source AppConfig will be imported. If no value specified, import keys with null label by default. Support star sign as filters, for instance * means all labels, abc* means labels with abc as prefix. Similarly, *abc and *abc* are also supported.")
c.argument('src_key', help='If no key specified, import all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix. Key filtering not applicable for feature flags. By default, all feature flags with specified label will be imported.')
c.argument('src_label', help="Only keys with this label in source AppConfig will be imported. If no value specified, import keys with null label by default. Support star sign as filters, for instance * means all labels, abc* means labels with abc as prefix.")
c.argument('preserve_labels', arg_type=get_three_state_flag(), help="Flag to preserve labels from source AppConfig. This argument should NOT be specified along with --label.")

with self.argument_context('appconfig kv import', arg_group='AppService') as c:
c.argument('appservice_account', validator=validate_appservice_name_or_id, help='ARM ID for AppService OR the name of the AppService, assuming it is in the same subscription and resource group as the App Configuration. Required for AppService arguments')

with self.argument_context('appconfig kv export') as c:
c.argument('label', help="Only keys and feature flags with this label will be exported. If no label specified, export keys and feature flags with null label by default. Only when export destination is appconfig, we support star sign as filters, for instance * means all labels and abc* means labels with abc as prefix. Similarly, *abc and *abc* are also supported. Label filters are not supported when exporting to file or appservice.")
c.argument('label', help="Only keys and feature flags with this label will be exported. If no label specified, export keys and feature flags with null label by default. Only when export destination is appconfig, we support star sign as filters, for instance * means all labels and abc* means labels with abc as prefix. Label filters are not supported when exporting to file or appservice.")
c.argument('prefix', help="Prefix to be trimmed from keys. Prefix will be ignored for feature flags.")
c.argument('key', help='If no key specified, return all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported. Key filtering not applicable for feature flags. By default, all feature flags with specified label will be exported.')
c.argument('key', help='If no key specified, return all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix. Key filtering not applicable for feature flags. By default, all feature flags with specified label will be exported.')
c.argument('destination', options_list=['--destination', '-d'], arg_type=get_enum_type(['file', 'appconfig', 'appservice']), validator=validate_export, help="The destination of exporting. Note that exporting feature flags to appservice is not supported.")
c.argument('yes', help="Do not prompt for preview.")
c.argument('skip_features', help="Export only key values and exclude all feature flags. By default, all features with the specified label will be exported to file or appconfig. Not applicable for appservice.", arg_type=get_three_state_flag())
Expand Down Expand Up @@ -151,20 +151,20 @@ def load_arguments(self, _):
c.argument('secret_identifier', validator=validate_secret_identifier, help="ID of the Key Vault object. Can be found using 'az keyvault {collection} show' command, where collection is key, secret or certificate. To set reference to the latest version of your secret, remove version information from secret identifier.")

with self.argument_context('appconfig kv delete') as c:
c.argument('key', help='Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported.')
c.argument('label', help="If no label specified, delete entry with null label. Support star sign as filters, for instance * means all label and abc* means labels with abc as prefix. Similarly, *abc and *abc* are also supported.")
c.argument('key', help='Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix.')
c.argument('label', help="If no label specified, delete entry with null label. Support star sign as filters, for instance * means all label and abc* means labels with abc as prefix.")

with self.argument_context('appconfig kv show') as c:
c.argument('key', help='Key to be showed.')
c.argument('label', help="If no label specified, show entry with null label. Filtering is not supported.")

with self.argument_context('appconfig kv list') as c:
c.argument('key', help='If no key specified, return all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported.')
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. Use '\\0' for null label.")
c.argument('key', help='If no key specified, return all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix.')
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. Use '\\0' for null label.")

with self.argument_context('appconfig kv restore') as c:
c.argument('key', help='If no key specified, restore all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported.')
c.argument('label', help="If no label specified, restore all key-value pairs with all labels. Support star sign as filters, for instance abc* means labels with abc as prefix. Similarly, *abc and *abc* are also supported.")
c.argument('key', help='If no key specified, restore all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix.')
c.argument('label', help="If no label specified, restore all key-value pairs with all labels. Support star sign as filters, for instance abc* means labels with abc as prefix.")

with self.argument_context('appconfig kv lock') as c:
c.argument('key', help='Key to be locked.')
Expand All @@ -175,8 +175,8 @@ def load_arguments(self, _):
c.argument('label', help="If no label specified, unlock entry with null label. Filtering is not supported.")

with self.argument_context('appconfig revision list') as c:
c.argument('key', help='If no key specified, return all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported.')
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. Use '\\0' for null label.")
c.argument('key', help='If no key specified, return all keys by default. Support star sign as filters, for instance abc* means keys with abc as prefix.')
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. Use '\\0' for null label.")

with self.argument_context('appconfig feature show') as c:
c.argument('feature', help='Name of the feature flag to be retrieved')
Expand All @@ -189,12 +189,12 @@ def load_arguments(self, _):
c.argument('description', help='Description of the feature flag to be set.')

with self.argument_context('appconfig feature delete') as c:
c.argument('feature', help='Key of the feature to be deleted. Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported. Comma separated keys are not supported. Please provide escaped string if your feature name contains comma.')
c.argument('label', help="If no label specified, delete the feature flag with null label by default. Support star sign as filters, for instance * means all labels and abc* means labels with abc as prefix. Similarly, *abc and *abc* are also supported.")
c.argument('feature', help='Key of the feature to be deleted. Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix. Comma separated keys are not supported. Please provide escaped string if your feature name contains comma.')
c.argument('label', help="If no label specified, delete the feature flag with null label by default. Support star sign as filters, for instance * means all labels and abc* means labels with abc as prefix.")

with self.argument_context('appconfig feature list') as c:
c.argument('feature', help='Key of the feature to be listed. Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix. Similarly, *abc and *abc* are also supported. Comma separated keys are not supported. Please provide escaped string if your feature name contains comma.')
c.argument('label', help="If no label specified, list all labels. Support star sign as filters, for instance * means all labels and abc* means labels with abc as prefix. Similarly, *abc and *abc* are also supported. Use '\\0' for null label.")
c.argument('feature', help='Key of the feature to be listed. Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix. Comma separated keys are not supported. Please provide escaped string if your feature name contains comma.')
c.argument('label', help="If no label specified, list all labels. Support star sign as filters, for instance * means all labels and abc* means labels with abc as prefix. Use '\\0' for null label.")
c.argument('fields', arg_type=feature_fields_arg_type)
c.argument('all_', help="List all feature flags.")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"Color": "Red",
"FeatureManagement": {
"Beta": false,
"Percentage": true,
"Timestamp": {
"EnabledFor": [
{
"Name": "Local Tests",
"Parameters": {
"StartTime": "2019-01-01T00:00:00Z",
"EndTime": "2019-09-01T00:00:00Z"
}
"EndTime": "2019-09-01T00:00:00Z",
"StartTime": "2019-01-01T00:00:00Z"
},
"Name": "Local Tests"
},
{
"Name": "Production Tests",
"Parameters": {
"StartTime": "2019-09-02T00:00:00Z",
"EndTime": "2019-11-01T00:00:00Z"
}
"EndTime": "2019-11-01T00:00:00Z",
"StartTime": "2019-09-02T00:00:00Z"
},
"Name": "Production Tests"
}
]
},
"Beta": false,
"Percentage": true
}
},
"Color": "Red",
"Region": "West US"
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#Mon Jan 20 23:05:09 Pacific Standard Time 2020
Color=Red
#Mon Feb 03 18:35:05 Pacific Standard Time 2020
feature-management.FeatureSample.enabled-for[2].Name=Filter@3
feature-management.TrueFeature=true
feature-management.FeatureSample.enabled-for[3].Name=filter.4
Region=West US
feature-management.FalseFeature=false
feature-management.FeatureSample.enabled-for[3].Parameters.dotInFilter.Param=?
feature-management.FeatureSample.enabled-for[0].Name=Filter1
Color=Red
feature-management.FeatureSample.enabled-for[3].Parameters.EmptyValue=
feature-management.FeatureSample.enabled-for[3].Parameters.dotInFilter.Param=?
feature-management.FeatureSample.enabled-for[1].Name=Filter2
feature-management.FeatureSample.enabled-for[0].Parameters.paramforfilter1=value1
feature-management.FeatureSample.enabled-for[3].Name=filter.4
feature-management.FalseFeature=false
feature-management.TrueFeature=true
feature-management.FeatureSample.enabled-for[1].Name=Filter2
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Color: Red
feature-management:
Beta: false
Timestamp:
Expand All @@ -11,4 +10,5 @@ feature-management:
Parameters:
EndTime: '2019-11-01T00:00:00Z'
StartTime: '2019-09-02T00:00:00Z'
Color: Red
Region: West US