Commit Graph

7 Commits (cdc0266de52906d929a0c5239a7b5458844dc886)

Author SHA1 Message Date
Martin Kopec 0b4a78daa8 Create utils.py
The patch create utils.py for methods which might be used
elsewhere in the project, with no matter on context.
Move get_base_url method from credentials.py to util.py so that
the method is reusable.

Change-Id: Ic8cb83bb8859b4fddcd57faa3e23992941d0010b
5 years ago
Arx Cruz 4ea3580672 Fix identity url version detection
Before we could diferentiate the api version for identity because
the use of /v2 or /v3. Even though v2 is now deprecated, we need
to continue support previous versions of openstack. In this case
We cannot relay on the /v2 or /v3 in the url. The best user case
is to do a request in the base url (without any version) and
check if we have v3 version stable. If so, we assume identity
version is v3 otherwise, is v2.

Change-Id: Ia41d21ebad9329ae9fa506868957a72e6f9a5ca5
5 years ago
Martin Kopec 1bd20dca53 Replace tenant by project, part 2
Story: 2002116
Task: 20023
Change-Id: I465fe96120ed5609c2747b587963d2e5f57b55be
5 years ago
Martin Kopec 6d7968bb16 Fix username is not defined warning
The tool tries to find the credentials in auth section first
and if it gets None, it tries identity section then. Because
of this a unnecessary warning message is logged out.
The patch changes the way, how the credentials are retrieved
from conf, so that there are no warnings.

Change-Id: I841241bddeb12cac9207c15e9dc4e1de8860791b
Story: 2002539
Task: 22085
5 years ago
Martin Kopec 283de20574 Replace tenant by project, part 1
Replace use of tenant when it's setting to or reading from
tempest.conf (conf object).
The change is needed for correct reading of that value in
dependent patches - need to count on that it's project not
tenant anymore.

Change-Id: Ic2987ce322a0cd4a92d35b06a86aec95226f981e
Story: 2002116
Task: 19795
5 years ago
Martin Kopec 0e085cdf85 Refactor to improve modularity, scalability, OOP
* each service class was moved to a new file
* Service and VersionedService were moved from api_discovery to service_base.py
* api_discovery.py is removed and methods for discovery were moved to a newly
  created class Services - class holds methods related to instantiating
  services, discovering their versions and extensions, configuring them
* constants were moved to an independent file - constants.py

Change-Id: I00880f4bd30cc4d1609c20aecca820854312b1e7
5 years ago
Martin Kopec e397415132 Split ClientManager
* ClientManager and ProjectsClient class were moved to clients.py
* tests related to ClientManager class were moved to test_clients.py
* Credentials and auth_provider were decoupled from ClientManager and moved
  to credentials.py into a Credentials class - credentials are now accessible
  from everywhere and can be reused.

Change-Id: I7251d6353a91f4bbd7b9b7839ad36bb946b660c8
5 years ago