Code Review
/
nfvbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
2.0 beta NFVBENCH-91 Allow multi-chaining with separate edge networks
[nfvbench.git]
/
nfvbench
/
specs.py
diff --git
a/nfvbench/specs.py
b/nfvbench/specs.py
index
3f93df6
..
75fe703
100644
(file)
--- a/
nfvbench/specs.py
+++ b/
nfvbench/specs.py
@@
-17,11
+17,12
@@
class Encaps(object):
VLAN = "VLAN"
VxLAN = "VxLAN"
class Encaps(object):
VLAN = "VLAN"
VxLAN = "VxLAN"
-
BASIC = "BASIC
"
+
NO_ENCAPS = "NONE
"
encaps_mapping = {
'VLAN': VLAN,
encaps_mapping = {
'VLAN': VLAN,
- 'VXLAN': VxLAN
+ 'VXLAN': VxLAN,
+ 'NONE': NO_ENCAPS
}
@classmethod
}
@classmethod
@@
-30,26
+31,16
@@
class Encaps(object):
class ChainType(object):
class ChainType(object):
- PVP = "PVP"
- PVVP = "PVVP"
- EXT = "EXT"
-
- chain_mapping = {
- 'PVP': PVP,
- 'PVVP': PVVP,
- 'EXT': EXT
- }
-
- @classmethod
- def get_chain_type(cls, chain):
- return cls.chain_mapping.get(chain.upper(), None)
+ PVP = "PVP"
+ PVVP = "PVVP"
+ EXT = "EXT"
+ names = [EXT, PVP, PVVP]
class OpenStackSpec(object):
class OpenStackSpec(object):
-
def __init__(self):
self.__vswitch = "BASIC"
def __init__(self):
self.__vswitch = "BASIC"
- self.__encaps = Encaps.
BASIC
+ self.__encaps = Encaps.
NO_ENCAPS
@property
def vswitch(self):
@property
def vswitch(self):
@@
-75,13
+66,12
@@
class OpenStackSpec(object):
class RunSpec(object):
class RunSpec(object):
-
def __init__(self, no_vswitch_access, openstack_spec):
def __init__(self, no_vswitch_access, openstack_spec):
- self.use_vswitch = (not no_vswitch_access) and openstack_spec.vswitch != "BASIC"
+ self.use_vswitch = (not no_vswitch_access) and openstack_spec \
+ and openstack_spec.vswitch != "BASIC"
class Specs(object):
class Specs(object):
-
def __init__(self):
self.openstack = None
self.run_spec = None
def __init__(self):
self.openstack = None
self.run_spec = None