diff options
| author | Danilo G. Baio <dbaio@FreeBSD.org> | 2019-09-07 23:19:39 +0000 |
|---|---|---|
| committer | Danilo G. Baio <dbaio@FreeBSD.org> | 2019-09-07 23:19:39 +0000 |
| commit | 273ed0dbb0929cca22e9bd40b81370d337efaba4 (patch) | |
| tree | 2f3a51467ed44939a0daed8e11b01ef433dd4446 /sysutils/py-azure-cli/files | |
| parent | sysutils/py-azure-cli-core: Update to 2.0.72 (diff) | |
sysutils/py-azure-cli: Update to 2.0.72
- Port changes
Almost all sysutils/py-azure-cli-* ports were incorporated into
py-azure-cli.
This update replaces all those dependencies to their
devel/py-azure-mgmt-* port directly, eliminating a level in the
dependency chain.
sysutils/py-azure-cli
--> sysutils/py-azure-cli-XYZ (GONE)
--> devel/py-azure-mgmt-XYZ
Now we will be able to remove ~50 sysutils/py-azure-cli-* ports
from the ports tree.
- Add patches to fix an issue with the Policy API
>>> ImportError: cannot import name 'PolicyMode'
Notes
Notes:
svn path=/head/; revision=511522
Diffstat (limited to 'sysutils/py-azure-cli/files')
| -rw-r--r-- | sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___help.py | 24 | ||||
| -rw-r--r-- | sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___params.py | 21 |
2 files changed, 45 insertions, 0 deletions
diff --git a/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___help.py b/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___help.py new file mode 100644 index 000000000000..f3fd7d00e436 --- /dev/null +++ b/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___help.py @@ -0,0 +1,24 @@ +# Part of +# https://github.com/Azure/azure-cli/commit/b33944353f474a35cae113b1496e90822d2eb8c6 +--- azure/cli/command_modules/resource/_help.py.orig 2019-09-07 20:28:46 UTC ++++ azure/cli/command_modules/resource/_help.py +@@ -799,6 +799,19 @@ examples: + "effect": "deny" + } + }' ++ - name: Create a policy definition with mode. The mode 'Indexed' indicates the policy should be evaluated only for resource types that support tags and location. ++ text: | ++ az policy definition create --name TagsPolicyDefinition --subscription 'MySubscription' --mode Indexed --rules '{ ++ "if": ++ { ++ "field": "tags", ++ "exists": "false" ++ }, ++ "then": ++ { ++ "effect": "deny" ++ } ++ }' + """ + + helps['policy definition delete'] = """ diff --git a/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___params.py b/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___params.py new file mode 100644 index 000000000000..4d83465381a4 --- /dev/null +++ b/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_resource___params.py @@ -0,0 +1,21 @@ +# Part of +# https://github.com/Azure/azure-cli/commit/b33944353f474a35cae113b1496e90822d2eb8c6 +--- azure/cli/command_modules/resource/_params.py.orig 2019-09-07 20:29:39 UTC ++++ azure/cli/command_modules/resource/_params.py +@@ -102,7 +102,6 @@ def load_arguments(self, _): + c.argument('resource_group_name', arg_type=resource_group_name_type, help='the resource group where the policy will be applied') + + with self.argument_context('policy definition', resource_type=ResourceType.MGMT_RESOURCE_POLICY) as c: +- from azure.mgmt.resource.policy.models import PolicyMode + c.argument('policy_definition_name', arg_type=existing_policy_definition_name_type) + c.argument('rules', help='JSON formatted string or a path to a file with such content', type=file_type, completer=FilesCompleter()) + c.argument('display_name', help='Display name of policy definition.') +@@ -110,7 +109,7 @@ def load_arguments(self, _): + c.argument('params', help='JSON formatted string or a path to a file or uri with parameter definitions.', type=file_type, completer=FilesCompleter(), min_api='2016-12-01') + c.argument('metadata', min_api='2017-06-01-preview', nargs='+', validator=validate_metadata, help='Metadata in space-separated key=value pairs.') + c.argument('management_group', arg_type=management_group_name_type) +- c.argument('mode', arg_type=get_enum_type(PolicyMode), options_list=['--mode', '-m'], help='Mode of the policy definition.', min_api='2016-12-01') ++ c.argument('mode', options_list=['--mode', '-m'], help='Mode of the policy definition, e.g. All, Indexed. Please visit https://aka.ms/azure-policy-mode for more information.', min_api='2016-12-01') + c.argument('subscription', arg_type=subscription_type) + c.ignore('_subscription') # disable global subscription + |
