summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils/keystone_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-04Added support for OSCreds output to SNAPS-OO orchestrator app.spisarski1-1/+2
Change-Id: Ic690ebff47d137fdd172f5dd5f263cd7f4a6ae04 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-03-12Closing keystone sessions after done with them.spisarski1-2/+17
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>
2018-02-22Changed pattern on how objects lookup themselves by name and project.spisarski1-13/+24
The pattern being replaced has unwittingly added the requirement that all creator credentials must be of type 'admin' as when looking up the associated project ID required a call to keystone.projects.list(). As the SNAPS integration tests were always creating users with an 'admin' role, this issue was not caught. As part of this patch, integration test users will no longer be admin. JIRA: SNAPS-274 Change-Id: I02957f69e31a9d4dfa63362d371f061687e59fbf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-01-29Avoid checking Keystone v3 domains when using API v2.0Georg Kunz1-3/+4
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-20Refactoring of ProjectSettings to extend ProjectConfigspisarski1-1/+1
ProjectSettings and keystone_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the ProjectSettings class. JIRA: SNAPS-221 Change-Id: I9e39f09fb8bb03dbd725f44b7256bacb05f26afc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-31Added method to OpenStackHeatStack to return OpenStackFlavor objects.spisarski1-1/+1
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-174 Change-Id: I791e427efc487045c0f72cd836dabd9a66a4f60f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-09-08Enhanced launch.py app to support all types.spisarski1-0/+7
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-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-09Added feature to update the quotas on a project/tenant.spisarski1-1/+5
JIRA: SNAPS-170 Change-Id: Icf494dd2bddc338b8e85259b0400c0950d2332bc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-03Add domain name when creating projects and usersLinda Wang1-7/+39
(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-07-31Changed keystone_utils#get_project to accept settingsspisarski1-12/+22
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-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-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.spisarski1-1/+3
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-20Changes required for running CI tests (Pike pod).spisarski1-8/+13
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-17Last task necessary to stop users from easily obtaining OS objects.spisarski1-14/+16
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-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-13Created domain class for roles.spisarski1-22/+31
Create Role domain class so keystone_utils.py functions returning role objects will not be leaking out implementation details as each API version can change these data structures and this should all be handled by the SNAPS neutron utility. JIRA: SNAPS-119 Change-Id: I6918a45c1c414ee6b104ec36e63c540d6f656e30 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-13Crteated domain class for projects.spisarski1-5/+6
Created Project domain class so keystone_utils.py functions returning project objects will not be leaking out implementation details as each API version can change these data structures and this should all be handled by the SNAPS keystone utility. JIRA: SNAPS-114 Change-Id: Id7bce929604278c8228622161eba1838ecd5e067 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-11Added ability to add a user to a role.spisarski1-3/+58
This functionality was requested as the SNAPS-OO integration tests currently have the ability to run these tests in custom projects with custom users and certain OpenStack installations are not allowing some of the integration tests functions unless the new user has been added to the 'admin' role. Change-Id: I255cfa089a14bbcb434a6cd33b2a1dfae66206b5 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-07Fix get_endpointLinda Wang1-3/+3
One specific service type has the same endpoint url if interface is admin or internal, while it is different from that with public interface, except the admin and internal endpoint url for service identity has same ip but different ports. Change-Id: I19c260222286d8b4aa3f0d3b7d273e192b13a96b Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-07-07Created domain object for users.spisarski1-24/+51
OpenStack implementation details were leaking out into the user creator. JIRA: SNAPS-117 Change-Id: I67c77c75055b37819512d1e7712925b839fbc047 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-27Enable snaps work using public endpointLinda Wang1-1/+2
When functest is not run on jumpserver but on other external host without admin network, snaps failed to connect the admin endpoint. So running snaps tests using public endpoint should be allowed. JIRA: SNAPS-110 Change-Id: I8ca8d8c48330b5f427568d3d5fe942f6f2ca9ea9 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-06-22Enable https for Openstack in SnapsLinda Wang1-4/+5
When running in https environment, snaps should provide two options: 1. To support certification verify when https certification file is provided; 2. To disable server certificate verification without cert file. JIRA: SNAPS-84 Change-Id: I5a9094238db5c8017cc8b80e3353adc6e793b552 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-06-01Refactor keystone endpoint tests to the proper test class.spisarski1-3/+2
Also added documentation for those three tests. Change-Id: I38a728ba9e258a821341621978953e0529a0c1a1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-19Add the function of getting endpointLinda Wang1-7/+36
Functest is trying to leverage SNAPS-OO library to replace some utility functions, in which def get_endpoint is called by testcases onos, odl, multisite and cloudify_ims. JIRA: SNAPS-78 Change-Id: Icb2778e0337a5d4246762ac3037773b39d5d554d Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-02-15Initial patch with all code from CableLabs repository.spisarski1-0/+204
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>