Skip to content
Open
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 @@ -388,9 +388,9 @@ def load_arguments(self, _):
c.argument('slot', options_list=['--slot', '-s'], help='Name of the web app slot. Default to the productions slot if not specified.')

with self.argument_context('webapp list-runtimes') as c:
c.argument('linux', action='store_true', help='list runtime stacks for linux based web apps', deprecate_info=c.deprecate(redirect="--os-type"))
c.argument('os_type', options_list=["--os", "--os-type"], help="limit the output to just windows or linux runtimes", arg_type=get_enum_type([LINUX_OS_NAME, WINDOWS_OS_NAME]))
c.argument('show_runtime_details', action='store_true', help="show detailed versions of runtime stacks")
c.argument('runtime', options_list=["--runtime"], help="limit the output to a specific runtime family", arg_type=get_enum_type(['dotnet', 'node', 'php', 'python', 'java']))
c.argument('support', options_list=["--support"], help="filter by support lifecycle status. Default: supported", arg_type=get_enum_type(['supported', 'active', 'near', 'eol', 'all']))

with self.argument_context('functionapp list-runtimes') as c:
c.argument('os_type', options_list=["--os", "--os-type"], help="limit the output to just windows or linux runtimes", arg_type=get_enum_type([LINUX_OS_NAME, WINDOWS_OS_NAME]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ def transform_web_list_output(webs):
return [transform_web_output(w) for w in webs]


def transform_runtime_list_output(result):
from collections import OrderedDict
return [OrderedDict([
('OS', r['os']), ('Runtime', r['runtime']), ('Version', r['version']),
('Config', r['config']), ('Support', r['support']), ('End of Life', r['end_of_life'])
]) for r in result]


def ex_handler_factory(creating_plan=False):
def _ex_handler(ex):
ex = _polish_bad_errors(ex, creating_plan)
Expand Down Expand Up @@ -133,7 +141,7 @@ def load_command_table(self, _):
g.custom_command('restart', 'restart_webapp')
g.custom_command('browse', 'view_in_browser')
g.custom_command('list-instances', 'list_instances')
g.custom_command('list-runtimes', 'list_runtimes')
g.custom_command('list-runtimes', 'list_runtimes', table_transformer=transform_runtime_list_output)
g.custom_command('identity assign', 'assign_identity')
g.custom_show_command('identity show', 'show_identity')
g.custom_command('identity remove', 'remove_identity')
Expand Down
Loading