summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests
AgeCommit message (Collapse)AuthorFilesLines
2017-08-07Refactored neutron_utils#get_router_by_name() to get_router()spisarski2-22/+22
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()spisarski1-20/+21
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 Pisarski1-42/+16
2017-08-07Merge "Refactor server retrieval API calls."Steven Pisarski1-4/+4
2017-08-07Merge "Refactored port retrieval to include PortSettigs."Steven Pisarski1-0/+7
2017-08-07Add domain name when creating projects and usersLinda Wang1-3/+6
Change-Id: Id06e20e3c87072531930130db66763f554b4649c Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-04Refactored neutron_utils#get_subnet_by_name() to get_subnet()spisarski1-42/+16
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-4/+4
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.spisarski1-0/+7
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-03Merge "Refactor network retrieval API calls."Steven Pisarski1-3/+3
2017-08-03Add domain name when creating projects and usersLinda Wang4-38/+50
(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.spisarski1-3/+3
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-01Fixed logging out the OSCreds.spisarski1-1/+1
Change-Id: Id5675ff37c1d7e98eceb923194f190e2d5bc1d4d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-01Merge "Changed keystone_utils#get_project to accept settings"Steven Pisarski1-2/+2
2017-08-01Merge "Added image_settings parameter to get_image()."Steven Pisarski1-19/+21
2017-07-31Changed keystone_utils#get_project to accept settingsspisarski1-2/+2
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-31Reformat auth_url based on the ID API version.spisarski1-19/+9
No longer raising an OSCredsError when the auth_url does not end with a 'v' + some number. Additionally, the auth_url will be massaged to remove any 'v' + num from the end of the URL and generate its own version value based on the ID API version configured. JIRA: SNAPS-144 Change-Id: I3a7844025324105576da59b1516d0f541281e6bf 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-31Attempt to fix domain support.spisarski2-33/+53
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-0/+45
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.spisarski3-18/+45
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 "Changes to enable overriding the OSCreds for tests."Steven Pisarski1-1/+6
2017-07-27Merge "Expand OpenStackSecurityGroup class tests."Steven Pisarski1-47/+201
2017-07-27Merge "Expanded project creation tests and validation."Steven Pisarski1-1/+37
2017-07-27Merge "Added configuration for keypair size."Steven Pisarski1-4/+40
2017-07-27Changes to enable overriding the OSCreds for tests.spisarski1-1/+6
JIRA: FUNCTEST-847 Change-Id: I36d1add82cdb13a2c8252495fd6df8e05dab837b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-26Expand OpenStackSecurityGroup class tests.spisarski1-47/+201
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-1/+37
JIRA: SNAPS-147 Change-Id: I16eb1ab9f976daf4195a47b04ce5b8b8ba931497 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-26Removed TODO from comment about the physical network value.spisarski1-1/+2
JIRA: SNAPS-123 Change-Id: Ie4085a35816a78cb5b4b910d52ddccaf6b102b1f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-26Added configuration for keypair size.spisarski1-4/+40
Removed hardcoded key byte value of 1024 and added the abiltiy for the user to define their key size. JIRA: SNAPS-20 Change-Id: I81654420e558aae8a03bed902bb8be8f025b992c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-25Added region support.spisarski2-8/+22
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-25Merge "Added keypair config for key file deletion."Steven Pisarski1-5/+204
2017-07-24Added keypair config for key file deletion.spisarski1-5/+204
Added KeypairSetting attribute named 'delete_on_clean' which is used to override the keypair creator's logic for deleting its associated public/private key files. JIRA: SNAPS-105 Change-Id: I337db99daa6bf7d4b42e8729a92a4baef5c73140 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-24Fixed problems when setting the OpenStack project ID.spisarski4-24/+182
There were several calls to retrieve the project ID that required named parameters which was causing the utility function to always return None. Additionally, when creating the dict() required by the Neutron create API 'body' parameter key 'project_id' is not supported and still uses 'tenant_id'. As these problems should have been found earlier, this patch also extends the tests for networks, subnets, ports, and security groups to use 'tenant_id' rather than 'project_id'. JIRA: SNAPS-143 Change-Id: Ic69e56145ea6070718d821edd22a1d0f9970995d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-24Merge "Default OSCreds cacert attribute to False."Steven Pisarski2-10/+11
2017-07-24Merge "Fixed potential problems with image creation exceptions."Steven Pisarski1-0/+16
2017-07-24Merge "Created new exceptions for security group settings"Steven Pisarski1-8/+10
2017-07-24Merge "Created new classes RouterSettingsError & RouterCreationError."Steven Pisarski1-6/+7
2017-07-24Merge "Created new class ProjectSettingsError."Steven Pisarski1-3/+4
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-24Merge "Refactor glance_utils.py v1 image creation."Steven Pisarski1-1/+8
2017-07-21Added and improved flavor creation tests.spisarski1-12/+58
JIRA: SNAPS-142 Change-Id: I9c3cf5202a551f7b137648e95359f0adeb831101 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-07-21Created new classes RouterSettingsError & RouterCreationError.spisarski1-6/+7
Raising RouterSettingsError in RouterSettings and RouterCreationError in OpenStackRouter instead of Exception. JIRA: SNAPS-136 Change-Id: I3ba4824ea80ccfc07b1f15959898936d51bca1de Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-21Default OSCreds cacert attribute to False.spisarski2-10/+11
The default of True causes more problems than False when dealing with unsecure and secure (HTTPS) API calls. This was issue was found while testing against the new OPNFV CI test pod running Pike. JIRA: SNAPS-80 Change-Id: I819b4f64fa637bb7ce53c58a7a1164600ff6a3b9 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-21Created new exceptions for security group settingsspisarski1-8/+10
Raising SecurityGroupSettingsError in SecurityGroupSettings and SecurityGroupRuleSettingsError in SecurityGroupRuleSettings instead of Exception. JIRA: SNAPS-137 Change-Id: I959ffe9a247dc9adffbef460119ba94ad86fd3f0 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-21Created new class ProjectSettingsError.spisarski1-3/+4
Raising ProjectSettingsError in ProjectSettings instead of Exception. JIRA: SNAPS-135 Change-Id: I5169dd196775453466ea8d7fe9fa0c8d82b2382a Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-21Merge "Created new exception classes for networks."Steven Pisarski1-11/+14
2017-07-21Merge "Created new class KeypairSettingsError."Steven Pisarski1-4/+5
2017-07-21Merge "Changes required for running CI tests (Pike pod)."Steven Pisarski4-44/+138