~ubuntu-branches/ubuntu/vivid/neutron/vivid-updates

« back to all changes in this revision

Viewing changes to neutron/tests/unit/sriovnicagent/test_eswitch_manager.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:17:19 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20150330111719-h0gx7233p4jkkgfh
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: Align version requirements with upstream.
  - d/control: Add new dependency on oslo-log.
  - d/p/*: Rebase.
  - d/control,d/neutron-plugin-hyperv*: Dropped, decomposed into
    separate project upstream.
  - d/control,d/neutron-plugin-openflow*: Dropped, decomposed into
    separate project upstream.
  - d/neutron-common.install: Add neutron-rootwrap-daemon and 
    neutron-keepalived-state-change binaries.
  - d/rules: Ignore neutron-hyperv-agent when installing; only for Windows.
  - d/neutron-plugin-cisco.install: Drop neutron-cisco-cfg-agent as
    decomposed into separate project upstream.
  - d/neutron-plugin-vmware.install: Drop neutron-check-nsx-config and
    neutron-nsx-manage as decomposed into separate project upstream.
  - d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent.
* d/pydist-overrides: Add overrides for oslo packages.
* d/control: Fixup type in package description (LP: #1263539).
* d/p/fixup-driver-test-execution.patch: Cherry pick fix from upstream VCS
  to support unit test exection in out-of-tree vendor drivers.
* d/neutron-common.postinst: Allow general access to /etc/neutron but limit
  access to root/neutron to /etc/neutron/neutron.conf to support execution
  of unit tests in decomposed vendor drivers.
* d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                       return_value=True)):
45
45
 
46
46
            with testtools.ExpectedException(exc.InvalidDeviceError):
47
 
                esm.ESwitchManager(device_mappings, None, None)
 
47
                esm.ESwitchManager(device_mappings, None)
48
48
 
49
49
    def test_create_eswitch_mgr_ok(self):
50
50
        device_mappings = {'physnet1': 'p6p1'}
56
56
                       "PciOsWrapper.is_assigned_vf",
57
57
                       return_value=True)):
58
58
 
59
 
            esm.ESwitchManager(device_mappings, None, None)
 
59
            esm.ESwitchManager(device_mappings, None)
60
60
 
61
61
 
62
62
class TestESwitchManagerApi(base.BaseTestCase):
79
79
            mock.patch("neutron.plugins.sriovnicagent.eswitch_manager."
80
80
                       "PciOsWrapper.is_assigned_vf",
81
81
                       return_value=True)):
82
 
            self.eswitch_mgr = esm.ESwitchManager(device_mappings, None, None)
 
82
            self.eswitch_mgr = esm.ESwitchManager(device_mappings, None)
83
83
 
84
84
    def test_get_assigned_devices(self):
85
85
        with mock.patch("neutron.plugins.sriovnicagent.eswitch_manager."
206
206
                        "PciOsWrapper.scan_vf_devices",
207
207
                        return_value=self.SCANNED_DEVICES):
208
208
            self.emb_switch = esm.EmbSwitch(self.PHYS_NET, self.DEV_NAME,
209
 
                                            exclude_devices, None)
 
209
                                            exclude_devices)
210
210
 
211
211
    def test_get_assigned_devices(self):
212
212
        with contextlib.nested(