Skip to content

Commit 1e06004

Browse files
authored
Merge pull request #129 from project-arlo/vlan_cli_skeleton
CLI skeletion for VLAN feature: config, show and its templates
2 parents 840510e + d5d6b80 commit 1e06004

File tree

3 files changed

+309
-89
lines changed

3 files changed

+309
-89
lines changed

src/CLI/actioner/sonic-cli-if.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def call_method(name, args):
4444

4545
def generate_body(func, args):
4646
body = None
47+
keypath = []
4748
# Get the rules of all ACL table entries.
4849
if func.__name__ == 'patch_openconfig_interfaces_interfaces_interface_config_description':
4950
keypath = [ args[0] ]
@@ -98,6 +99,11 @@ def run(func, args):
9899
keypath, body = generate_body(func, args)
99100

100101
try:
102+
# Temporary code for #show vlan command with dummy data
103+
if func.__name__ == "get_openconfig_vlan_interfaces_interface_ethernet_switched_vlan_state":
104+
api_response = {'Vlan100': {'Ethernet20': 'tagged', 'Ethernet40': 'untagged'}}
105+
show_cli_output(args[0], api_response)
106+
return
101107
if body is not None:
102108
api_response = getattr(aa,func.__name__)(*keypath, body=body)
103109
else :

0 commit comments

Comments
 (0)