Hello community, here is the log from the commit of package azure-cli-cdn for openSUSE:Factory checked in at 2018-02-14 09:30:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/azure-cli-cdn (Old) and /work/SRC/openSUSE:Factory/.azure-cli-cdn.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-cdn" Wed Feb 14 09:30:01 2018 rev:2 rq:574799 version:0.0.12 Changes: -------- --- /work/SRC/openSUSE:Factory/azure-cli-cdn/azure-cli-cdn.changes 2017-11-10 14:52:44.338187114 +0100 +++ /work/SRC/openSUSE:Factory/.azure-cli-cdn.new/azure-cli-cdn.changes 2018-02-14 09:30:05.078822499 +0100 @@ -1,0 +2,10 @@ +Wed Feb 7 14:52:48 UTC 2018 - [email protected] + +- New upstream release + + Version 0.0.12 + + For detailed information about changes see the + HISTORY.rst file provided with this package +- Install HISTORY.rst into doc directory +- Update Requires from setup.py + +------------------------------------------------------------------- Old: ---- azure-cli-cdn-0.0.9.tar.gz New: ---- azure-cli-cdn-0.0.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ azure-cli-cdn.spec ++++++ --- /var/tmp/diff_new_pack.swwXmy/_old 2018-02-14 09:30:07.170746695 +0100 +++ /var/tmp/diff_new_pack.swwXmy/_new 2018-02-14 09:30:07.174746550 +0100 @@ -1,7 +1,7 @@ # # spec file for package azure-cli-cdn # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,8 +15,9 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: azure-cli-cdn -Version: 0.0.9 +Version: 0.0.12 Release: 0 Summary: Microsoft Azure CLI 'Content Delivery Network (CDN)' Command Module License: MIT @@ -24,17 +25,17 @@ Url: https://github.com/Azure/azure-cli Source: https://files.pythonhosted.org/packages/source/a/azure-cli-cdn/azure-cli-cdn-%{version}.tar.gz Source1: LICENSE.txt -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: unzip BuildRequires: azure-cli-command-modules-nspkg BuildRequires: azure-cli-nspkg BuildRequires: python3-azure-nspkg +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: unzip Requires: azure-cli-command-modules-nspkg +Requires: azure-cli-core Requires: azure-cli-nspkg +Requires: python3-azure-mgmt-cdn >= 1.0.0 Requires: python3-azure-nspkg -Requires: python3-azure-mgmt-cdn >= 0.30.2 -Requires: azure-cli-core Conflicts: azure-cli < 2.0.0 BuildArch: noarch @@ -63,7 +64,8 @@ %files %defattr(-,root,root,-) -%doc LICENSE.txt README.rst +%doc HISTORY.rst LICENSE.txt README.rst %{python3_sitelib}/azure/cli/command_modules/cdn %{python3_sitelib}/azure_cli_cdn-*.egg-info + %changelog ++++++ azure-cli-cdn-0.0.9.tar.gz -> azure-cli-cdn-0.0.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/HISTORY.rst new/azure-cli-cdn-0.0.12/HISTORY.rst --- old/azure-cli-cdn-0.0.9/HISTORY.rst 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/HISTORY.rst 2018-01-26 17:12:23.000000000 +0100 @@ -2,6 +2,19 @@ Release History =============== + +0.0.12 +++++++ +* `cdn custom-domain create`: Fixed missing client issue. + +0.0.11 +++++++ +* Update for CLI core changes. + +0.0.10 +++++++ +* minor fixes + 0.0.9 (2017-09-22) ++++++++++++++++++ * minor fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/PKG-INFO new/azure-cli-cdn-0.0.12/PKG-INFO --- old/azure-cli-cdn-0.0.9/PKG-INFO 2017-09-23 01:49:33.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/PKG-INFO 2018-01-26 17:12:39.000000000 +0100 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: azure-cli-cdn -Version: 0.0.9 +Version: 0.0.12 Summary: Microsoft Azure Command-Line Tools Content Delivery Network (CDN) Command Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation Author-email: [email protected] License: MIT -Description-Content-Type: UNKNOWN Description: Microsoft Azure CLI 'Content Delivery Network (CDN)' Command Module =================================================================== @@ -18,6 +17,19 @@ Release History =============== + + 0.0.12 + ++++++ + * `cdn custom-domain create`: Fixed missing client issue. + + 0.0.11 + ++++++ + * Update for CLI core changes. + + 0.0.10 + ++++++ + * minor fixes + 0.0.9 (2017-09-22) ++++++++++++++++++ * minor fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/__init__.py new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/__init__.py --- old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/__init__.py 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/__init__.py 2018-01-26 17:12:23.000000000 +0100 @@ -5,10 +5,28 @@ # pylint: disable=unused-import import azure.cli.command_modules.cdn._help +from azure.cli.core import AzCommandsLoader -def load_params(_): - import azure.cli.command_modules.cdn._params # pylint: disable=redefined-outer-name, unused-variable +class CdnCommandsLoader(AzCommandsLoader): -def load_commands(): - import azure.cli.command_modules.cdn.commands # pylint: disable=redefined-outer-name, unused-variable + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + cdn_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.cdn.custom#{}') + super(CdnCommandsLoader, self).__init__(cli_ctx=cli_ctx, + min_profile='2017-03-10-profile', + custom_command_type=cdn_custom) + + def load_command_table(self, args): + super(CdnCommandsLoader, self).load_command_table(args) + from azure.cli.command_modules.cdn.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + super(CdnCommandsLoader, self).load_arguments(command) + from azure.cli.command_modules.cdn._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = CdnCommandsLoader diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_client_factory.py new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_client_factory.py --- old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_client_factory.py 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_client_factory.py 2018-01-26 17:12:23.000000000 +0100 @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- -def cf_cdn(_): +def cf_cdn(cli_ctx, _): from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.mgmt.cdn import CdnManagementClient - return get_mgmt_service_client(CdnManagementClient) + return get_mgmt_service_client(cli_ctx, CdnManagementClient) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_help.py new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_help.py --- old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_help.py 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_help.py 2018-01-26 17:12:23.000000000 +0100 @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.help_files import helps +from knack.help_files import helps helps['cdn'] = """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_params.py new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_params.py --- old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_params.py 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_params.py 2018-01-26 17:12:23.000000000 +0100 @@ -4,11 +4,13 @@ # -------------------------------------------------------------------------------------------- import argparse -from azure.mgmt.cdn.models import (QueryStringCachingBehavior, SkuName) +from knack.arguments import CLIArgumentType -from azure.cli.core.commands import (register_cli_argument, CliArgumentType) -from azure.cli.core.commands.parameters import enum_choice_list, three_state_flag, tags_type +from azure.mgmt.cdn.models import QueryStringCachingBehavior, SkuName + +from azure.cli.core.commands.parameters import get_three_state_flag, tags_type, get_enum_type from azure.cli.core.commands.validators import get_default_location_from_resource_group + from ._validators import validate_origin @@ -34,74 +36,67 @@ return deep_created_origin -name_arg_type = CliArgumentType(options_list=('--name', '-n'), metavar='NAME') - -register_cli_argument('cdn', 'name', name_arg_type, id_part='name') -register_cli_argument('cdn', 'tags', tags_type) - -# Profile # - -register_cli_argument('cdn profile create', - 'sku', - **enum_choice_list([item.value for item in list(SkuName)])) -register_cli_argument('cdn profile create', 'location', - validator=get_default_location_from_resource_group) -profile_name_help = 'Name of the CDN profile which is unique within the resource group.' -register_cli_argument('cdn profile', 'profile_name', name_arg_type, id_part='name', - help=profile_name_help) -register_cli_argument('cdn profile create', 'name', name_arg_type, id_part='name', - help=profile_name_help) -# Endpoint # - -register_cli_argument('cdn endpoint', 'endpoint_name', name_arg_type, id_part='name', - help='Name of the CDN endpoint.') -register_cli_argument('cdn endpoint create', 'name', name_arg_type, id_part='name', - help='Name of the CDN endpoint.') -cdn_endpoint = 'cdn endpoint' -register_cli_argument(cdn_endpoint, 'location', - validator=get_default_location_from_resource_group) -register_cli_argument(cdn_endpoint, - 'origins', - options_list='--origin', - nargs='+', - action=OriginType, - validator=validate_origin, - help='Endpoint origin specified by the following space delimited 3 ' - 'tuple: `www.example.com http_port https_port`. The HTTP and HTTPs' - 'ports are optional and will default to 80 and 443 respectively.') -register_cli_argument(cdn_endpoint, 'is_http_allowed', - options_list='--no-http', - help='Indicates whether HTTP traffic is not allowed on the endpoint. ' - 'Default is to allow HTTP traffic.', - **three_state_flag(invert=True)) -register_cli_argument(cdn_endpoint, 'is_https_allowed', - options_list='--no-https', - help='Indicates whether HTTPS traffic is not allowed on the endpoint. ' - 'Default is to allow HTTPS traffic.', - **three_state_flag(invert=True)) -register_cli_argument(cdn_endpoint, 'is_compression_enabled', - options_list='--enable-compression', - help='If compression is enabled, content will be served as compressed if ' - 'user requests for a compressed version. Content won\'t be compressed ' - 'on CDN when requested content is smaller than 1 byte or larger than 1 ' - 'MB.', - **three_state_flag()) -caching_behavior = [item.value for item in list(QueryStringCachingBehavior)] -register_cli_argument(cdn_endpoint, - 'query_string_caching_behavior', - options_list='--query-string-caching', - **enum_choice_list(caching_behavior)) -register_cli_argument(cdn_endpoint, 'content_types_to_compress', nargs='+') -register_cli_argument('cdn endpoint load', 'content_paths', nargs='+') -register_cli_argument('cdn endpoint purge', 'content_paths', nargs='+') - -# Custom Domain # - -register_cli_argument('cdn custom-domain', 'custom_domain_name', name_arg_type, id_part=None, - help='Name of the custom domain.') -register_cli_argument('cdn custom-domain create', 'location', - validator=get_default_location_from_resource_group) +def load_arguments(self, _): -# Origin # + name_arg_type = CLIArgumentType(options_list=('--name', '-n'), metavar='NAME') + profile_name_help = 'Name of the CDN profile which is unique within the resource group.' -register_cli_argument('cdn origin', 'origin_name', name_arg_type, id_part='name') + with self.argument_context('cdn') as c: + c.argument('name', name_arg_type, id_part='name') + c.argument('tags', tags_type) + + # Profile # + with self.argument_context('cdn profile') as c: + c.argument('profile_name', name_arg_type, id_part='name', help=profile_name_help) + + with self.argument_context('cdn profile create') as c: + c.argument('sku', arg_type=get_enum_type([item.value for item in list(SkuName)])) + c.argument('location', validator=get_default_location_from_resource_group) + c.argument('name', name_arg_type, id_part='name', help=profile_name_help) + + # Endpoint # + + with self.argument_context('cdn endpoint') as c: + c.argument('endpoint_name', name_arg_type, id_part='name', help='Name of the CDN endpoint.') + c.argument('location', validator=get_default_location_from_resource_group) + c.argument('origins', options_list='--origin', nargs='+', action=OriginType, validator=validate_origin, + help='Endpoint origin specified by the following space delimited 3 ' + 'tuple: `www.example.com http_port https_port`. The HTTP and HTTPs' + 'ports are optional and will default to 80 and 443 respectively.') + c.argument('is_http_allowed', arg_type=get_three_state_flag(invert=True), options_list='--no-http', + help='Indicates whether HTTP traffic is not allowed on the endpoint. ' + 'Default is to allow HTTP traffic.') + c.argument('is_https_allowed', arg_type=get_three_state_flag(invert=True), options_list='--no-https', + help='Indicates whether HTTPS traffic is not allowed on the endpoint. ' + 'Default is to allow HTTPS traffic.') + c.argument('is_compression_enabled', arg_type=get_three_state_flag(), options_list='--enable-compression', + help='If compression is enabled, content will be served as compressed if ' + 'user requests for a compressed version. Content won\'t be compressed ' + 'on CDN when requested content is smaller than 1 byte or larger than 1 ' + 'MB.') + + caching_behavior = [item.value for item in list(QueryStringCachingBehavior)] + c.argument('query_string_caching_behavior', options_list='--query-string-caching', + arg_type=get_enum_type(caching_behavior)) + c.argument('content_types_to_compress', nargs='+') + + with self.argument_context('cdn endpoint create') as c: + c.argument('name', name_arg_type, id_part='name', help='Name of the CDN endpoint.') + + with self.argument_context('cdn endpoint load') as c: + c.argument('content_paths', nargs='+') + + with self.argument_context('cdn endpoint purge') as c: + c.argument('content_paths', nargs='+') + + # Custom Domain # + + with self.argument_context('cdn custom-domain') as c: + c.argument('custom_domain_name', name_arg_type, id_part=None, help='Name of the custom domain.') + + with self.argument_context('cdn custom-domain create') as c: + c.argument('location', validator=get_default_location_from_resource_group) + + # Origin # + with self.argument_context('cdn origin') as c: + c.argument('origin_name', name_arg_type, id_part='name') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_validators.py new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_validators.py --- old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/_validators.py 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/_validators.py 2018-01-26 17:12:23.000000000 +0100 @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.util import CLIError +from knack.util import CLIError def validate_origin(namespace): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/commands.py new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/commands.py --- old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/commands.py 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/commands.py 2018-01-26 17:12:23.000000000 +0100 @@ -3,15 +3,17 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.profiles import supported_api_version, PROFILE_TYPE -from azure.cli.core.sdk.util import ServiceGroup, create_service_adapter +from azure.cli.core.commands import CliCommandType + from ._client_factory import cf_cdn -if not supported_api_version(PROFILE_TYPE, max_api='2017-03-09-profile'): + +def load_command_table(self, _): + def _not_found(message): def _inner_not_found(ex): from azure.mgmt.cdn.models.error_response import ErrorResponseException - from azure.cli.core.util import CLIError + from knack.util import CLIError if isinstance(ex, ErrorResponseException) \ and ex.response is not None \ @@ -27,63 +29,76 @@ cd_not_found_msg = not_found_msg.format('Custom Domain') origin_not_found_msg = not_found_msg.format('Origin') - custom_operations = 'azure.cli.command_modules.cdn.custom#{}' + cdn_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cdn#CdnManagementClient.{}', + client_factory=cf_cdn + ) + + cdn_endpoints_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cdn.operations.endpoints_operations#EndpointsOperations.{}', + client_factory=cf_cdn, + exception_handler=_not_found(endpoint_not_found_msg) + ) + + cdn_profiles_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cdn.operations.profiles_operations#ProfilesOperations.{}', + client_factory=cf_cdn, + exception_handler=_not_found(profile_not_found_msg) + ) + + cdn_domain_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cdn.operations.custom_domains_operations#CustomDomainsOperations.{}', + client_factory=cf_cdn, + exception_handler=_not_found(cd_not_found_msg) + ) + + cdn_origin_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cdn.operations.origins_operations#OriginsOperations.{}', + client_factory=cf_cdn, + exception_handler=_not_found(origin_not_found_msg) + ) + + cdn_edge_sdk = CliCommandType( + operations_tmpl='azure.mgmt.cdn.operations.edge_nodes_operations#EdgeNodesOperations.{}', + client_factory=cf_cdn + ) + + with self.command_group('cdn', cdn_sdk) as g: + g.command('name-exists', 'check_name_availability') + g.command('usage', 'list_resource_usage') + + with self.command_group('cdn endpoint', cdn_endpoints_sdk) as g: + for name in ['start', 'stop', 'delete']: + g.command(name, name) + g.command('show', 'get') + g.command('list', 'list_by_profile') + g.command('load', 'load_content') + g.command('purge', 'purge_content') + g.command('validate-custom-domain', 'validate_custom_domain') + g.custom_command('create', 'create_endpoint', client_factory=cf_cdn, + doc_string_source='azure.mgmt.cdn.models#Endpoint') + g.generic_update_command('update', setter_name='update', setter_arg_name='endpoint_update_properties', + custom_func_name='update_endpoint', + doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters') + + with self.command_group('cdn profile', cdn_profiles_sdk) as g: + g.command('show', 'get') + g.command('usage', 'list_resource_usage') + g.command('delete', 'delete') + g.custom_command('list', 'list_profiles', client_factory=cf_cdn) + g.custom_command('create', 'create_profile', client_factory=cf_cdn) + g.generic_update_command('update', setter_name='update', custom_func_name='update_profile', + doc_string_source='azure.mgmt.cdn.models#ProfileUpdateParameters') + + with self.command_group('cdn custom-domain', cdn_domain_sdk, client_factory=cf_cdn) as g: + g.command('show', 'get') + g.command('delete', 'delete') + g.command('list', 'list_by_endpoint') + g.custom_command('create', 'create_custom_domain') + + with self.command_group('cdn origin', cdn_origin_sdk) as g: + g.command('show', 'get') + g.command('list', 'list_by_endpoint') - mgmt_operations = create_service_adapter('azure.mgmt.cdn', 'CdnManagementClient') - with ServiceGroup(__name__, cf_cdn, mgmt_operations, custom_operations) as s: - with s.group('cdn') as c: - c.command('name-exists', 'check_name_availability') - c.command('usage', 'check_resource_usage') - - endpoint_operations = create_service_adapter('azure.mgmt.cdn.operations.endpoints_operations', - 'EndpointsOperations') - with ServiceGroup(__name__, cf_cdn, endpoint_operations, custom_operations, - exception_handler=_not_found(endpoint_not_found_msg)) as s: - with s.group('cdn endpoint') as c: - for name in ['start', 'stop', 'delete']: - c.command(name, name) - c.command('show', 'get') - c.command('list', 'list_by_profile') - c.command('load', 'load_content') - c.command('purge', 'purge_content') - c.command('validate-custom-domain', 'validate_custom_domain') - c.custom_command('create', 'create_endpoint') - c.generic_update_command('update', 'get', 'update', custom_func_name='update_endpoint', - setter_arg_name='endpoint_update_properties') - - profile_operations = create_service_adapter('azure.mgmt.cdn.operations.profiles_operations', - 'ProfilesOperations') - with ServiceGroup(__name__, cf_cdn, profile_operations, custom_operations, - exception_handler=_not_found(profile_not_found_msg)) as s: - - with s.group('cdn profile') as c: - c.command('show', 'get') - c.command('usage', 'list_resource_usage') - c.command('delete', 'delete') - c.custom_command('list', 'list_profiles') - c.custom_command('create', 'create_profile') - c.generic_update_command('update', 'get', 'update', custom_func_name='update_profile') - - domain_operations = create_service_adapter('azure.mgmt.cdn.operations.custom_domains_operations', - 'CustomDomainsOperations') - with ServiceGroup(__name__, cf_cdn, domain_operations, custom_operations, - exception_handler=_not_found(cd_not_found_msg)) as s: - with s.group('cdn custom-domain') as c: - c.command('show', 'get') - c.command('delete', 'delete') - c.command('list', 'list_by_endpoint') - c.custom_command('create', 'create_custom_domain') - - origin_operations = create_service_adapter('azure.mgmt.cdn.operations.origins_operations', - 'OriginsOperations') - with ServiceGroup(__name__, cf_cdn, origin_operations, custom_operations, - exception_handler=_not_found(origin_not_found_msg)) as s: - with s.group('cdn origin') as c: - c.command('show', 'get') - c.command('list', 'list_by_endpoint') - - edge_operations = create_service_adapter('azure.mgmt.cdn.operations.edge_nodes_operations', - 'EdgeNodesOperations') - with ServiceGroup(__name__, cf_cdn, edge_operations, custom_operations) as s: - with s.group('cdn edge-node') as c: - c.command('list', 'list') + with self.command_group('cdn edge-node', cdn_edge_sdk) as g: + g.command('list', 'list') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/custom.py new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/custom.py --- old/azure-cli-cdn-0.0.9/azure/cli/command_modules/cdn/custom.py 2017-09-23 01:47:00.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure/cli/command_modules/cdn/custom.py 2018-01-26 17:12:23.000000000 +0100 @@ -18,13 +18,6 @@ "application/xml"] -def list_profiles(client, resource_group_name=None): - profiles = client.profiles - profile_list = profiles.list_by_resource_group(resource_group_name=resource_group_name) \ - if resource_group_name else profiles.list() - return list(profile_list) - - def _update_mapper(existing, new, keys): for key in keys: existing_value = getattr(existing, key) @@ -32,7 +25,17 @@ setattr(new, key, new_value if new_value is not None else existing_value) -def update_endpoint(instance, +# region Custom Commands +# pylint: disable=unused-argument +def list_profiles(cmd, client, resource_group_name=None): + profiles = client.profiles + profile_list = profiles.list_by_resource_group(resource_group_name=resource_group_name) \ + if resource_group_name else profiles.list() + return list(profile_list) + + +# pylint: disable=unused-argument +def update_endpoint(cmd, instance, origin_host_header=None, origin_path=None, content_types_to_compress=None, @@ -68,10 +71,8 @@ return params -update_endpoint.__doc__ = EndpointUpdateParameters.__doc__ - - -def create_endpoint(client, resource_group_name, profile_name, name, origins, location=None, +# pylint: disable=unused-argument +def create_endpoint(cmd, client, resource_group_name, profile_name, name, origins, location=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=QueryStringCachingBehavior.ignore_query_string. @@ -95,10 +96,9 @@ return client.endpoints.create(resource_group_name, profile_name, name, endpoint) -create_endpoint.__doc__ = Endpoint.__doc__ - - -def create_custom_domain(client, resource_group_name, profile_name, endpoint_name, name, hostname): +# pylint: disable=unused-argument +def create_custom_domain(cmd, client, resource_group_name, profile_name, endpoint_name, name, hostname, + location=None, tags=None): return client.custom_domains.create(resource_group_name, profile_name, endpoint_name, @@ -106,18 +106,19 @@ hostname) -def update_profile(instance, tags=None): +# pylint: disable=unused-argument +def update_profile(cmd, instance, tags=None): params = ProfileUpdateParameters(tags=tags) _update_mapper(instance, params, ['tags']) return params -update_profile.__doc__ = ProfileUpdateParameters.__doc__ - - -def create_profile(client, resource_group_name, name, +# pylint: disable=unused-argument +def create_profile(cmd, client, resource_group_name, name, sku=SkuName.standard_akamai.value, location=None, tags=None): from azure.mgmt.cdn.models import (Profile, Sku) profile = Profile(location, Sku(name=sku), tags=tags) return client.profiles.create(resource_group_name, name, profile) + +# endregion diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure_cli_cdn.egg-info/PKG-INFO new/azure-cli-cdn-0.0.12/azure_cli_cdn.egg-info/PKG-INFO --- old/azure-cli-cdn-0.0.9/azure_cli_cdn.egg-info/PKG-INFO 2017-09-23 01:49:33.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure_cli_cdn.egg-info/PKG-INFO 2018-01-26 17:12:39.000000000 +0100 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: azure-cli-cdn -Version: 0.0.9 +Version: 0.0.12 Summary: Microsoft Azure Command-Line Tools Content Delivery Network (CDN) Command Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation Author-email: [email protected] License: MIT -Description-Content-Type: UNKNOWN Description: Microsoft Azure CLI 'Content Delivery Network (CDN)' Command Module =================================================================== @@ -18,6 +17,19 @@ Release History =============== + + 0.0.12 + ++++++ + * `cdn custom-domain create`: Fixed missing client issue. + + 0.0.11 + ++++++ + * Update for CLI core changes. + + 0.0.10 + ++++++ + * minor fixes + 0.0.9 (2017-09-22) ++++++++++++++++++ * minor fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/azure_cli_cdn.egg-info/requires.txt new/azure-cli-cdn-0.0.12/azure_cli_cdn.egg-info/requires.txt --- old/azure-cli-cdn-0.0.9/azure_cli_cdn.egg-info/requires.txt 2017-09-23 01:49:33.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/azure_cli_cdn.egg-info/requires.txt 2018-01-26 17:12:39.000000000 +0100 @@ -1,3 +1,2 @@ -azure-mgmt-cdn==0.30.2 +azure-mgmt-cdn==1.0.0 azure-cli-core -azure-cli-command-modules-nspkg>=2.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-cdn-0.0.9/setup.py new/azure-cli-cdn-0.0.12/setup.py --- old/azure-cli-cdn-0.0.9/setup.py 2017-09-23 01:49:32.000000000 +0200 +++ new/azure-cli-cdn-0.0.12/setup.py 2018-01-26 17:12:23.000000000 +0100 @@ -16,7 +16,7 @@ cmdclass = {} -VERSION = "0.0.9" +VERSION = "0.0.12" # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers CLASSIFIERS = [ @@ -34,7 +34,7 @@ ] DEPENDENCIES = [ - 'azure-mgmt-cdn==0.30.2', + 'azure-mgmt-cdn==1.0.0', 'azure-cli-core', ]
