summaryrefslogtreecommitdiffstats
path: root/utils/openstack_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2016-10-19Merge "Add wrappers for Tacker Python client"Jose Lausuch1-2/+1
2016-10-19Add wrappers for Tacker Python clientGeorge Paraskevopoulos1-2/+1
New module: functest.utils.openstack_tacker Change-Id: Ie02b72d53c824eeff944bc76e4cae58c8de9044a Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-10-18Remove exits in OpenStack client utilsCédric Ollivier1-2/+10
It prevents openstack_utils from exiting when the mandatory env vars are unset. Every testcase is now in charge of handling the exception MissingEnvVar. JIRA: FUNCTEST-438 Change-Id: I0e321b544a470c1f2f2fa62b3e061fe5f938e112 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-09-27Move sfc custom flavor creationGeorge Paraskevopoulos1-4/+6
The custom flavor that is needed for the sfc test case is created in the tacker deployment phase. The result of this is that when we use alternative methods of deploying tacker (i.e. the tacker fuel plugin) the test fails. Changes: - Move the flavor creation inside the test case code - Add an optional public parameter in the [get_or_]create_flavor utility functions. Change-Id: Iea13f172076770dde3876b7e27edc9b7ca9b28db Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-09-16Fix formatting errorcristinapauna1-1/+1
This is a fix for https://jira.opnfv.org/browse/FUNCTEST-477 The script terminated due to incomplete formatting Change-Id: I580750e2fe6b1b8957ab017c64d44b9693760860 Signed-off-by: cristinapauna <cristina.pauna@enea.com>
2016-09-15Added support for custom images and flavors in tempestjuraj.linkes1-18/+39
Change-Id: I9335ed1517097e83175a265b603a6707adf476b6 Signed-off-by: juraj.linkes <jlinkes@cisco.com>
2016-09-15fixed updating of hugepage flavorsjuraj.linkes1-1/+1
Change-Id: I5719aef5d5334584337858cf5fee3ef024c0eaac Signed-off-by: juraj.linkes <jlinkes@cisco.com>
2016-09-14Add utils for getting bgpvpn informationRomanos Skiadas1-0/+12
Change-Id: I86f9e2afa6578dc60ea82fd163427a4f6e2f8526 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com> Co-Authored-By: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-09-13Refactored support for flavor and image hugepages based on Morgan's suggestinsjuraj.linkes1-8/+15
Change-Id: I414338616aecda161a51a780abb24c9e3a8f5c54 Signed-off-by: juraj.linkes <jlinkes@cisco.com>
2016-09-12Added support for creating images and flavors with hugepages for fdio scenariosjuraj.linkes1-0/+10
Change-Id: Idb1cb3a6b71e6de9343a07b14731ae506a44567e Signed-off-by: juraj.linkes <jlinkes@cisco.com>
2016-09-01Add router association utility functionGeorge Paraskevopoulos1-0/+5
Add function to create an association between a router and a bgpvpn Change-Id: I23449a0363f9d8f3c77ea3be1e104586d3c111d1 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-09-01Fix some bugsboucherv1-1/+1
Change-Id: Iaf0859775933ba09cbbe170af3ce4ed1e6d3e9a1 Signed-off-by: boucherv <valentin.boucher@orange.com>
2016-08-26refactor create shared network process to eliminate reduplicateSerenaFeng1-0/+22
Some places shared network is created through create_network_full first, then update it to shared, abstract a uniformed method to eliminate reduplicate JIRA: FUNCTEST-437 Change-Id: I13c20ab061323188c5eb3b8c861674df38083c62 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-08-26refactor create or get image process to eliminate reduplicateSerenaFeng1-0/+20
Some places when create image is referred, they check if image exist, if exist use it directly, else create a new one. Abstract a method to integrate the process JIRA: FUNCTEST-432 Change-Id: I83d1112aa5cb0d3cdfab92fd49cd5f2c1cceff82 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-08-23when create/get/update failed return None rather than FalseSerenaFeng1-21/+21
In openstack_util.py, when create/get/update network or other resources failed, False is returned, which is incompatible with success return value such as id, network_nic. JIRA: FUNCTEST-427 Change-Id: Id2f55d8524e5aff150ba6bfb799085377a63baa4 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-07-28Add region name to OpenStack credentialsDimitri Mazmanov1-0/+4
Currently functest doesn't account for regions when it tries to instantieate OpenStack clients. As a result, the code fails when functest is used in a multi-region environment. The fix forces functest account for region name. Signed-off-by: Dimitri Mazmanov <dimitri.mazmanov@ericsson.com> Change-Id: Iebbd20042548c02da9d5ed7e58a454347a555778
2016-07-28Add endpoint type support on functestboucherv1-6/+31
By default public endpoint was used but now you can use internal or admin JIRA: FUNCTEST-387 Change-Id: If1adaa88248d379ad6d74b20f2dffd76278b67b9 Signed-off-by: boucherv <valentin.boucher@orange.com>
2016-07-20Remove logger as input parameter of functions in openstack_utilsjose.lausuch1-7/+5
JIRA: FUNCTEST-376 Also some fixes to get rid of flake8 violations in onos-sfc Change-Id: I52c2fd30a6b81af20ea779db2d73b9386524f7ce Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-19Add logger to openstack_utils to output error messagesjose.lausuch1-92/+109
This will help to see the exception error when something fails JIRA: FUNCTEST-376 Change-Id: Ibaa6954fc63af00d552ac32b3cf903b9218200d1 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-14Use common way to get the openstack clientsjose.lausuch1-0/+10
Instead of repeating the code in all the scripts and importing the openstack libraries, the clients shall be given by openstack utils, which is its purpose JIRA: FUNCTEST-163 Change-Id: I1ccc05a3af44ee1ab5938ea9e4e01dbe55f4816d Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-11Add fixed_ip and files parameters in openstack_utils in create_instancejose.lausuch1-10/+20
This is needed i.e. for sdnvpn test case Change-Id: I235a6871a86b7a0c4a9ab27a3aef4bfd62ba4d43 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-08Add delete bgpvpn function in openstack utilsjose.lausuch1-0/+5
JIRA: FUNCTEST-99 Change-Id: I0d28e5d07c857f4e80d7cf96a2ff4dbf87075abe Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-07Fix function get_hypervisors in openstack utilsjose.lausuch1-1/+2
JIRA: FUNCTEST-99 Change-Id: I23fd3fae08255d36ec158e5a522640615b5d8a10 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-07[SDNVPN] Bugfix bgpvpn functions in openstack utilsjose.lausuch1-5/+4
JIRA: FUNCTEST-99 Change-Id: Ia3fd91ec1dff5283edc3df098bb5cec342f87aea Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-07[SDNVPN] Add helper functions to create bgpvpn and associationsNikolas Hermanns1-0/+19
JIRA: FUNCTEST-99 These functions are used by sdnvpn test cases to create vpns and network associations Change-Id: I2fb25c84d8d02ea1cc92677e6a33e469a5d3ddc3 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2016-07-06Add support functions for SDNVPN test casesjose.lausuch1-5/+22
JIRA: FUNCTEST-99 Get availability zones from nova client and give the possibility to create an instance on a specific hypervisor (availability zone) Change-Id: Ieb2d26764c50ea4f4403818bb73a238236e03ee4 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-04Add example script creating an instancejose.lausuch1-22/+81
This is to be used by feature projects or newcomers to functest. SFC or BGPVPN test cases can be based on this one. The script creates an instance and assigns a floating IP to it. Change-Id: If35495631031187bfb5382ba8c0a8884dfaa3d7f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> Depends-On: Ie10d55872bc8c5a404b0d0156ee49a9d94482008
2016-07-04Add openstack clients and create instance in openstack_utilsjose.lausuch1-5/+85
JIRA: FUNCTEST-346 Change-Id: Ie10d55872bc8c5a404b0d0156ee49a9d94482008 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-06-16Remove default values if the os credentials are not setjose.lausuch1-5/+12
If the creds are not sourced, then exit. Change-Id: I55c9cd3a5a0885b81df4ce14502ba816546bcbaa Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-05-31Avoid tuples when printing multiple stringsCédric Ollivier1-28/+28
It fixes bugs induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/12623 Change-Id: I0232b14bed767b3ff857192146551a7963699bb9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-05-09Generic Function to create a private networkjose.lausuch1-0/+56
This is to be used by all the tests which need a private network to work, for example Tempest, Rally, vPing, ssh.. Added example for vPing and promise scripts. Change-Id: I5d79e7b60b81b0f34230ea3ef2f3076697a1958c Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-04-27Create prepare_env.py from prepare_env.sh and config_functest.pyjose.lausuch1-0/+10
JIRA: FUNCTEST-227 Change-Id: I1aa890b9f91ec524c766ba3c460666ed227f2126 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-04-26Move functest_utils and openstack_utils to directory /utilsjose.lausuch1-0/+767
JIRA: FUNCTEST-226 Change-Id: I74d09f6322844b25ab45a02156317ae76ab40d8a Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>