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

« back to all changes in this revision

Viewing changes to neutron/tests/unit/hyperv/test_hyperv_neutron_agent.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:
19
19
"""
20
20
 
21
21
import mock
22
 
from oslo.config import cfg
 
22
from oslo_config import cfg
23
23
 
24
24
from neutron.plugins.hyperv.agent import hyperv_neutron_agent
25
25
from neutron.plugins.hyperv.agent import utilsfactory
56
56
        self.agent = hyperv_neutron_agent.HyperVNeutronAgent()
57
57
        self.agent.plugin_rpc = mock.Mock()
58
58
        self.agent.sec_groups_agent = mock.MagicMock()
 
59
        self.agent.sg_plugin_rpc = mock.Mock()
59
60
        self.agent.context = mock.Mock()
60
61
        self.agent.agent_id = mock.Mock()
61
62
 
68
69
            'start_flag': True}
69
70
        self.agent_state = fake_agent_state
70
71
 
 
72
    def test_use_enhanced_rpc(self):
 
73
        self.agent.sec_groups_agent = hyperv_neutron_agent.HyperVSecurityAgent(
 
74
            self.agent.context, self.agent.sg_plugin_rpc)
 
75
        self.assertFalse(self.agent.sec_groups_agent.use_enhanced_rpc)
 
76
 
71
77
    def test_port_bound_enable_metrics(self):
72
78
        cfg.CONF.set_override('enable_metrics_collection', True, 'AGENT')
73
79
        self._test_port_bound(True)