aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/utils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-09-05Add TclClients for Spirent Landslide TGOrest Voznyy1-0/+3
Add class "LandslideTclClient" which holds TCL calls wrappers for operations on the LandSlide TG. It also introduces several new parameters in - test case YAML file structure: * session_profile: YAML file holding a template of Landslide test session for specific vEPC test scenario * dmf: test case options member holding traffic flow specific parameters for designated test scenario, that override ones in traffic_profile YAML file * test_cases: test case options member holding parameters specific to designated vEPC test case, overriding those in session_profile template file - pod YAML file structure: * tas_manager: holds parameters used to connect to Spirent Landslide TAS * config: list of entries describing Landslide test servers access, their network interfaces configuration, information of vEPC elements emulated by specific test server Class "LandslideProfile" implements access to traffic profile template from "LandslideResourceHelper" class. JIRA: YARDSTICK-1356 Change-Id: Ia6428072b1e72025be17c94e5141bd23f7993247 Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com>
2018-03-01NSB: move interface probe to VNF, and attempt driver-only probe firstRoss Brattain1-1/+0
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>
2017-12-15NSB: Fix standalone.model.Libvirt SR-IOV modelingDino Madarang1-22/+30
Fixed standalone.model.Libvirt SR-IOV XML interface modeling, acording to [1]: - All PCI attributes now are printed in hexadecimal format. - The PCI address is now added in the correct section, 'interface'. network_services.utils.PciAddress was refactored to accept both 'domain: bus:slot:function' and 'bus:slot:function' format inputs. This class is used as input in the previous class, Libvirt, to print in XML the PCI address of a SR-IOV interface. network_services.utils.PciAddress.parse_address is now deprecated. Instead the class standard instantiation must be used: libvirt_obj = utils.PciAddress(text_with_address) A deprecation decorator is implemented along with this patch. This decorator is used for the first time in the previously mentioned function. This decorator stores every decorated function name and deprecation message and raises a logging warning message the first time this function is used. [1] https://goo.gl/so2Mrp Change-Id: I22e95c488e27d6e2a8fdf6c1a07faab275fa6bba Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-09-29Enabling multi_VM & multi port launch in standalone contextDeepak S1-0/+57
new context names: - SRIOV - StandaloneSriov - OvsDpdk - StandaloneOvsDpdk - Seperate helper, libvirt, server info class - Allow multi-port and multi-VM support. Change-Id: I3c65e4535082fa0e2f4c6ee11c3bca9ccfdc01b8 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Martin Banszel <martinx.banszel@intel.com>
2017-08-24Standardized TRex client library pathMaciej Skrocki1-1/+4
- path should be defined via TREX_CLIENT_LIB environmental variable e.g. TREX_CLIENT_LIB=/opt/trex_client/stl - refactored unit tests Change-Id: I18767e48daf774432c010f1b88d18a4f0ee4e156 Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-09NSB fixes: docstring, whitespace, etc.Ross Brattain1-1/+1
remove unused docstring params remove whitespace fix sudo vnf_build command ignore stdout Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Change-Id: I6fcdbb0ed4bc6b7fc2f557529f5ff9fd960c05e9
2017-08-08NSB updateDeepak S1-3/+5
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>
2017-02-08nsb: move NSB root to constant, add unittestRoss Brattain1-4/+6
add unittest for non-None default fixup get_nsb_option to return default correctly. use NSB_ROOT for all paths Change-Id: Idd1951a8d436bc49c30d59d84ca12a5f26e9148f Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-06Fix: network_services: decode stdout instead of encodeRoss Brattain1-1/+1
Fixes unittest on Python 3 stdout is bytes, so we need to decode bytes to unicode using utf-8 bytes.decode(); str.encode() Change-Id: I4b19d237139f338a648d04aa44cd4f199bb901c3 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-19Generic helper function to provision and get path from configDeepak S1-0/+62
This patch adds, generic helper function to provision the tools and get required fields from yardstick.conf v2: Added unit tests to keep test coverage :) JIRA: YARDSTICK-484 Change-Id: Id6701924e3488c7f38f29c82e55c27fba67c0d76 Signed-off-by: Deepak S <deepak.s@linux.intel.com>