Skip to content

Commit

Permalink
Fix typo in option group shortcut 'aGENT' in NEC plugin
Browse files Browse the repository at this point in the history
Also adds a test to check if option group shortcuts work.

Fix bug #1183576

Change-Id: Ib2843f2b2b4e35964fb4bb5280fda8f5c9e2ba0c
  • Loading branch information
amotoki committed May 23, 2013
1 parent ee4b047 commit f0e38f4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion quantum/plugins/nec/common/config.py
Expand Up @@ -61,5 +61,5 @@
# shortcuts
CONF = cfg.CONF
OVS = cfg.CONF.ovs
aGENT = cfg.CONF.AGENT
AGENT = cfg.CONF.AGENT
OFC = cfg.CONF.OFC
13 changes: 11 additions & 2 deletions quantum/tests/unit/nec/test_config.py
Expand Up @@ -23,12 +23,21 @@ class ConfigurationTest(base.BaseTestCase):

def test_defaults(self):
self.assertEqual('br-int', config.CONF.ovs.integration_bridge)

self.assertEqual(2, config.CONF.AGENT.polling_interval)
self.assertEqual('sudo', config.CONF.AGENT.root_helper)

self.assertEqual('127.0.0.1', config.CONF.OFC.host)
self.assertEqual('8888', config.CONF.OFC.port)
self.assertEqual('trema', config.CONF.OFC.driver)
self.assertTrue(config.CONF.OFC.enable_packet_filter)
self.assertFalse(config.CONF.OFC.use_ssl)
self.assertEqual(None, config.CONF.OFC.key_file)
self.assertEqual(None, config.CONF.OFC.cert_file)
self.assertIsNone(config.CONF.OFC.key_file)
self.assertIsNone(config.CONF.OFC.cert_file)

def test_shortcuts(self):
self.assertEqual(config.CONF.ovs.integration_bridge,
config.OVS.integration_bridge)
self.assertEqual(config.CONF.AGENT.polling_interval,
config.AGENT.polling_interval)
self.assertEqual(config.CONF.OFC.host, config.OFC.host)

0 comments on commit f0e38f4

Please sign in to comment.