Merge "Add --hwlb options as a command line argument for SampleVNF"
[yardstick.git] / yardstick / network_services / traffic_profile / rfc2544.py
index 3dc08df..83020c8 100644 (file)
@@ -21,7 +21,7 @@ from trex_stl_lib.trex_stl_client import STLStream
 from trex_stl_lib.trex_stl_streams import STLFlowLatencyStats
 from trex_stl_lib.trex_stl_streams import STLTXCont
 
-from yardstick.network_services.traffic_profile.traffic_profile \
+from yardstick.network_services.traffic_profile.trex_traffic_profile \
     import TrexProfile
 
 LOGGING = logging.getLogger(__name__)
@@ -58,10 +58,11 @@ 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)
+                port = self.generator.port_num(intf)
                 self.ports.append(port)
                 self.generator.client.add_streams(self.get_streams(profile_data), ports=port)
 
@@ -165,10 +166,11 @@ 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)
+                port = self.generator.port_num(intf)
                 self.ports.append(port)
                 self.generator.client.add_streams(self.get_streams(profile_data), ports=port)