What's new:
* Print empty table if no clients found
* Check that client exists before delete,
print message if no clients with ID was found
* Import objects replaced by modules
* Some code refactored
Change-Id: I076afbcda21b1f1ca7a85d733f7fc7204487b25e
Closes-Bug: #1641184
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Executing freezer client-register without --file parameter
causes NoneType error during open file. This patch fixes it
by changing --file parameter to required.
Change-Id: I3cd6112187aa6c2a5dee2489078968b04567f4a9
Closes-Bug: #1634766
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
There is a problem with executing CLI commands:
no endpoint type was provided during creating keystone
client object. This patch fixes it.
Also, there are some small changes:
* moving from keystoneclient to keystoneauth1
* fixed import order, replaced import objects
* supressed output from requests lib due to info messages in output
(Starting new HTTP connection (1))
Change-Id: I57c42877c94d6d5706a7b6bf1e154f29704f9783
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.
Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.
Change-Id: Ie341224189b75302116ee6fc880f373e29bc8917
As per OpenStack Docstrings guide lines [1]:
[H401] Docstrings should not start with a space.
[H403] Multi line docstrings should end on a new line.
[H404] Multi line docstrings should start without a leading new line.
[H405] Multi line docstrings should start with a one line summary
followed by an empty line.
[1] http://docs.openstack.org/developer/hacking/#docstrings
trivialfix
Change-Id: Ifbc123eec81f47f833f93e5a51f34e385767162e
We need to support sending accept to make sure the returning response
will be json formated. This is needed as we interact with different
Openstack components which support xml, json format and default is xml
Change-Id: I07db838de4aa6c50b357a5ca32e0a1ecc41c720b
Implements: blueprint python-freezerclient-to-accept-json-header
There is a misconfigured parameters when freezer client tries to create a
keystone instance for version 3 using tokens in which project_name and
project_domain_name are expecting values that does not exists
Closes-bug: 1543156
Change-Id: Ic1baea868e8b7d64fd3cb803e0637225a4a82d46
And pep8 fixing
(suddenly this pull request was rejected by jenkins and pep8.
so this commit also contains some small style changes for pep8.)
Currently the default value for logging is INFO and it is hardcoded.
Additional command will be helpful for debug/development process.
Implements blueprint: logging-level-cli
Change-Id: I1105e3da277e2a948f3ff50b04751169eddf26ed
When a client is created from other method rather than command line arguments,
it skips the commandline arguments and by doing this a Namespace is not created,
this commit fix that by creating a default Namespace when the value of self.opts is None
Resolves bug: 1532205
Change-Id: I7a01715c675756e0ce66111939b71a2761b0657a
switch freezer-scheduler to use oslo.config and
switch from native python logging module to oslo.log
This commit includes:
- using oslo.config for parsing cli and config files options
- using oslo.log instead of native python logging module
- this applied only on freezer-scheduler
Implements: blueprint using-oslo-libs
Change-Id: I92e99c087cb2c2f836770644621f711af597dffc
Add verify and insecure flags for freezer scheduler and apiclient in order to handle
insecure connections when keystone and freezer-api are available through https
Add support for keystone v2 and v3 in the windows scheduler
Add explicit parameters to apiclient for v3 connections
Change-Id: Ib950c85e3d8d2b192ec7ba60e4fe5641202d2960
Provide meaningful error message from the scheduler
If no OpenStack credentials are provided.
Change-Id: I315a4252dc8259f6765f0a764d58fd106cd409e7
Closes-Bug: #1501384
This adds the ability to select the type of api endpoint
Adds the following command lint option to the freezer-scheduler
--os-endpoint-type <endpoint-type>
Implements blueprint: scheduler-endpoint-type
Change-Id: Id0432f1e97165c1d4aca017562b7bcdab3595c50
Requests of job event are executed using the
api endpoint
jobs/{job_id}/event
Event are not requested anymore modifying the job document
directly
Change-Id: Ib8c144c7e86d13a6e34ab7a20193051485d969e1
The apiclient now supports authentication using keystone versions 2.0 and 3
Authentication methods can be password or token.
Implements blueprint apiclient-keystone-v3-support
Change-Id: Ie09886e8f07aeb0a54fdf6f802bdd7fbf33aa253
The freezer scheduler is to be executed
as daemon process on the client machines
It has the following responsibilities:
* when using the api:
- register -if necessary- as a client in the api
- download the list of jobs from the api
- schedule the jobs for execution
- launch the freezer client at the scheduled time
- collect metadata and exit codes and upload them to the api
- periodically poll the api for new/updated jobs
- if a job is part of a session (a coordinated group of jobs)
it updates the session status when job starts/stops
* when not using the api
- load jobs configurations from files
- schedule the jobs for execution
- launch the freezer client at the scheduled time
The freezer scheduler can also be used to manage jobs
and sessions using the following positional parameters:
job-list
job-get
job-create
job-delete
job-start
job-stop
session-list
session-get
session-create
session-delete
session-list-job
session-add-job
session-remove-job
or to register the client in the api using the positional parameter:
register
Implements blueprint: freezer-scheduler-start
Change-Id: I06ae202a0f464f7240c137744a5b54d1177cabd9