summaryrefslogtreecommitdiffstats
path: root/test/functest/testcase_4.py
AgeCommit message (Collapse)AuthorFilesLines
2016-12-15Make sdnvpn a packageRomanos Skiadas1-210/+0
- 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>
2016-12-13Don't pass ips to get_ssh_output and check_pingRomanos Skiadas1-25/+8
Remove the IP arguments from these functions and use the VM objects passed to them to find their IPs. This simplifies the calls. Change-Id: Ideb08b6fdf0648870c2854f057708a88bb482d0c Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-12-13Encapsulate some functionality in Results classRomanos Skiadas1-8/+4
- Move adding actions taken during tests to summary in a method in Results - Provide add_success/failure methods that hide the column size manipulation Change-Id: If7416f3f9399125fe21632328a49af285a4b6cc6 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-12-02Move logging instance creation to create_instanceRomanos Skiadas1-10/+1
Change-Id: I299f2be3b127aefdd7036fa68fb934b09d278692 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-11-18Refactor config global variablesGeorge Paraskevopoulos1-130/+78
- Create config.py module to handle configuration parsing - Remove globals from testcases Change-Id: I16ed7bb138fde2d5d3c69703e3c2e569d49f0b37 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-11-14Merge "Fix router assoc in Boron"Tim Irnich1-5/+12
2016-11-10Encapsulate sleeps in functionGeorge Paraskevopoulos1-3/+2
We have some sleeps into the testcase code. We can encapsulate them in a utility function to refactor them out of the code until we figure out the best way to remove them completely Change-Id: I44c32d8329c2e319660518a8a46debc22f02c753 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-11-07Refactor common code across testsRomanos Skiadas1-22/+2
- Move collecting test results in a method in Results class - Create a util function for asserting the environment has enough compute nodes Change-Id: Ib7b9dfab7d2e9f50d5f352d3eadba4d4717ee750 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-11-03Fix router assoc in BoronRomanos Skiadas1-5/+12
As per I6b57eab89839d9e9122cd24b0f05737467439dd9: - Add a route distinguisher - Remove the router from the network that is network associated Change-Id: I1399bb51c787df881529279ef7a1946a3c5c5591 JIRA: SDNVPN-66 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-09-15RefactoringRomanos Skiadas1-117/+55
- Wrap common methods that use globals in a Class `get_ping_status` and `add_to_summary` depended on globals for statefulness. The easiest way to refactor them was to convert them into methods and the globals they used into instance variables. - Move `generate_userdata_common` and `generate_userdata_with_ssh` to the utils module. - Make flavor a kwarg in create_instance. Add a defaults section in config.yaml with flavor. This value is used if flavor is not passed via kwargs. - Substitute some sleeps with `wait_for_instances_up` which will wait until a dhcp lease success message appears in the instance's log. - Add functions that wait until router and network association is completed. These do not replace the sleeps but make the tests more deterministic. - Remove unused ping_timeout from config.yaml Change-Id: Ia68ebf47aaa5a58c4e20267f1476db626f015a7c Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com> Co-Authored-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-09-09Use get_functest_config where appropriateRomanos Skiadas1-4/+4
The latest functest enforces using `get_parameter_from_yaml` to only get test specific parameters from the config file. `get_functest_config` is given to get functest configuration parameters. Change-Id: Icb6ec2ed4a9d6c278bf1c403d4d0c4f4b21e51b7 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-09-09Refactor some common methods into utilsRomanos Skiadas1-121/+58
- generete_ping_userdata(): This method was exactly the same in two tests - create_instance(): The various implementations of this method had almost the same signature, but not quite. This was fixed by adding extra arguments as needed. Also a global variable was used in the function, which was converted into a parameter. - create_network(): The three implementations of create_network had three different signatures and returned different variables. They were all unified in a single create_network class and the calls to create_network were adjusted accordingly. Revision 1: Fix flake8 violations Revision 2: Rename logger in utils Change-Id: Ib6cfe798dc561a69eb50c901e3aa71c19d465821 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-09-02Add Router Association testcaseGeorge Paraskevopoulos1-0/+431
JIRA: SDNVPN-49 This functional test is a variant of testcase 1. Instead of associating Network 1 and Network 2 to the BGP VPN, we connect Network 1 to a router and associate that router and Network 2 to the VPN. The testcase is disabled for now. Test setup procedure: - Set up VM1 and VM2 on Node1 and VM3 on Node2, all having ports in the same Neutron Network N1 and having 10.10.10/24 addresses in subnet SN1. N1/SN1 are connected to router R1. - Set up VM4 on Node1 and VM5 on Node2, both having ports in Neutron Network N2 and having 10.10.11/24 addresses in subnet SN2. Test execution: 1. Create VPN1 with eRT<>iRT and associate R1 to it - Ping from VM1 to VM2 should work - Ping from VM1 to VM3 should work - Ping from VM1 to VM4 should not work 2. Associate SN2 to VPN1 - Ping from VM4 to VM5 should work - Ping from VM1 to VM4 should not work - Ping from VM1 to VM5 should not work 3. Change VPN1 so that iRT=eRT - Ping from VM1 to VM4 should work - Ping from VM1 to VM5 should work Jira task in SDNVPN: https://jira.opnfv.org/browse/SDNVPN-49 Change-Id: I0e805b042eb645e923f1639179c4c2c37be17835 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>