59 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
fdfe197da0 Updated from global requirements
Change-Id: Icba902a57b5def46a4f7a84b74cc058b09f2f8d6
2016-11-16 22:15:59 +00:00
Jenkins
43fcf3e8a8 Merge "Enable releasenotes translation" 2016-11-14 13:32:42 +00:00
Jenkins
84259ce3a0 Merge "Updated from global requirements" 2016-11-14 13:32:21 +00:00
Jenkins
121f837dd8 Merge "Fix freezer client-* output" 2016-11-14 12:27:16 +00:00
OpenStack Proposal Bot
a824d40630 Updated from global requirements
Change-Id: Ic193b984dbd3962796b73a3c2a7f2b6a0e290b59
2016-11-14 11:34:04 +00:00
Jenkins
70c6a844a5 Merge "Fix freezer client-register prompt" 2016-11-14 10:51:23 +00:00
Ruslan Aliev
e6a8863956 Fix freezer client-* output
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>
2016-11-11 21:02:10 +03:00
Ruslan Aliev
35cc6f404f Fix freezer client-register prompt
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>
2016-11-09 21:26:12 +03:00
Ruslan Aliev
c96526ff5d Fix freezer CLI output
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>
2016-11-09 21:11:06 +03:00
Jenkins
661c764a37 Merge "releasenote: Fix typo" 2016-10-21 13:07:06 +00:00
Saad Zaher
d0620df0d6 releasenote: Fix typo
Change-Id: Ie5a96e3a6ca3bb9aa20e75e7039b0b66e40d461d
2016-10-21 12:56:05 +00:00
caihui
203fd786b1 Enable releasenotes translation
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
2016-10-18 11:37:00 +08:00
Jenkins
51d88728fe Merge "Using assertEqual instead of assertEquals" 2016-10-17 15:13:25 +00:00
Jenkins
50e917081f Merge "Remove devstack plugin for python-freezerclient" 2016-10-17 15:04:24 +00:00
Jenkins
59c2473306 Merge "Docstrings should not start with a space" 2016-10-17 15:04:24 +00:00
Anh Tran
1ca5bd4694 Using assertEqual instead of assertEquals
This's defined in H234:
http://docs.openstack.org/developer/hacking/#python-3-x-compatibility

Change-Id: I917b09ac4c868eee5cd937c115d6c0913d219eea
2016-10-17 14:59:01 +00:00
Saad Zaher
9c7ff3a7fd Fixed python-freezerclient insecure option
Change-Id: I00efeb74e3c3c236a0e05d8743581f6c9812b713
Closes-Bug: #1634136
2016-10-17 13:26:31 +00:00
Jenkins
ccb4d05fbd Merge "Fixed set values for opts argument" 2016-10-17 09:40:12 +00:00
OpenStack Proposal Bot
2dc83f911b Updated from global requirements
Change-Id: Ibe05773623c7048267f95688f912b7d2679770a7
2016-10-15 00:11:49 +00:00
Saad Zaher
c889f443b3 Remove devstack plugin for python-freezerclient
Change-Id: Ief50aab2e9b7949f751d487e30afcd71dda2b882
2016-10-13 16:04:03 +00:00
Saad Zaher
8edda69963 Adding some statistics to python-freezerclient
Change-Id: Icba7308d07960a81ba82a95425c760a3487131e6
2016-10-13 15:18:28 +00:00
Saad Zaher
c0a630c164 Added releasenotes
Generate releasenotes using tox

Change-Id: I5b63df7b1da757a591b9222025460706930e8136
2016-10-10 10:15:07 +00:00
Memo Garcia
0a0f24f940 Filter jobs by client and/or custom filters
Closes-bug: 1562015
Change-Id: Ib887226c53d747ae36bef0dea7ade6a7a5e37531
2016-10-06 10:37:13 +00:00
Cao Xuan Hoang
5a77cd49bd Docstrings should not start with a space
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
2016-09-28 11:34:23 +07:00
Swapnil Kulkarni (coolsvap)
5270aa2c66 Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: I7bd5a89481e6e0e57d0ac3715b31881548c5ffb4
2016-07-22 03:56:33 +00:00
Saad Zaher
05da0f9fdb Force python-freezerclient to send Accept in headers
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
1.0.0
2016-07-19 08:08:07 +00:00
Memo Garcia
d6d388a7a2 Fixed set values for opts argument
Closes-bug: 1597285
Change-Id: Ia05516303973b232498a08dcfb8dc6b9de652d2c
2016-06-29 14:51:55 +01:00
Memo Garcia
63accdeac5 Enforce content-type in request headers
Implements Blueprint: contenttype
Change-Id: I7b407d29952090d88a4cd5900a814f651ffdf348
2016-06-05 22:09:48 +00:00
Memo Garcia
bb9871106d Fixed client creation when no os_backup_url is given
Closes-bug: 1585274
Change-Id: I7d3945b9f3c76c4042715b518ba5018d8e20f6bd
2016-06-01 11:17:47 +01:00
Memo Garcia
f933fec8a1 .gitreview updated to point new repo
Change-Id: Iaa4589577f4a90885b88bcd5d23814a44ee73152
2016-03-23 13:29:49 +00:00
Memo Garcia
cf86732366 Bump version to 2.0.0 2016-03-21 10:07:20 +00:00
Memo Garcia
fcb358bc80 Small code cleaning 2016-03-18 13:44:21 +00:00
Memo García
2864edd6d1 Python freezer client
Split apiclient from freezer-agent repo
Use cliff as a cli for freezer

Implements bp: freezerclient
2016-03-18 13:40:01 +00:00
eldar nugaev
d9212240de Fix freezer for py3 compatibility
Change-Id: I03160bf2dba1b67b1daf7c60f4f0182acc2a4d90
2016-02-12 01:39:34 +00:00
Memo García
341a67d3d4 Fix typo in keystone v3 creation dict
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
2016-02-08 14:53:30 +00:00
eldar nugaev
30dc62614f Command for changing logging level.
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
2016-01-13 16:46:17 +00:00
Memo García
b3161b0f39 Add default namespace to apiclient
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
2016-01-08 15:16:24 +00:00
Saad Zaher
940f9c962f Switch freezer-scheduler to oslo.config and oslo.log
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
2015-12-10 12:49:58 +00:00
memo
d950bab933 Initialize freezer-scheduler with insecure mode for keystone v3
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
2015-11-28 18:50:02 +00:00
memo
bd93113b9a Updated LICENSE file and headers
removed unnecesary header in license
added missing header in files

Change-Id: Iea79505307479541de01231dd25c3821e9e8997c
2015-11-09 16:13:56 +00:00
Saad Zaher
bfb9ccd99e Fix error message if no credentials are provided
Provide meaningful error message from the scheduler
If no OpenStack credentials are provided.

Change-Id: I315a4252dc8259f6765f0a764d58fd106cd409e7
Closes-Bug: #1501384
2015-10-02 14:59:20 +00:00
Jenkins
25fcd746fb Merge "job event requests use specific api endpoint" 2015-09-09 17:45:31 +00:00
Jenkins
e5dbdc934b Merge "Select endpoint type of freezer api service" 2015-09-09 17:45:00 +00:00
memo
7d5792cfe0 Default namespace for args options
added default namespace when the client is initialize from another project

Change-Id: Iafcce51720788a17573461c8fff3a21a0e8f5bb0
2015-09-01 16:48:19 +01:00
Fabrizio Vanni
0a1b5421dd Select endpoint type of freezer api service
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
2015-08-31 12:26:43 +01:00
Fabrizio Vanni
8641ac8da5 job event requests use specific api endpoint
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
2015-08-27 09:31:26 +00:00
Jenkins
f9b3146a13 Merge "apiclient support for keystone v2.0 and v3" 2015-08-21 15:36:31 +00:00
Fausto Marzi
d1af253d09 Updating HP Copyright label
Change-Id: Ie468e9d2e0853a77043342251b814784a839efb9
2015-08-21 14:19:39 +01:00
Fabrizio Vanni
e04f7cc41e apiclient support for keystone v2.0 and v3
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
2015-08-14 18:21:13 +01:00
Fabrizio Vanni
58988fc3e3 freezer scheduler
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
2015-07-10 18:51:17 +01:00