8 Commits

Author SHA1 Message Date
Martin Kopec
0f363c03a8 Make tempestconf easier to use as an library
Make main and method responsible for parsing arguments more
modular, so that, it's easier to import them.

Now the argument parser can be imported to an other project,
we want to integrate to. This way, we achieve the CLI which
will be maintained at only one place.

Split main to two parts:
1. arguments handling
2. the rest of config_tempest, which can be importable
as an external module.

Change-Id: I3b1b9cbd05ccdb7ccae1b34211c4c955e831d32d
2018-05-17 09:21:19 +00:00
Arx Cruz
ff5fbcbdb3 Load basic default config
This patch reduce the requirements of the values in the
defaults-overrides file when the user run the tool without
it.

Change-Id: I2a6d375598ee39789f81da750ba02783da2a83c2
2018-05-15 11:51:42 +02:00
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
2018-04-16 14:48:14 +00:00
Martin Kopec
c1951c379e Fix failing of listing services
Non admin user or a user with no such privileges can't list
services. Therefor cinder-backup and metering services can't
be discovered for such a user.
The patch adds a warning to inform the user.

Change-Id: I48119b7a48f49f58dfac7bf34c75a08681b9ae32
2018-04-05 12:49:21 +00:00
Zuul
6a10dbb153 Merge "Split ClientManager" 2018-03-27 11:47:47 +00:00
melissaml
f9d956f59c fix a typo in documentation
Change-Id: Ie006ed2a964b6a10e57af9e34d19d7a8554556da
2018-03-23 08:06:22 +08:00
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
2018-03-20 08:53:26 +00:00
Martin Kopec
026269dcc1 Decouple TempestConf class
* config_tempest.py was renamed to main.py - entrypoint for console-script
  (discover-tempest-config) was changed too
* TempestConf class was decoupled from main.py and moved to tempest_conf.py
  file. Imports of related tests were edited and the order of imports in each
  file was changed so that other dependencies are first followed by a blank
  space and then local dependencies are listed.
* tests related to TempestConf class were moved to test_tempest_conf.py file

Change-Id: Idb235b969ba3c1e320aa3efa7fe77b5c59f4ffc6
2018-03-20 08:40:43 +00:00