diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-05-21 21:07:50 -0700 |
---|---|---|
committer | Edward MacGillivray <edward.s.macgillivray@intel.com> | 2017-07-13 16:34:24 -0700 |
commit | 7a32c18b2fb3f220f099218871ba29115ef31ee9 (patch) | |
tree | 3e87b12bdbd030a43bbd849aee4f231b699768a5 /yardstick/benchmark/contexts/model.py | |
parent | 49d358550209ab39bf618d8b226f655a0b54d13f (diff) |
add network info to topology
we need to know which network each port is connected to
so we can find VLAN or VXLAN ID.
To do this we implement a new method for Contexts,
Context.get_network(). This method is similar to
Context.get_server(), it searches for a given
network name in all the contexts.
From this we generate a context_cfg["networks"]
dict that stores all the network info for the nodes
in the scenario.
Then when we generate the topology for VNFD, we can
lookup a given network by the vld_id and get the
network_type, segmentation_id, etc.
Then if we need to for example generated
traffic on a given VLAN or VXLAN, we have this
info available.
Define default nd_route_tbl for ACL VNF
we need default empty nd_route_tbl for IPv6 route.
Change-Id: I9f9cfbd6acabeb4ae4675ca7354390efa57b29e7
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Diffstat (limited to 'yardstick/benchmark/contexts/model.py')
-rw-r--r-- | yardstick/benchmark/contexts/model.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py index 5077a9786..06538d8a9 100644 --- a/yardstick/benchmark/contexts/model.py +++ b/yardstick/benchmark/contexts/model.py @@ -106,13 +106,14 @@ class Network(Object): self.subnet_cidr = attrs.get('cidr', '10.0.1.0/24') self.router = None self.physical_network = attrs.get('physical_network', 'physnet1') - self.provider = attrs.get('provider', None) - self.segmentation_id = attrs.get('segmentation_id', None) + self.provider = attrs.get('provider') + self.segmentation_id = attrs.get('segmentation_id') + self.network_type = attrs.get('network_type') if "external_network" in attrs: self.router = Router("router", self.name, context, attrs["external_network"]) - self.vld_id = attrs.get("vld_id", "") + self.vld_id = attrs.get("vld_id") Network.list.append(self) |