aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_objects.py
diff options
context:
space:
mode:
authorSarath Kumar <sarath.kutty@bigswitch.com>2016-09-23 15:56:30 -0700
committerSarath Kumar <sarath.kutty@bigswitch.com>2016-09-27 11:12:37 -0700
commit08590fc1a733a7f35958516f90258f1123791f06 (patch)
treead51f97bc312623e5a35faf797468cad2fac4786 /os_net_config/tests/test_objects.py
parent35823f261506f9256c1a227dd4a2770a0508c62d (diff)
Add options attribute to NFVSwitch
Adding options to NFVSwitch type bridge will give flexibility and avoid specific attributes like 'cpus' in the yaml file (which will now be moved into the options) Change-Id: I4d715b641c54de969b9195b1a4b16195b2d7e595
Diffstat (limited to 'os_net_config/tests/test_objects.py')
-rw-r--r--os_net_config/tests/test_objects.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/os_net_config/tests/test_objects.py b/os_net_config/tests/test_objects.py
index 26b16ad..7500392 100644
--- a/os_net_config/tests/test_objects.py
+++ b/os_net_config/tests/test_objects.py
@@ -407,7 +407,7 @@ class TestNfvswitchBridge(base.TestCase):
def test_from_json(self):
data = """{
"type": "nfvswitch_bridge",
-"cpus": "2,3,4,5",
+"options": "-c 2,3,4,5",
"members": [
{"type": "interface","name": "nic1"},
{"type": "interface","name": "nic2"}
@@ -416,7 +416,7 @@ class TestNfvswitchBridge(base.TestCase):
"""
bridge = objects.object_from_json(json.loads(data))
self.assertEqual("nfvswitch", bridge.name)
- self.assertEqual("2,3,4,5", bridge.cpus)
+ self.assertEqual("-c 2,3,4,5", bridge.options)
interface1 = bridge.members[0]
self.assertEqual("nic1", interface1.name)
self.assertEqual(False, interface1.ovs_port)
@@ -431,7 +431,7 @@ class TestNfvswitchInterface(base.TestCase):
def test_nfvswitch_internal_from_json(self):
data = """{
"type": "nfvswitch_bridge",
-"cpus": "2,3,4,5",
+"options": "-c 2,3,4,5",
"members": [
{"type": "nfvswitch_internal", "name": "storage", "vlan_id": 202},
{"type": "nfvswitch_internal", "name": "api", "vlan_id": 201}
@@ -440,7 +440,7 @@ class TestNfvswitchInterface(base.TestCase):
"""
bridge = objects.object_from_json(json.loads(data))
self.assertEqual("nfvswitch", bridge.name)
- self.assertEqual("2,3,4,5", bridge.cpus)
+ self.assertEqual("-c 2,3,4,5", bridge.options)
interface1 = bridge.members[0]
self.assertEqual("storage202", interface1.name)
interface2 = bridge.members[1]
@@ -451,7 +451,7 @@ class TestNfvswitchInterface(base.TestCase):
def test_bond_interface_from_json(self):
data = """{
"type": "nfvswitch_bridge",
-"cpus": "2,3,4,5",
+"options": "-c 2,3,4,5",
"members": [{
"type": "linux_bond", "name": "bond1", "members":
[{"type": "interface", "name": "nic2"},