aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/lib/odl_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2019-01-25Fix Two Chains Test and Enabled all Testcasesgvrangan1-7/+24
- Method added to support Port Chain update - Used the new method to modify the test as follows - Create two Port Chains (one VNF per chain) - Block ssh in one vnf and http in the other - Test communication - Swap the flow classifiers in the chains so that ssh packets are sent to vnf where http is blocked and vice versa - Fix extracting odl username/password from ml2_conf - Checking flow classifiers are implemented - Fixed odl cleanup Change-Id: I1f0f3a3b829d6c73d1bb1a774ebf3484912b84b7 Signed-off-by: gvrangan <venkatrangang@hcl.com>
2018-10-26Adapt regex to new flowsManuel Buil1-5/+6
ODL Fluorine changes the nsh syntax, so we should adapt it Change-Id: I63537f9b880f14b40be2658d3a7ed2e315e86b11 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-08-31Decouple tacker from testsManuel Buil1-17/+0
Support n-sfc too and abstract a bit the MANO layer so that other MANO components can be inserted into the test Change-Id: I3fb59fbf40b4207bf1721092cd8ff0559e1d9d90 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-08-29Flake8 fixesManuel Buil1-1/+1
When running flake8 I am getting several errors. This patch fixes them Change-Id: I4d32b4b214ca61e98da6fc28a4de44201c4c1cdc Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-08-08Fix UnboundLocalError in 'odl_utils.py'#L420Venkata Harshavardhan Reddy Allu1-0/+1
When an exception is raised from find_compute in #L411, the compute variable is not created and it raises an error < UnboundLocalError: local variable 'compute' referenced before assignment > at #L420. Change-Id: I48cff435dc3a03b30b7a8d24aa605611e30938de Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-08-05formatting the log message in odl_utils.py #413Venkata Harshavardhan Reddy Allu1-1/+1
Change-Id: I32f826fbb2c0a339264b8b316666ddf7f241570c Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-06-01Fix the logging to be compatible with functestPanagiotis Karalis1-6/+6
In order to collect logs from SFC test scenarios running through functest framework (mainly for troubleshooting purposes), the logging mechanism has been updated accordingly. JIRA: SFC-125 Change-Id: Ide7c32519afa6ece299d0ac1dcb168609a2e3945 Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2018-05-03Bug fix: Use opnfv.logger objectManuel Buil1-2/+2
JIRA: SFC-125 If we don't use the opnfv.logger from functest, logs are not printed when exeucting tests through the functest framework Change-Id: I6d58ff3977fd94221720eea978e0efde07a576a2 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-04-04Support sfp redirect action on acl flow checkJaime Caamaño Ruiz1-59/+139
Starting Oxygen, ODL networking-sfc translator supports symmetric paths and maps flow classifiers to ACLs with SFP redirect action instead of RSP redirect action. A SFP may have two RSPs associated if the path is symmetric, one otherwise. One of the two RSPs will be flagged as the reverse path and the other is the forward path. Traffic from the logical-source-port will be classified to the forward path, while traffic from the logical-destination-port will be classified to the reverse path. This patch updates the ACL flow check logic to account for the above. Change-Id: I2d8b9e6c2a1033d469668db29b9c18f525e89370 Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
2018-02-06Define the timethis function in the sfc repoManuel Buil1-2/+17
Functest removed the function from their repo, so we need to define it in ours: Change-Id: Ica122e57612c38751d8ff810f3ba61b749e867eb Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-01-31Test the deletion of chainManuel Buil1-8/+77
This is the flow of the test: 1 - Create a vnffg in tacker (i.e. chain + classifier) 2 - Remove the vnffg 3 - Check that the RSPs are removed from operation DB in ODL and the classifier rules are not present in the flows 4 - Create a new vnffg 5 - Test the new chain: 5.1 - Check HTTP traffic works 5.2 - Block HTTP traffic in VNF and check that it does not work anymore Change-Id: Ia077e58c5cbce4258a2f8a36f6b961eb923ff9c5 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-01-29Fix problem to fetch the compute name of client VMManuel Buil1-5/+2
When migrating to SNAPs a bug was introduced and could be seen in logs as: Error when waiting for classification rules: 'module' object has no attribute 'get_compute_client' The cause is that get_compute_client is not a global function anymore but a method inside a class. Besides, due to SNAPs, we need to fetch the compute name in another way Change-Id: I32007c83894281ba9514a121b7939b5bfe52f4bc Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-12-12Clean up our utils.pyManuel Buil1-0/+285
Utils.py was getting messy. This patch divides it into three different files: * test_utils.py * odl_utils.py * openstack_utils.py The tacker library is integrated into openstack_utils.py Change-Id: I310949d1cee49b6aa1c9b3396bf6d6ca458cbaac Signed-off-by: Manuel Buil <mbuil@suse.com>