issue:37306 Fix issue with vlan support for onyx version 3.6.6000 (#37310)

* issue:37306 Fix issue with vlan support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
This commit is contained in:
Samer Deeb 2018-03-20 03:08:35 -07:00 committed by John R Barker
parent 6308047dc9
commit a89bafce2e
3 changed files with 20 additions and 2 deletions

View file

@ -140,18 +140,24 @@ def get_interfaces_config(module, interface_type, flags=None, json_fmt=True):
return show_cmd(module, cmd, json_fmt)
def show_version(module):
return show_cmd(module, "show version")
def get_bgp_summary(module):
cmd = "show running-config protocol bgp"
return show_cmd(module, cmd, json_fmt=False, fail_on_error=False)
class BaseOnyxModule(object):
ONYX_API_VERSION = "3.6.6000"
def __init__(self):
self._module = None
self._commands = list()
self._current_config = None
self._required_config = None
self._os_version = None
def init_module(self):
pass
@ -162,6 +168,11 @@ class BaseOnyxModule(object):
def get_required_config(self):
pass
def _get_os_version(self):
version_data = show_version(self._module)
return self.get_config_attr(
version_data, "Product release")
# pylint: disable=unused-argument
def check_declarative_intent_params(self, result):
return None