summaryrefslogtreecommitdiffstats
path: root/testcases/functest_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2016-02-17Release floating ip after vPing_ssh testjose.lausuch1-2/+3
Also, check the console to see if the instance fails when sending the discover to the dhcp agent Change-Id: I314051886b9580a42bb88f2d88a9bdbf2a9e198a Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 62131c3f53e66b6305bdd163037d452483821cfd)
2016-02-16Create vPing instances with dynamic ports created by nova/neutronjose.lausuch1-0/+29
Also, - check if the used network is already created to not create it again - check if the image already exists to not create it again - check if the sec group already exists to not create it again Change-Id: I243619a1538444d836fdda84a86b834668aaf456 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 12c1b110e91b2c062b378561f3fb271fe0626aec)
2016-02-11Add project in push_to_db function of functests utils to allow external ↵Morgan Richomme1-51/+43
project onboarded in Functest to push their results Change-Id: I3a065e6ce82b1a87bbd07810f13df7d146655933 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com> (cherry picked from commit 9812bf270c6ef1a5f0582bd8be3c5a3776e73960)
2016-02-02Create security groups with ICMP and SSH rules for vPing testsjose.lausuch1-0/+53
JIRA: FUNCTEST-133 Some installers don't allow icmp and TCP port 22 (SSH) in the default security group. To avoid any dependency with the installer, vPing will create its own security group with those rules and delete it afterwards. Change-Id: I6f31f21c240d80eed8bead638af51aa7e1e92aad Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit ab3413a15aeb3b3669da94fa383ec07212eeb915)
2016-02-02Remove error message if instance is not foundjose.lausuch1-2/+2
Reason: vping calls this function until the VMs are deleted, when that happens, it throws an exception and returns None, which is fine, but the message error on the output is a bit confusing if you don't know the context. Change-Id: I8a4c408197d3c83151fb15a12387575d9fe1d553 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 7dd58acc208727aaed83807f065dedcc899b0137)
2016-01-28Small typos fixes in functest_utils.pyjose.lausuch1-6/+7
Change-Id: I9fdb1efe11ce62c460f380ba1087ed9fc83611ef Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 87880013c9030fdacf477c0b977a8e06f9afbbdf)
2016-01-28Refactor functest_utils.pyJuha Kosonen1-23/+24
The order of volume type related functions and the error handling changed to conform general approach used in functest_utils.py. Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com> (cherry picked from commit 09f1b2201aaee2c3deee5936c819089bcc86692b) Change-Id: I1461380ae0c579e5557bf4bfec4ec68f2766ee40
2016-01-28Volume type management moved from run_tests.sh to run_rally-cert.pyJuha Kosonen1-0/+30
Change-Id: I80c8b27e041ec5089b816b8515cbc8fa1e8b9eea Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com> (cherry picked from commit 9922669c3dd92d43c6e387c8077255153c35b71e)
2016-01-27Bugfix print arguments in functest_utils.pyjose.lausuch1-3/+4
Change-Id: I54c94ad43a88732840c0cf915bae42a0cf476e90 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit fd0e23740a75ef749a75431defba50520d79215a)
2016-01-27Refactor functest_utils.py scriptjose.lausuch1-287/+380
JIRA: FUNCTEST-129 Change-Id: Id5202b1830f7efa77fdb8023d4eeb93775168d29 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit b3b50bef3d0ee76decca7810fbccdbac13ab892c)
2016-01-25Add support for Promise test casesjose.lausuch1-0/+6
JIRA: FUNCTEST-68 Change-Id: I80f8e587e53c7242f8bfa666f2ac450e73c8294f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 76b49b8c1eefcebe69d798157cb7742152a57155)
2016-01-22Put scenario in version field on the Test DB (rather that git indication)Morgan Richomme1-3/+17
Change-Id: I22f7ff3841d7fca637e400d92926d2e1b1755371 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com> (cherry picked from commit 59063638116508f7ce4f7612def938bb9eb0e938)
2016-01-20Added vPing2 using SCP and SSH instead of nova userdatajose.lausuch1-0/+32
Change-Id: I194f88a4d213e5ad2225241420a9254878f4f7f4 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 625dde8e972f2586e986a46225ce87ebd3823b79)
2016-01-19Ensure nameserver ip worksboucherv1-1/+5
Change-Id: I380b69bcfa79873fbde3412ab994f9c34c4b9ac2 Signed-off-by: boucherv <valentin.boucher@orange.com> (cherry picked from commit 4dc35c36e80521b0fe0ca6ab528d2c4e062b2a12)
2016-01-15bugfix: update cinder quota strange spaceboucherv1-1/+1
Change-Id: I984be5267a3492c4d3b5922a982aed0ad94e7c5b Signed-off-by: boucherv <valentin.boucher@orange.com> (cherry picked from commit f4aa5fbebff139543acb891d9d38c9f8fa864cda)
2016-01-15add doctor test caseRyota MIBU1-3/+6
Change-Id: Ia40face4cb32247542d5841e00caafb2cf927c2e Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com> (cherry picked from commit 4781a7b06cdba9bcf4489b1cb4e94ffdeec677bd)
2016-01-14set up mechanism to tun only runnable tests in CI based on scenarioMorgan Richomme1-76/+70
JIRA: FUNCTEST-119 Change-Id: I342c027c79fab1cc9fa65ddf8222e7b12b946af8 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com> (cherry picked from commit cdf5e6a2fd05f07a5db92175777113d732258a94)
2016-01-13Fix dns problem on E/// podboucherv1-4/+20
FUNCTEST-122 Change-Id: I077ca9f1e8394583410f4b067d272e5be225ef3d Signed-off-by: boucherv <valentin.boucher@orange.com> (cherry picked from commit 5f49a3982fdd8c8addac8b3b5d3b23327de3d077)
2016-01-13Remove references to foreman installer.jose.lausuch1-1/+1
Foreman is not longer supported, the only INSTALLER_TYPE values are: fuel|apex|joid|compass Change-Id: I3c86335d16cdcab4796892a769189fcc4e7457db Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 0f9250f654be1e2ced4b6d640ec13e7e78db39ee)
2016-01-12Cleanup functionality improvedViktor Tikkanen1-4/+10
1. All the existing external networks will be preserved. 2. Forced deleting is used for volumes with wrong status. 3. Added forced removing of hanging ports in case of network:router_interface ownership. Change-Id: Ibd51b98d6bf2a5d82f16f070003128e3200f99ed Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com> (cherry picked from commit 5380c97d53cf7f198e75e9cd5531e758edbc76ff)
2016-01-11Add mechanism to check whether the test can be run or not according to the ↵Morgan Richomme1-12/+131
scenario/controller JIRA: FUNCTEST-119 Change-Id: Ida658760484140ff59f7198dbbf4d5620450ff27 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com> (cherry picked from commit 9de9e1226184ede9c5b8aadde9287dec29b422ee)
2016-01-11Searching for shared private networksViktor Tikkanen1-2/+2
Tempest suite assumes that there is at least one shared private network in the system. get_private_net() returns now first found shared private network (instead of first found private network). Change-Id: I892abcacff2c0349dd42444a632f71c6a14a0861 Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com> (cherry picked from commit 378c1baeecdd66ea8c74f1046e2e54297d9f204d)
2016-01-05Using shared private networkViktor Tikkanen1-0/+10
Number of tempest test cases search for shared private networks and use value of fixed_network_name parameter from tempest.conf file in case when multiple shared networks are found. Private network created by functest is updated to be "shared". Added routine for network updating into functest_utils.py. Note that currently used OpenDaylight release (Lithium) doesn't support shared private networks so network updating will fail (this is however not a fatal error). Change-Id: I5a9a0f950b3ef61b6ebfda1af4345460134cc0e3 Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com>
2016-01-04Update cinder volume quota for new tenant 'vIMS'grakiss1-0/+13
Change-Id: I26aad4f3989c89a62f66add85e0d88b7fd274425 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
2015-12-30Merge "Update orchestrator (cloudify) version from 3.2 to 3.3"boucherv1-1/+2
2015-12-28Support for removing hanging portsViktor Tikkanen1-0/+13
Sometimes we have situations when all the routers are deleted but there are still ports with network:router_gateway device owner. Such ports can be deleted only after clearing the device owner information. update_neutron_port() function is added into functest_utils.py and taken into use in clean_openstack.py. Change-Id: I1c9ba2ac499edecec99849b5e895be0248ffd84f Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com>
2015-12-27Update orchestrator (cloudify) version from 3.2 to 3.3boucherv1-1/+2
FUNCTEST-121 Change-Id: I05de60dae213e2f2b3ba272917dc70ca03e5fe90 Signed-off-by: boucherv <valentin.boucher@orange.com>
2015-12-23Add 'check if file exists' when creating the glance imagejose.lausuch1-2/+7
Change-Id: I2f61d130ac49ca0cc6bdde6b3da209ec37f24452 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-12-14OpenStack cleanup scriptjose.lausuch1-1/+117
This is needed in case any test case doesn't clean what it creates in openstack. (This has been happening sometimes for Tempest, for example) This script will remove: - nova instances - glance images - cinder volumes - networks/subnets/ports - routers - floating ips - security groups - users and tenants (not admin) It won't remove the defaults. Change-Id: Ie09a5ad481fc3d1b92f124362aea6906665a1629 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-12-09Create a common network for functest for all the testsjose.lausuch1-0/+11
Some installers provide a private network by default, if that is the case, it will not create another one. This is needed for Rally/Tempest to work. Removed from vPing test case, since it will use that network as well. Change-Id: Iaff8a9e18026fe5aba31e567a4a8d5faf4a0bb6b Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-12-07condensing python code in utils check_credentialsDan Radez1-19/+2
comment said: TODO: there must be a short way to do this doing if os.environ["something"] == "" throws an error This does the same thing removing the try catches using conditionals and list functions Change-Id: I614e0aa49ab62aeeb738bdd36ef55452d585d8fb Signed-off-by: Dan Radez <dradez@redhat.com>
2015-11-30Add functions to retrieve POD name in FunctestMorgan Richomme1-0/+15
JIRA: FUNCTEST-108 Change-Id: I3453933e12cd7af9b06f50b327873f7516609566 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2015-10-29Fix error when deleting the network in vPing test.jose.lausuch1-0/+7
JIRA: FUNCTEST-93 Change-Id: I9472c1183eea86b0c018059aa17b76bd2932ad8e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-10-28vIMS test integration and move "push_results_to_db" methodboucherv1-0/+18
Move "push_results_to_db" method to functest_util Updated some files for clearwater vIMS functional testing Change-Id: I21628b063470963e4e4425a0f89fefa33494e40d Signed-off-by: boucherv <valentin.boucher@orange.com>
2015-10-13Fix version number returnMorgan Richomme1-2/+1
JIRA: FUNCTEST-36 Change-Id: Icc4927abc5993535effd58658c3166b59afec93c Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2015-10-13add functions in utils and fix vPingMorgan Richomme1-38/+98
JIRA: FUNCTEST-36 Change-Id: I5bf315117edc25a6f92b3c4cc873e7626aaff5e0 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2015-10-09Bugfix: urllib-->urllib2.jose.lausuch1-1/+1
If there is no internet, it will not throw an error, but it will quit as expected with a proper message. Change-Id: I133d932d4713b6bb6f452736c71b38ce5c5a6310 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-10-07Dockerfile for Functestjose.lausuch1-1/+1
Includes also: - script to trigger Functest automatically within the container - common requirements file to install python modules - added new parameters in the config_functest.yaml - other small adjustements JIRA: FUNCTEST-29 Change-Id: I230631e43e5f7e14938b35903ecec1b17db0f88a Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-10-05vIMS deployment and cleanupboucherv1-2/+38
These scripts allow to : - Prepare platform (tenant, user, image, quota etc) - Deploy cloudify-manager-server - Deploy vIMS Clearwater - Undeploy vIMS - Undeploy cloudify-manager-server - Clean the platform vIMS test coming soon JIRA: FUNCTEST-38 Change-Id: I35be6433c6511d741a27b67fe24c3031f1e29fe5 Signed-off-by: boucherv <valentin.boucher@orange.com>
2015-10-02Add get_networks_list function in functest_utils.pyjose.lausuch1-20/+33
Change-Id: Ibafaf66f2c63a38d847cdd59a70da74475dc7c7e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-09-18Adding some methods on functest_utils.pyunknown1-0/+87
These methodes allow to manage : - keystone user, tenant and role - glance image - nova flavor These methodes will be used on vIMS test-case. JIRA: FUNCTEST-38 Change-Id: Ib5f1fb5ef325ab0527115a36b9c6ce6b45aa84f6 Signed-off-by: boucherv <boucherv@live.fr>
2015-09-15Remove OS_REGION_NAME from OpenStack credentials checkjose.lausuch1-4/+0
Change-Id: I4de7a1cd68f3381d4e22848595ce4c52b1aaa29f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-06-18functet_utils: bugfix check_internet_connectivity exceptjose.lausuch1-1/+1
JIRA: FUNCTEST-17 Change-Id: I28cdd11b1004507ae7b455f19a2555a17eae85c7 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-06-18replace default web site for testing internet connectivityMorgan Richomme1-1/+1
previous one was filtered in China JIRA: FUNCTEST-10 Change-Id: Ib5c7f1a6b69b12b2e78a3d8aca9dc78e5b7c652e Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2015-06-03functest_utils.py : bugfix: logg-->loggerjose.lausuch1-1/+1
JIRA: FUNCTEST-10 Change-Id: I6595aecb29b3b6881840a12d5594130fbd9b790e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-06-02vPing.py: Fixed IPs for VMs, Not DHCPjose.lausuch1-0/+14
JIRA: FUNCTEST-3 Change-Id: Ib921262cfe153e47b88ba268199a66bc47950893 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2015-05-30Improvementsjose.lausuch1-0/+231
- Added: functest_utils.py for common util functions - Moved: a lot of functions from config_functest.py to functest_utils.py - Moved: create of functest-net from config_functest.py to vPing.py - Improvements and code cleaned JIRA: FUNCTEST-10 Change-Id: I0d3381576cbb24a999ea69e107baafea896a36e7 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>