summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils
AgeCommit message (Collapse)AuthorFilesLines
2018-01-30Avoid checking Keystone v3 domains when using API v2.0stable/euphratesGeorg Kunz2-5/+9
Introducing a version check to avoid checking keystone domains, which are an auth API v3 feature, when only auth API v2.0 is being used. Change-Id: I220c6637e5f65124e5dbe7d5246490c3986b7a66 Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
2017-11-09Fixed test names.spisarski1-3/+3
Copy/paste issue changed nova to heat. Change-Id: Ib75fcea4c87375f615862e0542569c8e3d9675e8 Signed-off-by: spisarski <s.pisarski@cablelabs.com> (cherry picked from commit 1ac3fefd616758779fc1489b5fee8689ec2487d9)
2017-08-23Get the correct endpoints URL based on OS_REGION_NAME env propertyLaurent Strullu1-1/+2
It also ignores *.pyc. Change-Id: I94a5e297108b839fd6d2811faa34eed3023c0e3a Signed-off-by: Laurent Strullu <laurent.strullu@orange.com>
2017-08-11Merge "SNAPS Stack creators can now return SNAPS network creators."Steven Pisarski4-17/+154
2017-08-09SNAPS Stack creators can now return SNAPS network creators.spisarski4-17/+154
As Heat Stacks are responsible for spawning objects in OpenStack, the class OpenStackHeatStack which is responsible for applying and managing the state of a stack now can retrieve OpenStackNetwork objects for the networks created in the stack for clients who would like to query the networks and subnets or update them outside of Heat. JIRA: SNAPS-171 Change-Id: I9bf0b81d4f7bfeb1b6392f345022c7d9a57d0415 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-09Added feature to update the quotas on a project/tenant.spisarski3-1/+74
JIRA: SNAPS-170 Change-Id: Icf494dd2bddc338b8e85259b0400c0950d2332bc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-08Merge "Refactored neutron_utils#get_router_by_name() to get_router()"Steven Pisarski2-8/+19
2017-08-08Configure requirements for AAVMF(UEFI) with Cirros image on AArch64 Delia Popescu2-2/+2
Cirros image on AArch64 with AAVMF(UEFI) requires at least 256MB RAM. The default 128MB was changed to 256MB. Change-Id: I7414de519dcb53337f83690d1470ea672cec739b Signed-off-by: Delia Popescu <delia.popescu@enea.com> JIRA: ARMBAND-279
2017-08-07Refactored neutron_utils#get_router_by_name() to get_router()spisarski2-8/+19
Added a router_settings (RouterSettings) object parameter in addition to router_name for more robust query options. JIRA: SNAPS-163 Change-Id: I47672f531171d6ee0c90dabb6641640bf97c1d20 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-07Refactored neutron_utils#get_security_group()spisarski3-22/+37
Added a sec_grp_settings (SecurityGroupSettings) object parameter in addition to sec_grp_name for more robust query options. JIRA: SNAPS-164 Change-Id: I8bb21ff9e5e6b1f532773ca01d37964f8b47b530 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-07Merge "Refactored neutron_utils#get_subnet_by_name() to get_subnet()"Steven Pisarski2-49/+59
2017-08-07Merge "Refactor server retrieval API calls."Steven Pisarski1-10/+17
2017-08-07Merge "Refactored port retrieval to include PortSettigs."Steven Pisarski2-9/+23
2017-08-04Refactored neutron_utils#get_subnet_by_name() to get_subnet()spisarski2-49/+59
Renamed utility function and added a subnet_settings parameter to hold a SubnetSettings object to help make the query more robust by being able to leverage values on the settings object. JIRA: SNAPS-165 Change-Id: I226a1217dc4ba7bb50f7d985ecfaf3b7bc4f610b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-03Refactor server retrieval API calls.spisarski1-10/+17
Refactored nova_utils#get_servers_by_name() to get_server() and include a VmInstSettings object in addition to the server_name parameter as well as only returning one VmInst object. JIRA: SNAPS-168 Change-Id: I30c22a36b07ce143ee8c1c76a77fd75f0062e4aa Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-03Refactored port retrieval to include PortSettigs.spisarski2-9/+23
Refactored neutron_utils#get_port_by_name to get_port while adding in a port_settings object for more robust query options. JIRA: SNAPS-162 Change-Id: I01222ad344224db94615859448ad05d8d5bc0c30 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-03Delete 'default' security group associated to new projects.spisarski2-4/+18
OpenStack can create a security group named 'default' each time a new project/tenant has been created but is not cleaned up when the project has been deleted. This patch adds this functionality into OpenStackProject#clean() method. Also added similar routine to KeystoneUtilsTests#tearDown() method. JIRA: SNAPS-169 Change-Id: I29492ae2ddd82e7d59d09b9c4eb759be4835532a Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-03Merge "Refactor network retrieval API calls."Steven Pisarski2-16/+20
2017-08-03Merge "Add domain name when creating projects and users"Steven Pisarski2-13/+55
2017-08-03Add domain name when creating projects and usersLinda Wang2-13/+55
(spisarski) Also clarified the difference between domain ID and name Added helper methods and domain object for Domains JIRA: FUNCTEST-858 Change-Id: Iccd7eef56713a4ad0c23232073f52bc71168bf5c Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-02Refactor network retrieval API calls.spisarski2-16/+20
Refactored neutron_utils#get_network() to also accept a NetworkSettings object for more robust queries in addition to the old network_name parameter. Also refactored neutron_utils# get_network_by_id to add in the ID to list_networks((**{'id': id) and returning the first item contains the expected ID value. JIRA: SNAPS-161 Change-Id: Ie670a442dd70633bbef7a1233e630672ebac6b0c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-02Merge "Changed heat_utils#get_stack_by_name to get_stack."Steven Pisarski2-26/+129
2017-08-01Merge "Changed keystone_utils#get_project to accept settings"Steven Pisarski2-13/+23
2017-08-01Merge "Added image_settings parameter to get_image()."Steven Pisarski3-16/+26
2017-07-31Changed keystone_utils#get_project to accept settingsspisarski2-13/+23
Added project_settings parameter to allow for more robust queries based on the known settings as required. JIRA: SNAPS-159 Change-Id: I56ecf0cc34bbb91c4cfe2afe83971b614ec80a39 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-31Changed heat_utils#get_stack_by_name to get_stack.spisarski2-26/+129
Added stack_settings parameter to allow for more robust queries based on the known settings as required. JIRA: SNAPS-158 Change-Id: I538826f822307365b1afe997b71280b9ea500eab Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-31Added image_settings parameter to get_image().spisarski3-16/+26
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-31Attempt to fix domain support.spisarski1-1/+3
The prior code treated *_domain_name & *_domain_id the same where the ID was taken first and the name was used as the fallback which was incorrect. This patch treats the name and ID fields as separate members. JIRA: SNAPS-154 Change-Id: I5219863de597c4db24579f4af74ece2d648b2b07 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-28Removed floating IP list from OpenStackVmInstance.spisarski1-4/+18
There was a list and dict both holding the same floating IP objects which has been problematic especially when trying to initialize the object with a VM instance that already exists. JIRA: SNAPS-149 Change-Id: If4af6dfef04a40b9c8cd7a8add484c9ec03f1ef8 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-27Ensure library and tests close all necessary resources.spisarski2-31/+56
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-27Merge "Expand OpenStackSecurityGroup class tests."Steven Pisarski1-11/+3
2017-07-26Expand OpenStackSecurityGroup class tests.spisarski1-11/+3
Improved validation and added another test case. JIRA: SNAPS-148 Change-Id: I249ac0fcce502dd91c82cc2bfb54ca22da5e33bb Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-26Expanded project creation tests and validation.spisarski1-2/+10
JIRA: SNAPS-147 Change-Id: I16eb1ab9f976daf4195a47b04ce5b8b8ba931497 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-25Added region support.spisarski6-18/+37
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-24Added validation router is attached to the external network.spisarski1-1/+4
Verifying that the external network's ID is the same as the 'network_id' value in router.external_gateway_info. JIRA: SNAPS-145 Change-Id: I60795c69679f6e439e6e102115e228a65572db52 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-24Merge "Refactor glance_utils.py v1 image creation."Steven Pisarski1-24/+13
2017-07-21Added and improved flavor creation tests.spisarski1-0/+11
JIRA: SNAPS-142 Change-Id: I9c3cf5202a551f7b137648e95359f0adeb831101 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-20Changes required for running CI tests (Pike pod).spisarski4-17/+32
Added support for HTTPS proxies HTTPS OSCreds settings for both RC file and os_env.yaml OSCreds 'cacert' T/F and cert file path support OSCreds API version support cleanup including the addition of heat Added more OSCreds test validations Disabling of InsecureRequestWarning PEP8 line width refactoring heat_utils_test.py fix when stack status is error test suite for CI removed default flavor metadata of mem_page_size: Any to None JIRA: SNAPS-80 Change-Id: I333e83ca79d7403bf43a9b74da4c072b4da976ba Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-18Merge "Created new class NovaException."Steven Pisarski1-4/+9
2017-07-18Merge "Created new class NeutronException."Steven Pisarski2-15/+24
2017-07-17Created new class NovaException.spisarski1-4/+9
Raising NovaException in nova_utils.py instead of Exception. Change-Id: I9564e43352114df18bccc794a5cd57e20880085f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-17Last task necessary to stop users from easily obtaining OS objects.spisarski5-37/+90
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-17Merge "Created new class KeystoneException"Steven Pisarski1-2/+8
2017-07-17Created new class KeystoneExceptionspisarski1-2/+8
Raising KeystoneException in keystone_utils.py instead of Exception JIRA: SNAPS-127 Change-Id: Ife37c9df79c5c85dfdb07e239268c05b7c9a91bd 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-07-17Created new class NeutronException.spisarski2-15/+24
Raising NeutronException in neutron_utils.py instead of Exception. JIRA: SNAPS-128 Change-Id: I567db38a5dfcaae9bbfc6c74558521b0e28d9d46 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-13Created domain classes for networks and subnets.spisarski2-126/+99
Created Network and Subnet domain classes so neutron_utils.py functions returning these types of objects will not be leaking out implementation details as each API version can change these data structures which is now being handled by the SNAPS neutron utility. JIRA: SNAPS-113 Change-Id: Id95dd0f8c2618c20a1a73a428abb95686dfa8251 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-13Merge "Created domain class for routers."Steven Pisarski2-22/+22