summaryrefslogtreecommitdiffstats
path: root/snaps/provisioning
AgeCommit message (Collapse)AuthorFilesLines
2017-10-06Increse ssh timeout in AnsibleJose Lausuch1-2/+2
The SNAPS smoke tests pass on Apex when the timeout is a bit higher than 10 (default) JIRA: SNAPS-186 Change-Id: I2f42f0fc9a78bfad4ae3940813e87ba7572ad2f5 Signed-off-by: Jose Lausuch <jalausuch@suse.com> (cherry picked from commit 440acd77fbda4cf944cc915bef4183935527f651)
2017-07-27Ensure library and tests close all necessary resources.spisarski1-13/+39
The SNAPS-OO library and tests had left open files, ssh, and scp connections. These have all now been wrapped with try/finally blocks. JIRA: SNAPS-152 Change-Id: I43e09978b5c075bd78ff3279c0799556b8758878 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-18Merge "Created new class AnsibleException."Steven Pisarski1-2/+8
2017-07-17Created new class AnsibleException.spisarski1-2/+8
Raising AnsibleException in ansible_utils.py instead of Exception. JIRA: SNAPS-130 Change-Id: I72d7ea3779c9644559ae7dc4dbb26edc4da20594 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-17Last task necessary to stop users from easily obtaining OS objects.spisarski1-4/+4
Changed external interfaces still exposing OpenStack created APIs to either return SNAPS-OO domain objects or objects contained on the OpenStack generated objects as to not leak implementation details that would eventually break the library when new API versions are released. JIRA: SNAPS-125 Change-Id: Iab6d6d298c4c5da68daed4b1b252313a1595a295 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-11Allow ssh when testing via ansibleCédric Ollivier1-3/+7
Change-Id: I5a518242fec9c3434040bbfa0d725e16068cff25 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-07-10Changed validation logic to check for DHCP lease before SSH connection.spisarski1-9/+8
Change-Id: Ifa5c481963d0a9607107465915eb7ab12501e21d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-06Added support for using '~' for SSH key location.spisarski1-21/+38
While testing changes, fixed problems found with querying for floating IPs which also required adding network data to the VMInst domain object. JIRA: SNAPS-85 Change-Id: I0ecf3a6885ce84fe14c4a6db09269c56dc0ad9fc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-29Fixed tests to delete security groups.spisarski1-8/+38
Change-Id: I140618a310bae050bea29df665b98881c6052980 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-22Use neutron to create floating IPs.spisarski1-44/+84
This patch moves the floating IP creation out of nova and into neutron. Other changes include the use of domain objects for VM and Floating IP instances, addition of new nova_utils tests to exercise the create server functionality, and more PEP8 compliance. JIRA: SNAPS-92 Change-Id: I16c12b26b56008901633e90ae307586ad2045f9b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-21Fixed launcher app to support new settings kwargs.spisarski14-75/+0
Additionally, found issue with importing ansible libraries. Needed to rename the snaps.provisioning.ansible package to 'ansible_pb'. JIRA: SNAPS-107 & SNAPS-93 Change-Id: I8c8628d3af5ce30849229ed47bfbb0ecaad5b3ad Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-19Merge "Missed image config for configuring multiple NICs test"Steven Pisarski5-0/+75
2017-06-14Need to move file resources required by tests.spisarski1-0/+0
Functest was not installing the heat resource files required by the snaps tests being run by Functest as the heat template file used by the tests as it was under the repository's root directory which is causing tests to fail. Change-Id: I214d2e61e92f7dfa2e9859dded1e7ea08706314d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-11Missed image config for configuring multiple NICs testspisarski5-0/+75
JIRA: SNAPS-89 Change-Id: I640aee39842272ca8dd6245be10c2fb3a899020e Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-07Removed current working directory logic retrieving test file resources.spisarski2-3/+21
Some of the SNAPS tests leverage file resources contained within the project. These resources were being accessed via relative paths which required the test clients to ensure that the CWD was the <repo>/snaps directory. Replaced that logic to leverage the import pkg_resources making the tests much more flexible and robust. JIRA: SNAPS-89 Change-Id: Ic9c429ee53e4dd785641e11e1ed4de5aeeab54d1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-07Merge "Added custom security group with ICMP and SSH rules."Steven Pisarski1-3/+29
2017-06-06Added custom security group with ICMP and SSH rules.spisarski1-3/+29
This was done for all tests exercising floating IPs. Also added check to all of these tests to ensure the VMs all have received their private IP address via DHCP. JIRA: FUNCTEST-834 Change-Id: I88ae2fecc3f8e507641adf24cb65a0583f4db24c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-05Added support for applying Heat Templatesspisarski1-0/+15
Second patch expanded support to both files and dict() objects. Third patch exposes new accessor for status and outputs. JIRA: SNAPS-86 Change-Id: Ie7e8d883b4cc1a08dbe851fc9cbf663396334909 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-25Updated installation documents and fixed problems found during investigation.spisarski1-4/+7
The code changes are primarily required when the runtime environment is Windows. JIRA: SNAPS-75 Change-Id: Ia2134861dd96e1d2c4b597f42fb348929e787a51 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-19Fixed error in ansible_utils_tests.py and added ansible helperspisarski1-4/+4
method to the OpenStackVMInstance class. Test error was due to the image configuration having the incorrect user applied. The helper method will make it easier for adhoc ansible playbooks to be applied to running instances. JIRA: SNAPS-83 Change-Id: I6b229e0adb836dd3d5ea7b468d38d93f880589a2 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-16Added support for offline testingspisarski1-1/+1
Expanded the image_metadata used by the tests for overriding default images for not only supporting 3part images but also to support offline testing as required by Functest. JIRA: SNAPS-67 Change-Id: I6975e7b51fa879fe984af64402939c465df95184 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-08Modified code to support both Python 2.7 and 3.xspisarski2-7/+7
* Tested on Python 2.7.10 and 3.4.4 * Updated installation documentation JIRA: SNAPS-30 Change-Id: I94a37d218be8ea47bbbcfb560197737430fcb3ba Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-03Changed image metadata to support cirros, ubuntu, and centos.spisarski1-3/+3
The image metadata that was designed for multi-part form support did not take into account tests that require ubuntu or centos tests. JIRA: SNAPS-76 Change-Id: I95c7b74b8f7d7b78c3842b5e716fd7b466107c9c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-27Refactored multi-part images.spisarski1-36/+12
The logic used for creating multi-part images for the Danube release was copied all throughout the tests, which was not sustainable. This patch encapsulates the kernel and ramdisk images within the same OpenStackImage object as the disk image. JIRA: SNAPS-59 Change-Id: I45ec0ccc666accb4e768c41e249e6130dc07f6d1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-03-23Check for kernel_url and ramdisk_url keys in dictCatalina Focsa1-4/+4
Need to check if the above keys exist in image_metadata before checking for their assigned values in case they are not declared (e.g. obsolete when creating a one part image) Change-Id: I22fa259b320a425d6ad030eeb9bf68b4c06b667f Signed-off-by: Catalina Focsa <catalina.focsa@enea.com>
2017-03-08Adapt integration tests to use custom image configCristina Pauna1-6/+30
This fix uses the possibility to pass custom imformation about the image via image_metadata variable. In the integration tests it checks for this info and creates a 3-part image if the kernel_url and ramdisk_url are set. The fix also allows the default url to be overriden as well as passing extra-properties. All the metadata info comes from the app. The part in functest where the custom config is set for creating a 3-part image is https://gerrit.opnfv.org/gerrit/29987 Change-Id: Ib2ad823705dbea68d672514c7c89b150c9c6dc63 Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-03-06Added the ability to give the tests the ability to add in flavor metadata.spisarski1-1/+2
NFVI's configured for OVS/DPDK and fd.io scenarios required special metadata for flavors in order for VM instances to be activated. This patch allows for setting a value to be applied to all tests. With this change, the default value is being removed that only partially addressed this issue. JIRA: SNAPS-38 Change-Id: Ic42944a849f710f631fe7ac6fbefb720a73f0b77 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-02-27Added Ansible substitution value support for flavor IDs, image IDs, and ↵spisarski1-7/+1
image_user values to the SNAPS-OO application deploy_venv.py. Decided to stop raising an exception when ansible cannot properly apply the playbook and simply logging the problem as a WARN. Change-Id: I4ae74bbaa80a5d9763cc9352810c1620af3192af Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-02-15Initial patch with all code from CableLabs repository.spisarski12-0/+475
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>