driver test are failing

Bug #1833634 reported by norman shen on 2019-06-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Networking ML2 Generic Switch
Undecided
norman shen

Bug Description

(py27) root@ecs-2019616124656:~/networking-generic-switch# python -munittest networking_generic_switch.tests.unit.netmiko.test_cisco3000
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/unittest/__main__.py", line 12, in <module>
    main(module=None)
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_cisco3000'
(py27) root@ecs-2019616124656:~/networking-generic-switch# python -munittest networking_generic_switch.tests.unit.netmiko.test_cisco_300
EEEEEE
======================================================================
ERROR: test__format_commands (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_add_network (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_constants (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_del_network (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_delete_port (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_plug_port_to_network (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

----------------------------------------------------------------------
Ran 6 tests in 0.002s

FAILED (errors=6)
(py27) root@ecs-2019616124656:~/networking-generic-switch# python -munittest networking_generic_switch.tests.unit.netmiko.test_cisco_300

EEEEEE
======================================================================
ERROR: test__format_commands (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_add_network (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_constants (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_del_network (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_delete_port (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

======================================================================
ERROR: test_plug_port_to_network (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
    self.switch = self._make_switch_device()
  File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py", line 25, in _make_switch_device
    return cisco.Cisco300(device_cfg)
  File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
    if CONF.ngs_coordination.backend_url:
  File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

norman shen (jshen28) wrote :

it does report any problem running from parent directory because cfg.CONF is a global variable.

Changed in networking-generic-switch:
assignee: nobody → norman shen (jshen28)
norman shen (jshen28) wrote :
Download full text (139.4 KiB)

{1} networking_generic_switch.tests.unit.netmiko.test_arista_eos.TestNetmikoAristaEos.test__format_commands [0.000207s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
        self.switch = self._make_switch_device()
      File "networking_generic_switch/tests/unit/netmiko/test_arista_eos.py", line 25, in _make_switch_device
        return arista.AristaEos(device_cfg)
      File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
        if CONF.ngs_coordination.backend_url:
      File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
        raise NoSuchOptError(name)
    oslo_config.cfg.NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

{1} networking_generic_switch.tests.unit.netmiko.test_arista_eos.TestNetmikoAristaEos.test_add_network [0.000121s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
        self.switch = self._make_switch_device()
      File "networking_generic_switch/tests/unit/netmiko/test_arista_eos.py", line 25, in _make_switch_device
        return arista.AristaEos(device_cfg)
      File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
        if CONF.ngs_coordination.backend_url:
      File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
        raise NoSuchOptError(name)
    oslo_config.cfg.NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

{1} networking_generic_switch.tests.unit.netmiko.test_arista_eos.TestNetmikoAristaEos.test_constants [0.000113s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
        self.switch = self._make_switch_device()
      File "networking_generic_switch/tests/unit/netmiko/test_arista_eos.py", line 25, in _make_switch_device
        return arista.AristaEos(device_cfg)
      File "networking_generic_switch/devices/netmiko_devices/__init__.py", line 62, in __init__
        if CONF.ngs_coordination.backend_url:
      File "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2519, in __getattr__
        raise NoSuchOptError(name)
    oslo_config.cfg.NoSuchOptError: no such option ngs_coordination in group [DEFAULT]

{1} networking_generic_switch.tests.unit.netmiko.test_arista_eos.TestNetmikoAristaEos.test_del_network [0.000113s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line 32, in setUp
        self.switch = self._make_switch_device()
      File "networking_generic_switch/tests/unit/netmiko/test_arista_eos.py", line 25, in _make_switch_devic...

description: updated
norman shen (jshen28) wrote :

above result is obtained by running

`stestr run --test-path networking_generic_switch/tests/unit/netmiko/`

Mark Goddard (mgoddard) wrote :

Can you reproduce using tox? That is how we run tests.

Download full text (13.9 KiB)

Hi,

No, I cannot reproduce it with tox. But sometimes I think I would like to
debug code with IDE, that's when things go wrong.

On Fri, Jun 21, 2019 at 4:46 PM Mark Goddard <email address hidden> wrote:

> Can you reproduce using tox? That is how we run tests.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1833634
>
> Title:
> driver test are failing
>
> Status in Networking ML2 Generic Switch :
> New
>
> Bug description:
>
> (py27) root@ecs-2019616124656:~/networking-generic-switch# python
> -munittest networking_generic_switch.tests.unit.netmiko.test_cisco3000
> Traceback (most recent call last):
> File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
> "__main__", fname, loader, pkg_name)
> File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
> exec code in run_globals
> File "/usr/lib/python2.7/unittest/__main__.py", line 12, in <module>
> main(module=None)
> File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
> self.parseArgs(argv)
> File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
> self.createTests()
> File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
> self.module)
> File "/usr/lib/python2.7/unittest/loader.py", line 130, in
> loadTestsFromNames
> suites = [self.loadTestsFromName(name, module) for name in names]
> File "/usr/lib/python2.7/unittest/loader.py", line 100, in
> loadTestsFromName
> parent, obj = obj, getattr(obj, part)
> AttributeError: 'module' object has no attribute 'test_cisco3000'
> (py27) root@ecs-2019616124656:~/networking-generic-switch# python
> -munittest networking_generic_switch.tests.unit.netmiko.test_cisco_300
> EEEEEE
> ======================================================================
> ERROR: test__format_commands
> (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line
> 32, in setUp
> self.switch = self._make_switch_device()
> File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py",
> line 25, in _make_switch_device
> return cisco.Cisco300(device_cfg)
> File "networking_generic_switch/devices/netmiko_devices/__init__.py",
> line 62, in __init__
> if CONF.ngs_coordination.backend_url:
> File
> "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py",
> line 2519, in __getattr__
> raise NoSuchOptError(name)
> NoSuchOptError: no such option ngs_coordination in group [DEFAULT]
>
> ======================================================================
> ERROR: test_add_network
> (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "networking_generic_switch/tests/unit/netmiko/test_netmiko_base...

norman shen (jshen28) wrote :
Download full text (13.9 KiB)

and btw ostestr is deprecated according to
https://github.com/openstack/os-testr

On Fri, Jun 21, 2019 at 4:46 PM Mark Goddard <email address hidden> wrote:

> Can you reproduce using tox? That is how we run tests.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1833634
>
> Title:
> driver test are failing
>
> Status in Networking ML2 Generic Switch :
> New
>
> Bug description:
>
> (py27) root@ecs-2019616124656:~/networking-generic-switch# python
> -munittest networking_generic_switch.tests.unit.netmiko.test_cisco3000
> Traceback (most recent call last):
> File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
> "__main__", fname, loader, pkg_name)
> File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
> exec code in run_globals
> File "/usr/lib/python2.7/unittest/__main__.py", line 12, in <module>
> main(module=None)
> File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
> self.parseArgs(argv)
> File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
> self.createTests()
> File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
> self.module)
> File "/usr/lib/python2.7/unittest/loader.py", line 130, in
> loadTestsFromNames
> suites = [self.loadTestsFromName(name, module) for name in names]
> File "/usr/lib/python2.7/unittest/loader.py", line 100, in
> loadTestsFromName
> parent, obj = obj, getattr(obj, part)
> AttributeError: 'module' object has no attribute 'test_cisco3000'
> (py27) root@ecs-2019616124656:~/networking-generic-switch# python
> -munittest networking_generic_switch.tests.unit.netmiko.test_cisco_300
> EEEEEE
> ======================================================================
> ERROR: test__format_commands
> (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line
> 32, in setUp
> self.switch = self._make_switch_device()
> File "networking_generic_switch/tests/unit/netmiko/test_cisco_300.py",
> line 25, in _make_switch_device
> return cisco.Cisco300(device_cfg)
> File "networking_generic_switch/devices/netmiko_devices/__init__.py",
> line 62, in __init__
> if CONF.ngs_coordination.backend_url:
> File
> "/root/networking-generic-switch/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py",
> line 2519, in __getattr__
> raise NoSuchOptError(name)
> NoSuchOptError: no such option ngs_coordination in group [DEFAULT]
>
> ======================================================================
> ERROR: test_add_network
> (networking_generic_switch.tests.unit.netmiko.test_cisco_300.TestNetmikoCisco300)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "networking_generic_switch/tests/unit/netmiko/test_netmiko_base.py", line
> 32, in setUp
> self.switch = ...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers