Skip to content

Commit

Permalink
CLI GEN-1 merged
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
  • Loading branch information
vivekrnv committed Aug 11, 2021
1 parent 4e9a2a2 commit 7be9ee4
Show file tree
Hide file tree
Showing 31 changed files with 3,575 additions and 2 deletions.
Empty file added clear/plugins/auto/__init__.py
Empty file.
Empty file added config/plugins/auto/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def run_tests(self):
'acl_loader',
'clear',
'clear.plugins',
'clear.plugins.auto',
'config',
'config.plugins',
'config.plugins.auto',
'connect',
'consutil',
'counterpoll',
Expand All @@ -58,6 +60,7 @@ def run_tests(self):
'show',
'show.interfaces',
'show.plugins',
'show.plugins.auto',
'sonic_installer',
'sonic_installer.bootloader',
'sonic_package_manager',
Expand All @@ -66,6 +69,7 @@ def run_tests(self):
'undebug',
'utilities_common',
'watchdogutil',
'sonic_cli_gen',
],
package_data={
'show': ['aliases.ini'],
Expand Down Expand Up @@ -174,6 +178,7 @@ def run_tests(self):
'spm = sonic_package_manager.main:cli',
'undebug = undebug.main:cli',
'watchdogutil = watchdogutil.main:watchdogutil',
'sonic-cli-gen = sonic_cli_gen.main:cli',
]
},
install_requires=[
Expand Down
Empty file added show/plugins/auto/__init__.py
Empty file.
8 changes: 8 additions & 0 deletions sonic-utilities-data/bash_completion.d/sonic-cli-gen
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_sonic_cli_gen_completion() {
COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
_SONIC_CLI_GEN_COMPLETE=complete $1 ) )
return 0
}

complete -F _sonic_cli_gen_completion -o default sonic-cli-gen;
5 changes: 3 additions & 2 deletions sonic-utilities-data/debian/install
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bash_completion.d/ /etc/
templates/*.j2 /usr/share/sonic/templates/
bash_completion.d/ /etc/
templates/*.j2 /usr/share/sonic/templates/
templates/sonic-cli-gen/*.j2 /usr/share/sonic/templates/sonic-cli-gen/
3 changes: 3 additions & 0 deletions sonic-utilities-data/templates/sonic-cli-gen/common.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% macro cli_name(name) -%}
{{ name|lower|replace("_", "-") }}
{%- endmacro %}
Loading

0 comments on commit 7be9ee4

Please sign in to comment.