Issue 46477 Fix Module onyx interface for supporting new json changes (#46494)

Signed-off-by: Anas Badaha <anasb@mellanox.com>
pull/47979/head
anasbadaha 6 years ago committed by Ganesh Nalawade
parent ec48e854c9
commit e8d6645c54

@ -81,7 +81,7 @@ EXAMPLES = """
onyx_interface: onyx_interface:
name: Eth1/2 name: Eth1/2
description: test-interface description: test-interface
speed: 100 GB speed: 100G
mtu: 512 mtu: 512
- name: make interface up - name: make interface up
@ -346,9 +346,12 @@ class OnyxInterfaceModule(BaseOnyxModule):
self._current_config[if_name] = self._create_if_data( self._current_config[if_name] = self._create_if_data(
if_name, if_data) if_name, if_data)
else: else:
if_data = dict()
for if_config in config: for if_config in config:
for if_name, if_data in iteritems(if_config): for if_name, if_attr in iteritems(if_config):
if_data = if_data[0] for config in if_attr:
for key, value in iteritems(config):
if_data[key] = value
self._current_config[if_name] = self._create_if_data( self._current_config[if_name] = self._create_if_data(
if_name, if_data) if_name, if_data)

Loading…
Cancel
Save