Skip to content

CLI skeletion for VLAN feature: config, show and its templates #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 25, 2019
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
6 changes: 6 additions & 0 deletions src/CLI/actioner/sonic-cli-if.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def call_method(name, args):

def generate_body(func, args):
body = None
keypath = []
# Get the rules of all ACL table entries.
if func.__name__ == 'patch_openconfig_interfaces_interfaces_interface_config_description':
keypath = [ args[0] ]
Expand Down Expand Up @@ -98,6 +99,11 @@ def run(func, args):
keypath, body = generate_body(func, args)

try:
# Temporary code for #show vlan command with dummy data
if func.__name__ == "get_openconfig_vlan_interfaces_interface_ethernet_switched_vlan_state":
api_response = {'Vlan100': {'Ethernet20': 'tagged', 'Ethernet40': 'untagged'}}
show_cli_output(args[0], api_response)
return
if body is not None:
api_response = getattr(aa,func.__name__)(*keypath, body=body)
else :
Expand Down
Loading