aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
AgeCommit message (Collapse)AuthorFilesLines
2019-02-07Update Intel Copyright for files edited in 2019John O Loughlin1-1/+1
JIRA: YARDSTICK-1591 Change-Id: I3ea9039d25bfce578681adb9e27e1598e84a1f56 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2019-01-29NSB sync: clean-up draft IPC implementation (part 1)Mytnyk, Volodymyr1-4/+3
The existing implementation of IPC is not finished and isn't used by any of the VNFs/TG implementation. It is used in the code but does nothing from functionality perspective. New syncronization mechanism is going to be implemented by using different approach than it was designed before. Thus, the current IPC mechanism is not going to be re-used. So, removing it. The IPC consumer/producer implementation is left as it may be required for other purposes. - Remove SampleVNF MQ consumer class - Remove IterationIPC MQ producer for VNF control messages - Remove MQ producer from SampleVNFTrafficGen class - Remove TrafficGeneratorProducer class - Remove IterationIPC runner - Remove unused task_id form VNF Generic initialization as it is not required for synchronization of VNFs/TGs anymore. - Fix UT JIRA: YARDSTICK-1592 Change-Id: I65fe51bcbd1bfeea0c43eb79ca6fb2aab5b65ae7 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-11-27Add option to allow user to pass vpe_scriptJohn O Loughlin1-4/+12
Add option to allow user to pass their own vpe_script vpe_script will be auto-generated by default. To use your own config file use the 'script' parameter in the config file vnf_config: { file: './vpe_config/vpe_config_2_ports', action_bulk_file: './vpe_config/action_bulk_512.txt', full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg', script_file: './vpe_config/vpe_script_sample } JIRA: YARDSTICK-1525 Change-Id: Ie23e5705f4c0475e858be73b8a504a7df8898828 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-11-14Remove unused functions vpeJohn O Loughlin1-151/+0
JIRA: YARDSTICK-1473 Change-Id: Ib9d3eb01f3fd900cbb08d55fc21fb95beceec941 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-11-14Add option to pass config file to vPEJohn O Loughlin1-14/+24
Yardstick should not generate config files for vPE. The current autogenerated configfile is incorrect. Therefore this patch is removing the auto-generation functionality. JIRA: YARDSTICK-1473 Change-Id: I9d909fcd0ac517d5ccdefb024c89b6bf979ef9c0 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez1-3/+4
This new class is designed to be used in a ``GenericVNF`` object (VNF or traffic generator) in a builder pattern. This consumer class will be instantiated when initializing the ``GenericVNF`` derived object. The ``GenericVNFConsumer`` endpoint is the ``GenericVNF``derived object itself. ``GenericVNFEndpoint`` is an interface class to be inherited in a ``GenericVNF`` child object; the VNF object will implement the endpoints methods. NewVNF(GenericVNF, GenericVNFEndpoint): def __init__(self, name, vnfd, task_id): ... self._consumer = vnf_base.GenericVNFConsumer([task_id], self) self._consumer.start_rpc_server() JIRA: YARDSTICK-1293 Change-Id: I1bcd980352099e9ebefdab0c96d51aa46f6a1e54 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-11Revert "vPE Sample VNF is missing in the installation scripts"Volodymyr Mytnyk1-2/+2
SampleVNF source tree doesn't contain vPE VNF sources, thus the installation of the vPE sampleVNF fails because of the changes. Reverting. This reverts commit 5bb855a82d960a4fb796e801ec9a9a22dc40b1ca. Change-Id: I27e929e813a28847c2ca725031ec767633a36954 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-05Merge "vPE Sample VNF is missing in the installation scripts"Rodolfo Alonso Hernandez1-2/+2
2018-06-29NFVI support for standalone, baremetal and heat contextsChornyi, TarasX1-0/+5
JIRA: YARDSTICK-1257 Change-Id: I6733bd49ac91985e8f3d7722e6990e8733bb430e Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
2018-06-11Move tests: unit/network_services/vnf_genericEmma Foley1-2/+4
* Fix pylint errors * Add TODOs Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged with a TODO, and should be fixed later. JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: I3d95537a64bde923703421510d27bac0d6dd92bd
2018-05-22vPE Sample VNF is missing in the installation scriptsRodolfo Alonso Hernandez1-2/+2
Sample VNF vPE is missing in the installation scripts and should be added to support the execution of the test cases related. JIRA: YARDSTICK-1187 Change-Id: I6684304cc97fd3bde90ca06f5fe8df9e1d11ce18 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-16Add --hwlb options as a command line argument for SampleVNFChornyi, TarasX1-1/+1
To enable HWLB queues in samplevnf on supported hardware (e.g Intel Fortville) --hwlb option needs to be passed as a VNF command line argument. JIRA: YARDSTICK-1159 Change-Id: I6e5c098dc71a711252b545c7622ee52085fa81f0 Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
2018-02-06vpe: convert DPKD_PORT to LINK IDRoss Brattain1-10/+29
http://dpdk.org/doc/guides/sample_app_ug/ip_pipeline.html#application-resources-present-in-the-configuration-file LINK instances are created implicitly based on the PORT_MASK application startup argument. LINK0 is the first port enabled in the PORT_MASK, port 1 is the next one, etc. The LINK ID is different than the DPDK PMD-level NIC port ID, which is the actual position in the bitmask mentioned above. For example, if bit 5 is the first bit set in the bitmask, then LINK0 is having the PMD ID of 5. This mechanism creates a contiguous LINK ID space and isolates the configuration file against changes in the board PCIe slots where NICs are plugged in. Change-Id: I6e449272cfcfb2b2a75c246f7f569e3f923da245 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-03NSB PROX test hang fixesRoss Brattain1-0/+3
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-09-25Fix vPE VNF characterization issues.Deepak S1-19/+28
Change-Id: Ia934128777d2839f6d2b940857c266fc3e2bd4a1 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-09-18NSB: count from 0, vnf_0, tg_9, private->uplink, public->downlinkRoss Brattain1-16/+16
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 Banszel1-30/+43
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-08-08NSB updateDeepak S1-295/+250
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-04-11standardize ssh authRoss Brattain1-10/+6
we need to be following defautl paramiko rules, first use pkey, then key_filenames (autodetecting ~/.ssh/ keys), then password We have too much boilerplate redudant code everywhere, we need to standardize on a factory function that takes a node dict. Using Python3 ChainMap we can layer overrides and defaults. VNF descriptors have to default key_filename, password to Python None. The only way to do this is to omit key values if the variable is not defined, this way the dict will not have the value and it will default to Python None Add python2 chainmap backport Updated unittest mocking to use ssh.SSH.from_node Change-Id: I80b0cb606e593b33e317c9e5e8ed0b74da591514 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-19Adding vPE VNF class aligned with IETS per-deploy senariosDeepak S1-0/+331
VNF life cycle - instantiate - collect_kpi - terminate JIRA: YARDSTICK-520 Change-Id: Ied6ac79870fa35cc3dd14fd7a99b6bade3b77c81 Signed-off-by: Deepak S <deepak.s@linux.intel.com>