aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-12 09:57:38 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-19 07:42:43 -0700
commit9b0b8ae33541c0ad8925521b1c3f1bc559fefbe6 (patch)
tree24c3e5279786bd0ccf9816e9d1076d067b6cee43 /yardstick/network_services/traffic_profile
parent51ecde958cbaaedcb443bd7845eb1da9a1c013af (diff)
NSB: count from 0, vnf_0, tg_9, private->uplink, public->downlink
Also rename private to uplink, public to downlink for scale-out template we need to count from 0 so we can use range() without +1/-1 errors vnf_0, vnf_1 tg_0, tg_1 also fix Ixia defaults Change-Id: I6aecfbb95f99af20f012a9df19c19be77d1b5b77 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Diffstat (limited to 'yardstick/network_services/traffic_profile')
-rw-r--r--yardstick/network_services/traffic_profile/base.py2
-rw-r--r--yardstick/network_services/traffic_profile/ixia_rfc2544.py4
-rw-r--r--yardstick/network_services/traffic_profile/rfc2544.py6
3 files changed, 8 insertions, 4 deletions
diff --git a/yardstick/network_services/traffic_profile/base.py b/yardstick/network_services/traffic_profile/base.py
index 611792b94..ad256b444 100644
--- a/yardstick/network_services/traffic_profile/base.py
+++ b/yardstick/network_services/traffic_profile/base.py
@@ -22,6 +22,8 @@ class TrafficProfile(object):
This class defines the behavior
"""
+ UPLINK = "uplink"
+ DOWNLINK = "downlink"
@staticmethod
def get(tp_config):
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
index 049a81a65..cb8a34796 100644
--- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py
+++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
@@ -78,7 +78,7 @@ class IXIARFC2544Profile(TrexProfile):
def _ixia_traffic_generate(self, traffic_generator, traffic, ixia_obj):
for key, value in traffic.items():
- if "public" in key or "private" in key:
+ if key.startswith((self.UPLINK, self.DOWNLINK)):
value["iload"] = str(self.rate)
ixia_obj.ix_update_frame(traffic)
ixia_obj.ix_update_ether(traffic)
@@ -90,7 +90,7 @@ class IXIARFC2544Profile(TrexProfile):
def update_traffic_profile(self, traffic_generator):
def port_generator():
for vld_id, intfs in sorted(traffic_generator.networks.items()):
- if not vld_id.startswith(("private", "public")):
+ if not vld_id.startswith((self.UPLINK, self.DOWNLINK)):
continue
profile_data = self.params.get(vld_id)
if not profile_data:
diff --git a/yardstick/network_services/traffic_profile/rfc2544.py b/yardstick/network_services/traffic_profile/rfc2544.py
index 3dc08df69..16e809b65 100644
--- a/yardstick/network_services/traffic_profile/rfc2544.py
+++ b/yardstick/network_services/traffic_profile/rfc2544.py
@@ -58,7 +58,8 @@ class RFC2544Profile(TrexProfile):
if not profile_data:
continue
# correlated traffic doesn't use public traffic?
- if vld_id.startswith("public") and self.generator.rfc2544_helper.correlated_traffic:
+ if vld_id.startswith(self.DOWNLINK) and \
+ self.generator.rfc2544_helper.correlated_traffic:
continue
for intf in intfs:
port = self.generator.vnfd_helper.port_num(intf)
@@ -165,7 +166,8 @@ class RFC2544Profile(TrexProfile):
if not profile_data:
continue
# correlated traffic doesn't use public traffic?
- if vld_id.startswith("public") and self.generator.rfc2544_helper.correlated_traffic:
+ if vld_id.startswith(self.DOWNLINK) and \
+ self.generator.rfc2544_helper.correlated_traffic:
continue
for intf in intfs:
port = self.generator.vnfd_helper.port_num(intf)