Skip to content

Commit

Permalink
Rename spring cloud config to config server for spring, rename spring… (
Browse files Browse the repository at this point in the history
  • Loading branch information
Descatles committed Apr 9, 2024
1 parent 5a1a733 commit 4b6912b
Show file tree
Hide file tree
Showing 7 changed files with 10,054 additions and 83 deletions.
2 changes: 2 additions & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Release History
upcoming
++++++
* 'az containerapp up/create/update': Wait longer time for logstream of Cloud Build to make sure the container start
* 'az containerapp env java-component config-server-for-spring': Support create/update/show/delete Spring Cloud Config; deprecation of 'az containerapp env java-component spring-cloud-config'
* 'az containerapp env java-component eureka-server-for-spring': Support create/update/show/delete Spring Cloud Eureka; deprecation of 'az containerapp env java-component spring-cloud-eureka'

0.3.50
++++++
Expand Down
123 changes: 122 additions & 1 deletion src/containerapp/azext_containerapp/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,8 @@

helps['containerapp env java-component spring-cloud-config'] = """
type: group
short-summary: Commands to manage the Spring Cloud Config for the Container Apps environment.
short-summary: Commands to manage the Config Server for Spring for the Container Apps environment.
deprecate_info: This command group is deprecated. Use 'az containerapp env java-component config-server-for-spring' instead.
"""

helps['containerapp env java-component spring-cloud-config create'] = """
Expand Down Expand Up @@ -1276,9 +1277,67 @@
--configuration PropertyName1=Value1 PropertyName2=Value2
"""

helps['containerapp env java-component config-server-for-spring'] = """
type: group
short-summary: Commands to manage the Config Server for Spring for the Container Apps environment.
"""

helps['containerapp env java-component config-server-for-spring create'] = """
type: command
short-summary: Command to create the Config Server for Spring.
examples:
- name: Create a Config Server for Spring.
text: |
az containerapp env java-component config-server-for-spring create -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration PropertyName1=Value1 PropertyName2=Value2
"""

helps['containerapp env java-component config-server-for-spring delete'] = """
type: command
short-summary: Command to delete the Config Server for Spring.
examples:
- name: Delete a Config Server for Spring.
text: |
az containerapp env java-component config-server-for-spring delete -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment
"""

helps['containerapp env java-component config-server-for-spring show'] = """
type: command
short-summary: Command to show the Config Server for Spring.
examples:
- name: Show a Config Server for Spring.
text: |
az containerapp env java-component config-server-for-spring show -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment
"""

helps['containerapp env java-component config-server-for-spring update'] = """
type: command
short-summary: Command to update the Config Server for Spring.
examples:
- name: Delete all configurations of the Config Server for Spring.
text: |
az containerapp env java-component config-server-for-spring update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration
- name: Update a Config Server for Spring with custom configurations.
text: |
az containerapp env java-component config-server-for-spring update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration PropertyName1=Value1 PropertyName2=Value2
"""

helps['containerapp env java-component spring-cloud-eureka'] = """
type: group
short-summary: Commands to manage the Spring Cloud Eureka for the Container Apps environment.
deprecate_info: This command group is deprecated. Use 'az containerapp env java-component eureka-server-for-spring' instead.
"""

helps['containerapp env java-component spring-cloud-eureka create'] = """
Expand Down Expand Up @@ -1338,6 +1397,68 @@
--configuration PropertyName1=Value1 PropertyName2=Value2
"""

helps['containerapp env java-component eureka-server-for-spring'] = """
type: group
short-summary: Commands to manage the Eureka Server for Spring for the Container Apps environment.
"""

helps['containerapp env java-component eureka-server-for-spring create'] = """
type: command
short-summary: Command to create the Eureka Server for Spring.
examples:
- name: Create a Eureka Server for Spring with default configuration.
text: |
az containerapp env java-component eureka-server-for-spring create -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment
- name: Create a Eureka Server for Spring with custom configurations.
text: |
az containerapp env java-component eureka-server-for-spring create -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration PropertyName1=Value1 PropertyName2=Value2
"""

helps['containerapp env java-component eureka-server-for-spring delete'] = """
type: command
short-summary: Command to delete the Eureka Server for Spring.
examples:
- name: Delete a Eureka Server for Spring.
text: |
az containerapp env java-component eureka-server-for-spring delete -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment
"""

helps['containerapp env java-component eureka-server-for-spring show'] = """
type: command
short-summary: Command to show the Eureka Server for Spring.
examples:
- name: Show a Eureka Server for Spring.
text: |
az containerapp env java-component eureka-server-for-spring show -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment
"""

helps['containerapp env java-component eureka-server-for-spring update'] = """
type: command
short-summary: Command to update the Eureka Server for Spring.
examples:
- name: Delete all configurations of the Eureka Server for Spring.
text: |
az containerapp env java-component eureka-server-for-spring update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration
- name: Update a Eureka Server for Spring with custom configurations.
text: |
az containerapp env java-component eureka-server-for-spring update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration PropertyName1=Value1 PropertyName2=Value2
"""

# Container Apps Telemetry Commands

helps['containerapp env telemetry'] = """
Expand Down
38 changes: 26 additions & 12 deletions src/containerapp/azext_containerapp/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,29 @@ def load_command_table(self, args):

with self.command_group('containerapp env java-component', is_preview=True) as g:
g.custom_command('list', 'list_java_components')

with self.command_group('containerapp env java-component spring-cloud-config') as g:
g.custom_command('create', 'create_spring_cloud_config', supports_no_wait=True)
g.custom_command('update', 'update_spring_cloud_config', supports_no_wait=True)
g.custom_show_command('show', 'show_spring_cloud_config')
g.custom_command('delete', 'delete_spring_cloud_config', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp env java-component spring-cloud-eureka') as g:
g.custom_command('create', 'create_spring_cloud_eureka', supports_no_wait=True)
g.custom_command('update', 'update_spring_cloud_eureka', supports_no_wait=True)
g.custom_show_command('show', 'show_spring_cloud_eureka')
g.custom_command('delete', 'delete_spring_cloud_eureka', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp env java-component spring-cloud-config',
deprecate_info=self.deprecate(redirect='containerapp env java-component config-server-for-spring', hide=True)) as g:
g.custom_command('create', 'create_config_server_for_spring', supports_no_wait=True)
g.custom_command('update', 'update_config_server_for_spring', supports_no_wait=True)
g.custom_show_command('show', 'show_config_server_for_spring')
g.custom_command('delete', 'delete_config_server_for_spring', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp env java-component spring-cloud-eureka',
deprecate_info=self.deprecate(redirect='containerapp env java-component eureka-server-for-spring', hide=True)) as g:
g.custom_command('create', 'create_eureka_server_for_spring', supports_no_wait=True)
g.custom_command('update', 'update_eureka_server_for_spring', supports_no_wait=True)
g.custom_show_command('show', 'show_eureka_server_for_spring')
g.custom_command('delete', 'delete_eureka_server_for_spring', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp env java-component config-server-for-spring') as g:
g.custom_command('create', 'create_config_server_for_spring', supports_no_wait=True)
g.custom_command('update', 'update_config_server_for_spring', supports_no_wait=True)
g.custom_show_command('show', 'show_config_server_for_spring')
g.custom_command('delete', 'delete_config_server_for_spring', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp env java-component eureka-server-for-spring') as g:
g.custom_command('create', 'create_eureka_server_for_spring', supports_no_wait=True)
g.custom_command('update', 'update_eureka_server_for_spring', supports_no_wait=True)
g.custom_show_command('show', 'show_eureka_server_for_spring')
g.custom_command('delete', 'delete_eureka_server_for_spring', confirmation=True, supports_no_wait=True)
16 changes: 8 additions & 8 deletions src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2295,35 +2295,35 @@ def update_java_component(cmd, java_component_name, environment_name, resource_g
return java_component_decorator.update()


def create_spring_cloud_config(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
def create_config_server_for_spring(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
return create_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_CONFIG, configuration, no_wait)


def update_spring_cloud_config(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
def update_config_server_for_spring(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
return update_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_CONFIG, configuration, no_wait)


def show_spring_cloud_config(cmd, java_component_name, environment_name, resource_group_name):
def show_config_server_for_spring(cmd, java_component_name, environment_name, resource_group_name):
return show_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_CONFIG)


def delete_spring_cloud_config(cmd, java_component_name, environment_name, resource_group_name, no_wait=False):
def delete_config_server_for_spring(cmd, java_component_name, environment_name, resource_group_name, no_wait=False):
return delete_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_CONFIG, no_wait)


def create_spring_cloud_eureka(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
def create_eureka_server_for_spring(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
return create_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_EUREKA, configuration, no_wait)


def update_spring_cloud_eureka(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
def update_eureka_server_for_spring(cmd, java_component_name, environment_name, resource_group_name, configuration=None, no_wait=False):
return update_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_EUREKA, configuration, no_wait)


def show_spring_cloud_eureka(cmd, java_component_name, environment_name, resource_group_name):
def show_eureka_server_for_spring(cmd, java_component_name, environment_name, resource_group_name):
return show_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_EUREKA)


def delete_spring_cloud_eureka(cmd, java_component_name, environment_name, resource_group_name, no_wait=False):
def delete_eureka_server_for_spring(cmd, java_component_name, environment_name, resource_group_name, no_wait=False):
return delete_java_component(cmd, java_component_name, environment_name, resource_group_name, JAVA_COMPONENT_EUREKA, no_wait)


Expand Down
Loading

0 comments on commit 4b6912b

Please sign in to comment.