aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/unit_tests/unit/lib/test_openstack_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2019-03-22Add new methods to openstack_utilsVenkata Harshavardhan Reddy Allu1-0/+30
When we use OSM as MANO_COMPONENT, we don't have methods to retrieve the object instances of ports and VMs. So, we need these methods to gather details of a : - VM using the 'id' get_instance(id) - port using their 'ip_address' get_port_by_ip(ip_address) Change-Id: Ica45bf49dddb38a3811b049d67c363ac606fde7a Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2019-03-21Flake8 fixesVenkata Harshavardhan Reddy Allu1-3/+3
Change-Id: Ia0012ebb6af1faa8028b45545cd1f93ea5ed22f0 Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2019-01-25Fix Two Chains Test and Enabled all Testcasesgvrangan1-0/+91
- 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>
2019-01-21Simplify deletion test and fix unittestManuel Buil1-0/+35
Removing the port groups when deleting the first chain simplifies things because we don't need port_groups to be a variable of the SfcCommonTestCase class There were also some missing unittest Change-Id: I6ae780bdc72116907a9e6037571c29f28a6ba334 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-11-26Migrate SNAPS to Openstack-SDKNikos Mimigiannis1-366/+559
JIRA: SFC-137 This patch replaces SNAPS library with openstack_SDK library for TCs with mano component: no-mano Change-Id: I99b9a5f54a273f61ecff05a11616440d5e85e55b Signed-off-by: Nikos Mimigiannis <nmimi@intracom-telecom.com>
2018-11-06Avoid race conditionsManuel Buil1-0/+34
Sometimes the port pair group gets created before port pair was committed in openstack. Before creating the port pair group, we check that the port pair is already listed by openstack Change-Id: Icfd23521859fc5d4e6bb6745be80f79bf9e31a0c Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-10-30Improve ansible tasks and fix license headersVenkata Harshavardhan Reddy Allu1-2/+2
This patch does two things: 1. improve the ansible tasks: - register Openstack as VIM - create osmrc file - install OSM (master) 2. fix license headers in unit tests installer-type:osa deploy-scenario:os-odl-sfc_osm Change-Id: I02297dae2b0108397541cedeb2f47183f1df99fc Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-10-26Add a bit more data to the logging messageManuel Buil1-6/+6
In case of failures, it is hard to understand for what vnf the port pair was being created when things went wrong Change-Id: I1cfa2553318d910535d45910b2a46d75b2f7926a Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-09-18Refactor unit tests in 'test_openstack_utils.py'Venkata Harshavardhan Reddy Allu1-119/+227
JIRA: SFC-126 JIRA: SFC-129 Some of the unit tests I wrote earlier needs to be separated into individual unit tests, which Mr Dimitrios has mentioned in one of my previous commits. Unit tests are supposed to be independent & should only test one test case at a time. This patch fixes them. Change-Id: Ie4651c0eeede5fe729356664493708d8144ff84a Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-09-03Remove port security from vnfs when no-manoManuel Buil1-2/+62
If the ports have security enabled, the traffic is dropped due to the anti-spoofing Change-Id: I6fbc63a3d959d9d55dfd1d64e12e1d0e7ec48bcb Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-08-31Decouple tacker from testsManuel Buil1-13/+251
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-13Added unit tests for 'openstack_utils.py' moduleVenkata Harshavardhan Reddy Allu1-0/+1715
JIRA: SFC-123 Change-Id: Ia41ec596d1c2247b2c86d88672a07e50021b3bc0 Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>