summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils/glance_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-03-12Closing keystone sessions after done with them.spisarski1-2/+7
By not closing all of the keystone sessions being created when running all of the tests, this may be the root cause to the IOError occasionally being observed: IOError: [Errno 24] Too many open files JIRA: SNAPS-285 Change-Id: I7fc7ab0c6cdd02f1ae32bb3ae4f121cb465d5693 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-09-08Enhanced launch.py app to support all types.spisarski1-2/+2
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-11/+19
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-27Ensure library and tests close all necessary resources.spisarski1-15/+23
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-25Added region support.spisarski1-1/+2
Added region_name attribute to OSCreds Added region_name to neutron, nova, glance, heat, and keystone client retrieval Fixed false positive heat connection test. JIRA: SNAPS-50 & SNAPS-146 Change-Id: If3471ed7a2bdd0e6bfc281455c996386d031235d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-24Fixed potential problems with image creation exceptions.spisarski1-16/+27
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-24/+13
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-07-17Created new class GlanceException.spisarski1-23/+39
Raising GlanceException in glance_utils.py instead of Exception. JIRA: SNAPS-126 Change-Id: I11b2d9a1ff439c1a4a52b4be30584fe8af877c73 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-25Updated installation documents and fixed problems found during investigation.spisarski1-2/+11
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-16Added support for offline testingspisarski1-11/+19
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.xspisarski1-3/+1
* 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-04-26Added support for Glance v2spisarski1-24/+121
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-01Add support for extra properties in an imageCristina Pauna1-0/+12
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/+78
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>