22 Commits

Author SHA1 Message Date
Jenkins
6856793455 Merge "Deprecated tox -downloadcache option removed" 2016-01-12 10:52:11 +00:00
vishal mahajan
00baef4f51 Pass proxy enviroment varibles in tox
When Development environment is under a proxy then tox is failed even if environment variables of the proxy are set.

Change-Id: Ia59a522f9ed9250e7b754eca49af600b381554fd
2016-01-06 08:29:02 +00:00
Ondřej Nový
71b95b314f Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: Idfa22a7363a5f7e4998ba8084dfbb56084d2161d
2015-12-11 21:15:16 +01:00
Kenji Yasui
623f08928e Delete python bytecode before every test run
Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.

Change-Id: I7908520f6e2935ffacf5d914a01078939392e2e2
Closes-Bug: #1368661
2015-12-07 07:43:09 +00:00
Fausto Marzi
94e1c6ea4a Improved freezerc and freezer-agent script management
With this patch the scripts are generated by automatically
only from setuptools. The /bin/freezerc script is removed
and the content is incorporated in freezer.main

This patch should make more portable freezer on
win32 platform.

Unfortunately in order to support win32 platforms
we need to use a version of PBR >= 1.0.0,
to support env markers. Now requirements.txt reflects that

Change-Id: I31a4a13711f8c042072e3cc8785078fdbb971cb7
2015-10-29 14:35:55 +00:00
Fausto Marzi
15be7d2b0c Fixed and improved tox.ini, added subunit as dep
fixed a typo in tox.ini and also added
python-subunit in test-requirements.txt

Change-Id: Ic897f5a39586c07b89613311e766ad73bafd96b5
2015-10-19 17:58:21 +01:00
Fausto Marzi
5902b0f7cd Swift from pytest to testr for unittests
Freezer currently uses pytest to execute unittests.
As we need to be consistent with the frameworks by the
other OS project, we are porting our tests to tests.

Change-Id: Ib755771efe496e467079dc2e990ca89a2e513eb6
Implements blueprint: swift-to-testr
2015-10-15 16:32:22 +01:00
Fausto Marzi
f7841f840c Fixed deps in setup.py and a bug in tests
Currently the deps of oslo.i18n wasn't aligned with
Kilo global-requirements.

Now tests are not execute by runtests.py but tox
call directly py.test, as there was a bug in the exec
of runtests.py. This is a temporary solution as
testr will be used soon as testing framework

Close bug: 1498078

Change-Id: I07daddb14ab75fe089c98c8e00c24ecb550ada82
2015-09-22 12:04:37 +01:00
Fabrizio Vanni
cea7fb2702 basic integration tests for freezer-agent
The test provided in the tests/integration directory
execute the command line version of the freezer-agent.

The tests execute backups and restores, passing the parameters
on the command line, and check the results.

Types of integration tests depend on the environment variables defined.

Local storage tests are enabled by default and use temporary
files and directories, while SSH and Swift storage testing need
also access to existing external resources.

To enable the ssh storage testing, the following environment
variables need to be defined:

 - FREEZER_TEST_SSH_USERNAME
 - FREEZER_TEST_SSH_KEY
 - FREEZER_TEST_SSH_HOST
 - FREEZER_TEST_CONTAINER

To enable the swift storage testing, the following environment
variables need to be defined:

 - FREEZER_TEST_OS_USERNAME
 - FREEZER_TEST_OS_TENANT_NAME
 - FREEZER_TEST_OS_REGION_NAME
 - FREEZER_TEST_OS_PASSWORD
 - FREEZER_TEST_OS_AUTH_URL

Tests involving LVM snapshots are executed only with superuser
privileges and if the following env variable is not defined:

 - FREEZER_TEST_NO_LVM

Change-Id: I39f0c9bf62f7c82f81ad95f19cf0f7aefb059633
2015-08-13 16:54:14 +01:00
Erno Kuvaja
403a76ccd3 Align requirements with global-requirements
Setting requirements to mins and caps aligned with global requirements
on packages where it's possible.
Commenting the ones that does not align.

Change-Id: Iba37d120c980ba849f79851fcbfc005651ed600d
2015-08-05 08:14:31 +00:00
Fabrizio Vanni
d4b9399e9b 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
Fausto Marzi
eaf8d10599 Added pylint checks. Fixed import error during python-novaclient import.
Finally pylint checks are executed now during the build.
Currently, as pylint is just enabled, checks for
Warnings, Refactor, Convention are disabled.

Closes bug: 1465063

Change-Id: I1a5447d7a7c2ec717e21aae67d26b0586edad7a5
2015-06-14 21:22:21 +00:00
Fabrizio Vanni
616e742792 client retrieval of freezer api endpoint
The api client queries keystone to obtain the freezer api endpoint,
provided that the freezer api service and endpoint have been registered in
keystone.

An optional parameter to specify the api endpoint is supported

Change-Id: I6626a60d1fd5d18a59376165e94c789832865ae0
Implements: blueprint freezer-apiclient-endpoint
2015-04-27 11:16:47 +01:00
Memo Garcia
75b5a6aa5a Windows backup and restore incrementals
Add windows incremental support for backup and restore

Change-Id: I49a6b611f52a5d3a1950bd3f6f49cdb4a59354af
Implements: blueprint windows-backup-and-restore-incrementals
2015-04-14 16:22:33 +01:00
Fabrizio Vanni
e4238272c5 Freezer API
First implementation of the freezer API.
Slightly more than a skeleton with basic functionality

Change-Id: Iae04affea3aa0f4a943599b528df49d9d4a5b845
Implements: blueprint freezer-api-first-rel
2015-04-08 18:25:45 +01:00
Zahari Zahariev
000d002f46 Remove pyrsync dependency
BUG: https://bugs.launchpad.net/freezer/+bug/1430865
Change-Id: I0685c21069cfc53da742e8b724a53907dbc0c3fb
2015-03-11 15:51:27 +00:00
Daniel Mellado
192cd9dd75 Updated setup.py to add proper pyrsync installation
The PyPI installer for pyrsync was broken, so in order to assure a proper
install a workaround to fetch it from GitHub has been added. Updated tox.ini
file

Change-Id: Ib08dd822e04177a852d5f8846d10865e2e9417f8
2015-02-04 17:28:20 +00:00
Zahari Zahariev
ea13fd33f7 Use Python module MyMySQL instead of MySQLdb
There are issues porting to Windows when MySQLdb
C files have to be compiled. New library is
100% Python and 100% compatible.

LAUNCHPAD: https://blueprints.launchpad.net/freezer/+spec/windows-testing

Change-Id: Ic863bd231eaca5a891df61741df5e2ba6433ba4e
2015-01-29 16:41:21 +00:00
Fausto Marzi
8266162ccc Add unittest for swift.py and bug fix
Fixed a bug when parsing backup names. The issue
arised after the freezer_ prefix was introduced.

Added unittests for freezer/swift.py

In tox.ini now pytest doesn't recurse on .venv dir.

Change-Id: Ie29481e525efafcb4420f442174932f058e71d3f
LAUNCHPAD: https://bugs.launchpad.net/freezer/+bug/1412016
LAUNCHPAD: https://blueprints.launchpad.net/freezer/+spec/unittest-swift
2015-01-19 20:35:43 +00:00
Fausto Marzi
3302161358 Added unittest for utils.py
Now a basic unittest for utils.py
is available under tests/test_utils.py.
While writing unittest two bugs were encountered
and fixed also on this commit.

tox.ini also has been modified to be able to use
runtests.py

Change-Id: Ieecd9549f358566ba5d4c7fcf7ad5780b9311dcd
2014-12-06 17:36:53 +00:00
Fausto Marzi
978a30ec3a Added unittest for arguments.py
Now a basic unittest for arguments.py
is available under tests/test_arguments.py

Change-Id: I5561fbcf595fc9fa45f729405748a05c82bc6253
LAUNCHPAD: https://blueprints.launchpad.net/freezer/+spec/unittest-arguments
2014-11-22 17:00:56 +00:00
Fausto Marzi
555f8d48b5 Changed .gitreview .gitignore and added tox.ini
- freezer layout and code is now more
    OpenStack oriented
- .gitreview points to review.openstack.org
- few more items are added in .gitignore
- tox.ini is added to be able to succesfully
  py27 and pep8 gate jobs
- Code pep8 style is improved in this commit
- removed HACKING.rst and CHANGES.rst
- Bumped version to 1.0.9

Change-Id: If6dc5f32af83e726bb393017775e068fd2af8c04
2014-08-03 00:13:04 +01:00