summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests/create_image_tests.py
AgeCommit message (Collapse)AuthorFilesLines
2017-11-16Refactoring of ImageSettings to extend ImageConfigspisarski1-26/+30
ImageSettings and glance_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the ImageSettings class. JIRA: SNAPS-217 Change-Id: I09f34531366f2a5bd3202c9cbbdef878b2542abe Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-09-08Enhanced launch.py app to support all types.spisarski1-13/+0
Added application support for users, projects, and security groups. In addition, added support for multiple credential sets so one can manage multiple projects potentially on multiple clouds. Added Jinja2 template support for substituting values in the template file with values contained in the environment file. Added ansible substituion value for a VM's floating IP. Changed credentials interface attribute's default value from 'admin' to 'public'. Added optional pre_sleep_time attribute to ansible execution that will wait for a given number of seconds prior to attempting to apply a playbook to a set of VMs. JIRA: SNAPS-4, SNAPS-5, SNAPS-6, SNAPS-26 Change-Id: I67b8d69a3b06a43631d80e8fe0c56e02773dbfbe Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-31Added image_settings parameter to get_image().spisarski1-19/+21
With the ImageSettings object, was able to add logic to filter on the image format field in addition to the name. JIRA: SNAPS-157 Change-Id: I6fc51a9d4d03dc9971005ee738e6592d8ed70485 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-24Fixed potential problems with image creation exceptions.spisarski1-0/+16
With Glance client v2, it appears that rolling back on image creation error was sending in an OpenStack image object into the delete_image() function where it should have been expecting a SNAPS-OO Image domain object. Also added log messages to help expose other potential issues if this patch does not address the root problem at hand. JIRA: SNAPS-139 Change-Id: I52591ff1d055ddf4eacbbc49b3bc8718285edcfa Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-21Refactor glance_utils.py v1 image creation.spisarski1-1/+8
Replace 4 blocks using named parameters with on call to create() with kwargs. JIRA: SNAPS-141 Change-Id: I1268877a8524bb25a7f605f583ace9602f5a9c1b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-28Fixed test to not download images when configured with a disk file path.spisarski1-3/+19
JIRA: FUNCTEST-809 Change-Id: I078578ba9881eeeb8942d22cb342e87e17f6f879 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-19Changes ImageSettings constructor to use kwargs.spisarski1-140/+261
And changed line lengths to 79 for pep8. JIRA: SNAPS-96 Change-Id: Ibda4954a4d9a6be4b94a7b2de61d03b25afff8db Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-16Added support for offline testingspisarski1-193/+238
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-08Merge "Modified code to support both Python 2.7 and 3.x"Steven Pisarski1-96/+96
2017-05-08Fixed some redundant dict() key checks that can cause runtime errors.spisarski1-7/+7
Change-Id: I9d05e6cc69526b7424b65e171da1fa4e99e02149 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-08Modified code to support both Python 2.7 and 3.xspisarski1-96/+96
* 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-37/+29
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-225/+137
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-04-26Added support for Glance v2spisarski1-38/+89
Updated copyright date on new and edited files to current year. JIRA: SNAPS-66 Change-Id: I491157d6ced8bd9322f99272fc14e00168faaf29 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-03-23Check for kernel_url and ramdisk_url keys in dictCatalina Focsa1-36/+45
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-35/+171
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-01Add support for extra properties in an imageCristina Pauna1-4/+175
This patch adds a new setting for images, extra_properties. This field is a dict and can be used to create a 3-part image by setting the kernel_id and the ramdisk_id of the main image. Unit tests have been added to set some generic property, for creation of the 3-part image, and for creating an instance with that 3-part image JIRA: SNAPS-32 Change-Id: Ifb53d1da1085fcd6429ddc0607c905522db5e8bb Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-02-15Initial patch with all code from CableLabs repository.spisarski1-0/+362
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>