aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/helpers
AgeCommit message (Collapse)AuthorFilesLines
2018-06-21Configure ACL via static fileMytnyk, Volodymyr1-110/+11
This patch allows user to configure ACL/vFW SampleVNF ACL via configuration file provided in TC definition. The Yardstick applies the rules to SampleVNF from specified config file + rules generated by Yardstick (default rules). The example of SampleVNF ACL CLI commands generated/applied by Yardstick can be found at (using default ACL config file): ACL VNF ACL CLI commands: acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml http://paste.openstack.org/show/723303/ vFW VNF ACL CLI commands: vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml http://paste.openstack.org/show/723304/ Change-Id: I76a630261a982083b628e3985fc3bec14ca495db Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-06-01Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to exceptionsRodolfo Alonso Hernandez1-12/+11
JIRA: YARDSTICK-1218 Change-Id: I804065e9bce3e728f5bf9e756a78df8fd28f74ac Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-01Convert SSH custom exceptions to Yardstick exceptionsRodolfo Alonso Hernandez1-3/+4
JIRA: YARDSTICK-1215 Change-Id: I5ecfd3dccd91b07cd8de5309dfa1a372eff16ed0 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-01NSB: move interface probe to VNF, and attempt driver-only probe firstRoss Brattain1-23/+290
If no devices are present we can't detect MAC address so we can't match Heat ports to interfaces. If only the driver is missing we can try to probe the driver using lspci. We can use lspci to ask the kernel what driver it should use for the PCI device. If we can't probe at all because the device is already bound, we can use dpkd-devind to find all the PCI address we care about and create a map with PCI device and real kernel driver. Then we can dpdk force rebind to the kernel driver. Once we have rebound to the kernel driver we can detect MAC address and all the other attributes that are required. Fix VnfSshHelper to allow override of wait timeout And a bunch of other refactors that got swept up in this JIRA: YARDSTICK-835 Change-Id: I14cb657ed289a77941d048345d06ced5b5d5da52 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-05Remove references to "dpdk_nic_bind" utilityRodolfo Alonso Hernandez1-12/+12
In DPDK 16.07 [1], "dpdk_nic_bind" utility was renamed to "dpdk-devbind". This patch removes all references to this previous naming to avoid confusions. [1] https://dpdk-guide.gitlab.io/dpdk-guide/setup/binding.html JIRA: YARDSTICK-995 Change-Id: I827c4c11c9e9e519f33f21b80459e7d65e51545e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-10-17NSB: MultiPortConfig adjust start_coreRoss Brattain1-1/+1
Change-Id: I8f4b6af898c9d3783f7b45471088a69e51c8baba Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-13Relocate iniparser to yardstick.network_services.helpersEdward MacGillivray1-0/+249
Change-Id: I1f457c9c24f2ca84dde61b64f58edaff8952670a Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-10-11Move arp route tbl to script and update defailt vnf config filesDeepak S1-12/+12
Change-Id: I8674caa15c9fc32cfacb17f558da5fb31094877e Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-09Bugfix: Update HW lb config VNF thread to start from core 1Deepak S1-0/+3
Change-Id: Ib0007fa3689b90346598baaef5c6e88d4fdf444a Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-10-03NSB PROX test hang fixesRoss Brattain1-6/+21
The PROX tests were hanging in the duration runner. These are fixes for various errors: raise error in collect_kpi if VNF is down move prox dpdk_rebind after collectd stop fix dpdk nicbind rebind to group by drivers prox: raise error in collect_kpi if the VNF is down prox: add VNF_TYPE for consistency sample_vnf: debug and fix kill_vnf pkill is not matching some executable names, add some debug process dumps and try switching back to killall until we can find the issue sample_vnf: add default timeout, so we can override default 3600 SSH timeout collect_kpi is the point at which we check the VNFs and TGs for failures or exits queues are the problem make sure we aren't silently blocking on non-empty queues by canceling join thread in subprocess fixup duration runner to close queues and other attempt to stop duration runner from hanging VnfdHelper: memoize port_num resource: fail if ssh can't connect at the end of 3600 second test our ssh connection is dead, so we can't actually stop collectd unless we reconnect fix stop() logic to ignore ssh errors Change-Id: I6c8e682a80cb9d00362e2fef4a46df080f304e55 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-02Optimize Core usage for the sampleVNFsDeepak S1-12/+8
Change-Id: I80aa7e796b9ca4c4881c78310860e293a4a75560 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-18NSB: count from 0, vnf_0, tg_9, private->uplink, public->downlinkRoss Brattain1-31/+32
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>
2017-09-14NSB: fix port topologyMartin Banszel2-123/+333
Add a new PortPair class to resolve the topology into list of public and private ports. Before we were calculating public/private in multiple locations and using different conventions. In addition for all the DPDK test we need to use the DPDK port number and no rely on interface ordering or interface naming conventions. We used to use xe0 -> 0, xe1 -> 1, etc. This is not the DPDK port number. Use the new dpdknicbind_helper class to parse the output of dpdk-devbind.py to find the actual DPDK port number at runtime. We then use this DPDK port number to correctly calculate the port_mask_hex. The port mask maps the DPDK port num (PMD ID) to the LINK ID used in the pipeline config We also need to make sure we only use the interfaces matched to the topology and not use all the interfaces, because in some cases we will have unused interfaces. In particular TRex always requires an even number of interfaces, so for single port TRex tests we have to create the second port and not use it. Thus we had to modify the traffic generator stats code to only dump stats for used ports and no unused ports. Ixia was using interface ordering to map to Ixia ports, instead we use the dpdk_port_num which must be hardcoded for Ixia. Renamed traffic_profile.execute to traffic_profile.execute_traffic so we can trace the code easier. We pass the port used by the traffic profile to generate_samples so we don't get stats for unused ports. Fixed up vPE config creation and bring up issues. Fixed up CGNAPT and UDP_Replay to work correctly. Tested with 4-port scale-out Change-Id: I2e4f328bff2904108081e92a4bf712333fa73869 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-09-05Add fixes for heat deployed UDP_Replay and TRexMartin Banszel1-2/+7
- Added a PROTOCOL_MAP to map the protocol names to codes -- the scapy requires the code, it fails if the proto is set e.g. to 'udp' - ip addresses must be str, not unicode -- explicit conversion to str added - removed unittest for setup_vnf_environment in test_tg_trex.py as it is the same function as already tested in test_sample_vnf.py - traffic_profile refactored -- code repetition decreased, unittest adapted Known issues: - there is a an attempt to stop already stopped trex. It fires an exception that stop command is issued on the disconnected client. Change-Id: I87e9029630f48b30e8f5b4f9d88ab3b25fd65f03 Signed-off-by: Martin Banszel <martinx.banszel@intel.com>
2017-08-30Merge "Fix Scale-up issue in HWLB"Ross Brattain1-2/+12
2017-08-25Merge "Fixed invalid vfw/vacl rulw config issues"Ross Brattain1-2/+2
2017-08-23Fixed invalid vfw/vacl rulw config issuesDeepak S1-2/+2
Change-Id: Ib96bc4bec359005e04e4a839846779d918881ba4 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-08-23Fixed 1C/2T configuration issues.Deepak S1-1/+1
Change-Id: I361d88043076c2f901ff6df22f2849edc7559ba0 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-08-23Fix Scale-up issue in HWLBDeepak S1-2/+12
Change-Id: I62e23bf0c9811ecf0eedb1cd8adc8cf541cd4b7e Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-08-23Merge "samplevnf_helper: use network address"Ross Brattain1-43/+65
2017-08-21ssh: add new get_file_obj method to fetch remote filesRoss Brattain1-2/+6
We can either cat remote files, or we can just sftp get them. use sftp get for /proc/cpuinfo since it can be so very large on systems with 88+ cores. Change-Id: I420b8c5eefdce8bb3e3b13dcc8257583dee537c1 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-21samplevnf_helper: use network addressRoss Brattain1-43/+65
use network address with netmasks to be proper ports_mac_list is no longer valid, remove it nd_route_tbl needs to default to something otherwise the VNF will segfault if it receives IPv6 on the port, which it will because something in Neutron is sending out IPv6 packets. disable use of the routing table gateways to set arp add. We set the next hop IP to always be the TG IP address, so we need to always use the TG IP in arp add to send to the TG MAC address don't use gateways to get local addresses. we can't use gateways because with OpenStack if we define a gateway is breaks the default route and we can no longer connect to the instance via floating IP. Change-Id: I0ebefe8ac09812b6030046f73bf772edda1c7d27 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-17samplevnf: fix make_ip_addrRoss Brattain1-1/+1
we get TypeError sometimes, so we need to catch them Change-Id: I5fc58006f18acf84f62d8f4a21077d71b2fb0ed8 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-16Verify the route list before parsing the data keyDeepak S1-1/+4
Exception: line 502, in get_route_data return next((route[data_key] for route in route_list if route['if'] == port), None) TypeError: 'NoneType' object is not iterable Change-Id: Ia45d90a4e9a61cb917b23efd03b86eafb249b747 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-08-08NSB updateDeepak S3-0/+715
Refactored main NSB VNF classes accroding to class diagram https://wiki.opnfv.org/display/yardstick/NSB+class+diagram All the SampleVNFs have been separated and placed under the SampleVNF class. Added AutoConnectSSH to automatically create SSH conneciton on demand. Added VnfdHelper class to wrap the VNFD dictionary in prepartion for class-based modeling. Extracted DpdkVnfSetupEnvHelper for DPDK based VNF setup. Extracted Stats and other client config to ResourceHelper Had to replace dict_key_flatten with deepgetitem due to Python 2.7 Jinja2 infinite recursion. Change-Id: Ia8840e9c44cdbdf39aab6b02e6d2176b31937dc9 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>