summaryrefslogtreecommitdiffstats
path: root/sdnvpn/lib/utils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-10-09Wait for instance deletionstable/fraserStamatis Katsaounis1-1/+17
JIRA: SDNVPN-222 Confirm the deletion of instance in order to prevent its port existence when trying to delete relevant subnet in a later stage. Change-Id: Iace0fbbd90d50f05764ac09682caae59baba22fa Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com> (cherry picked from commit ea48239f99fdddd703bebb1727575f844c097702)
2018-06-15[Bug Fix] Determine the BGP entity owner in ODL ClusterDimitrios Markou1-0/+42
In HA deployments is essential to determine which is the ODL BGP entity owner and transform that ODL to BGP speaker. This is necessary because of this bug [0] in netvirt. So we can consider this as a workaround for the testcase_3. Note: This patch is dependent on this task resolution [1] for master branch. Note: This patch works fine in stable/fraser branch. [0] https://jira.opendaylight.org/browse/NETVIRT-1308 [1] https://jira.opnfv.org/browse/SDNVPN-217 Jira: SDNVPN-214 Change-Id: I383987e650da45400a3a6437dbdaaea904db9265 Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-06-04Fix the logging to be compatible with functestPeriyasamy Palanisamy1-2/+2
Change-Id: I62b432497175e79bcf2cd241be54d8a7f5db2799 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> (cherry picked from commit e08e7c43c85fa04dc78a1fcf8a11ab877a78dfb9)
2018-04-20Make sdnvpn logging properPeriyasamy Palanisamy1-28/+30
* Currently no log messages are getting written into log file due to file handler is registered for logger object created at different modules. Now corresponding handler is registered for logger objects. * Making sdnvpn Feature class to use its parent class logger object to avoid unnecessary logger object creation. Change-Id: I4ec61951ba4ac39cecc137dbb818da72f0b43b35 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> (cherry picked from commit 303268d0464127c52f11443404fb1baae03d615f)
2018-03-12testcase execution halt fixPeriyasamy Palanisamy1-7/+12
It's found that sys.exit is used in utils.py which caused testcase execution is stopped abruptly while running bgpvpn testsuite. This is now replaced with Exception. Change-Id: I69df4be705985994318f58d57b152d6db4087610 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-03-08potential fix for custom flavor creation issuePeriyasamy Palanisamy1-4/+1
Change-Id: Ic079e6d699927a400ca5f1530b18efacf3465629 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-03-01update python modules shebang line for python intrepreter directivePeriyasamy Palanisamy1-1/+1
Change-Id: I1929a5b86a89a96fbf5c21b3bc419c9237034aba Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-02-26Host openstack utils in SDNVPNCédric Ollivier1-1/+1
SDNVPN is the last project using the deprecated openstack utils which are being removed from Functest tree. All methods unused by SDNVPN could be safely removed in a second change. This patch aims at publishing them asis. Change-Id: I4e479e6def2c691799c9bd86ba325e3d1544ef0d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-15fix for sdnvpn CI test failurePeriyasamy Palanisamy1-0/+7
Change-Id: Ie55ccbe68f57a9bb03efc8b6eebf23a0018a0bca Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-01-18Set unlimited router quotastomsou1-4/+6
Update router quotas to fix bgpvpn scenario in CIq JIRA:SDNVPN-208 Change-Id: I25353229d119459c8e961b0f3f6264f715533d13 Signed-off-by: tomsou <soth@intracom-telecom.com>
2018-01-09Intra-Data Center ECMP testcasePeriyasamy Palanisamy1-2/+116
This testcase add a scenario in which one extra route can be reachable through two VMs which are in a same network attached to a router which is later associated to a BGPVPN instance. This extra route ip address is different from subnet of VMs. After the extra route is configured with VM ips as nexthops, then when third VM is trying to reach extra route, traffic would split between two VMs. The traffic split can happen only in heavy loaded scenario, so this testcase would test only reachability. JIRA: SDNVPN-23 Change-Id: I4bb4e94f5c98c0f3c22bff7a6998af2a7a919f16 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2017-11-10add resync testcasePeriyasamy Palanisamy1-0/+17
It is an extention of testcase_11.py to check resync happens properly between ODL and OVS when there is no changes from northbound JIRA: SDNVPN-175 Change-Id: I63bd17f5e5fdab7d5ab90a2be2836e02e7dd54fa Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2017-11-09Merge "remove flavor at the end of the test"Tim Irnich1-1/+7
2017-11-09Merge "Fix instance boot when metadata exists"Tim Irnich1-8/+11
2017-11-08remove flavor at the end of the testPeriyasamy Palanisamy1-1/+7
JIRA: SDNVPN-122 Change-Id: I89f457e0d5a7c7c98bab223e722a5eb5a23387b6 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2017-11-08use glance_client for image cleanupPeriyasamy Palanisamy1-2/+5
Change-Id: Ia192a1b26c5f31b6d3465a060c3d8a3097e6ebd4 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2017-11-08Test groups are deleted after ovs reconnectionpperiyasamy1-0/+17
Create a new testcase (Testcase 11) Testing procedure: Create a Network with 2 VMs so that a group is added to ovs. Disconnect ovs. Remove the Network and the VMs. Connect ovs again. Check that the group is deleted from it. JIRA: SDNVPN-151 Change-Id: I4c6f5e16f837bbcc589cbbbf05896a2d17b9cd57 Signed-off-by: panageo2 <panageo@intracom-telecom.com> Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2017-11-06Fix instance boot when metadata existstomsou1-8/+11
The way that a instance is considered as UP is pretty strict and returns ERROR in case of instances with userdata This patch differentiates the instances that are supposed to boot till login prompt and those with userdata parameter JIRA: SDNVPN-177 Change-Id: Ic4755366df006669475c90cc0693ac802256f379 Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-10-25use openstack api's instead of CLIsPeriyasamy Palanisamy1-0/+46
add two apis update_instance_quota_class and update_nw_subnet_port_quota and make run_sdnvpn_tests.py to use these APIs for setting quotas JIRA:SDNVPN-188 Change-Id: I764bb6897e6c4c5abad4d252c1f3b4ccc742d52e Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2017-10-19Remove argparse for adding argument -rLinda Wang1-1/+1
Change-Id: Iaa2ddc3f655a2bf85785a99a519e0df78c298037 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-10-18Gather logs only if fuel or apex installerPeriyasamy Palanisamy1-1/+3
Change-Id: I11988ad86a916d1d7251aacf951c6362fda961ba Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2017-08-28Merge "Make tight the way an instance is considered as UP"Tim Irnich1-8/+4
2017-08-23Make tight the way an instance is considered as UPpanageo21-8/+4
An instance will be considered UP not only if a DHCP IP is leased, but if the login prompt is present, as well JIRA: SDNVPN-174 Change-Id: If68fd1436a54f057f37de777e22f1d6a1967d97c Signed-off-by: panageo2 <panageo@intracom-telecom.com>
2017-08-02Add/Remove testcasepanageo21-3/+3
This testcase investigates if communication between a group of VMs is interupted upon deleteon and creation of VMs inside this group. Test case flow: 3 vms: [1] on compute 1, [2] on compute 1, [3] on compute 2, all vms ping each other. vm [2] is deleted. Traffic is still flying between [1] and [3]. A new [4] vm is added to compute 1. Traffic is not interrupted and [4] can be reached as well. JIRA: SDNVPN-105 Change-Id: I93a65de2a5df83551e3115fd20b60241cd460e97 Signed-off-by: panageo2 <panageo@intracom-telecom.com>
2017-07-18Add test case 9panageo21-0/+34
Development of a new test that checks all nodes and succeeds if all OVS br-int interfaces have fail_mode=secure JIRA: SDNVPN-168 Change-Id: Iff14f60e2d25c1769cdec7cec126425937780eb7 Signed-off-by: panageo2 <panageo@intracom-telecom.com>
2017-06-29Merge "Adapt the floating ip handling in functest"Nikolas Hermanns1-12/+11
2017-06-28Transfer utils functions from functestpanageo21-3/+41
Transfer functions: - create_bgpvpn - create_network_association - create_router_association - update_bgpvpn - delete_bgpvpn - get_bgpvpn - get_bgpvpn_routers - get_bgpvpn_networks from functest/utils/openstack_utils.py to sdnvpn/lib/utils.py JIRA: SDNVPN-164 JIRA: FUNCTEST-840 Change-Id: Ic64d8ee85e74601b0fe51e1c452cf83fa6b0203b Signed-off-by: panageo2 <panageo@intracom-telecom.com>
2017-06-27Adapt the floating ip handling in functesttomsou1-12/+11
Comply with the new floating ip management in functest (https://gerrit.opnfv.org/gerrit/#/c/36415) JIRA: SDNVPN-165 Change-Id: I39e380caf07568e2370246afcf483eb8adb3def6 Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-05-31Cleanup after testcase runningtomsou1-0/+76
After every testcase running cleanup neutron and nova elements: - Allocated floating IPs (nova) - Created instances (nova) - Created images (nova) - Created router-subnet interfaces (neutron) - Created gateaway routers (neutron) - Created routers (neutron) - Created subnets (neutron) - Created networks (neutron) - Created bgpvpns (neutron) JIRA: SDNVPN-145 JIRA: SDNVPN-148 Change-Id: Id6df004bb9d0d394e2cf39692b624607167c9a6c Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-05-25Fix failure in router association- testcase8tomsou1-1/+1
Due to some latency at the creation of the instance 8-1 somitimes the router association between 'sdnvpn-8-1-router' and net 'sdnvpn-8-2' fails. The case could be more robust, increasing the number of ping tries from its current value (=1) JIRA: SDNVPN-102 Change-Id: I3b9701c40f1221cfebc540d312b61bb881389762 Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-05-17Update logger via logging.getLogger()Linda Wang1-2/+2
1. The module functest.utils.functest_logger has been deleted and logger has been reconfigured in functest [1]. 2. Update all related modules to get loggers via logging.getLogger(). [1] https://gerrit.opnfv.org/gerrit/#/c/34019/ JIRA: FUNCTEST-824 Change-Id: I89f5d15342b5f257fbc2700655e255a4e28bd36f Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-05-03Clean always and change orderNikolas Hermanns1-8/+8
Change-Id: Ic9e0d374a4fe5278888b28fe2694c546840d55b4 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2017-05-03Remove dependence inetNikolas Hermanns1-9/+12
A new ubuntu image with quagga included was uploaded to artifacts.opnfv.org/sdnvpn/ ubuntu-16.04-server-cloudimg-amd64-disk1.img Change-Id: I7e48ebbc2b00b7e771f43b26303acc66c2c48457 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2017-05-02Cleanup br-ex/br-quagga from testcase_3tomsou1-0/+31
After the peering between Quagga and ODL within testcase 3 cleanup br-ex (for fuel) or br-quagga (for apex) interfaces JIRA: SDNVPN-13 Change-Id: I3e7bf91d4e47dfd7fe2a5068ed40ea4b2be48c6d Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-04-06Checking if hacked quagga bridge exsists and contiuneNikolas Hermanns1-7/+9
Change-Id: I8983ed687dabba0af2128c0ce06bd53aba22c819 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2017-03-28Fix security group rule conflicttomsou1-13/+48
-open_icmp_ssh function, that creates security group rules for icmp and http (here the name of the function is misleading), is splitted into 2 new functions one for each rule (open_icmp() and open_http_port()). Test cases that used the old function have been updated -In the original implementation of open_icmp_ssh() and open_bgp_port(), the direction parameter was missing. This was leading to an error message -A check for the existence of security group rule has been added and used before the creation of each security group rule. If a rule already exists, an info message is printed and the testcase continues This change is strongly dependent on https://gerrit.opnfv.org/gerrit/#/c/31925 of Functest repo. NOT TO BE MERGED before JIRA: SDNVPN-103 Change-Id: Icb96954556f6d7294cf3454f045dbca4b9be672d Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-03-24Fix testcase3 (peering subcase) for Apextomsou1-1/+2
- Fix runnning bgp related commands on Karaf: update util.run_odl_cmd() in order to be able to run commands on karaf client. Otherwise karaf commands fail - Ensure zrpcd/bgpd to run on controller side properly: Add missing quagga run folder, change owner and add user quagga into quaggavt group, in case of apex installer - Update the way of handling br-ex information and parsing out the controller external ip and mask: In case we have multiple ip/netmask assigned on br-ex the separation was faulty and an extra line, containing the second ip address, was added into ext_net_mask variable JIRA: SDNVPN-118 Change-Id: I62468c94fd945ba30e419bd30d9cd85502f28eeb Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-03-22Testcase 3 Apex compatibility fixesRomanos Skiadas1-0/+27
- Workaround a bug releng in getting opedaylight nodes - Add some sudo commands because the path is not properly set otherwise it seems - remove needless command that gets ip information from the compute, since that is already available from when the command was ran on the controller - Handle attaching the quagga instance to Apex's br-ex ovs bridge Change-Id: I870f1049d9cce696ec26376a09db5f9e9bac0bf9 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2017-03-17Merge "Create flavor for Quagga ubuntu VM"Nikolas Hermanns1-0/+7
2017-03-17Fix broken call to re.search()Romanos Skiadas1-1/+1
Change-Id: I3d49c683c81e136967432acd1d28b6d305cfe90f Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2017-03-17Create flavor for Quagga ubuntu VMtomsou1-0/+7
- Implement a new function in lib/utils ensures (gets or creates) a new flavor existence - Use this new function within Testcase3, in order to create a flavor big enough to start ubuntu with JIRA: SDNVPN-120 Change-Id: I5c7d9c855f083b96bfd056bb5d935baa851420c9 Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-03-16Merge "Fix most end-to-end issues with testcase 3 and reenable it"Nikolas Hermanns1-3/+33
2017-03-16Fix most end-to-end issues with testcase 3 and reenable itRomanos Skiadas1-3/+33
- Make the test work end-to-end on Fuel - Use the instance log to verify quagga started - Don't attempt to check for peering, as that is for a future release - Use the external IP of the controller for peering - Fix not getting the output of OpenDaylight commands Change-Id: Ia7bb533ab65e0fca6b7f48bb64133f6d8f3ff8ae JIRA: SDNVPN-114 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2017-03-15Implement a get VM IP function in utils to be used within test casestomsou1-1/+6
Change-Id: Iaedbfb2fc626eb7d88badee2530593b43c0d1152 Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-03-07Fix functest failing in apex case- testcase3tomsou1-0/+34
- Check the INSTALLER_TYPE environment variable - Differentiate fuel from apex case JIRA: SDNVPN-101 Change-Id: I10fa26f5c0b7f95601b29db86e756a20c9e921ec Signed-off-by: tomsou <soth@intracom-telecom.com>
2017-03-02Implement quagga peeringRomanos Skiadas1-1/+61
- Create an openstack instance - Assign it a floating IP - Execute a quagga bootstrap script using cloud init - Tell ODL to peer with the instance - Start an instance in a VPN - make sure the route was exchanged between the peered quagga and ODL Change-Id: I73bcaec5425df2b953c2bceaca7d4f09ff28f3d0 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2017-02-12Add and update license headersjose.lausuch1-1/+1
Change-Id: I8ccb23c9ffa0d511427ad089b033973ffe96360f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-12-15Make sdnvpn a packageRomanos Skiadas1-0/+303
- Clean up the test/functest folder and move things to lib/ & artifacts/ - Add a new top level folder for the sdnvpn python code Change-Id: I5fdc7fa5475fb800f488a17d3481158c9c4f84e1 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>