From 2d8a1303646b5ad3ef202af60aabed9cb64bf734 Mon Sep 17 00:00:00 2001 From: pensh Date: Mon, 10 Oct 2022 16:36:26 +0800 Subject: [PATCH 1/8] Add remote-debugging support for azure spring apps --- src/spring/azext_spring/_help.py | 15 ++ src/spring/azext_spring/_params.py | 257 ++++++++++++++++++------- src/spring/azext_spring/_validators.py | 52 +++-- src/spring/azext_spring/commands.py | 5 +- src/spring/azext_spring/custom.py | 68 +++++-- 5 files changed, 290 insertions(+), 107 deletions(-) diff --git a/src/spring/azext_spring/_help.py b/src/spring/azext_spring/_help.py index 7b40a18c4bd..b46fa1235fd 100644 --- a/src/spring/azext_spring/_help.py +++ b/src/spring/azext_spring/_help.py @@ -383,6 +383,21 @@ short-summary: Start a JFR on your target app instance to given file path. """ +helps['spring app deployment enable-remote-debugging'] = """ + type: command + short-summary: Enable remote debugging for a deployment. +""" + +helps['spring app deployment disable-remote-debugging'] = """ + type: command + short-summary: Disable remote debugging for a deployment. +""" + +helps['spring app deployment get-remote-debugging'] = """ + type: command + short-summary: Get the remote debugging configuration of a deployment. +""" + helps['spring config-server'] = """ type: group short-summary: (Support Standard Tier and Basic Tier) Commands to manage Config Server in Azure Spring Apps. diff --git a/src/spring/azext_spring/_params.py b/src/spring/azext_spring/_params.py index 5eac04615e4..a3a02cde784 100644 --- a/src/spring/azext_spring/_params.py +++ b/src/spring/azext_spring/_params.py @@ -13,7 +13,8 @@ validate_vnet, validate_vnet_required_parameters, validate_node_resource_group, validate_tracing_parameters_asc_create, validate_tracing_parameters_asc_update, validate_app_insights_parameters, validate_instance_count, validate_java_agent_parameters, - validate_ingress_timeout, validate_jar, validate_ingress_send_timeout, validate_ingress_session_max_age) + validate_ingress_timeout, validate_remote_debugging_port, validate_jar, validate_ingress_send_timeout, + validate_ingress_session_max_age) from ._validators_enterprise import (only_support_enterprise, validate_builder_resource, validate_builder_create, validate_builder_update, validate_build_pool_size, validate_git_uri, validate_acs_patterns, validate_config_file_patterns, @@ -32,12 +33,13 @@ validate_app_force_set_user_identity_or_warning) from ._utils import ApiType - from .vendored_sdks.appplatform.v2020_07_01.models import RuntimeVersion, TestKeyType from .vendored_sdks.appplatform.v2022_01_01_preview.models \ import _app_platform_management_client_enums as v20220101_preview_AppPlatformEnums -from .vendored_sdks.appplatform.v2022_01_01_preview.models._app_platform_management_client_enums import SupportedRuntimeValue, TestKeyType -from .vendored_sdks.appplatform.v2022_09_01_preview.models._app_platform_management_client_enums import BackendProtocol, SessionAffinity +from .vendored_sdks.appplatform.v2022_01_01_preview.models._app_platform_management_client_enums import \ + SupportedRuntimeValue, TestKeyType +from .vendored_sdks.appplatform.v2022_09_01_preview.models._app_platform_management_client_enums import BackendProtocol, \ + SessionAffinity name_type = CLIArgumentType(options_list=[ '--name', '-n'], help='The primary resource name', validator=validate_name) @@ -45,22 +47,30 @@ validator=validate_env, help="Space-separated environment variables in 'key[=value]' format.", nargs='*') build_env_type = CLIArgumentType( validator=validate_build_env, help="Space-separated environment variables in 'key[=value]' format.", nargs='*') -service_name_type = CLIArgumentType(options_list=['--service', '-s'], help='Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.', configured_default='spring') -app_name_type = CLIArgumentType(help='App name, you can configure the default app using az configure --defaults spring-cloud-app=.', validator=validate_app_name, configured_default='spring-app') -sku_type = CLIArgumentType(arg_type=get_enum_type(['Basic', 'Standard', 'Enterprise']), help='Name of SKU. Enterprise is still in Preview.') +service_name_type = CLIArgumentType(options_list=['--service', '-s'], + help='Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.', + configured_default='spring') +app_name_type = CLIArgumentType( + help='App name, you can configure the default app using az configure --defaults spring-cloud-app=.', + validator=validate_app_name, configured_default='spring-app') +sku_type = CLIArgumentType(arg_type=get_enum_type(['Basic', 'Standard', 'Enterprise']), + help='Name of SKU. Enterprise is still in Preview.') source_path_type = CLIArgumentType(nargs='?', const='.', help="Deploy the specified source folder. The folder will be packed into tar, uploaded, and built using kpack. Default to the current folder if no value provided.", arg_group='Source Code deploy') # app cpu and memory -cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', validator=validate_cpu) -memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', validator=validate_memory) -build_cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', validator=validate_build_cpu) -build_memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', validator=validate_build_memory) +cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', + validator=validate_cpu) +memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', + validator=validate_memory) +build_cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', + validator=validate_build_cpu) +build_memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', + validator=validate_build_memory) # pylint: disable=too-many-statements def load_arguments(self, _): - with self.argument_context('spring') as c: c.argument('resource_group', arg_type=resource_group_name_type) c.argument('name', options_list=[ @@ -71,12 +81,27 @@ def load_arguments(self, _): with self.argument_context('spring create') as c: c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=validate_location) c.argument('sku', arg_type=sku_type, default='Standard', validator=validate_sku) - c.argument('reserved_cidr_range', arg_group='VNet Injection', help='Comma-separated list of IP address ranges in CIDR format. The IP ranges are reserved to host underlying Azure Spring Apps infrastructure, which should be 3 at least /16 unused IP ranges, must not overlap with any Subnet IP ranges.', validator=validate_vnet_required_parameters) - c.argument('vnet', arg_group='VNet Injection', help='The name or ID of an existing Virtual Network into which to deploy the Spring Apps instance.', validator=validate_vnet_required_parameters) - c.argument('app_subnet', arg_group='VNet Injection', help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps app. Required when deploying into a Virtual Network. Smaller subnet sizes are supported, please refer: https://aka.ms/azure-spring-cloud-smaller-subnet-vnet-docs', validator=validate_vnet_required_parameters) - c.argument('service_runtime_subnet', arg_group='VNet Injection', options_list=['--service-runtime-subnet', '--svc-subnet'], help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps service runtime. Required when deploying into a Virtual Network.', validator=validate_vnet) - c.argument('service_runtime_network_resource_group', arg_group='VNet Injection', options_list=['--service-runtime-network-resource-group', '--svc-nrg'], help='The resource group where all network resources for Azure Spring Apps service runtime will be created in.', validator=validate_node_resource_group) - c.argument('app_network_resource_group', arg_group='VNet Injection', options_list=['--app-network-resource-group', '--app-nrg'], help='The resource group where all network resources for apps will be created in.', validator=validate_node_resource_group) + c.argument('reserved_cidr_range', arg_group='VNet Injection', + help='Comma-separated list of IP address ranges in CIDR format. The IP ranges are reserved to host underlying Azure Spring Apps infrastructure, which should be 3 at least /16 unused IP ranges, must not overlap with any Subnet IP ranges.', + validator=validate_vnet_required_parameters) + c.argument('vnet', arg_group='VNet Injection', + help='The name or ID of an existing Virtual Network into which to deploy the Spring Apps instance.', + validator=validate_vnet_required_parameters) + c.argument('app_subnet', arg_group='VNet Injection', + help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps app. Required when deploying into a Virtual Network. Smaller subnet sizes are supported, please refer: https://aka.ms/azure-spring-cloud-smaller-subnet-vnet-docs', + validator=validate_vnet_required_parameters) + c.argument('service_runtime_subnet', arg_group='VNet Injection', + options_list=['--service-runtime-subnet', '--svc-subnet'], + help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps service runtime. Required when deploying into a Virtual Network.', + validator=validate_vnet) + c.argument('service_runtime_network_resource_group', arg_group='VNet Injection', + options_list=['--service-runtime-network-resource-group', '--svc-nrg'], + help='The resource group where all network resources for Azure Spring Apps service runtime will be created in.', + validator=validate_node_resource_group) + c.argument('app_network_resource_group', arg_group='VNet Injection', + options_list=['--app-network-resource-group', '--app-nrg'], + help='The resource group where all network resources for apps will be created in.', + validator=validate_node_resource_group) c.argument('outbound_type', arg_group='VNet Injection', help='The outbound type of Azure Spring Apps VNet instance.', validator=validate_vnet, default="loadBalancer") @@ -203,14 +228,18 @@ def load_arguments(self, _): c.argument('service', service_name_type) c.argument('name', name_type, help='Name of app.') - for scope in ['spring app create', 'spring app update', 'spring app deploy', 'spring app deployment create', 'spring app deployment update']: + for scope in ['spring app create', 'spring app update', 'spring app deploy', 'spring app deployment create', + 'spring app deployment update']: with self.argument_context(scope) as c: c.argument('enable_liveness_probe', arg_type=get_three_state_flag(), is_preview=True, - help='If false, will disable the liveness probe of the app instance', arg_group='App Customization') + help='If false, will disable the liveness probe of the app instance', + arg_group='App Customization') c.argument('enable_readiness_probe', arg_type=get_three_state_flag(), is_preview=True, - help='If false, will disable the readiness probe of the app instance', arg_group='App Customization') + help='If false, will disable the readiness probe of the app instance', + arg_group='App Customization') c.argument('enable_startup_probe', arg_type=get_three_state_flag(), is_preview=True, - help='If false, will disable the startup probe of the app instance', arg_group='App Customization') + help='If false, will disable the startup probe of the app instance', + arg_group='App Customization') c.argument('liveness_probe_config', type=str, is_preview=True, help='A json file path indicates the liveness probe config', arg_group='App Customization') c.argument('readiness_probe_config', type=str, is_preview=True, @@ -219,12 +248,14 @@ def load_arguments(self, _): help='A json file path indicates the startup probe config', arg_group='App Customization') c.argument('termination_grace_period_seconds', type=str, is_preview=True, options_list=['--termination-grace-period-seconds', '--grace-period'], - help='Optional duration in seconds the app instance needs to terminate gracefully', arg_group='App Customization') + help='Optional duration in seconds the app instance needs to terminate gracefully', + arg_group='App Customization') with self.argument_context('spring app create') as c: c.argument('assign_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL for direct access.', default=False, - options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) + options_list=['--assign-endpoint', + c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('assign_public_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL which could be accessed out of virtual network for vnet injection instance app.') @@ -255,14 +286,17 @@ def load_arguments(self, _): with self.argument_context('spring app update') as c: c.argument('assign_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL for direct access.', - options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) + options_list=['--assign-endpoint', + c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('assign_public_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL which could be accessed out of virtual network for vnet injection instance app.') c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_ingress_to_app_tls', arg_type=get_three_state_flag(), help='If true, enable ingress to app tls', - options_list=['--enable-ingress-to-app-tls', c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', hide=True)]) + options_list=['--enable-ingress-to-app-tls', + c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', + hide=True)]) c.argument('persistent_storage', type=str, help='A json file path for the persistent storages to be mounted to the app') c.argument('loaded_public_certificate_file', type=str, options_list=['--loaded-public-certificate-file', '-f'], @@ -274,18 +308,24 @@ def load_arguments(self, _): with self.argument_context('spring app append-persistent-storage') as c: c.argument('storage_name', type=str, help='Name of the storage resource you created in Azure Spring Apps.') - c.argument('persistent_storage_type', options_list=['--persistent-storage-type', '-t'], type=str, help='Type of the persistent storage volumed.') + c.argument('persistent_storage_type', options_list=['--persistent-storage-type', '-t'], type=str, + help='Type of the persistent storage volumed.') c.argument('share_name', type=str, help="The name of the pre-created file share. " "ShareName should be provided only if the type of the persistent storage volume is AzureFileVolume.") c.argument('mount_path', type=str, help='The path for the persistent storage volume to be mounted.') - c.argument('mount_options', nargs='+', help='[optional] The mount options for the persistent storage volume.', default=None) - c.argument('read_only', arg_type=get_three_state_flag(), help='[optional] If true, the persistent storage volume will be read only.', default=False) + c.argument('mount_options', nargs='+', help='[optional] The mount options for the persistent storage volume.', + default=None) + c.argument('read_only', arg_type=get_three_state_flag(), + help='[optional] If true, the persistent storage volume will be read only.', default=False) - for scope in ['spring app start', 'spring app stop', 'spring app restart', 'spring app deploy', 'spring app scale', 'spring app set-deployment', 'spring app show-deploy-log']: + for scope in ['spring app start', 'spring app stop', 'spring app restart', 'spring app deploy', 'spring app scale', + 'spring app set-deployment', 'spring app show-deploy-log']: with self.argument_context(scope) as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) with self.argument_context('spring app unset-deployment') as c: c.argument('name', name_type, help='Name of app.', validator=active_deployment_exist) @@ -324,14 +364,21 @@ def load_arguments(self, _): def prepare_logs_argument(c): '''`app log tail` is deprecated. `app logs` is the new choice. They share the same command processor.''' - c.argument('instance', options_list=['--instance', '-i'], help='Name of an existing instance of the deployment.') + c.argument('instance', options_list=['--instance', '-i'], + help='Name of an existing instance of the deployment.') c.argument('lines', type=int, help='Number of lines to show. Maximum is 10000', validator=validate_log_lines) - c.argument('follow', options_list=['--follow ', '-f'], help='Specify if the logs should be streamed.', action='store_true') - c.argument('since', help='Only return logs newer than a relative duration like 5s, 2m, or 1h. Maximum is 1h', validator=validate_log_since) - c.argument('limit', type=int, help='Maximum kilobytes of logs to return. Ceiling number is 2048.', validator=validate_log_limit) + c.argument('follow', options_list=['--follow ', '-f'], help='Specify if the logs should be streamed.', + action='store_true') + c.argument('since', help='Only return logs newer than a relative duration like 5s, 2m, or 1h. Maximum is 1h', + validator=validate_log_since) + c.argument('limit', type=int, help='Maximum kilobytes of logs to return. Ceiling number is 2048.', + validator=validate_log_limit) c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) - c.argument('format_json', nargs='?', const='{timestamp} {level:>5} [{thread:>15.15}] {logger{39}:<40.40}: {message}\n{stackTrace}', + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) + c.argument('format_json', nargs='?', + const='{timestamp} {level:>5} [{thread:>15.15}] {logger{39}:<40.40}: {message}\n{stackTrace}', help='Format JSON logs if structured log is enabled') with self.argument_context('spring app logs') as c: @@ -341,14 +388,18 @@ def prepare_logs_argument(c): prepare_logs_argument(c) with self.argument_context('spring app connect') as c: - c.argument('instance', options_list=['--instance', '-i'], help='Name of an existing instance of the deployment.') + c.argument('instance', options_list=['--instance', '-i'], + help='Name of an existing instance of the deployment.') c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) c.argument('shell_cmd', help='The shell command to run when connect to the app instance.') with self.argument_context('spring app set-deployment') as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app.', validator=ensure_not_active_deployment) + '--deployment', '-d'], help='Name of an existing deployment of the app.', + validator=ensure_not_active_deployment) for scope in ['spring app create', 'spring app update']: with self.argument_context(scope) as c: @@ -382,7 +433,8 @@ def prepare_logs_argument(c): c.argument('jvm_options', type=str, validator=validate_jvm_options, help="A string containing jvm options, use '=' instead of ' ' for this argument to avoid bash parse error, eg: --jvm-options='-Xms1024m -Xmx2048m'") c.argument('env', env_type) - c.argument('disable_probe', arg_type=get_three_state_flag(), help='If true, disable the liveness and readiness probe.') + c.argument('disable_probe', arg_type=get_three_state_flag(), + help='If true, disable the liveness and readiness probe.') c.argument('main_entry', options_list=[ '--main-entry', '-m'], help="The path to the .NET executable relative to zip root.") @@ -408,19 +460,23 @@ def prepare_logs_argument(c): c.argument( 'disable_validation', arg_type=get_three_state_flag(), help='If true, disable jar validation.') - c.argument('builder', help='(Enterprise Tier Only) Build service builder used to build the executable.', default='default') + c.argument('builder', help='(Enterprise Tier Only) Build service builder used to build the executable.', + default='default') c.argument( 'main_entry', options_list=[ - '--main-entry', '-m'], help="A string containing the path to the .NET executable relative to zip root.") + '--main-entry', '-m'], + help="A string containing the path to the .NET executable relative to zip root.") c.argument( - 'target_module', help='Child module to be deployed, required for multiple jar packages built from source code.', + 'target_module', + help='Child module to be deployed, required for multiple jar packages built from source code.', arg_group='Source Code deploy', validator=validate_target_module) c.argument( 'version', help='Deployment version, keep unchanged if not set.') c.argument( 'container_image', help='The container image tag.', arg_group='Custom Container') c.argument( - 'container_registry', default='docker.io', help='The registry of the container image.', arg_group='Custom Container') + 'container_registry', default='docker.io', help='The registry of the container image.', + arg_group='Custom Container') c.argument( 'registry_username', help='The username of the container registry.', arg_group='Custom Container') c.argument( @@ -430,7 +486,9 @@ def prepare_logs_argument(c): c.argument( 'container_args', help='The arguments of the container image.', arg_group='Custom Container') c.argument( - 'language_framework', help='Language framework of the container image uploaded. Supported values: "springboot", "".', arg_group='Custom Container') + 'language_framework', + help='Language framework of the container image uploaded. Supported values: "springboot", "".', + arg_group='Custom Container') c.argument( 'build_env', build_env_type) c.argument( @@ -445,7 +503,8 @@ def prepare_logs_argument(c): c.argument('source_path', arg_type=source_path_type, validator=validate_deloyment_create_path) with self.argument_context('spring app deployment create') as c: - c.argument('skip_clone_settings', help='Create staging deployment will automatically copy settings from production deployment.', + c.argument('skip_clone_settings', + help='Create staging deployment will automatically copy settings from production deployment.', action='store_true') c.argument('cpu', arg_type=cpu_type) c.argument('memory', arg_type=memory_type) @@ -456,16 +515,40 @@ def prepare_logs_argument(c): validator=validate_app_name) c.argument('name', name_type, help='Name of deployment.') + for scope in ['spring app deployment disable-remote-debugging', 'spring app deployment get-remote-debugging']: + with self.argument_context(scope) as c: + c.argument('app', app_name_type, help='Name of app.', + validator=validate_app_name) + c.argument('deployment', options_list=[ + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) + + with self.argument_context('spring app deployment enable-remote-debugging') as c: + c.argument('app', app_name_type, help='Name of app.', + validator=validate_app_name) + c.argument('deployment', options_list=[ + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) + c.argument('remote_debugging_port', options_list=['--port', '-p'], type=int, default=5005, + help='Remote debugging port, the value should be from 1024 to 65536, default value is 5005', + validator=validate_remote_debugging_port) + for scope in ['spring app deployment generate-heap-dump', 'spring app deployment generate-thread-dump']: with self.argument_context(scope) as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) c.argument('app_instance', help='Target app instance you want to dump.') c.argument('file_path', help='The mount file path for your dump file.') with self.argument_context('spring app deployment start-jfr') as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) c.argument('app_instance', help='Target app instance you want to dump.') c.argument('file_path', help='The mount file path for your dump file.') c.argument('duration', type=str, default="60s", help='Duration of JFR.') @@ -502,17 +585,21 @@ def prepare_logs_argument(c): for scope in ['spring app binding redis add', 'spring app binding redis update']: with self.argument_context(scope) as c: c.argument('key', help='Api key of the service.') - c.argument('disable_ssl', arg_type=get_three_state_flag(), help='If true, disable SSL. If false, enable SSL.', default=False) + c.argument('disable_ssl', arg_type=get_three_state_flag(), + help='If true, disable SSL. If false, enable SSL.', default=False) with self.argument_context('spring app append-loaded-public-certificate') as c: c.argument('certificate_name', help='Name of the certificate to be appended') - c.argument('load_trust_store', arg_type=get_three_state_flag(), help='If true, the certificate would be loaded into trust store for Java applications', default=False) + c.argument('load_trust_store', arg_type=get_three_state_flag(), + help='If true, the certificate would be loaded into trust store for Java applications', + default=False) with self.argument_context('spring config-server set') as c: c.argument('config_file', help='A yaml file path for the configuration of Spring Cloud config server') - for scope in ['spring config-server git set', 'spring config-server git repo add', 'spring config-server git repo update']: + for scope in ['spring config-server git set', 'spring config-server git repo add', + 'spring config-server git repo update']: with self.argument_context(scope) as c: c.argument('uri', help='Uri of the added config.') c.argument('label', help='Label of the added config.') @@ -528,7 +615,8 @@ def prepare_logs_argument(c): options_list=['--strict-host-key-checking', '--host-key-check'], help='Strict_host_key_checking of the added config.') - for scope in ['spring config-server git repo add', 'spring config-server git repo update', 'spring config-server git repo remove']: + for scope in ['spring config-server git repo add', 'spring config-server git repo update', + 'spring config-server git repo remove']: with self.argument_context(scope) as c: c.argument('repo_name', help='Name of the repo.') @@ -541,7 +629,9 @@ def prepare_logs_argument(c): c.argument('app', app_name_type, help='Name of app.', validator=validate_app_name) c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=validate_deployment_name) + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=validate_deployment_name) with self.argument_context('spring storage') as c: c.argument('service', service_name_type) @@ -582,13 +672,17 @@ def prepare_logs_argument(c): c.argument('certificate', type=str, help='Certificate name in Azure Spring Apps.') c.argument('enable_ingress_to_app_tls', arg_type=get_three_state_flag(), help='If true, enable ingress to app tls', - options_list=['--enable-ingress-to-app-tls', c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', hide=True)]) + options_list=['--enable-ingress-to-app-tls', + c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', + hide=True)]) with self.argument_context('spring app custom-domain update') as c: c.argument('certificate', help='Certificate name in Azure Spring Apps.') c.argument('enable_ingress_to_app_tls', arg_type=get_three_state_flag(), help='If true, enable ingress to app tls', - options_list=['--enable-ingress-to-app-tls', c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', hide=True)]) + options_list=['--enable-ingress-to-app-tls', + c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', + hide=True)]) with self.argument_context('spring app-insights update') as c: c.argument('app_insights_key', @@ -614,7 +708,8 @@ def prepare_logs_argument(c): for scope in ['create', 'update']: with self.argument_context('spring build-service builder {}'.format(scope)) as c: c.argument('builder_json', help="The JSON array of builder.", validator=validate_builder_resource) - c.argument('builder_file', help="The file path of JSON array of builder.", validator=validate_builder_resource) + c.argument('builder_file', help="The file path of JSON array of builder.", + validator=validate_builder_resource) with self.argument_context('spring build-service builder create') as c: c.argument('name', help="The builder name.", validator=validate_builder_create) @@ -654,7 +749,8 @@ def prepare_logs_argument(c): c.argument('host_key', help='Host key of the added config.') c.argument('host_key_algorithm', help='Host key algorithm of the added config.') c.argument('private_key', help='Private_key of the added config.') - c.argument('host_key_check', help='Strict host key checking of the added config which is used in SSH authentication. If false, ignore errors with host key.') + c.argument('host_key_check', + help='Strict host key checking of the added config which is used in SSH authentication. If false, ignore errors with host key.') for scope in ['add', 'update', 'remove']: with self.argument_context('spring application-configuration-service git repo {}'.format(scope)) as c: @@ -663,29 +759,41 @@ def prepare_logs_argument(c): for scope in ['gateway update', 'api-portal update']: with self.argument_context('spring {}'.format(scope)) as c: c.argument('instance_count', type=int, help='Number of instance.') - c.argument('assign_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL for direct access.') + c.argument('assign_endpoint', arg_type=get_three_state_flag(), + help='If true, assign endpoint URL for direct access.') c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access endpoint via https') - c.argument('scope', arg_group='Single Sign On (SSO)', help="Comma-separated list of the specific actions applications can be allowed to do on a user's behalf.") + c.argument('scope', arg_group='Single Sign On (SSO)', + help="Comma-separated list of the specific actions applications can be allowed to do on a user's behalf.") c.argument('client_id', arg_group='Single Sign On (SSO)', help="The public identifier for the application.") - c.argument('client_secret', arg_group='Single Sign On (SSO)', help="The secret known only to the application and the authorization server.") + c.argument('client_secret', arg_group='Single Sign On (SSO)', + help="The secret known only to the application and the authorization server.") c.argument('issuer_uri', arg_group='Single Sign On (SSO)', help="The URI of Issuer Identifier.") with self.argument_context('spring gateway update') as c: c.argument('cpu', type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.') c.argument('memory', type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') - c.argument('api_title', arg_group='API metadata', help="Title describing the context of the APIs available on the Gateway instance.") - c.argument('api_description', arg_group='API metadata', help="Detailed description of the APIs available on the Gateway instance.") - c.argument('api_doc_location', arg_group='API metadata', help="Location of additional documentation for the APIs available on the Gateway instance.") + c.argument('api_title', arg_group='API metadata', + help="Title describing the context of the APIs available on the Gateway instance.") + c.argument('api_description', arg_group='API metadata', + help="Detailed description of the APIs available on the Gateway instance.") + c.argument('api_doc_location', arg_group='API metadata', + help="Location of additional documentation for the APIs available on the Gateway instance.") c.argument('api_version', arg_group='API metadata', help="Version of APIs available on this Gateway instance.") - c.argument('server_url', arg_group='API metadata', help="Base URL that API consumers will use to access APIs on the Gateway instance.") - c.argument('allowed_origins', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of allowed origins to make cross-site requests. The special value `*` allows all domains.") - c.argument('allowed_methods', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of allowed HTTP methods on cross-site requests. The special value `*` allows all methods.") - c.argument('allowed_headers', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of allowed headers in cross-site requests. The special value `*` allows actual requests to send any header.") + c.argument('server_url', arg_group='API metadata', + help="Base URL that API consumers will use to access APIs on the Gateway instance.") + c.argument('allowed_origins', arg_group='Cross-origin Resource Sharing (CORS)', + help="Comma-separated list of allowed origins to make cross-site requests. The special value `*` allows all domains.") + c.argument('allowed_methods', arg_group='Cross-origin Resource Sharing (CORS)', + help="Comma-separated list of allowed HTTP methods on cross-site requests. The special value `*` allows all methods.") + c.argument('allowed_headers', arg_group='Cross-origin Resource Sharing (CORS)', + help="Comma-separated list of allowed headers in cross-site requests. The special value `*` allows actual requests to send any header.") c.argument('max_age', arg_group='Cross-origin Resource Sharing (CORS)', type=int, help="How long, in seconds, the response from a pre-flight request can be cached by clients.") - c.argument('allow_credentials', arg_group='Cross-origin Resource Sharing (CORS)', arg_type=get_three_state_flag(), + c.argument('allow_credentials', arg_group='Cross-origin Resource Sharing (CORS)', + arg_type=get_three_state_flag(), help="Whether user credentials are supported on cross-site requests.") - c.argument('exposed_headers', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of HTTP response headers to expose for cross-site requests.") + c.argument('exposed_headers', arg_group='Cross-origin Resource Sharing (CORS)', + help="Comma-separated list of HTTP response headers to expose for cross-site requests.") for scope in ['spring gateway custom-domain', 'spring api-portal custom-domain']: @@ -706,11 +814,13 @@ def prepare_logs_argument(c): with self.argument_context('spring gateway route-config {}'.format(scope)) as c: c.argument('app_name', type=str, help="The Azure Spring Apps app name to configure the route.") c.argument('routes_json', type=str, help="The JSON array of API routes.", validator=validate_routes) - c.argument('routes_file', type=str, help="The file path of JSON array of API routes.", validator=validate_routes) + c.argument('routes_file', type=str, help="The file path of JSON array of API routes.", + validator=validate_routes) for scope in ['spring build-service builder buildpack-binding create']: with self.argument_context(scope) as c: - c.argument('name', name_type, help='Name for buildpack binding.', validator=validate_buildpack_binding_not_exist) + c.argument('name', name_type, help='Name for buildpack binding.', + validator=validate_buildpack_binding_not_exist) for scope in ['spring build-service builder buildpack-binding create', 'spring build-service builder buildpack-binding set']: @@ -733,7 +843,8 @@ def prepare_logs_argument(c): 'spring build-service builder buildpack-binding show', 'spring build-service builder buildpack-binding delete']: with self.argument_context(scope) as c: - c.argument('name', name_type, help='Name for buildpack binding.', validator=validate_buildpack_binding_exist) + c.argument('name', name_type, help='Name for buildpack binding.', + validator=validate_buildpack_binding_exist) for scope in ['spring build-service builder buildpack-binding create', 'spring build-service builder buildpack-binding set', diff --git a/src/spring/azext_spring/_validators.py b/src/spring/azext_spring/_validators.py index e33491ed997..171d19d03d7 100644 --- a/src/spring/azext_spring/_validators.py +++ b/src/spring/azext_spring/_validators.py @@ -107,7 +107,9 @@ def validate_instance_not_existed(client, resource_group, name, location): availability_parameters = models.NameAvailabilityParameters(type="Microsoft.AppPlatform/Spring", name=name) name_availability = client.services.check_name_availability(location, availability_parameters) if not name_availability.name_available and name_availability.reason == "AlreadyExists": - raise InvalidArgumentValueError("Service instance '{}' under resource group '{}' is already existed in region '{}', cannot be created again.".format(name, resource_group, location)) + raise InvalidArgumentValueError( + "Service instance '{}' under resource group '{}' is already existed in region '{}', cannot be created again.".format( + name, resource_group, location)) def validate_name(namespace): @@ -218,6 +220,12 @@ def validate_ingress_timeout(namespace): raise InvalidArgumentValueError("Invalid value: Ingress read timeout must be in the range [1,1800].") +def validate_remote_debugging_port(namespace): + if namespace.remote_debugging_port is not None and (namespace.remote_debugging_port < 1024 or + namespace.remote_debugging_port > 65535): + raise InvalidArgumentValueError("Invalid value: remote debugging port must be in the range [1024,65535].") + + def validate_ingress_send_timeout(namespace): if namespace.ingress_send_timeout is not None and (namespace.ingress_read_timeout < 1 or namespace.ingress_read_timeout > 1800): @@ -289,13 +297,15 @@ def _validate_app_insights_parameters(namespace): def validate_app_insights_command_not_supported_tier(cmd, namespace): if is_enterprise_tier(cmd, namespace.resource_group, namespace.name): - raise NotSupportedPricingTierError("Enterprise tier service instance {} in group {} is not supported in this command, ".format(namespace.name, namespace.resource_group) + - "please refer to 'az spring build-service builder buildpack-binding' command group.") + raise NotSupportedPricingTierError( + "Enterprise tier service instance {} in group {} is not supported in this command, ".format(namespace.name, + namespace.resource_group) + + "please refer to 'az spring build-service builder buildpack-binding' command group.") def validate_vnet(cmd, namespace): if not namespace.vnet and not namespace.app_subnet and \ - not namespace.service_runtime_subnet and not namespace.reserved_cidr_range: + not namespace.service_runtime_subnet and not namespace.reserved_cidr_range: return validate_vnet_required_parameters(namespace) @@ -323,7 +333,8 @@ def validate_vnet(cmd, namespace): app_vnet_id = _parse_vnet_id_from_subnet(namespace.app_subnet) service_runtime_vnet_id = _parse_vnet_id_from_subnet(namespace.service_runtime_subnet) if app_vnet_id.lower() != service_runtime_vnet_id.lower(): - raise InvalidArgumentValueError('--app-subnet and --service-runtime-subnet should be in the same Virtual Networks.') + raise InvalidArgumentValueError( + '--app-subnet and --service-runtime-subnet should be in the same Virtual Networks.') vnet_id = app_vnet_id if namespace.app_subnet.lower() == namespace.service_runtime_subnet.lower(): raise InvalidArgumentValueError('--app-subnet and --service-runtime-subnet should not be the same.') @@ -365,7 +376,8 @@ def _validate_subnet(namespace, subnet): raise InvalidArgumentValueError('--{} should not have connected device.'.format(name)) address = ip_network(subnet.address_prefix, strict=False) if address.prefixlen > limit: - raise InvalidArgumentValueError('--{0} should contain at least /{1} address, got /{2}'.format(name, limit, address.prefixlen)) + raise InvalidArgumentValueError( + '--{0} should contain at least /{1} address, got /{2}'.format(name, limit, address.prefixlen)) def _get_vnet(cmd, vnet_id): @@ -442,8 +454,8 @@ def _parse_vnet_id_from_subnet(subnet_id): raise InvalidArgumentValueError('{0} is not a valid subnet resource ID'.format(subnet_id)) subnet = parse_resource_id(subnet_id) if subnet['namespace'].lower() != 'microsoft.network' or \ - subnet['type'].lower() != 'virtualnetworks' or \ - 'resource_type' not in subnet or subnet['resource_type'].lower() != 'subnets': + subnet['type'].lower() != 'virtualnetworks' or \ + 'resource_type' not in subnet or subnet['resource_type'].lower() != 'subnets': raise InvalidArgumentValueError('{0} is not a valid subnet resource ID'.format(subnet_id)) return resource_id( subscription=subnet['subscription'], @@ -505,16 +517,16 @@ def _validate_ip(ip, prefix): def validate_vnet_required_parameters(namespace): # pylint: disable=too-many-boolean-expressions if not namespace.app_subnet and \ - not namespace.service_runtime_subnet and \ - not namespace.app_network_resource_group and \ - not namespace.service_runtime_network_resource_group and \ - not namespace.reserved_cidr_range and \ - not namespace.vnet: + not namespace.service_runtime_subnet and \ + not namespace.app_network_resource_group and \ + not namespace.service_runtime_network_resource_group and \ + not namespace.reserved_cidr_range and \ + not namespace.vnet: return if namespace.sku and _parse_sku_name(namespace.sku) == 'basic': raise InvalidArgumentValueError('Virtual Network Injection is not supported for Basic tier.') if not namespace.app_subnet \ - or not namespace.service_runtime_subnet: + or not namespace.service_runtime_subnet: raise InvalidArgumentValueError( '--app-subnet, --service-runtime-subnet must be set when deploying to VNet') @@ -539,7 +551,8 @@ def _validate_resource_group_name(name, message_name): return matchObj = match(r'^[-\w\._\(\)]+$', name) if matchObj is None: - raise InvalidArgumentValueError('--{0} must conform to the following pattern: \'^[-\\w\\._\\(\\)]+$\'.'.format(message_name)) + raise InvalidArgumentValueError( + '--{0} must conform to the following pattern: \'^[-\\w\\._\\(\\)]+$\'.'.format(message_name)) def _validate_route_table(namespace, vnet_obj): @@ -553,7 +566,8 @@ def _validate_route_table(namespace, vnet_obj): if app_route_table_id and runtime_route_table_id: if app_route_table_id == runtime_route_table_id: - raise InvalidArgumentValueError('--service-runtime-subnet and --app-subnet should associate with different route tables.') + raise InvalidArgumentValueError( + '--service-runtime-subnet and --app-subnet should associate with different route tables.') if (app_route_table_id and not runtime_route_table_id) \ or (not app_route_table_id and runtime_route_table_id): raise InvalidArgumentValueError( @@ -577,10 +591,12 @@ def validate_jar(namespace): tips = ", if you choose to ignore these errors, turn validation off with --disable-validation" if not has_jar and not has_class: telemetry.set_user_fault("invalid_jar_no_class_jar") - raise InvalidArgumentValueError("Do not find any class or jar file, please check if your artifact is a valid fat jar" + tips) + raise InvalidArgumentValueError( + "Do not find any class or jar file, please check if your artifact is a valid fat jar" + tips) if not has_manifest: telemetry.set_user_fault("invalid_jar_no_manifest") - raise InvalidArgumentValueError("Do not find MANIFEST.MF, please check if your artifact is a valid fat jar" + tips) + raise InvalidArgumentValueError( + "Do not find MANIFEST.MF, please check if your artifact is a valid fat jar" + tips) if file_size / 1024 / 1024 < 10: telemetry.set_user_fault("invalid_jar_thin_jar") raise InvalidArgumentValueError("Thin jar detected, please check if your artifact is a valid fat jar" + tips) diff --git a/src/spring/azext_spring/commands.py b/src/spring/azext_spring/commands.py index 18c8dff7c54..96375766771 100644 --- a/src/spring/azext_spring/commands.py +++ b/src/spring/azext_spring/commands.py @@ -170,7 +170,7 @@ def load_command_table(self, _): exception_handler=handle_asc_exception) as g: g.custom_command('create', 'deployment_create', supports_no_wait=True) - with self.command_group('spring app deployment', client_factory=cf_spring_20220501preview, + with self.command_group('spring app deployment', client_factory=cf_spring_20220901preview, exception_handler=handle_asc_exception) as g: g.custom_command('list', 'deployment_list', table_transformer=transform_spring_deployment_output) @@ -180,6 +180,9 @@ def load_command_table(self, _): g.custom_command('generate-heap-dump', 'deployment_generate_heap_dump') g.custom_command('generate-thread-dump', 'deployment_generate_thread_dump') g.custom_command('start-jfr', 'deployment_start_jfr') + g.custom_command('enable-remote-debugging', 'deployment_enable_remote_debugging') + g.custom_command('disable-remote-debugging', 'deployment_disable_remote_debugging') + g.custom_command('get-remote-debugging', 'deployment_get_remote_debugging') with self.command_group('spring app binding', client_factory=cf_spring_20220101preview, exception_handler=handle_asc_exception) as g: diff --git a/src/spring/azext_spring/custom.py b/src/spring/azext_spring/custom.py index ea5672558e8..4901cfe8c1c 100644 --- a/src/spring/azext_spring/custom.py +++ b/src/spring/azext_spring/custom.py @@ -25,13 +25,16 @@ from .vendored_sdks.appplatform.v2020_11_01_preview import models as models_20201101preview from .vendored_sdks.appplatform.v2022_01_01_preview import models as models_20220101preview from .vendored_sdks.appplatform.v2022_05_01_preview import models as models_20220501preview +from .vendored_sdks.appplatform.v2022_09_01_preview import models as models_20220901preview + from .vendored_sdks.appplatform.v2020_07_01.models import _app_platform_management_client_enums as AppPlatformEnums from .vendored_sdks.appplatform.v2020_11_01_preview import ( AppPlatformManagementClient as AppPlatformManagementClient_20201101preview ) from ._client_factory import (cf_spring) from knack.log import get_logger -from azure.cli.core.azclierror import ClientRequestError, FileOperationError, InvalidArgumentValueError, ResourceNotFoundError +from azure.cli.core.azclierror import ClientRequestError, FileOperationError, InvalidArgumentValueError, \ + ResourceNotFoundError from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.util import sdk_no_wait from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient @@ -132,7 +135,8 @@ def spring_update(cmd, client, resource_group, name, app_insights_key=None, app_ updated_resource.tags = tags update_service_tags = True - if update_service_tags is False and update_service_sku is False and update_log_stream_public_endpoint is False and (ingress_read_timeout is None): + if update_service_tags is False and update_service_sku is False and update_log_stream_public_endpoint is False and ( + ingress_read_timeout is None): return resource updated_resource.properties = updated_resource_properties @@ -196,7 +200,9 @@ def spring_start(cmd, client, resource_group, name, no_wait=False): state = resource.properties.provisioning_state power_state = resource.properties.power_state if state != "Succeeded" or power_state != "Stopped": - raise ClientRequestError("Service is in Provisioning State({}) and Power State({}), starting cannot be performed.".format(state, power_state)) + raise ClientRequestError( + "Service is in Provisioning State({}) and Power State({}), starting cannot be performed.".format(state, + power_state)) return sdk_no_wait(no_wait, client.services.begin_start, resource_group_name=resource_group, service_name=name) @@ -205,7 +211,9 @@ def spring_stop(cmd, client, resource_group, name, no_wait=False): state = resource.properties.provisioning_state power_state = resource.properties.power_state if state != "Succeeded" or power_state != "Running": - raise ClientRequestError("Service is in Provisioning State({}) and Power State({}), stopping cannot be performed.".format(state, power_state)) + raise ClientRequestError( + "Service is in Provisioning State({}) and Power State({}), stopping cannot be performed.".format(state, + power_state)) return sdk_no_wait(no_wait, client.services.begin_stop, resource_group_name=resource_group, service_name=name) @@ -236,7 +244,8 @@ def list_keys(cmd, client, resource_group, name, app=None, deployment=None): if deployment else app_get(cmd, client, resource_group, name, app).properties.active_deployment if deployment_resource: keys.primary_test_endpoint = "{}/{}/{}/".format(keys.primary_test_endpoint, app, deployment_resource.name) - keys.secondary_test_endpoint = "{}/{}/{}/".format(keys.secondary_test_endpoint, app, deployment_resource.name) + keys.secondary_test_endpoint = "{}/{}/{}/".format(keys.secondary_test_endpoint, app, + deployment_resource.name) return keys @@ -315,6 +324,23 @@ def app_stop(cmd, client, resource_group, service, name, deployment.name) +def deployment_enable_remote_debugging(cmd, client, resource_group, service, app, remote_debugging_port=None, deployment=None, no_wait=False): + logger.warning("Enable remote debugging for the app '{}', deployment '{}'".format(app, deployment.name)) + remote_debugging_payload = models_20220901preview.RemoteDebuggingPayload(port=remote_debugging_port) + return sdk_no_wait(no_wait, client.deployments.begin_enable_remote_debugging, + resource_group, service, app, deployment.name, remote_debugging_payload) + + +def deployment_disable_remote_debugging(cmd, client, resource_group, service, app, deployment=None, no_wait=False): + logger.warning("Disable remote debugging for the app '{}', deployment '{}'".format(app, deployment.name)) + return sdk_no_wait(no_wait, client.deployments.begin_disable_remote_debugging, + resource_group, service, app, deployment.name) + + +def deployment_get_remote_debugging(cmd, client, resource_group, service, app, deployment=None): + return client.deployments.get_remote_debugging_config(resource_group, service, app, deployment.name) + + def app_restart(cmd, client, resource_group, service, @@ -334,7 +360,9 @@ def app_list(cmd, client, client.deployments.list_for_cluster(resource_group, service)) for app in apps: app.properties.active_deployment = next(iter(x for x in deployments - if x.properties.active and x.id.startswith(app.id + '/deployments/')), None) + if + x.properties.active and x.id.startswith(app.id + '/deployments/')), + None) return apps @@ -397,7 +425,9 @@ def app_tail_log(cmd, client, resource_group, service, name, log_stream = LogStream(client, resource_group, service) if not log_stream: - raise CLIError("To use the log streaming feature, please enable the test endpoint by running 'az spring test-endpoint enable -n {0} -g {1}'".format(service, resource_group)) + raise CLIError( + "To use the log streaming feature, please enable the test endpoint by running 'az spring test-endpoint enable -n {0} -g {1}'".format( + service, resource_group)) streaming_url = "https://{0}/api/logstream/apps/{1}/instances/{2}".format( log_stream.base_url, name, instance) @@ -454,7 +484,8 @@ def _set_active_in_lagecy_api(cmd, client, resource_group, service, name, deploy return client.apps.begin_update(resource_group, service, name, app) -def app_append_loaded_public_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): +def app_append_loaded_public_certificate(cmd, client, resource_group, service, name, certificate_name, + load_trust_store): app_resource = client.apps.get(resource_group, service, name) certificate_resource = client.certificates.get(resource_group, service, certificate_name) certificate_resource_id = certificate_resource.id @@ -504,14 +535,16 @@ def deployment_list(cmd, client, resource_group, service, app): def deployment_generate_heap_dump(cmd, client, resource_group, service, app, app_instance, file_path, deployment=None): diagnostic_parameters = models_20220101preview.DiagnosticParameters(app_instance=app_instance, file_path=file_path) logger.info("Heap dump is triggered.") - return client.deployments.begin_generate_heap_dump(resource_group, service, app, deployment.name, diagnostic_parameters) + return client.deployments.begin_generate_heap_dump(resource_group, service, app, deployment.name, + diagnostic_parameters) def deployment_generate_thread_dump(cmd, client, resource_group, service, app, app_instance, file_path, deployment=None): diagnostic_parameters = models_20220101preview.DiagnosticParameters(app_instance=app_instance, file_path=file_path) logger.info("Thread dump is triggered.") - return client.deployments.begin_generate_thread_dump(resource_group, service, app, deployment.name, diagnostic_parameters) + return client.deployments.begin_generate_thread_dump(resource_group, service, app, deployment.name, + diagnostic_parameters) def deployment_start_jfr(cmd, client, resource_group, service, app, app_instance, file_path, duration=None, @@ -551,7 +584,9 @@ def validate_config_server_settings(client, resource_group, name, config_server_ try: result = sdk_no_wait(False, client.begin_validate, resource_group, name, config_server_settings).result() except Exception as err: # pylint: disable=broad-except - raise CLIError("{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format(err)) + raise CLIError( + "{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format( + err)) if not result.is_valid: for item in result.details or []: @@ -1169,7 +1204,8 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert if vault_uri is None and public_certificate_file is None: raise InvalidArgumentValueError("One of --vault-uri and --public-certificate-file should be provided") if vault_uri is not None and public_certificate_file is not None: - raise InvalidArgumentValueError("--vault-uri and --public-certificate-file could not be provided at the same time") + raise InvalidArgumentValueError( + "--vault-uri and --public-certificate-file could not be provided at the same time") if vault_uri is not None: if vault_certificate_name is None: raise InvalidArgumentValueError("--vault-certificate-name should be provided for Key Vault Certificate") @@ -1200,7 +1236,8 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert certificate_resource = models_20220101preview.CertificateResource(properties=properties) def callback(pipeline_response, deserialized, headers): - return models_20220101preview.CertificateResource.deserialize(json.loads(pipeline_response.http_response.text())) + return models_20220101preview.CertificateResource.deserialize( + json.loads(pipeline_response.http_response.text())) return client.certificates.begin_create_or_update( resource_group_name=resource_group, @@ -1469,7 +1506,6 @@ def app_insights_show(cmd, client, resource_group, name, no_wait=False): def app_connect(cmd, client, resource_group, service, name, deployment=None, instance=None, shell_cmd='/bin/sh'): - profile = Profile(cli_ctx=cmd.cli_ctx) creds, _, _ = profile.get_raw_token() token = creds[1] @@ -1491,7 +1527,9 @@ def app_connect(cmd, client, resource_group, service, name, connect_url = "wss://{0}/api/appconnect/apps/{1}/deployments/{2}/instances/{3}/connect?command={4}".format( hostname, name, deployment.name, instance, shell_cmd) - logger.warning("Connecting to the app instance Microsoft.AppPlatform/Spring/%s/apps/%s/deployments/%s/instances/%s..." % (service, name, deployment.name, instance)) + logger.warning( + "Connecting to the app instance Microsoft.AppPlatform/Spring/%s/apps/%s/deployments/%s/instances/%s..." % ( + service, name, deployment.name, instance)) conn = WebSocketConnection(connect_url, token) reader = Thread(target=recv_remote, args=(conn,)) From 77a890f3c8aa7b4778ce62abf9513b10a0c6c7d7 Mon Sep 17 00:00:00 2001 From: pensh Date: Tue, 11 Oct 2022 10:19:49 +0800 Subject: [PATCH 2/8] 1. Add test 2. Bump version --- src/spring/HISTORY.md | 6 + .../tests/latest/test_asa_app_scenario.py | 113 +++++++++++++----- src/spring/setup.py | 2 +- 3 files changed, 87 insertions(+), 34 deletions(-) diff --git a/src/spring/HISTORY.md b/src/spring/HISTORY.md index 1fafa9ab910..9f3d22f2c82 100644 --- a/src/spring/HISTORY.md +++ b/src/spring/HISTORY.md @@ -1,5 +1,11 @@ Release History =============== +1.1.11 +--- +* Add command `az spring app deployment enable-remote-debugging`. +* Add command `az spring app deployment disable-remote-debugging`. +* Add command `az spring app deployment get-remote-debugging`. + 1.1.10 --- * Remove `Preview` tag for user-assigned identities of apps. diff --git a/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py b/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py index 9e942059a39..c99d2db114a 100644 --- a/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py +++ b/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py @@ -14,11 +14,12 @@ TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + @record_only() class AppDeploy(ScenarioTest): def test_deploy_app(self): py_path = os.path.abspath(os.path.dirname(__file__)) - file_path = os.path.join(py_path, 'files/test.jar').replace("\\","/") + file_path = os.path.join(py_path, 'files/test.jar').replace("\\", "/") self.kwargs.update({ 'app': 'deploy', 'serviceName': 'cli-unittest', @@ -26,15 +27,18 @@ def test_deploy_app(self): 'file': file_path }) - self.cmd('spring app create -n {app} -g {rg} -s {serviceName} --cpu 2 --env "foo=bar" --runtime-version Java_11', checks=[ - self.check('name', '{app}'), - self.check('properties.activeDeployment.name', 'default'), - self.check('properties.activeDeployment.properties.deploymentSettings.resourceRequests.cpu', '2'), - self.check('properties.activeDeployment.sku.capacity', 1), - self.check('properties.activeDeployment.properties.source.type', 'Jar'), - self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_11'), - self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), - ]) + self.cmd( + 'spring app create -n {app} -g {rg} -s {serviceName} --cpu 2 --env "foo=bar" --runtime-version Java_11', + checks=[ + self.check('name', '{app}'), + self.check('properties.activeDeployment.name', 'default'), + self.check('properties.activeDeployment.properties.deploymentSettings.resourceRequests.cpu', '2'), + self.check('properties.activeDeployment.sku.capacity', 1), + self.check('properties.activeDeployment.properties.source.type', 'Jar'), + self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_11'), + self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', + {'foo': 'bar'}), + ]) # deploy fake file, the fail is expected with self.assertRaisesRegexp(CLIError, "112404: Exit code 1: application error."): @@ -65,7 +69,8 @@ def test_deploy_app(self): # deploy change to .Net with self.assertRaisesRegexp(CLIError, "112404: Exit code 0: purposely stopped."): - self.cmd('spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v2 --runtime-version NetCore_31 --main-entry test') + self.cmd( + 'spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v2 --runtime-version NetCore_31 --main-entry test') deployment = self.cmd('spring app deployment show -n default --app {app} -g {rg} -s {serviceName}', checks=[ self.check('name', 'default'), self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), @@ -93,7 +98,8 @@ def test_deploy_app(self): # keep deploy .net with self.assertRaisesRegexp(CLIError, "112404: Exit code 0: purposely stopped."): - self.cmd('spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v3 --main-entry test3') + self.cmd( + 'spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v3 --main-entry test3') self.cmd('spring app deployment show -n default --app {app} -g {rg} -s {serviceName}', checks=[ self.check('name', 'default'), self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), @@ -122,19 +128,21 @@ def test_app_crud(self): self.check('properties.activeDeployment.sku.capacity', 1), self.check('properties.activeDeployment.properties.source.type', 'Jar'), self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_8'), - self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), + self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', + {'foo': 'bar'}), ]) # green deployment copy settings from active, but still accept input as highest priority - self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --instance-count 2', checks=[ - self.check('name', 'green'), - self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), - self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), - self.check('properties.source.type', 'Jar'), - self.check('properties.source.runtimeVersion', 'Java_8'), - self.check('sku.capacity', 2), - self.check('properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), - ]) + self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --instance-count 2', + checks=[ + self.check('name', 'green'), + self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), + self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), + self.check('properties.source.type', 'Jar'), + self.check('properties.source.runtimeVersion', 'Java_8'), + self.check('sku.capacity', 2), + self.check('properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), + ]) self.cmd('spring app update -n {app} -g {rg} -s {serviceName} --runtime-version Java_11', checks=[ self.check('properties.activeDeployment.name', 'default'), @@ -143,11 +151,11 @@ def test_app_crud(self): self.check('properties.activeDeployment.sku.capacity', 1), self.check('properties.activeDeployment.properties.source.type', 'Jar'), self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_11'), - self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), + self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', + {'foo': 'bar'}), ]) self.cmd('spring app delete -n {app} -g {rg} -s {serviceName}') - def test_app_crud_1(self): self.kwargs.update({ 'app': 'test-crud-app-1', @@ -165,12 +173,13 @@ def test_app_crud_1(self): ]) # green deployment not copy settings from active - self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --skip-clone-settings', checks=[ - self.check('name', 'green'), - self.check('properties.deploymentSettings.resourceRequests.cpu', '1'), - self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), - self.check('sku.capacity', 1) - ]) + self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --skip-clone-settings', + checks=[ + self.check('name', 'green'), + self.check('properties.deploymentSettings.resourceRequests.cpu', '1'), + self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), + self.check('sku.capacity', 1) + ]) @record_only() @@ -263,10 +272,48 @@ def test_generate_deployment_dump(self): 'resourceGroup': 'cli', 'path': file_path }) - result = self.cmd('spring app deployment show -g {resourceGroup} -s {serviceName} --app {app} -n {deployment}').get_output_in_json() + result = self.cmd( + 'spring app deployment show -g {resourceGroup} -s {serviceName} --app {app} -n {deployment}').get_output_in_json() self.kwargs['instance'] = result['properties'].get('instances', [{}])[0].get('name') self.assertTrue(self.kwargs['instance']) - self.cmd('spring app deployment generate-heap-dump -g {resourceGroup} -s {serviceName} --app {app} --deployment {deployment} --app-instance {instance} --file-path {path}') + self.cmd( + 'spring app deployment generate-heap-dump -g {resourceGroup} -s {serviceName} --app {app} --deployment {deployment} --app-instance {instance} --file-path {path}') + + +@record_only() +class RemoteDebuggingTest(ScenarioTest): + def test_enable_remote_debugging(self): + self.kwargs.update({ + 'app': 'test-app-remote-debugging', + 'deployment': 'default', + 'serviceName': 'cli-unittest', + 'resourceGroup': 'cli', + }) + self.cmd( + 'spring app deployment enable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}') + + self.cmd( + 'spring app deployment get-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', + checks=[ + self.check('enabled', True), + self.check('port', 5005) + ]) + + def test_disable_remote_debugging(self): + self.kwargs.update({ + 'app': 'test-app-remote-debugging', + 'deployment': 'default', + 'serviceName': 'cli-unittest', + 'resourceGroup': 'cli', + }) + self.cmd( + 'spring app deployment disable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}') + + self.cmd( + 'spring app deployment get-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', + checks=[ + self.check('enabled', False) + ]) @record_only() @@ -288,4 +335,4 @@ def test_vnet_public_endpoint(self): self.cmd('spring app update -n {app} -g {rg} -s {serviceName} --assign-public-endpoint true', checks=[ self.check('properties.vnetAddons.publicEndpoint', True) - ]) \ No newline at end of file + ]) diff --git a/src/spring/setup.py b/src/spring/setup.py index d0b7418d84e..aa89b509d53 100644 --- a/src/spring/setup.py +++ b/src/spring/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.1.10' +VERSION = '1.1.11' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From efcf1b37c0a52c0e15c6cbd7182c9cdda30170f2 Mon Sep 17 00:00:00 2001 From: pensh Date: Tue, 11 Oct 2022 15:45:49 +0800 Subject: [PATCH 3/8] Add recording file --- .../recordings/test_remote_debugging.yaml | 1344 +++++++++++++++++ .../tests/latest/test_asa_app_scenario.py | 36 - .../tests/latest/test_asa_scenario.py | 30 + 3 files changed, 1374 insertions(+), 36 deletions(-) create mode 100644 src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml diff --git a/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml b/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml new file mode 100644 index 00000000000..b4e41909ab1 --- /dev/null +++ b/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml @@ -0,0 +1,1344 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"error":{"code":"NotFound","message":"App was not found","target":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","details":null}}' + headers: + cache-control: + - no-cache + content-length: + - '235' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:29 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","zoneRedundant":false,"version":3,"serviceId":"a4e4ba0aa37440fbad3f79d58a33b868","networkProfile":{"outboundIPs":{"publicIPs":["20.204.233.104","20.204.235.241"]},"outboundType":"loadBalancer"},"powerState":"Running","fqdn":"cli-unittest.azuremicroservices.io"},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"S0","tier":"Standard"},"location":"centralindia","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest","name":"cli-unittest","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T06:35:51.2157015Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T06:35:51.2157015Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '805' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:29 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"public": false, "httpsOnly": false, "temporaryDisk": {"sizeInGB": + 5, "mountPath": "/tmp"}, "enableEndToEndTLS": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + Content-Length: + - '136' + Content-Type: + - application/json + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Creating","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:30.428517Z"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a?api-version=2022-09-01-preview + cache-control: + - no-cache + content-length: + - '882' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:30 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/d57a47c5-404c-4a9f-8667-c3cd30c6165a/Spring/test-remote-debugging?api-version=2022-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a","name":"d57a47c5-404c-4a9f-8667-c3cd30c6165a","status":"Running","startTime":"2022-10-11T07:32:31.0097393Z"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:31 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a","name":"d57a47c5-404c-4a9f-8667-c3cd30c6165a","status":"Succeeded","startTime":"2022-10-11T07:32:31.0097393Z","endTime":"2022-10-11T07:32:37.4100271Z"}' + headers: + cache-control: + - no-cache + content-length: + - '371' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:42 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:30.428517Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '985' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:43 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11997' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"source": {"type": "Jar", "relativePath": "", + "runtimeVersion": "Java_8"}, "deploymentSettings": {"resourceRequests": {"cpu": + "1", "memory": "1Gi"}}, "active": true}, "sku": {"name": "S0", "tier": "Standard", + "capacity": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + Content-Length: + - '249' + Content-Type: + - application/json + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90},"provisioningState":"Creating","status":"Running","active":true,"instances":null,"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + cache-control: + - no-cache + content-length: + - '836' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:46 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/a4014525-360c-4a51-921d-a772eb10dea7/Spring/default?api-version=2022-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 201 + message: Created +- request: + body: '{"properties": {"public": false, "httpsOnly": false, "enableEndToEndTLS": + false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + Content-Length: + - '81' + Content-Type: + - application/json + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Updating","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:47.3504785Z"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e?api-version=2022-09-01-preview + cache-control: + - no-cache + content-length: + - '985' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:47 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/4875a1f2-708b-45da-88c8-db727a9cc37e/Spring/test-remote-debugging?api-version=2022-09-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '1198' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e","name":"4875a1f2-708b-45da-88c8-db727a9cc37e","status":"Running","startTime":"2022-10-11T07:32:47.9071662Z"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:48 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:32:58 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e","name":"4875a1f2-708b-45da-88c8-db727a9cc37e","status":"Succeeded","startTime":"2022-10-11T07:32:47.9071662Z","endTime":"2022-10-11T07:32:54.9556516Z"}' + headers: + cache-control: + - no-cache + content-length: + - '371' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:33:01 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:47.3504785Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '986' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:33:02 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11995' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:33:09 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:33:21 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:33:31 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:33:42 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:33:52 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + headers: + cache-control: + - no-cache + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:05 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + response: + body: + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Succeeded","startTime":"2022-10-11T07:32:46.9992994Z","endTime":"2022-10-11T07:34:13.0331184Z"}' + headers: + cache-control: + - no-cache + content-length: + - '357' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:15 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:18 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11997' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview + response: + body: + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:47.3504785Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '986' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:22 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11994' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app create + Connection: + - keep-alive + ParameterSetName: + - -s -g -n + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments?api-version=2022-09-01-preview + response: + body: + string: '{"value":[{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1365' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:25 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11996' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app deployment enable-remote-debugging + Connection: + - keep-alive + ParameterSetName: + - --app -g -s --deployment + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:30 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: '{"port": 5005}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app deployment enable-remote-debugging + Connection: + - keep-alive + Content-Length: + - '14' + Content-Type: + - application/json + ParameterSetName: + - --app -g -s --deployment + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/enableRemoteDebugging?api-version=2022-09-01-preview + response: + body: + string: '{"error":{"code":"InvalidArgument","message":"Only java applications + support remote debugging","target":null,"details":null}}' + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:31 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 400 + message: Bad Request +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app deployment disable-remote-debugging + Connection: + - keep-alive + ParameterSetName: + - --app -g -s --deployment + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:41 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app deployment disable-remote-debugging + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --app -g -s --deployment + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/disableRemoteDebugging?api-version=2022-09-01-preview + response: + body: + string: '{"port":5005,"enabled":false}' + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:34:43 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app deployment get-remote-debugging + Connection: + - keep-alive + ParameterSetName: + - --app -g -s --deployment + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview + response: + body: + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '1353' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:35:00 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - spring app deployment get-remote-debugging + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --app -g -s --deployment + User-Agent: + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/getRemoteDebuggingConfig?api-version=2022-09-01-preview + response: + body: + string: '{"port":5005,"enabled":false}' + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 11 Oct 2022 07:35:04 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-rp-server-mvid: + - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 + status: + code: 200 + message: OK +version: 1 diff --git a/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py b/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py index c99d2db114a..074a5a02c2b 100644 --- a/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py +++ b/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py @@ -280,42 +280,6 @@ def test_generate_deployment_dump(self): 'spring app deployment generate-heap-dump -g {resourceGroup} -s {serviceName} --app {app} --deployment {deployment} --app-instance {instance} --file-path {path}') -@record_only() -class RemoteDebuggingTest(ScenarioTest): - def test_enable_remote_debugging(self): - self.kwargs.update({ - 'app': 'test-app-remote-debugging', - 'deployment': 'default', - 'serviceName': 'cli-unittest', - 'resourceGroup': 'cli', - }) - self.cmd( - 'spring app deployment enable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}') - - self.cmd( - 'spring app deployment get-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', - checks=[ - self.check('enabled', True), - self.check('port', 5005) - ]) - - def test_disable_remote_debugging(self): - self.kwargs.update({ - 'app': 'test-app-remote-debugging', - 'deployment': 'default', - 'serviceName': 'cli-unittest', - 'resourceGroup': 'cli', - }) - self.cmd( - 'spring app deployment disable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}') - - self.cmd( - 'spring app deployment get-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', - checks=[ - self.check('enabled', False) - ]) - - @record_only() class VnetPublicEndpointTest(ScenarioTest): def test_vnet_public_endpoint(self): diff --git a/src/spring/azext_spring/tests/latest/test_asa_scenario.py b/src/spring/azext_spring/tests/latest/test_asa_scenario.py index bd6ab2c6834..36caed8dab0 100644 --- a/src/spring/azext_spring/tests/latest/test_asa_scenario.py +++ b/src/spring/azext_spring/tests/latest/test_asa_scenario.py @@ -231,6 +231,36 @@ def test_app_deploy_container(self): self.check('properties.source.customContainer.languageFramework', 'springboot'), ]) + +class RemoteDebuggingTest(ScenarioTest): + def test_remote_debugging(self): + py_path = os.path.abspath(os.path.dirname(__file__)) + file_path = os.path.join(py_path, 'files/test.jar').replace("\\", "/") + self.kwargs.update({ + 'app': 'test-remote-debugging', + 'serviceName': 'cli-unittest', + 'resourceGroup': 'cli', + 'location': 'centralindia', + 'deployment': 'default', + 'file': file_path + }) + + self.cmd('spring app create -s {serviceName} -g {resourceGroup} -n {app}') + + # remote debugging can only be supported for jar, here will throw exception for default banner + self.cmd( + 'spring app deployment enable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', expect_failure=True) + + self.cmd( + 'spring app deployment disable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}') + + self.cmd( + 'spring app deployment get-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', + checks=[ + self.check('enabled', False) + ]) + + class AppConnectTest(ScenarioTest): def test_app_connect(self): From 79fa754ee0be5f55052042489414528be1290a9f Mon Sep 17 00:00:00 2001 From: pensh Date: Tue, 11 Oct 2022 16:05:36 +0800 Subject: [PATCH 4/8] remove unnecessary changes --- src/spring/azext_spring/_params.py | 234 ++++++------------ src/spring/azext_spring/_validators.py | 46 ++-- src/spring/azext_spring/custom.py | 52 ++-- .../tests/latest/test_asa_app_scenario.py | 77 +++--- 4 files changed, 139 insertions(+), 270 deletions(-) diff --git a/src/spring/azext_spring/_params.py b/src/spring/azext_spring/_params.py index a3a02cde784..5cd3109c6f4 100644 --- a/src/spring/azext_spring/_params.py +++ b/src/spring/azext_spring/_params.py @@ -33,13 +33,12 @@ validate_app_force_set_user_identity_or_warning) from ._utils import ApiType + from .vendored_sdks.appplatform.v2020_07_01.models import RuntimeVersion, TestKeyType from .vendored_sdks.appplatform.v2022_01_01_preview.models \ import _app_platform_management_client_enums as v20220101_preview_AppPlatformEnums -from .vendored_sdks.appplatform.v2022_01_01_preview.models._app_platform_management_client_enums import \ - SupportedRuntimeValue, TestKeyType -from .vendored_sdks.appplatform.v2022_09_01_preview.models._app_platform_management_client_enums import BackendProtocol, \ - SessionAffinity +from .vendored_sdks.appplatform.v2022_01_01_preview.models._app_platform_management_client_enums import SupportedRuntimeValue, TestKeyType +from .vendored_sdks.appplatform.v2022_09_01_preview.models._app_platform_management_client_enums import BackendProtocol, SessionAffinity name_type = CLIArgumentType(options_list=[ '--name', '-n'], help='The primary resource name', validator=validate_name) @@ -47,30 +46,22 @@ validator=validate_env, help="Space-separated environment variables in 'key[=value]' format.", nargs='*') build_env_type = CLIArgumentType( validator=validate_build_env, help="Space-separated environment variables in 'key[=value]' format.", nargs='*') -service_name_type = CLIArgumentType(options_list=['--service', '-s'], - help='Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.', - configured_default='spring') -app_name_type = CLIArgumentType( - help='App name, you can configure the default app using az configure --defaults spring-cloud-app=.', - validator=validate_app_name, configured_default='spring-app') -sku_type = CLIArgumentType(arg_type=get_enum_type(['Basic', 'Standard', 'Enterprise']), - help='Name of SKU. Enterprise is still in Preview.') +service_name_type = CLIArgumentType(options_list=['--service', '-s'], help='Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.', configured_default='spring') +app_name_type = CLIArgumentType(help='App name, you can configure the default app using az configure --defaults spring-cloud-app=.', validator=validate_app_name, configured_default='spring-app') +sku_type = CLIArgumentType(arg_type=get_enum_type(['Basic', 'Standard', 'Enterprise']), help='Name of SKU. Enterprise is still in Preview.') source_path_type = CLIArgumentType(nargs='?', const='.', help="Deploy the specified source folder. The folder will be packed into tar, uploaded, and built using kpack. Default to the current folder if no value provided.", arg_group='Source Code deploy') # app cpu and memory -cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', - validator=validate_cpu) -memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', - validator=validate_memory) -build_cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', - validator=validate_build_cpu) -build_memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', - validator=validate_build_memory) +cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', validator=validate_cpu) +memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', validator=validate_memory) +build_cpu_type = CLIArgumentType(type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.', validator=validate_build_cpu) +build_memory_type = CLIArgumentType(type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.', validator=validate_build_memory) # pylint: disable=too-many-statements def load_arguments(self, _): + with self.argument_context('spring') as c: c.argument('resource_group', arg_type=resource_group_name_type) c.argument('name', options_list=[ @@ -81,27 +72,12 @@ def load_arguments(self, _): with self.argument_context('spring create') as c: c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=validate_location) c.argument('sku', arg_type=sku_type, default='Standard', validator=validate_sku) - c.argument('reserved_cidr_range', arg_group='VNet Injection', - help='Comma-separated list of IP address ranges in CIDR format. The IP ranges are reserved to host underlying Azure Spring Apps infrastructure, which should be 3 at least /16 unused IP ranges, must not overlap with any Subnet IP ranges.', - validator=validate_vnet_required_parameters) - c.argument('vnet', arg_group='VNet Injection', - help='The name or ID of an existing Virtual Network into which to deploy the Spring Apps instance.', - validator=validate_vnet_required_parameters) - c.argument('app_subnet', arg_group='VNet Injection', - help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps app. Required when deploying into a Virtual Network. Smaller subnet sizes are supported, please refer: https://aka.ms/azure-spring-cloud-smaller-subnet-vnet-docs', - validator=validate_vnet_required_parameters) - c.argument('service_runtime_subnet', arg_group='VNet Injection', - options_list=['--service-runtime-subnet', '--svc-subnet'], - help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps service runtime. Required when deploying into a Virtual Network.', - validator=validate_vnet) - c.argument('service_runtime_network_resource_group', arg_group='VNet Injection', - options_list=['--service-runtime-network-resource-group', '--svc-nrg'], - help='The resource group where all network resources for Azure Spring Apps service runtime will be created in.', - validator=validate_node_resource_group) - c.argument('app_network_resource_group', arg_group='VNet Injection', - options_list=['--app-network-resource-group', '--app-nrg'], - help='The resource group where all network resources for apps will be created in.', - validator=validate_node_resource_group) + c.argument('reserved_cidr_range', arg_group='VNet Injection', help='Comma-separated list of IP address ranges in CIDR format. The IP ranges are reserved to host underlying Azure Spring Apps infrastructure, which should be 3 at least /16 unused IP ranges, must not overlap with any Subnet IP ranges.', validator=validate_vnet_required_parameters) + c.argument('vnet', arg_group='VNet Injection', help='The name or ID of an existing Virtual Network into which to deploy the Spring Apps instance.', validator=validate_vnet_required_parameters) + c.argument('app_subnet', arg_group='VNet Injection', help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps app. Required when deploying into a Virtual Network. Smaller subnet sizes are supported, please refer: https://aka.ms/azure-spring-cloud-smaller-subnet-vnet-docs', validator=validate_vnet_required_parameters) + c.argument('service_runtime_subnet', arg_group='VNet Injection', options_list=['--service-runtime-subnet', '--svc-subnet'], help='The name or ID of an existing subnet in "vnet" into which to deploy the Spring Apps service runtime. Required when deploying into a Virtual Network.', validator=validate_vnet) + c.argument('service_runtime_network_resource_group', arg_group='VNet Injection', options_list=['--service-runtime-network-resource-group', '--svc-nrg'], help='The resource group where all network resources for Azure Spring Apps service runtime will be created in.', validator=validate_node_resource_group) + c.argument('app_network_resource_group', arg_group='VNet Injection', options_list=['--app-network-resource-group', '--app-nrg'], help='The resource group where all network resources for apps will be created in.', validator=validate_node_resource_group) c.argument('outbound_type', arg_group='VNet Injection', help='The outbound type of Azure Spring Apps VNet instance.', validator=validate_vnet, default="loadBalancer") @@ -228,18 +204,14 @@ def load_arguments(self, _): c.argument('service', service_name_type) c.argument('name', name_type, help='Name of app.') - for scope in ['spring app create', 'spring app update', 'spring app deploy', 'spring app deployment create', - 'spring app deployment update']: + for scope in ['spring app create', 'spring app update', 'spring app deploy', 'spring app deployment create', 'spring app deployment update']: with self.argument_context(scope) as c: c.argument('enable_liveness_probe', arg_type=get_three_state_flag(), is_preview=True, - help='If false, will disable the liveness probe of the app instance', - arg_group='App Customization') + help='If false, will disable the liveness probe of the app instance', arg_group='App Customization') c.argument('enable_readiness_probe', arg_type=get_three_state_flag(), is_preview=True, - help='If false, will disable the readiness probe of the app instance', - arg_group='App Customization') + help='If false, will disable the readiness probe of the app instance', arg_group='App Customization') c.argument('enable_startup_probe', arg_type=get_three_state_flag(), is_preview=True, - help='If false, will disable the startup probe of the app instance', - arg_group='App Customization') + help='If false, will disable the startup probe of the app instance', arg_group='App Customization') c.argument('liveness_probe_config', type=str, is_preview=True, help='A json file path indicates the liveness probe config', arg_group='App Customization') c.argument('readiness_probe_config', type=str, is_preview=True, @@ -248,14 +220,12 @@ def load_arguments(self, _): help='A json file path indicates the startup probe config', arg_group='App Customization') c.argument('termination_grace_period_seconds', type=str, is_preview=True, options_list=['--termination-grace-period-seconds', '--grace-period'], - help='Optional duration in seconds the app instance needs to terminate gracefully', - arg_group='App Customization') + help='Optional duration in seconds the app instance needs to terminate gracefully', arg_group='App Customization') with self.argument_context('spring app create') as c: c.argument('assign_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL for direct access.', default=False, - options_list=['--assign-endpoint', - c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) + options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('assign_public_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL which could be accessed out of virtual network for vnet injection instance app.') @@ -286,17 +256,14 @@ def load_arguments(self, _): with self.argument_context('spring app update') as c: c.argument('assign_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL for direct access.', - options_list=['--assign-endpoint', - c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) + options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('assign_public_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL which could be accessed out of virtual network for vnet injection instance app.') c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access app via https', default=False) c.argument('enable_ingress_to_app_tls', arg_type=get_three_state_flag(), help='If true, enable ingress to app tls', - options_list=['--enable-ingress-to-app-tls', - c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', - hide=True)]) + options_list=['--enable-ingress-to-app-tls', c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', hide=True)]) c.argument('persistent_storage', type=str, help='A json file path for the persistent storages to be mounted to the app') c.argument('loaded_public_certificate_file', type=str, options_list=['--loaded-public-certificate-file', '-f'], @@ -308,24 +275,18 @@ def load_arguments(self, _): with self.argument_context('spring app append-persistent-storage') as c: c.argument('storage_name', type=str, help='Name of the storage resource you created in Azure Spring Apps.') - c.argument('persistent_storage_type', options_list=['--persistent-storage-type', '-t'], type=str, - help='Type of the persistent storage volumed.') + c.argument('persistent_storage_type', options_list=['--persistent-storage-type', '-t'], type=str, help='Type of the persistent storage volumed.') c.argument('share_name', type=str, help="The name of the pre-created file share. " "ShareName should be provided only if the type of the persistent storage volume is AzureFileVolume.") c.argument('mount_path', type=str, help='The path for the persistent storage volume to be mounted.') - c.argument('mount_options', nargs='+', help='[optional] The mount options for the persistent storage volume.', - default=None) - c.argument('read_only', arg_type=get_three_state_flag(), - help='[optional] If true, the persistent storage volume will be read only.', default=False) + c.argument('mount_options', nargs='+', help='[optional] The mount options for the persistent storage volume.', default=None) + c.argument('read_only', arg_type=get_three_state_flag(), help='[optional] If true, the persistent storage volume will be read only.', default=False) - for scope in ['spring app start', 'spring app stop', 'spring app restart', 'spring app deploy', 'spring app scale', - 'spring app set-deployment', 'spring app show-deploy-log']: + for scope in ['spring app start', 'spring app stop', 'spring app restart', 'spring app deploy', 'spring app scale', 'spring app set-deployment', 'spring app show-deploy-log']: with self.argument_context(scope) as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) with self.argument_context('spring app unset-deployment') as c: c.argument('name', name_type, help='Name of app.', validator=active_deployment_exist) @@ -364,21 +325,14 @@ def load_arguments(self, _): def prepare_logs_argument(c): '''`app log tail` is deprecated. `app logs` is the new choice. They share the same command processor.''' - c.argument('instance', options_list=['--instance', '-i'], - help='Name of an existing instance of the deployment.') + c.argument('instance', options_list=['--instance', '-i'], help='Name of an existing instance of the deployment.') c.argument('lines', type=int, help='Number of lines to show. Maximum is 10000', validator=validate_log_lines) - c.argument('follow', options_list=['--follow ', '-f'], help='Specify if the logs should be streamed.', - action='store_true') - c.argument('since', help='Only return logs newer than a relative duration like 5s, 2m, or 1h. Maximum is 1h', - validator=validate_log_since) - c.argument('limit', type=int, help='Maximum kilobytes of logs to return. Ceiling number is 2048.', - validator=validate_log_limit) + c.argument('follow', options_list=['--follow ', '-f'], help='Specify if the logs should be streamed.', action='store_true') + c.argument('since', help='Only return logs newer than a relative duration like 5s, 2m, or 1h. Maximum is 1h', validator=validate_log_since) + c.argument('limit', type=int, help='Maximum kilobytes of logs to return. Ceiling number is 2048.', validator=validate_log_limit) c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) - c.argument('format_json', nargs='?', - const='{timestamp} {level:>5} [{thread:>15.15}] {logger{39}:<40.40}: {message}\n{stackTrace}', + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + c.argument('format_json', nargs='?', const='{timestamp} {level:>5} [{thread:>15.15}] {logger{39}:<40.40}: {message}\n{stackTrace}', help='Format JSON logs if structured log is enabled') with self.argument_context('spring app logs') as c: @@ -388,18 +342,14 @@ def prepare_logs_argument(c): prepare_logs_argument(c) with self.argument_context('spring app connect') as c: - c.argument('instance', options_list=['--instance', '-i'], - help='Name of an existing instance of the deployment.') + c.argument('instance', options_list=['--instance', '-i'], help='Name of an existing instance of the deployment.') c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) c.argument('shell_cmd', help='The shell command to run when connect to the app instance.') with self.argument_context('spring app set-deployment') as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], help='Name of an existing deployment of the app.', - validator=ensure_not_active_deployment) + '--deployment', '-d'], help='Name of an existing deployment of the app.', validator=ensure_not_active_deployment) for scope in ['spring app create', 'spring app update']: with self.argument_context(scope) as c: @@ -433,8 +383,7 @@ def prepare_logs_argument(c): c.argument('jvm_options', type=str, validator=validate_jvm_options, help="A string containing jvm options, use '=' instead of ' ' for this argument to avoid bash parse error, eg: --jvm-options='-Xms1024m -Xmx2048m'") c.argument('env', env_type) - c.argument('disable_probe', arg_type=get_three_state_flag(), - help='If true, disable the liveness and readiness probe.') + c.argument('disable_probe', arg_type=get_three_state_flag(), help='If true, disable the liveness and readiness probe.') c.argument('main_entry', options_list=[ '--main-entry', '-m'], help="The path to the .NET executable relative to zip root.") @@ -460,23 +409,19 @@ def prepare_logs_argument(c): c.argument( 'disable_validation', arg_type=get_three_state_flag(), help='If true, disable jar validation.') - c.argument('builder', help='(Enterprise Tier Only) Build service builder used to build the executable.', - default='default') + c.argument('builder', help='(Enterprise Tier Only) Build service builder used to build the executable.', default='default') c.argument( 'main_entry', options_list=[ - '--main-entry', '-m'], - help="A string containing the path to the .NET executable relative to zip root.") + '--main-entry', '-m'], help="A string containing the path to the .NET executable relative to zip root.") c.argument( - 'target_module', - help='Child module to be deployed, required for multiple jar packages built from source code.', + 'target_module', help='Child module to be deployed, required for multiple jar packages built from source code.', arg_group='Source Code deploy', validator=validate_target_module) c.argument( 'version', help='Deployment version, keep unchanged if not set.') c.argument( 'container_image', help='The container image tag.', arg_group='Custom Container') c.argument( - 'container_registry', default='docker.io', help='The registry of the container image.', - arg_group='Custom Container') + 'container_registry', default='docker.io', help='The registry of the container image.', arg_group='Custom Container') c.argument( 'registry_username', help='The username of the container registry.', arg_group='Custom Container') c.argument( @@ -486,9 +431,7 @@ def prepare_logs_argument(c): c.argument( 'container_args', help='The arguments of the container image.', arg_group='Custom Container') c.argument( - 'language_framework', - help='Language framework of the container image uploaded. Supported values: "springboot", "".', - arg_group='Custom Container') + 'language_framework', help='Language framework of the container image uploaded. Supported values: "springboot", "".', arg_group='Custom Container') c.argument( 'build_env', build_env_type) c.argument( @@ -503,8 +446,7 @@ def prepare_logs_argument(c): c.argument('source_path', arg_type=source_path_type, validator=validate_deloyment_create_path) with self.argument_context('spring app deployment create') as c: - c.argument('skip_clone_settings', - help='Create staging deployment will automatically copy settings from production deployment.', + c.argument('skip_clone_settings', help='Create staging deployment will automatically copy settings from production deployment.', action='store_true') c.argument('cpu', arg_type=cpu_type) c.argument('memory', arg_type=memory_type) @@ -538,17 +480,13 @@ def prepare_logs_argument(c): for scope in ['spring app deployment generate-heap-dump', 'spring app deployment generate-thread-dump']: with self.argument_context(scope) as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) c.argument('app_instance', help='Target app instance you want to dump.') c.argument('file_path', help='The mount file path for your dump file.') with self.argument_context('spring app deployment start-jfr') as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) c.argument('app_instance', help='Target app instance you want to dump.') c.argument('file_path', help='The mount file path for your dump file.') c.argument('duration', type=str, default="60s", help='Duration of JFR.') @@ -585,21 +523,17 @@ def prepare_logs_argument(c): for scope in ['spring app binding redis add', 'spring app binding redis update']: with self.argument_context(scope) as c: c.argument('key', help='Api key of the service.') - c.argument('disable_ssl', arg_type=get_three_state_flag(), - help='If true, disable SSL. If false, enable SSL.', default=False) + c.argument('disable_ssl', arg_type=get_three_state_flag(), help='If true, disable SSL. If false, enable SSL.', default=False) with self.argument_context('spring app append-loaded-public-certificate') as c: c.argument('certificate_name', help='Name of the certificate to be appended') - c.argument('load_trust_store', arg_type=get_three_state_flag(), - help='If true, the certificate would be loaded into trust store for Java applications', - default=False) + c.argument('load_trust_store', arg_type=get_three_state_flag(), help='If true, the certificate would be loaded into trust store for Java applications', default=False) with self.argument_context('spring config-server set') as c: c.argument('config_file', help='A yaml file path for the configuration of Spring Cloud config server') - for scope in ['spring config-server git set', 'spring config-server git repo add', - 'spring config-server git repo update']: + for scope in ['spring config-server git set', 'spring config-server git repo add', 'spring config-server git repo update']: with self.argument_context(scope) as c: c.argument('uri', help='Uri of the added config.') c.argument('label', help='Label of the added config.') @@ -615,8 +549,7 @@ def prepare_logs_argument(c): options_list=['--strict-host-key-checking', '--host-key-check'], help='Strict_host_key_checking of the added config.') - for scope in ['spring config-server git repo add', 'spring config-server git repo update', - 'spring config-server git repo remove']: + for scope in ['spring config-server git repo add', 'spring config-server git repo update', 'spring config-server git repo remove']: with self.argument_context(scope) as c: c.argument('repo_name', help='Name of the repo.') @@ -629,9 +562,7 @@ def prepare_logs_argument(c): c.argument('app', app_name_type, help='Name of app.', validator=validate_app_name) c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=validate_deployment_name) + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=validate_deployment_name) with self.argument_context('spring storage') as c: c.argument('service', service_name_type) @@ -672,17 +603,13 @@ def prepare_logs_argument(c): c.argument('certificate', type=str, help='Certificate name in Azure Spring Apps.') c.argument('enable_ingress_to_app_tls', arg_type=get_three_state_flag(), help='If true, enable ingress to app tls', - options_list=['--enable-ingress-to-app-tls', - c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', - hide=True)]) + options_list=['--enable-ingress-to-app-tls', c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', hide=True)]) with self.argument_context('spring app custom-domain update') as c: c.argument('certificate', help='Certificate name in Azure Spring Apps.') c.argument('enable_ingress_to_app_tls', arg_type=get_three_state_flag(), help='If true, enable ingress to app tls', - options_list=['--enable-ingress-to-app-tls', - c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', - hide=True)]) + options_list=['--enable-ingress-to-app-tls', c.deprecate(target='--enable-end-to-end-tls', redirect='--enable-ingress-to-app-tls', hide=True)]) with self.argument_context('spring app-insights update') as c: c.argument('app_insights_key', @@ -708,8 +635,7 @@ def prepare_logs_argument(c): for scope in ['create', 'update']: with self.argument_context('spring build-service builder {}'.format(scope)) as c: c.argument('builder_json', help="The JSON array of builder.", validator=validate_builder_resource) - c.argument('builder_file', help="The file path of JSON array of builder.", - validator=validate_builder_resource) + c.argument('builder_file', help="The file path of JSON array of builder.", validator=validate_builder_resource) with self.argument_context('spring build-service builder create') as c: c.argument('name', help="The builder name.", validator=validate_builder_create) @@ -749,8 +675,7 @@ def prepare_logs_argument(c): c.argument('host_key', help='Host key of the added config.') c.argument('host_key_algorithm', help='Host key algorithm of the added config.') c.argument('private_key', help='Private_key of the added config.') - c.argument('host_key_check', - help='Strict host key checking of the added config which is used in SSH authentication. If false, ignore errors with host key.') + c.argument('host_key_check', help='Strict host key checking of the added config which is used in SSH authentication. If false, ignore errors with host key.') for scope in ['add', 'update', 'remove']: with self.argument_context('spring application-configuration-service git repo {}'.format(scope)) as c: @@ -759,41 +684,29 @@ def prepare_logs_argument(c): for scope in ['gateway update', 'api-portal update']: with self.argument_context('spring {}'.format(scope)) as c: c.argument('instance_count', type=int, help='Number of instance.') - c.argument('assign_endpoint', arg_type=get_three_state_flag(), - help='If true, assign endpoint URL for direct access.') + c.argument('assign_endpoint', arg_type=get_three_state_flag(), help='If true, assign endpoint URL for direct access.') c.argument('https_only', arg_type=get_three_state_flag(), help='If true, access endpoint via https') - c.argument('scope', arg_group='Single Sign On (SSO)', - help="Comma-separated list of the specific actions applications can be allowed to do on a user's behalf.") + c.argument('scope', arg_group='Single Sign On (SSO)', help="Comma-separated list of the specific actions applications can be allowed to do on a user's behalf.") c.argument('client_id', arg_group='Single Sign On (SSO)', help="The public identifier for the application.") - c.argument('client_secret', arg_group='Single Sign On (SSO)', - help="The secret known only to the application and the authorization server.") + c.argument('client_secret', arg_group='Single Sign On (SSO)', help="The secret known only to the application and the authorization server.") c.argument('issuer_uri', arg_group='Single Sign On (SSO)', help="The URI of Issuer Identifier.") with self.argument_context('spring gateway update') as c: c.argument('cpu', type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.') c.argument('memory', type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') - c.argument('api_title', arg_group='API metadata', - help="Title describing the context of the APIs available on the Gateway instance.") - c.argument('api_description', arg_group='API metadata', - help="Detailed description of the APIs available on the Gateway instance.") - c.argument('api_doc_location', arg_group='API metadata', - help="Location of additional documentation for the APIs available on the Gateway instance.") + c.argument('api_title', arg_group='API metadata', help="Title describing the context of the APIs available on the Gateway instance.") + c.argument('api_description', arg_group='API metadata', help="Detailed description of the APIs available on the Gateway instance.") + c.argument('api_doc_location', arg_group='API metadata', help="Location of additional documentation for the APIs available on the Gateway instance.") c.argument('api_version', arg_group='API metadata', help="Version of APIs available on this Gateway instance.") - c.argument('server_url', arg_group='API metadata', - help="Base URL that API consumers will use to access APIs on the Gateway instance.") - c.argument('allowed_origins', arg_group='Cross-origin Resource Sharing (CORS)', - help="Comma-separated list of allowed origins to make cross-site requests. The special value `*` allows all domains.") - c.argument('allowed_methods', arg_group='Cross-origin Resource Sharing (CORS)', - help="Comma-separated list of allowed HTTP methods on cross-site requests. The special value `*` allows all methods.") - c.argument('allowed_headers', arg_group='Cross-origin Resource Sharing (CORS)', - help="Comma-separated list of allowed headers in cross-site requests. The special value `*` allows actual requests to send any header.") + c.argument('server_url', arg_group='API metadata', help="Base URL that API consumers will use to access APIs on the Gateway instance.") + c.argument('allowed_origins', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of allowed origins to make cross-site requests. The special value `*` allows all domains.") + c.argument('allowed_methods', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of allowed HTTP methods on cross-site requests. The special value `*` allows all methods.") + c.argument('allowed_headers', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of allowed headers in cross-site requests. The special value `*` allows actual requests to send any header.") c.argument('max_age', arg_group='Cross-origin Resource Sharing (CORS)', type=int, help="How long, in seconds, the response from a pre-flight request can be cached by clients.") - c.argument('allow_credentials', arg_group='Cross-origin Resource Sharing (CORS)', - arg_type=get_three_state_flag(), + c.argument('allow_credentials', arg_group='Cross-origin Resource Sharing (CORS)', arg_type=get_three_state_flag(), help="Whether user credentials are supported on cross-site requests.") - c.argument('exposed_headers', arg_group='Cross-origin Resource Sharing (CORS)', - help="Comma-separated list of HTTP response headers to expose for cross-site requests.") + c.argument('exposed_headers', arg_group='Cross-origin Resource Sharing (CORS)', help="Comma-separated list of HTTP response headers to expose for cross-site requests.") for scope in ['spring gateway custom-domain', 'spring api-portal custom-domain']: @@ -814,13 +727,11 @@ def prepare_logs_argument(c): with self.argument_context('spring gateway route-config {}'.format(scope)) as c: c.argument('app_name', type=str, help="The Azure Spring Apps app name to configure the route.") c.argument('routes_json', type=str, help="The JSON array of API routes.", validator=validate_routes) - c.argument('routes_file', type=str, help="The file path of JSON array of API routes.", - validator=validate_routes) + c.argument('routes_file', type=str, help="The file path of JSON array of API routes.", validator=validate_routes) for scope in ['spring build-service builder buildpack-binding create']: with self.argument_context(scope) as c: - c.argument('name', name_type, help='Name for buildpack binding.', - validator=validate_buildpack_binding_not_exist) + c.argument('name', name_type, help='Name for buildpack binding.', validator=validate_buildpack_binding_not_exist) for scope in ['spring build-service builder buildpack-binding create', 'spring build-service builder buildpack-binding set']: @@ -843,8 +754,7 @@ def prepare_logs_argument(c): 'spring build-service builder buildpack-binding show', 'spring build-service builder buildpack-binding delete']: with self.argument_context(scope) as c: - c.argument('name', name_type, help='Name for buildpack binding.', - validator=validate_buildpack_binding_exist) + c.argument('name', name_type, help='Name for buildpack binding.', validator=validate_buildpack_binding_exist) for scope in ['spring build-service builder buildpack-binding create', 'spring build-service builder buildpack-binding set', diff --git a/src/spring/azext_spring/_validators.py b/src/spring/azext_spring/_validators.py index 171d19d03d7..7de18dce789 100644 --- a/src/spring/azext_spring/_validators.py +++ b/src/spring/azext_spring/_validators.py @@ -107,9 +107,7 @@ def validate_instance_not_existed(client, resource_group, name, location): availability_parameters = models.NameAvailabilityParameters(type="Microsoft.AppPlatform/Spring", name=name) name_availability = client.services.check_name_availability(location, availability_parameters) if not name_availability.name_available and name_availability.reason == "AlreadyExists": - raise InvalidArgumentValueError( - "Service instance '{}' under resource group '{}' is already existed in region '{}', cannot be created again.".format( - name, resource_group, location)) + raise InvalidArgumentValueError("Service instance '{}' under resource group '{}' is already existed in region '{}', cannot be created again.".format(name, resource_group, location)) def validate_name(namespace): @@ -297,15 +295,13 @@ def _validate_app_insights_parameters(namespace): def validate_app_insights_command_not_supported_tier(cmd, namespace): if is_enterprise_tier(cmd, namespace.resource_group, namespace.name): - raise NotSupportedPricingTierError( - "Enterprise tier service instance {} in group {} is not supported in this command, ".format(namespace.name, - namespace.resource_group) + - "please refer to 'az spring build-service builder buildpack-binding' command group.") + raise NotSupportedPricingTierError("Enterprise tier service instance {} in group {} is not supported in this command, ".format(namespace.name, namespace.resource_group) + + "please refer to 'az spring build-service builder buildpack-binding' command group.") def validate_vnet(cmd, namespace): if not namespace.vnet and not namespace.app_subnet and \ - not namespace.service_runtime_subnet and not namespace.reserved_cidr_range: + not namespace.service_runtime_subnet and not namespace.reserved_cidr_range: return validate_vnet_required_parameters(namespace) @@ -333,8 +329,7 @@ def validate_vnet(cmd, namespace): app_vnet_id = _parse_vnet_id_from_subnet(namespace.app_subnet) service_runtime_vnet_id = _parse_vnet_id_from_subnet(namespace.service_runtime_subnet) if app_vnet_id.lower() != service_runtime_vnet_id.lower(): - raise InvalidArgumentValueError( - '--app-subnet and --service-runtime-subnet should be in the same Virtual Networks.') + raise InvalidArgumentValueError('--app-subnet and --service-runtime-subnet should be in the same Virtual Networks.') vnet_id = app_vnet_id if namespace.app_subnet.lower() == namespace.service_runtime_subnet.lower(): raise InvalidArgumentValueError('--app-subnet and --service-runtime-subnet should not be the same.') @@ -376,8 +371,7 @@ def _validate_subnet(namespace, subnet): raise InvalidArgumentValueError('--{} should not have connected device.'.format(name)) address = ip_network(subnet.address_prefix, strict=False) if address.prefixlen > limit: - raise InvalidArgumentValueError( - '--{0} should contain at least /{1} address, got /{2}'.format(name, limit, address.prefixlen)) + raise InvalidArgumentValueError('--{0} should contain at least /{1} address, got /{2}'.format(name, limit, address.prefixlen)) def _get_vnet(cmd, vnet_id): @@ -454,8 +448,8 @@ def _parse_vnet_id_from_subnet(subnet_id): raise InvalidArgumentValueError('{0} is not a valid subnet resource ID'.format(subnet_id)) subnet = parse_resource_id(subnet_id) if subnet['namespace'].lower() != 'microsoft.network' or \ - subnet['type'].lower() != 'virtualnetworks' or \ - 'resource_type' not in subnet or subnet['resource_type'].lower() != 'subnets': + subnet['type'].lower() != 'virtualnetworks' or \ + 'resource_type' not in subnet or subnet['resource_type'].lower() != 'subnets': raise InvalidArgumentValueError('{0} is not a valid subnet resource ID'.format(subnet_id)) return resource_id( subscription=subnet['subscription'], @@ -517,16 +511,16 @@ def _validate_ip(ip, prefix): def validate_vnet_required_parameters(namespace): # pylint: disable=too-many-boolean-expressions if not namespace.app_subnet and \ - not namespace.service_runtime_subnet and \ - not namespace.app_network_resource_group and \ - not namespace.service_runtime_network_resource_group and \ - not namespace.reserved_cidr_range and \ - not namespace.vnet: + not namespace.service_runtime_subnet and \ + not namespace.app_network_resource_group and \ + not namespace.service_runtime_network_resource_group and \ + not namespace.reserved_cidr_range and \ + not namespace.vnet: return if namespace.sku and _parse_sku_name(namespace.sku) == 'basic': raise InvalidArgumentValueError('Virtual Network Injection is not supported for Basic tier.') if not namespace.app_subnet \ - or not namespace.service_runtime_subnet: + or not namespace.service_runtime_subnet: raise InvalidArgumentValueError( '--app-subnet, --service-runtime-subnet must be set when deploying to VNet') @@ -551,8 +545,7 @@ def _validate_resource_group_name(name, message_name): return matchObj = match(r'^[-\w\._\(\)]+$', name) if matchObj is None: - raise InvalidArgumentValueError( - '--{0} must conform to the following pattern: \'^[-\\w\\._\\(\\)]+$\'.'.format(message_name)) + raise InvalidArgumentValueError('--{0} must conform to the following pattern: \'^[-\\w\\._\\(\\)]+$\'.'.format(message_name)) def _validate_route_table(namespace, vnet_obj): @@ -566,8 +559,7 @@ def _validate_route_table(namespace, vnet_obj): if app_route_table_id and runtime_route_table_id: if app_route_table_id == runtime_route_table_id: - raise InvalidArgumentValueError( - '--service-runtime-subnet and --app-subnet should associate with different route tables.') + raise InvalidArgumentValueError('--service-runtime-subnet and --app-subnet should associate with different route tables.') if (app_route_table_id and not runtime_route_table_id) \ or (not app_route_table_id and runtime_route_table_id): raise InvalidArgumentValueError( @@ -591,12 +583,10 @@ def validate_jar(namespace): tips = ", if you choose to ignore these errors, turn validation off with --disable-validation" if not has_jar and not has_class: telemetry.set_user_fault("invalid_jar_no_class_jar") - raise InvalidArgumentValueError( - "Do not find any class or jar file, please check if your artifact is a valid fat jar" + tips) + raise InvalidArgumentValueError("Do not find any class or jar file, please check if your artifact is a valid fat jar" + tips) if not has_manifest: telemetry.set_user_fault("invalid_jar_no_manifest") - raise InvalidArgumentValueError( - "Do not find MANIFEST.MF, please check if your artifact is a valid fat jar" + tips) + raise InvalidArgumentValueError("Do not find MANIFEST.MF, please check if your artifact is a valid fat jar" + tips) if file_size / 1024 / 1024 < 10: telemetry.set_user_fault("invalid_jar_thin_jar") raise InvalidArgumentValueError("Thin jar detected, please check if your artifact is a valid fat jar" + tips) diff --git a/src/spring/azext_spring/custom.py b/src/spring/azext_spring/custom.py index 4901cfe8c1c..76267c9fa2a 100644 --- a/src/spring/azext_spring/custom.py +++ b/src/spring/azext_spring/custom.py @@ -25,16 +25,14 @@ from .vendored_sdks.appplatform.v2020_11_01_preview import models as models_20201101preview from .vendored_sdks.appplatform.v2022_01_01_preview import models as models_20220101preview from .vendored_sdks.appplatform.v2022_05_01_preview import models as models_20220501preview -from .vendored_sdks.appplatform.v2022_09_01_preview import models as models_20220901preview - from .vendored_sdks.appplatform.v2020_07_01.models import _app_platform_management_client_enums as AppPlatformEnums +from .vendored_sdks.appplatform.v2022_09_01_preview import models as models_20220901preview from .vendored_sdks.appplatform.v2020_11_01_preview import ( AppPlatformManagementClient as AppPlatformManagementClient_20201101preview ) from ._client_factory import (cf_spring) from knack.log import get_logger -from azure.cli.core.azclierror import ClientRequestError, FileOperationError, InvalidArgumentValueError, \ - ResourceNotFoundError +from azure.cli.core.azclierror import ClientRequestError, FileOperationError, InvalidArgumentValueError, ResourceNotFoundError from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.util import sdk_no_wait from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient @@ -135,8 +133,7 @@ def spring_update(cmd, client, resource_group, name, app_insights_key=None, app_ updated_resource.tags = tags update_service_tags = True - if update_service_tags is False and update_service_sku is False and update_log_stream_public_endpoint is False and ( - ingress_read_timeout is None): + if update_service_tags is False and update_service_sku is False and update_log_stream_public_endpoint is False and (ingress_read_timeout is None): return resource updated_resource.properties = updated_resource_properties @@ -200,9 +197,7 @@ def spring_start(cmd, client, resource_group, name, no_wait=False): state = resource.properties.provisioning_state power_state = resource.properties.power_state if state != "Succeeded" or power_state != "Stopped": - raise ClientRequestError( - "Service is in Provisioning State({}) and Power State({}), starting cannot be performed.".format(state, - power_state)) + raise ClientRequestError("Service is in Provisioning State({}) and Power State({}), starting cannot be performed.".format(state, power_state)) return sdk_no_wait(no_wait, client.services.begin_start, resource_group_name=resource_group, service_name=name) @@ -211,9 +206,7 @@ def spring_stop(cmd, client, resource_group, name, no_wait=False): state = resource.properties.provisioning_state power_state = resource.properties.power_state if state != "Succeeded" or power_state != "Running": - raise ClientRequestError( - "Service is in Provisioning State({}) and Power State({}), stopping cannot be performed.".format(state, - power_state)) + raise ClientRequestError("Service is in Provisioning State({}) and Power State({}), stopping cannot be performed.".format(state, power_state)) return sdk_no_wait(no_wait, client.services.begin_stop, resource_group_name=resource_group, service_name=name) @@ -244,8 +237,7 @@ def list_keys(cmd, client, resource_group, name, app=None, deployment=None): if deployment else app_get(cmd, client, resource_group, name, app).properties.active_deployment if deployment_resource: keys.primary_test_endpoint = "{}/{}/{}/".format(keys.primary_test_endpoint, app, deployment_resource.name) - keys.secondary_test_endpoint = "{}/{}/{}/".format(keys.secondary_test_endpoint, app, - deployment_resource.name) + keys.secondary_test_endpoint = "{}/{}/{}/".format(keys.secondary_test_endpoint, app, deployment_resource.name) return keys @@ -360,9 +352,7 @@ def app_list(cmd, client, client.deployments.list_for_cluster(resource_group, service)) for app in apps: app.properties.active_deployment = next(iter(x for x in deployments - if - x.properties.active and x.id.startswith(app.id + '/deployments/')), - None) + if x.properties.active and x.id.startswith(app.id + '/deployments/')), None) return apps @@ -425,9 +415,7 @@ def app_tail_log(cmd, client, resource_group, service, name, log_stream = LogStream(client, resource_group, service) if not log_stream: - raise CLIError( - "To use the log streaming feature, please enable the test endpoint by running 'az spring test-endpoint enable -n {0} -g {1}'".format( - service, resource_group)) + raise CLIError("To use the log streaming feature, please enable the test endpoint by running 'az spring test-endpoint enable -n {0} -g {1}'".format(service, resource_group)) streaming_url = "https://{0}/api/logstream/apps/{1}/instances/{2}".format( log_stream.base_url, name, instance) @@ -484,8 +472,7 @@ def _set_active_in_lagecy_api(cmd, client, resource_group, service, name, deploy return client.apps.begin_update(resource_group, service, name, app) -def app_append_loaded_public_certificate(cmd, client, resource_group, service, name, certificate_name, - load_trust_store): +def app_append_loaded_public_certificate(cmd, client, resource_group, service, name, certificate_name, load_trust_store): app_resource = client.apps.get(resource_group, service, name) certificate_resource = client.certificates.get(resource_group, service, certificate_name) certificate_resource_id = certificate_resource.id @@ -535,16 +522,14 @@ def deployment_list(cmd, client, resource_group, service, app): def deployment_generate_heap_dump(cmd, client, resource_group, service, app, app_instance, file_path, deployment=None): diagnostic_parameters = models_20220101preview.DiagnosticParameters(app_instance=app_instance, file_path=file_path) logger.info("Heap dump is triggered.") - return client.deployments.begin_generate_heap_dump(resource_group, service, app, deployment.name, - diagnostic_parameters) + return client.deployments.begin_generate_heap_dump(resource_group, service, app, deployment.name, diagnostic_parameters) def deployment_generate_thread_dump(cmd, client, resource_group, service, app, app_instance, file_path, deployment=None): diagnostic_parameters = models_20220101preview.DiagnosticParameters(app_instance=app_instance, file_path=file_path) logger.info("Thread dump is triggered.") - return client.deployments.begin_generate_thread_dump(resource_group, service, app, deployment.name, - diagnostic_parameters) + return client.deployments.begin_generate_thread_dump(resource_group, service, app, deployment.name, diagnostic_parameters) def deployment_start_jfr(cmd, client, resource_group, service, app, app_instance, file_path, duration=None, @@ -584,9 +569,7 @@ def validate_config_server_settings(client, resource_group, name, config_server_ try: result = sdk_no_wait(False, client.begin_validate, resource_group, name, config_server_settings).result() except Exception as err: # pylint: disable=broad-except - raise CLIError( - "{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format( - err)) + raise CLIError("{0}. You may raise a support ticket if needed by the following link: https://docs.microsoft.com/azure/spring-cloud/spring-cloud-faq?pivots=programming-language-java#how-can-i-provide-feedback-and-report-issues".format(err)) if not result.is_valid: for item in result.details or []: @@ -1204,8 +1187,7 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert if vault_uri is None and public_certificate_file is None: raise InvalidArgumentValueError("One of --vault-uri and --public-certificate-file should be provided") if vault_uri is not None and public_certificate_file is not None: - raise InvalidArgumentValueError( - "--vault-uri and --public-certificate-file could not be provided at the same time") + raise InvalidArgumentValueError("--vault-uri and --public-certificate-file could not be provided at the same time") if vault_uri is not None: if vault_certificate_name is None: raise InvalidArgumentValueError("--vault-certificate-name should be provided for Key Vault Certificate") @@ -1236,8 +1218,7 @@ def certificate_add(cmd, client, resource_group, service, name, only_public_cert certificate_resource = models_20220101preview.CertificateResource(properties=properties) def callback(pipeline_response, deserialized, headers): - return models_20220101preview.CertificateResource.deserialize( - json.loads(pipeline_response.http_response.text())) + return models_20220101preview.CertificateResource.deserialize(json.loads(pipeline_response.http_response.text())) return client.certificates.begin_create_or_update( resource_group_name=resource_group, @@ -1506,6 +1487,7 @@ def app_insights_show(cmd, client, resource_group, name, no_wait=False): def app_connect(cmd, client, resource_group, service, name, deployment=None, instance=None, shell_cmd='/bin/sh'): + profile = Profile(cli_ctx=cmd.cli_ctx) creds, _, _ = profile.get_raw_token() token = creds[1] @@ -1527,9 +1509,7 @@ def app_connect(cmd, client, resource_group, service, name, connect_url = "wss://{0}/api/appconnect/apps/{1}/deployments/{2}/instances/{3}/connect?command={4}".format( hostname, name, deployment.name, instance, shell_cmd) - logger.warning( - "Connecting to the app instance Microsoft.AppPlatform/Spring/%s/apps/%s/deployments/%s/instances/%s..." % ( - service, name, deployment.name, instance)) + logger.warning("Connecting to the app instance Microsoft.AppPlatform/Spring/%s/apps/%s/deployments/%s/instances/%s..." % (service, name, deployment.name, instance)) conn = WebSocketConnection(connect_url, token) reader = Thread(target=recv_remote, args=(conn,)) diff --git a/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py b/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py index 074a5a02c2b..9e942059a39 100644 --- a/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py +++ b/src/spring/azext_spring/tests/latest/test_asa_app_scenario.py @@ -14,12 +14,11 @@ TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) - @record_only() class AppDeploy(ScenarioTest): def test_deploy_app(self): py_path = os.path.abspath(os.path.dirname(__file__)) - file_path = os.path.join(py_path, 'files/test.jar').replace("\\", "/") + file_path = os.path.join(py_path, 'files/test.jar').replace("\\","/") self.kwargs.update({ 'app': 'deploy', 'serviceName': 'cli-unittest', @@ -27,18 +26,15 @@ def test_deploy_app(self): 'file': file_path }) - self.cmd( - 'spring app create -n {app} -g {rg} -s {serviceName} --cpu 2 --env "foo=bar" --runtime-version Java_11', - checks=[ - self.check('name', '{app}'), - self.check('properties.activeDeployment.name', 'default'), - self.check('properties.activeDeployment.properties.deploymentSettings.resourceRequests.cpu', '2'), - self.check('properties.activeDeployment.sku.capacity', 1), - self.check('properties.activeDeployment.properties.source.type', 'Jar'), - self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_11'), - self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', - {'foo': 'bar'}), - ]) + self.cmd('spring app create -n {app} -g {rg} -s {serviceName} --cpu 2 --env "foo=bar" --runtime-version Java_11', checks=[ + self.check('name', '{app}'), + self.check('properties.activeDeployment.name', 'default'), + self.check('properties.activeDeployment.properties.deploymentSettings.resourceRequests.cpu', '2'), + self.check('properties.activeDeployment.sku.capacity', 1), + self.check('properties.activeDeployment.properties.source.type', 'Jar'), + self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_11'), + self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), + ]) # deploy fake file, the fail is expected with self.assertRaisesRegexp(CLIError, "112404: Exit code 1: application error."): @@ -69,8 +65,7 @@ def test_deploy_app(self): # deploy change to .Net with self.assertRaisesRegexp(CLIError, "112404: Exit code 0: purposely stopped."): - self.cmd( - 'spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v2 --runtime-version NetCore_31 --main-entry test') + self.cmd('spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v2 --runtime-version NetCore_31 --main-entry test') deployment = self.cmd('spring app deployment show -n default --app {app} -g {rg} -s {serviceName}', checks=[ self.check('name', 'default'), self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), @@ -98,8 +93,7 @@ def test_deploy_app(self): # keep deploy .net with self.assertRaisesRegexp(CLIError, "112404: Exit code 0: purposely stopped."): - self.cmd( - 'spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v3 --main-entry test3') + self.cmd('spring app deploy -n {app} -g {rg} -s {serviceName} --artifact-path {file} --version v3 --main-entry test3') self.cmd('spring app deployment show -n default --app {app} -g {rg} -s {serviceName}', checks=[ self.check('name', 'default'), self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), @@ -128,21 +122,19 @@ def test_app_crud(self): self.check('properties.activeDeployment.sku.capacity', 1), self.check('properties.activeDeployment.properties.source.type', 'Jar'), self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_8'), - self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', - {'foo': 'bar'}), + self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), ]) # green deployment copy settings from active, but still accept input as highest priority - self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --instance-count 2', - checks=[ - self.check('name', 'green'), - self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), - self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), - self.check('properties.source.type', 'Jar'), - self.check('properties.source.runtimeVersion', 'Java_8'), - self.check('sku.capacity', 2), - self.check('properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), - ]) + self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --instance-count 2', checks=[ + self.check('name', 'green'), + self.check('properties.deploymentSettings.resourceRequests.cpu', '2'), + self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), + self.check('properties.source.type', 'Jar'), + self.check('properties.source.runtimeVersion', 'Java_8'), + self.check('sku.capacity', 2), + self.check('properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), + ]) self.cmd('spring app update -n {app} -g {rg} -s {serviceName} --runtime-version Java_11', checks=[ self.check('properties.activeDeployment.name', 'default'), @@ -151,11 +143,11 @@ def test_app_crud(self): self.check('properties.activeDeployment.sku.capacity', 1), self.check('properties.activeDeployment.properties.source.type', 'Jar'), self.check('properties.activeDeployment.properties.source.runtimeVersion', 'Java_11'), - self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', - {'foo': 'bar'}), + self.check('properties.activeDeployment.properties.deploymentSettings.environmentVariables', {'foo': 'bar'}), ]) self.cmd('spring app delete -n {app} -g {rg} -s {serviceName}') + def test_app_crud_1(self): self.kwargs.update({ 'app': 'test-crud-app-1', @@ -173,13 +165,12 @@ def test_app_crud_1(self): ]) # green deployment not copy settings from active - self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --skip-clone-settings', - checks=[ - self.check('name', 'green'), - self.check('properties.deploymentSettings.resourceRequests.cpu', '1'), - self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), - self.check('sku.capacity', 1) - ]) + self.cmd('spring app deployment create -n green --app {app} -g {rg} -s {serviceName} --skip-clone-settings', checks=[ + self.check('name', 'green'), + self.check('properties.deploymentSettings.resourceRequests.cpu', '1'), + self.check('properties.deploymentSettings.resourceRequests.memory', '1Gi'), + self.check('sku.capacity', 1) + ]) @record_only() @@ -272,12 +263,10 @@ def test_generate_deployment_dump(self): 'resourceGroup': 'cli', 'path': file_path }) - result = self.cmd( - 'spring app deployment show -g {resourceGroup} -s {serviceName} --app {app} -n {deployment}').get_output_in_json() + result = self.cmd('spring app deployment show -g {resourceGroup} -s {serviceName} --app {app} -n {deployment}').get_output_in_json() self.kwargs['instance'] = result['properties'].get('instances', [{}])[0].get('name') self.assertTrue(self.kwargs['instance']) - self.cmd( - 'spring app deployment generate-heap-dump -g {resourceGroup} -s {serviceName} --app {app} --deployment {deployment} --app-instance {instance} --file-path {path}') + self.cmd('spring app deployment generate-heap-dump -g {resourceGroup} -s {serviceName} --app {app} --deployment {deployment} --app-instance {instance} --file-path {path}') @record_only() @@ -299,4 +288,4 @@ def test_vnet_public_endpoint(self): self.cmd('spring app update -n {app} -g {rg} -s {serviceName} --assign-public-endpoint true', checks=[ self.check('properties.vnetAddons.publicEndpoint', True) - ]) + ]) \ No newline at end of file From a0d7c5e4fb5cf338d18fb0f73e7394e26113cb26 Mon Sep 17 00:00:00 2001 From: pensh Date: Fri, 14 Oct 2022 16:45:22 +0800 Subject: [PATCH 5/8] move command from deployment to app --- src/spring/HISTORY.md | 2 +- src/spring/azext_spring/_help.py | 30 ++++++++-------- src/spring/azext_spring/_params.py | 36 +++++++++---------- src/spring/azext_spring/commands.py | 6 ++-- src/spring/azext_spring/custom.py | 16 ++++----- .../tests/latest/test_asa_scenario.py | 6 ++-- 6 files changed, 46 insertions(+), 50 deletions(-) diff --git a/src/spring/HISTORY.md b/src/spring/HISTORY.md index 9f3d22f2c82..111889261d6 100644 --- a/src/spring/HISTORY.md +++ b/src/spring/HISTORY.md @@ -4,7 +4,7 @@ Release History --- * Add command `az spring app deployment enable-remote-debugging`. * Add command `az spring app deployment disable-remote-debugging`. -* Add command `az spring app deployment get-remote-debugging`. +* Add command `az spring app deployment get-remote-debugging-config`. 1.1.10 --- diff --git a/src/spring/azext_spring/_help.py b/src/spring/azext_spring/_help.py index b46fa1235fd..fe0c8314bee 100644 --- a/src/spring/azext_spring/_help.py +++ b/src/spring/azext_spring/_help.py @@ -216,6 +216,21 @@ short-summary: Restart instances of the app, default to production deployment. """ +helps['spring app enable-remote-debugging'] = """ + type: command + short-summary: Enable remote debugging for a deployment. +""" + +helps['spring app disable-remote-debugging'] = """ + type: command + short-summary: Disable remote debugging for a deployment. +""" + +helps['spring app get-remote-debugging-config'] = """ + type: command + short-summary: Get the remote debugging configuration of a deployment. +""" + helps['spring app deploy'] = """ type: command short-summary: Deploy source code or pre-built binary to an app and update related configurations. @@ -383,21 +398,6 @@ short-summary: Start a JFR on your target app instance to given file path. """ -helps['spring app deployment enable-remote-debugging'] = """ - type: command - short-summary: Enable remote debugging for a deployment. -""" - -helps['spring app deployment disable-remote-debugging'] = """ - type: command - short-summary: Disable remote debugging for a deployment. -""" - -helps['spring app deployment get-remote-debugging'] = """ - type: command - short-summary: Get the remote debugging configuration of a deployment. -""" - helps['spring config-server'] = """ type: group short-summary: (Support Standard Tier and Basic Tier) Commands to manage Config Server in Azure Spring Apps. diff --git a/src/spring/azext_spring/_params.py b/src/spring/azext_spring/_params.py index 5cd3109c6f4..791c2f609cb 100644 --- a/src/spring/azext_spring/_params.py +++ b/src/spring/azext_spring/_params.py @@ -288,6 +288,22 @@ def load_arguments(self, _): c.argument('deployment', options_list=[ '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) + for scope in ['spring app disable-remote-debugging', 'spring app get-remote-debugging-config']: + with self.argument_context(scope) as c: + c.argument('deployment', options_list=[ + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) + + with self.argument_context('spring app enable-remote-debugging') as c: + c.argument('deployment', options_list=[ + '--deployment', '-d'], + help='Name of an existing deployment of the app. Default to the production deployment if not specified.', + validator=fulfill_deployment_param) + c.argument('remote_debugging_port', options_list=['--port', '-p'], type=int, default=5005, + help='Remote debugging port, the value should be from 1024 to 65536, default value is 5005', + validator=validate_remote_debugging_port) + with self.argument_context('spring app unset-deployment') as c: c.argument('name', name_type, help='Name of app.', validator=active_deployment_exist) @@ -457,26 +473,6 @@ def prepare_logs_argument(c): validator=validate_app_name) c.argument('name', name_type, help='Name of deployment.') - for scope in ['spring app deployment disable-remote-debugging', 'spring app deployment get-remote-debugging']: - with self.argument_context(scope) as c: - c.argument('app', app_name_type, help='Name of app.', - validator=validate_app_name) - c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) - - with self.argument_context('spring app deployment enable-remote-debugging') as c: - c.argument('app', app_name_type, help='Name of app.', - validator=validate_app_name) - c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) - c.argument('remote_debugging_port', options_list=['--port', '-p'], type=int, default=5005, - help='Remote debugging port, the value should be from 1024 to 65536, default value is 5005', - validator=validate_remote_debugging_port) - for scope in ['spring app deployment generate-heap-dump', 'spring app deployment generate-thread-dump']: with self.argument_context(scope) as c: c.argument('deployment', options_list=[ diff --git a/src/spring/azext_spring/commands.py b/src/spring/azext_spring/commands.py index 96375766771..5918735e7be 100644 --- a/src/spring/azext_spring/commands.py +++ b/src/spring/azext_spring/commands.py @@ -149,6 +149,9 @@ def load_command_table(self, _): g.custom_command('append-persistent-storage', 'app_append_persistent_storage') g.custom_command('append-loaded-public-certificate', 'app_append_loaded_public_certificate') g.custom_command('connect', 'app_connect') + g.custom_command('enable-remote-debugging', 'deployment_enable_remote_debugging', supports_no_wait=True) + g.custom_command('disable-remote-debugging', 'deployment_disable_remote_debugging', supports_no_wait=True) + g.custom_command('get-remote-debugging-config', 'deployment_get_remote_debugging') with self.command_group('spring app identity', custom_command_type=app_managed_identity_command, exception_handler=handle_asc_exception) as g: @@ -180,9 +183,6 @@ def load_command_table(self, _): g.custom_command('generate-heap-dump', 'deployment_generate_heap_dump') g.custom_command('generate-thread-dump', 'deployment_generate_thread_dump') g.custom_command('start-jfr', 'deployment_start_jfr') - g.custom_command('enable-remote-debugging', 'deployment_enable_remote_debugging') - g.custom_command('disable-remote-debugging', 'deployment_disable_remote_debugging') - g.custom_command('get-remote-debugging', 'deployment_get_remote_debugging') with self.command_group('spring app binding', client_factory=cf_spring_20220101preview, exception_handler=handle_asc_exception) as g: diff --git a/src/spring/azext_spring/custom.py b/src/spring/azext_spring/custom.py index 76267c9fa2a..28682f5cf3a 100644 --- a/src/spring/azext_spring/custom.py +++ b/src/spring/azext_spring/custom.py @@ -316,21 +316,21 @@ def app_stop(cmd, client, resource_group, service, name, deployment.name) -def deployment_enable_remote_debugging(cmd, client, resource_group, service, app, remote_debugging_port=None, deployment=None, no_wait=False): - logger.warning("Enable remote debugging for the app '{}', deployment '{}'".format(app, deployment.name)) +def deployment_enable_remote_debugging(cmd, client, resource_group, service, name, remote_debugging_port=None, deployment=None, no_wait=False): + logger.warning("Enable remote debugging for the app '{}', deployment '{}'".format(name, deployment.name)) remote_debugging_payload = models_20220901preview.RemoteDebuggingPayload(port=remote_debugging_port) return sdk_no_wait(no_wait, client.deployments.begin_enable_remote_debugging, - resource_group, service, app, deployment.name, remote_debugging_payload) + resource_group, service, name, deployment.name, remote_debugging_payload) -def deployment_disable_remote_debugging(cmd, client, resource_group, service, app, deployment=None, no_wait=False): - logger.warning("Disable remote debugging for the app '{}', deployment '{}'".format(app, deployment.name)) +def deployment_disable_remote_debugging(cmd, client, resource_group, service, name, deployment=None, no_wait=False): + logger.warning("Disable remote debugging for the app '{}', deployment '{}'".format(name, deployment.name)) return sdk_no_wait(no_wait, client.deployments.begin_disable_remote_debugging, - resource_group, service, app, deployment.name) + resource_group, service, name, deployment.name) -def deployment_get_remote_debugging(cmd, client, resource_group, service, app, deployment=None): - return client.deployments.get_remote_debugging_config(resource_group, service, app, deployment.name) +def deployment_get_remote_debugging(cmd, client, resource_group, service, name, deployment=None): + return client.deployments.get_remote_debugging_config(resource_group, service, name, deployment.name) def app_restart(cmd, client, diff --git a/src/spring/azext_spring/tests/latest/test_asa_scenario.py b/src/spring/azext_spring/tests/latest/test_asa_scenario.py index 36caed8dab0..8f169cfff38 100644 --- a/src/spring/azext_spring/tests/latest/test_asa_scenario.py +++ b/src/spring/azext_spring/tests/latest/test_asa_scenario.py @@ -249,13 +249,13 @@ def test_remote_debugging(self): # remote debugging can only be supported for jar, here will throw exception for default banner self.cmd( - 'spring app deployment enable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', expect_failure=True) + 'spring app enable-remote-debugging -n {app} -g {resourceGroup} -s {serviceName} -d {deployment}', expect_failure=True) self.cmd( - 'spring app deployment disable-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}') + 'spring app disable-remote-debugging -n {app} -g {resourceGroup} -s {serviceName} -d {deployment}') self.cmd( - 'spring app deployment get-remote-debugging --app {app} -g {resourceGroup} -s {serviceName} --deployment {deployment}', + 'spring app get-remote-debugging-config -n {app} -g {resourceGroup} -s {serviceName} -d {deployment}', checks=[ self.check('enabled', False) ]) From f0d2079c43761966ac335d395fc2515f334dab56 Mon Sep 17 00:00:00 2001 From: pensh Date: Sat, 15 Oct 2022 12:02:22 +0800 Subject: [PATCH 6/8] update test file --- .../recordings/test_remote_debugging.yaml | 336 +++++++++--------- 1 file changed, 170 insertions(+), 166 deletions(-) diff --git a/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml b/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml index b4e41909ab1..2468b8feb35 100644 --- a/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml +++ b/src/spring/azext_spring/tests/latest/recordings/test_remote_debugging.yaml @@ -13,7 +13,7 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview response: @@ -27,7 +27,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:29 GMT + - Sat, 15 Oct 2022 03:43:28 GMT expires: - '-1' pragma: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11998' + - '11999' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -59,21 +59,21 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest?api-version=2022-09-01-preview response: body: - string: '{"properties":{"provisioningState":"Succeeded","zoneRedundant":false,"version":3,"serviceId":"a4e4ba0aa37440fbad3f79d58a33b868","networkProfile":{"outboundIPs":{"publicIPs":["20.204.233.104","20.204.235.241"]},"outboundType":"loadBalancer"},"powerState":"Running","fqdn":"cli-unittest.azuremicroservices.io"},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"S0","tier":"Standard"},"location":"centralindia","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest","name":"cli-unittest","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T06:35:51.2157015Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T06:35:51.2157015Z"}}' + string: '{"properties":{"provisioningState":"Succeeded","zoneRedundant":false,"version":3,"serviceId":"f7d4a4626c344bbd95266264a8882c19","networkProfile":{"outboundIPs":{"publicIPs":["20.244.73.9","20.244.73.29"]},"outboundType":"loadBalancer"},"powerState":"Running","fqdn":"cli-unittest.azuremicroservices.io"},"type":"Microsoft.AppPlatform/Spring","sku":{"name":"S0","tier":"Standard"},"location":"centralindia","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest","name":"cli-unittest","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:25:28.7260805Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:39:48.8667057Z"}}' headers: cache-control: - no-cache content-length: - - '805' + - '800' content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:29 GMT + - Sat, 15 Oct 2022 03:43:29 GMT expires: - '-1' pragma: @@ -89,7 +89,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11998' + - '11999' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -114,27 +114,27 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview response: body: - string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Creating","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:30.428517Z"}}' + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Creating","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:30.4560313Z"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a?api-version=2022-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547?api-version=2022-09-01-preview cache-control: - no-cache content-length: - - '882' + - '884' content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:30 GMT + - Sat, 15 Oct 2022 03:43:30 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/d57a47c5-404c-4a9f-8667-c3cd30c6165a/Spring/test-remote-debugging?api-version=2022-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547/Spring/test-remote-debugging?api-version=2022-09-01-preview pragma: - no-cache request-context: @@ -164,12 +164,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a","name":"d57a47c5-404c-4a9f-8667-c3cd30c6165a","status":"Running","startTime":"2022-10-11T07:32:31.0097393Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","name":"7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","status":"Running","startTime":"2022-10-15T03:43:30.9301919Z"}' headers: cache-control: - no-cache @@ -178,7 +178,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:31 GMT + - Sat, 15 Oct 2022 03:43:30 GMT expires: - '-1' pragma: @@ -212,21 +212,21 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/d57a47c5-404c-4a9f-8667-c3cd30c6165a","name":"d57a47c5-404c-4a9f-8667-c3cd30c6165a","status":"Succeeded","startTime":"2022-10-11T07:32:31.0097393Z","endTime":"2022-10-11T07:32:37.4100271Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","name":"7343cdc5-7efd-4b5d-92d6-b1a7d7c0a547","status":"Succeeded","startTime":"2022-10-15T03:43:30.9301919Z","endTime":"2022-10-15T03:43:38.783783Z"}' headers: cache-control: - no-cache content-length: - - '371' + - '370' content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:42 GMT + - Sat, 15 Oct 2022 03:43:41 GMT expires: - '-1' pragma: @@ -260,21 +260,21 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview response: body: - string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:30.428517Z"}}' + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:30.4560313Z"}}' headers: cache-control: - no-cache content-length: - - '985' + - '987' content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:43 GMT + - Sat, 15 Oct 2022 03:43:42 GMT expires: - '-1' pragma: @@ -290,7 +290,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11997' + - '11998' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -317,15 +317,15 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-09-01-preview response: body: - string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90},"provisioningState":"Creating","status":"Running","active":true,"instances":null,"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90},"provisioningState":"Creating","status":"Running","active":true,"instances":null,"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview cache-control: - no-cache content-length: @@ -333,11 +333,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:46 GMT + - Sat, 15 Oct 2022 03:43:47 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/a4014525-360c-4a51-921d-a772eb10dea7/Spring/default?api-version=2022-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/0ce06d04-bce5-43a6-911a-472209f91483/Spring/default?api-version=2022-09-01-preview pragma: - no-cache request-context: @@ -372,27 +372,27 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview response: body: - string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Updating","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:47.3504785Z"}}' + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Updating","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:47.5343128Z"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e?api-version=2022-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8?api-version=2022-09-01-preview cache-control: - no-cache content-length: - - '985' + - '986' content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:47 GMT + - Sat, 15 Oct 2022 03:43:47 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/4875a1f2-708b-45da-88c8-db727a9cc37e/Spring/test-remote-debugging?api-version=2022-09-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationResults/90f2fec1-d813-4768-a3b9-a0972d3b47e8/Spring/test-remote-debugging?api-version=2022-09-01-preview pragma: - no-cache request-context: @@ -422,12 +422,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e","name":"4875a1f2-708b-45da-88c8-db727a9cc37e","status":"Running","startTime":"2022-10-11T07:32:47.9071662Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8","name":"90f2fec1-d813-4768-a3b9-a0972d3b47e8","status":"Running","startTime":"2022-10-15T03:43:47.9214433Z"}' headers: cache-control: - no-cache @@ -436,7 +436,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:48 GMT + - Sat, 15 Oct 2022 03:43:48 GMT expires: - '-1' pragma: @@ -470,12 +470,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' headers: cache-control: - no-cache @@ -484,7 +484,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:32:58 GMT + - Sat, 15 Oct 2022 03:43:58 GMT expires: - '-1' pragma: @@ -518,12 +518,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/4875a1f2-708b-45da-88c8-db727a9cc37e","name":"4875a1f2-708b-45da-88c8-db727a9cc37e","status":"Succeeded","startTime":"2022-10-11T07:32:47.9071662Z","endTime":"2022-10-11T07:32:54.9556516Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/test-remote-debugging/operationId/90f2fec1-d813-4768-a3b9-a0972d3b47e8","name":"90f2fec1-d813-4768-a3b9-a0972d3b47e8","status":"Succeeded","startTime":"2022-10-15T03:43:47.9214433Z","endTime":"2022-10-15T03:43:54.9306385Z"}' headers: cache-control: - no-cache @@ -532,7 +532,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:33:01 GMT + - Sat, 15 Oct 2022 03:43:58 GMT expires: - '-1' pragma: @@ -541,6 +541,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-rp-server-mvid: @@ -562,21 +566,21 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview response: body: - string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:47.3504785Z"}}' + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:47.5343128Z"}}' headers: cache-control: - no-cache content-length: - - '986' + - '987' content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:33:02 GMT + - Sat, 15 Oct 2022 03:43:59 GMT expires: - '-1' pragma: @@ -585,54 +589,14 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11995' - x-rp-server-mvid: - - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - spring app create - Connection: - - keep-alive - ParameterSetName: - - -s -g -n - User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview - response: - body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' - headers: - cache-control: - - no-cache - content-length: - - '314' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 11 Oct 2022 07:33:09 GMT - expires: - - '-1' - pragma: - - no-cache - request-context: - - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff + - '11999' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -652,12 +616,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' headers: cache-control: - no-cache @@ -666,7 +630,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:33:21 GMT + - Sat, 15 Oct 2022 03:44:08 GMT expires: - '-1' pragma: @@ -675,6 +639,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-rp-server-mvid: @@ -696,12 +664,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' headers: cache-control: - no-cache @@ -710,7 +678,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:33:31 GMT + - Sat, 15 Oct 2022 03:44:18 GMT expires: - '-1' pragma: @@ -719,6 +687,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-rp-server-mvid: @@ -740,12 +712,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' headers: cache-control: - no-cache @@ -754,7 +726,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:33:42 GMT + - Sat, 15 Oct 2022 03:44:28 GMT expires: - '-1' pragma: @@ -763,6 +735,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-rp-server-mvid: @@ -784,12 +760,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' headers: cache-control: - no-cache @@ -798,7 +774,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:33:52 GMT + - Sat, 15 Oct 2022 03:44:38 GMT expires: - '-1' pragma: @@ -807,6 +783,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-rp-server-mvid: @@ -828,12 +808,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Running","startTime":"2022-10-11T07:32:46.9992994Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Running","startTime":"2022-10-15T03:43:47.1905897Z"}' headers: cache-control: - no-cache @@ -842,7 +822,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:05 GMT + - Sat, 15 Oct 2022 03:44:49 GMT expires: - '-1' pragma: @@ -851,6 +831,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-rp-server-mvid: @@ -872,12 +856,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7?api-version=2022-09-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483?api-version=2022-09-01-preview response: body: - string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/a4014525-360c-4a51-921d-a772eb10dea7","name":"a4014525-360c-4a51-921d-a772eb10dea7","status":"Succeeded","startTime":"2022-10-11T07:32:46.9992994Z","endTime":"2022-10-11T07:34:13.0331184Z"}' + string: '{"id":"subscriptions/0753feba-86f1-4242-aff1-27938fb04531/resourceGroups/cli/providers/Microsoft.AppPlatform/locations/centralindia/operationStatus/default/operationId/0ce06d04-bce5-43a6-911a-472209f91483","name":"0ce06d04-bce5-43a6-911a-472209f91483","status":"Succeeded","startTime":"2022-10-15T03:43:47.1905897Z","endTime":"2022-10-15T03:44:50.9697693Z"}' headers: cache-control: - no-cache @@ -886,7 +870,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:15 GMT + - Sat, 15 Oct 2022 03:45:00 GMT expires: - '-1' pragma: @@ -895,6 +879,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-rp-server-mvid: @@ -916,12 +904,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-09-01-preview response: body: - string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' headers: cache-control: - no-cache @@ -930,7 +918,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:18 GMT + - Sat, 15 Oct 2022 03:45:03 GMT expires: - '-1' pragma: @@ -939,10 +927,14 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11997' + - '11999' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -962,21 +954,21 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging?api-version=2022-09-01-preview response: body: - string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:30.428517Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:47.3504785Z"}}' + string: '{"properties":{"addonConfigs":{"applicationConfigurationService":{},"serviceRegistry":{}},"public":false,"provisioningState":"Succeeded","fqdn":"cli-unittest.azuremicroservices.io","httpsOnly":false,"temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"},"enableEndToEndTLS":false,"ingressSettings":{"readTimeoutInSeconds":300,"sendTimeoutInSeconds":60,"sessionCookieMaxAge":0,"sessionAffinity":"None","backendProtocol":"Default"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging","name":"test-remote-debugging","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:30.4560313Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:47.5343128Z"}}' headers: cache-control: - no-cache content-length: - - '986' + - '987' content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:22 GMT + - Sat, 15 Oct 2022 03:45:07 GMT expires: - '-1' pragma: @@ -985,10 +977,14 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11994' + - '11998' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -1008,12 +1004,12 @@ interactions: ParameterSetName: - -s -g -n User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments?api-version=2022-09-01-preview response: body: - string: '{"value":[{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}]}' + string: '{"value":[{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}]}' headers: cache-control: - no-cache @@ -1022,7 +1018,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:25 GMT + - Sat, 15 Oct 2022 03:45:10 GMT expires: - '-1' pragma: @@ -1031,10 +1027,14 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '11996' + - '11998' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -1048,18 +1048,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring app deployment enable-remote-debugging + - spring app enable-remote-debugging Connection: - keep-alive ParameterSetName: - - --app -g -s --deployment + - -n -g -s -d User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview response: body: - string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' headers: cache-control: - no-cache @@ -1068,7 +1068,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:30 GMT + - Sat, 15 Oct 2022 03:45:15 GMT expires: - '-1' pragma: @@ -1098,7 +1098,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring app deployment enable-remote-debugging + - spring app enable-remote-debugging Connection: - keep-alive Content-Length: @@ -1106,9 +1106,9 @@ interactions: Content-Type: - application/json ParameterSetName: - - --app -g -s --deployment + - -n -g -s -d User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/enableRemoteDebugging?api-version=2022-09-01-preview response: @@ -1123,7 +1123,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:31 GMT + - Sat, 15 Oct 2022 03:45:16 GMT expires: - '-1' pragma: @@ -1149,18 +1149,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring app deployment disable-remote-debugging + - spring app disable-remote-debugging Connection: - keep-alive ParameterSetName: - - --app -g -s --deployment + - -n -g -s -d User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview response: body: - string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' headers: cache-control: - no-cache @@ -1169,7 +1169,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:41 GMT + - Sat, 15 Oct 2022 03:45:20 GMT expires: - '-1' pragma: @@ -1199,15 +1199,15 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring app deployment disable-remote-debugging + - spring app disable-remote-debugging Connection: - keep-alive Content-Length: - '0' ParameterSetName: - - --app -g -s --deployment + - -n -g -s -d User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/disableRemoteDebugging?api-version=2022-09-01-preview response: @@ -1221,7 +1221,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:34:43 GMT + - Sat, 15 Oct 2022 03:45:20 GMT expires: - '-1' pragma: @@ -1237,7 +1237,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: @@ -1251,18 +1251,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring app deployment get-remote-debugging + - spring app get-remote-debugging-config Connection: - keep-alive ParameterSetName: - - --app -g -s --deployment + - -n -g -s -d User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment?api-version=2022-05-01-preview response: body: - string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-8655df5799-6t5gl","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-11T07:33:50Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-11T07:32:46.3973465Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-11T07:32:46.3973465Z"}}' + string: '{"properties":{"deploymentSettings":{"resourceRequests":{"cpu":"1","memory":"1Gi"},"environmentVariables":null,"terminationGracePeriodSeconds":90,"livenessProbe":{"disableProbe":false,"failureThreshold":24,"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}},"readinessProbe":{"disableProbe":false,"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1,"probeAction":{"type":"TCPSocketAction"}}},"provisioningState":"Succeeded","status":"Running","active":true,"instances":[{"name":"test-remote-debugging-default-21-68546d98fb-62gxg","status":"Running","discoveryStatus":"UNREGISTERED","startTime":"2022-10-15T03:43:54Z"}],"source":{"type":"Jar","relativePath":"","runtimeVersion":"Java_8"}},"type":"Microsoft.AppPlatform/Spring/apps/deployments","sku":{"name":"S0","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/default","name":"default","systemData":{"createdBy":"pensh@microsoft.com","createdByType":"User","createdAt":"2022-10-15T03:43:46.3936757Z","lastModifiedBy":"pensh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-10-15T03:43:46.3936757Z"}}' headers: cache-control: - no-cache @@ -1271,7 +1271,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:35:00 GMT + - Sat, 15 Oct 2022 03:45:24 GMT expires: - '-1' pragma: @@ -1280,6 +1280,10 @@ interactions: - appId=cid-v1:797d7e4e-8180-497e-a254-780fbd39ba4d strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: @@ -1297,15 +1301,15 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - spring app deployment get-remote-debugging + - spring app get-remote-debugging-config Connection: - keep-alive Content-Length: - '0' ParameterSetName: - - --app -g -s --deployment + - -n -g -s -d User-Agent: - - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + - AZURECLI/2.40.0 (PIP) azsdk-python-mgmt-appplatform/6.1.0 Python/3.10.8 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli/providers/Microsoft.AppPlatform/Spring/cli-unittest/apps/test-remote-debugging/deployments/mock-deployment/getRemoteDebuggingConfig?api-version=2022-09-01-preview response: @@ -1319,7 +1323,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 11 Oct 2022 07:35:04 GMT + - Sat, 15 Oct 2022 03:45:29 GMT expires: - '-1' pragma: @@ -1335,7 +1339,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' x-rp-server-mvid: - e7de6c4f-f52b-4353-818b-0db9b32d2ec6 status: From 2365b766a011a5e79e1554cc83fce2732efcf731 Mon Sep 17 00:00:00 2001 From: pensh Date: Sun, 16 Oct 2022 11:15:46 +0800 Subject: [PATCH 7/8] remove unnecessary changes --- src/spring/azext_spring/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spring/azext_spring/commands.py b/src/spring/azext_spring/commands.py index 5918735e7be..1b96b49de38 100644 --- a/src/spring/azext_spring/commands.py +++ b/src/spring/azext_spring/commands.py @@ -173,7 +173,7 @@ def load_command_table(self, _): exception_handler=handle_asc_exception) as g: g.custom_command('create', 'deployment_create', supports_no_wait=True) - with self.command_group('spring app deployment', client_factory=cf_spring_20220901preview, + with self.command_group('spring app deployment', client_factory=cf_spring_20220501preview, exception_handler=handle_asc_exception) as g: g.custom_command('list', 'deployment_list', table_transformer=transform_spring_deployment_output) From 6bba93124200dc9f24852de6e83a805899aad9c3 Mon Sep 17 00:00:00 2001 From: pensh Date: Mon, 17 Oct 2022 08:23:13 +0800 Subject: [PATCH 8/8] fix format --- src/spring/azext_spring/_params.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/spring/azext_spring/_params.py b/src/spring/azext_spring/_params.py index 791c2f609cb..adb97a22cf2 100644 --- a/src/spring/azext_spring/_params.py +++ b/src/spring/azext_spring/_params.py @@ -291,15 +291,11 @@ def load_arguments(self, _): for scope in ['spring app disable-remote-debugging', 'spring app get-remote-debugging-config']: with self.argument_context(scope) as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) with self.argument_context('spring app enable-remote-debugging') as c: c.argument('deployment', options_list=[ - '--deployment', '-d'], - help='Name of an existing deployment of the app. Default to the production deployment if not specified.', - validator=fulfill_deployment_param) + '--deployment', '-d'], help='Name of an existing deployment of the app. Default to the production deployment if not specified.', validator=fulfill_deployment_param) c.argument('remote_debugging_port', options_list=['--port', '-p'], type=int, default=5005, help='Remote debugging port, the value should be from 1024 to 65536, default value is 5005', validator=validate_remote_debugging_port)