Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def add_source_resource_block(context, source, enable_id=True, validate_source_i
required_args = []
for arg, content in SOURCE_RESOURCES_PARAMS.get(source).items():
id_arg = '\'--id\'' if enable_id else '\'--source-id\''
context.argument(arg, options_list=content.get('options'), type=str,
context.argument(arg, configured_default=content.get('configured_default'),
options_list=content.get('options'), type=str,
help='{}. Required if {} is not specified.'.format(content.get('help'), id_arg))
required_args.append(content.get('options')[0])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,13 @@ class CLIENT_TYPE(Enum):
SOURCE_RESOURCES_PARAMS = {
RESOURCE.WebApp: {
'source_resource_group': {
'configured_default': 'group',
'options': ['--resource-group', '-g'],
'help': 'The resource group which contains the webapp',
'placeholder': 'WebAppRG'
},
'site': {
'configured_default': 'web',
'options': ['--name', '-n'],
'help': 'Name of the webapp',
'placeholder': 'MyWebApp'
Expand Down Expand Up @@ -300,6 +302,7 @@ class CLIENT_TYPE(Enum):
'placeholder': 'SqlRG'
},
'server': {
'configured_default': 'sql-server',
'options': ['--server'],
'help': 'Name of the sql server',
'placeholder': 'MyServer'
Expand Down Expand Up @@ -936,6 +939,7 @@ class CLIENT_TYPE(Enum):
CLIENT_TYPE.Nodejs,
CLIENT_TYPE.Go,
CLIENT_TYPE.SpringBoot,
CLIENT_TYPE.KafkaSpringBoot,
CLIENT_TYPE.Blank
],
RESOURCE.ServiceBus: [
Expand Down Expand Up @@ -970,10 +974,6 @@ class CLIENT_TYPE(Enum):
}

SUPPORTED_CLIENT_TYPE[RESOURCE.SpringCloud] = SUPPORTED_CLIENT_TYPE[RESOURCE.WebApp]
SUPPORTED_CLIENT_TYPE[RESOURCE.SpringCloud][RESOURCE.EventHub].append(
CLIENT_TYPE.KafkaSpringBoot)
SUPPORTED_CLIENT_TYPE[RESOURCE.SpringCloudDeprecated] = SUPPORTED_CLIENT_TYPE[RESOURCE.WebApp]
SUPPORTED_CLIENT_TYPE[RESOURCE.SpringCloudDeprecated][RESOURCE.EventHub].append(
CLIENT_TYPE.KafkaSpringBoot)
SUPPORTED_CLIENT_TYPE[RESOURCE.KubernetesCluster] = SUPPORTED_CLIENT_TYPE[RESOURCE.WebApp]
SUPPORTED_CLIENT_TYPE[RESOURCE.ContainerApp] = SUPPORTED_CLIENT_TYPE[RESOURCE.WebApp]