Commit Graph

53 Commits

Author SHA1 Message Date
Jenkins
34c770c6b5 Merge "Add py35 to tox job list" 2016-11-09 20:28:38 +00:00
John L. Villalovos
4ba285bc5f Add py35 to tox job list
Add 'py35' to the tox job list, so that it will run unit tests using
Python 3.5 when doing:
    $ tox

Change-Id: I0059e016b3eb6e0d812706ee4a6e679a52c34e41
2016-11-09 05:39:30 -08:00
John L. Villalovos
ba9adaa2f5 Update to hacking 0.12.0 and use new checks
Use hacking 0.12.0

Use the new checks that are available:
    [H106] Don’t put vim configuration in source files.
    [H203] Use assertIs(Not)None to check for None.
    [H904] Delay string interpolations at logging calls.

Fix code so tests pass.

Change-Id: I7b1cd98aeb3bb8f4f01dd1d69d1afcd839749074
2016-11-09 05:37:10 -08:00
Dmitry Tantsur
cb8db157e4 Switch func3 environment to Python 3.5
Change-Id: I95943826f8d702466ab50a3f5c16bc147313ad41
2016-10-31 13:58:53 +01:00
AvnishPal
f3fd06fab5 Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.

Change-Id: Ibb49105fea5f119d181e7fd6f78ca6cf72ada33f
Closes-Bug: #1614361
2016-08-22 16:54:48 +05:30
Jenkins
f04a318cd4 Merge "Make tox respect upper-constraints.txt" 2016-04-11 11:20:36 +00:00
Marcellin Fom Tchassem
16594518f3 Make tox respect upper-constraints.txt
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
wide world changes in a way that you don't expect.

Post jobs are not yet compatible with the upper-constraints file, so
override the install_command there to skip upper-constraints.

Credit to the equivalent Ironic patch
https://review.openstack.org/#/c/300146/

Change-Id: Ica668afedf622a0be8e8566ac88e1d0020ed9bc7
Closes-Bug: #1563038
2016-04-08 00:33:07 +00:00
Anton Arefiev
30ae1e72f1 Move unit tests to "unit" directory
This refoctor is needed for tempest test work as tempest tests
will placed in test dir. So move unit tests to separate directory
"unit" under test.

Change-Id: Ic99df6111ef30947148a9e38b9435a54f3d37064
2016-04-05 11:15:29 +03:00
Pavlo Shchelokovskyy
b71a3d9c79 Use dedicated config file for config generator
Change-Id: I1c9dcdb118005e10bc180afe8c81c8567c0b4c7b
2016-03-07 13:54:19 +01:00
Anton Arefiev
5086d93b41 Add enroll_node_not_found hook
Add new node_not_found_hook - enroll_node_not_found hook,
which allows to enroll unknown nodes to Ironic automatically.

Change-Id: If1528688504e4be4b2369b985bc576544d96868d
Related-Bug: #1524753
2016-03-01 14:00:31 +02:00
Janonymous
ffcf76a684 Put py34 first in the env order of tox
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.

Change-Id: I088ae4e71bfa2e673743193751410693d533153b
Closes-bug: #1489059
2015-12-22 18:22:53 +05:30
Dmitry Tantsur
99732e5297 Numerous improvements in the documentation
* Flatten the directory structure (we don't have that many doc files)
* Dropped HTTP-API from the root so that we don't maintain 2 copies
* Fixed links all over the place
* Leave one copy of README text in the root and include it in docs
* Update 'tox -epep8' to also check docs

Change-Id: Ic14cb73668544be27c6b96b384f93b239e49acfd
2015-12-02 18:07:22 +01:00
Jenkins
31bf3f1606 Merge "Do not explicitly mention requirements.txt in tox.ini" 2015-11-30 19:40:17 +00:00
Serge Kovaleff
292e8c9cfd Generate Sphinx docs
Change-Id: I540b28d6173b30baf6ee2e6e14d8ba5ffb67b660
Closes-Bug: #1514803
2015-11-27 11:56:36 +02:00
Dmitry Tantsur
f5671a4376 Use Reno for release notes management
Shameless copy-paste from Ic700d719242b17532b0b43a68b7eff507cb3a43c
and Iaef8b78802c04ec8306dd6f1da02d6c6a50697d8 with minimal changes.

Change-Id: I604136b72e2cf6b2bbbc3f9dc46ea3b419e495df
2015-11-26 10:12:14 +01:00
Dmitry Tantsur
a25b48715c Do not explicitly mention requirements.txt in tox.ini
It's handled by pbr anyway, and this makes it harder for tests
to pick requirements changes.

Change-Id: I1e5a7682da0a114dcfbe8dc0e2c2116f9b98628f
2015-11-16 14:11:59 +01:00
Kurt Taylor
9fbd91b9d1 Add coverage target to tox.ini
This creates a seperate target splitting out the coverage from the other
tests. The test directory and project names are different, overriding with
passed package name. Since testr is not used, coverage is called separately.

Change-Id: I32c132414a8b7e702b65617b95236397f4a471c2
2015-10-06 17:25:22 -05:00
Dmitry Tantsur
38ee2340d9 Add func3 tox environment for functional testing with Python 3.
It's the same as func, but runs functional tests with Python 3.
One issue was fixed in ironic_inspector.test.functional.

Change-Id: I6a081ad2ca8857018c6b531ed82182aab0ccca4d
2015-08-13 14:51:58 +02:00
Yuiko Takada
6ce87e8f42 Migrate to oslo_log
Use oslo_log instead of logging module.

Change-Id: I0e9c9b9b68ba9c8c4f1c0cdd0746991c53e2d7e5
Closes-bug: #1475690
2015-08-12 09:23:18 +09:00
Dmitry Tantsur
6c234a39ca Clean up tox.ini
* Don't repeat dependencies
* Reuse 'venv' for genconfig

Change-Id: I3cb011bbbacbe4708cb7e0021d7bf08c0362405e
2015-07-08 20:48:09 +02:00
Yuiko Takada
e195b4780a Migrate to oslo_db
Currently, Ironic-inspector uses SQLite as database.
We should migrate to oslo.db.
In this patch, make database connect operations to oslo_db.

Change-Id: Ibd0f787b570bc101eab9fbd0b59d8a775a95e2e0
Implements: blueprint migrate-to-oslodb
2015-07-08 08:33:23 -04:00
Jenkins
c946f616f9 Merge "Make functional test importable and stop depending on DIB code" 2015-07-01 07:39:17 +00:00
Dmitry Tantsur
def1f3700c Make functional test importable and stop depending on DIB code
With integration tests on the radar we no longer need to do
integration checking between ramdisk code and inspector here.

Also copy integration test script from functest to devstack.
Once we update the gate to use the new script, the whole functest
directory should be deleted.

Change-Id: Ic29e954fac1c535cb4f83d46ccea9ebfb80f840c
Closes-Bug: #1468748
2015-06-30 07:57:06 +00:00
Dmitry Tantsur
931685d008 Move Python ramdisk code out of tree
New home will be IPA, patch is already being worked on:
https://review.openstack.org/#/c/194116/

Anyway, we have to get rid of the ramdisk code before release.

Change-Id: I1b71a466059e70fd249712eaaf325efd459addcf
Closes-Bug: #1464708
2015-06-29 12:22:41 +02:00
Dmitry Tantsur
a7788a7a9a Move client out of tree
New home is https://github.com/openstack/python-ironic-inspector-client

Change-Id: I9b252f7007f568bfd19906662d7fb8b2e53574f6
Closes-Bug: #1464707
2015-06-18 16:50:03 +02:00
Dmitry Tantsur
9dcc2bb082 Switch to pbr
Also creates a required "venv" environment, drops version handling
from __init__.py and updates requirements.

Closes-Bug: #1466477
Change-Id: I57ce71ee52cc48e0239cdecb69fd2272fc99ea41
2015-06-18 16:09:07 +02:00
Sam Betts
dd0f0085a6 Add missing backslash and run genconfig
Change-Id: I0a9f6a4743de3903919480faeca3a2dc9cf97603
Closes-Bug: #1465303
2015-06-15 15:14:56 +01:00
Yuiko Takada
9df4c8c868 Pass environment variables of proxy to tox
When a development environment is under a proxy, tox is failed even if
environment variables of the proxy are set.

This patch fix this problem.

Change-Id: I24ca2f991832e5a0689c1051b60caf949d8225a1
2015-06-15 09:53:20 +09:00
John Trowbridge
912c30830a Fix edeploy plugin puts too much data in Ironic extra column
The edeploy plugin stores all of the facts it collects in the extra
column of the Ironic db. When using real hardware, edeploy collects a
large amount of facts and can lead to overflowing that column.

This patch fixes this by storing the collected data in Swift instead.
This makes it usable more generically as well. Anything stored on the
'data' key in the dictionary returned by the ramdisk is stored as a
JSON encoded string in a Swift object. The object is named
'extra_hardware-<node uuid>' and is stored in the 'ironic-inspector'
container.

Change-Id: Ie9e017df735a95350991ce419fa3b64249819d70
Closes-Bug: 1461252
2015-06-12 07:59:30 -04:00
Yuiko Takada
274e1e9d2b Use keystonemiddleware auth credentials
We support oslo.config, so use Use keystonemiddleware auth credentials
instead of auth options ourselves.
Notes:
Below items will be used to get ironic client forever, not DEPRECATED,
but, in the case of keystone authentication, they are DEPRECATED.
Use [keystone_authtoken]'s items instead of them.
[ironic]
* os_auth_url
* os_username
* os_password
* os_tenant_name
And also this patch set drop default value of os_auth_url and identity_url,
so that this change will break people relying on ether/both of them.

Change-Id: Ib0774b6027bb60910dd4b5c2bc8acea0069ba0a1
Closes-Bug: #1435882
2015-06-12 19:22:57 +09:00
Dmitry Tantsur
d6404d2f99 Rename discoverd -> inspector
As agreed on the summit I'm renaming the python modules
and doing some adjustments:
* This is a breaking change, so version is bumped to 2.0.0
* Used this chance to split conf options over proper sections
* RELEASES.rst is gone; it's too hard to keep it up-to-date;
  anyway git does better job at doing history
* Dropped deprecated option ports_for_inactive_interfaces
* Dropped old /v1/discover endpoint and associated client call
* No longer set on_discovery and newly_discovered in Node.extra
  (deprecated since 1.0.0, superseded by the get status API)
* Default firewall chain name is "ironic-inspector" and
  is configurable

Notes:
* Some links will be updated after real move.
* Stable branches will probably use the old name.
* Some usage of discovery word is left in context of
  "discovered data"
* DIB element will probably be deprecated, so leaving it
  alone for now.
* Some usages of word "discovery" in the README will be updated
  later to make this patch a bit smaller
* Ramdisk code will be moved to IPA, so not touching it too much

Change-Id: I59f1f5bfb1248ab69973dab845aa028df493054e
2015-05-29 09:06:56 +02:00
Dmitry Tantsur
75ff1b1064 Fix leftover of edeploy options removal
Change-Id: Ie1c59dbb2514a0f9bc916b1abfdd5ad94da44025
2015-04-29 13:00:40 +02:00
Dmitry Tantsur
48471bce6d Initial import of ironic_discoverd_ramdisk
This is Python script for implementing a full-featured ironic-discoverd
ramdisk, including support for 'edeploy' plugin. It was initially
developed downstream.

Missing in this patch are:
* support for updating IPMI credentials
* support for serving logs via HTTP

Change-Id: I6987d46d7b6a1411d0d38f97373e5cd036ba6162
Implements: bluepring python-ramdisk-code
2015-04-27 16:29:26 +02:00
Dmitry Tantsur
d463c590bf Pre-release documentation update
* move out release notes to RELEASES.rst
* create troubleshooting guide
* document interaction with Ironic state machine
* document how discoverd creates/deletes ports
* mention Ironic inspection

Closes-Bug: #1439971
Closes-Bug: #1439276
Change-Id: I11cfcf215083385bbf02f160c858c6da19a91c0e
2015-04-08 11:30:46 +02:00
YuikoTakada
9ec4f0fbc8 Switch to oslo.config
This patch set adds support for generating config files
using oslo-config-generator.

Old invocation without --config-file is no longer supported.

Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Change-Id: If640e6dc83c971a8f82f9b245a4496d298dfd042
Closes-Bug: #1398359
2015-03-24 15:57:14 +01:00
Dmitry Tantsur
358c113e7a Documentation update
* Split away HTTP API and make sure usage info is enough for users
* Drop release notes for unsupported 0.2
* Various link updates and small fixes
* Forward-port 1.0.1 release notes

Change-Id: Ifa2b306d4a6fff19abc1565dabe7f6609363dc08
2015-03-20 16:40:09 +01:00
Dmitry Tantsur
4d589a8593 Switch to Python 3.4 as default Python 3 env
Change-Id: If0a0fc4c121d0a7ce5422d329b9b276cfc28dba1
2015-03-02 18:53:05 +01:00
Dmitry Tantsur
bffcb9a1ef Use less verbose imports for i18n
Change-Id: I969327d239d3df71cbd48bb4dfed0579b1dc9ab8
2015-02-19 16:40:55 +01:00
Dmitry Tantsur
067db13a5a Getting ready for inclusion into projects.yaml
* Switch from docutils to doc8 for checking docs
* Split away plugin-requirements
* Update to Kilo

Change-Id: Icf1411bd80aa7870996b5536b0ac1aec96783dab
2015-02-16 17:24:46 +01:00
Dmitry Tantsur
440351f64e Introduce test-requirements and update to stable/juno
Change-Id: I40907db9fba6008a99d95edb9fd8896fcab43b10
2015-01-16 14:08:32 +01:00
Dmitry Tantsur
f6b28e8244 Simple functional testing for discoverd and the reference ramdisk
New 'tox -efunc' command fetches the ramdisk from Github and
executes some simple testing with it. Ironic and Keystone API
are faked. Tools used by ramdisk are faked too.

Change-Id: I0158000cfb50372d6000d1f675aa1370a6c09d13
2014-12-16 12:14:14 +01:00
Dmitry Tantsur
c211e9c1b5 Refactoring: split test.py and rewrite tests for process
Tests for process.py completely rewritten to be more 'unit'.

Moved one function from utils that does not belong there
and fixed small issues uncovered by the new tests.

To simplify migration, prevent Python from writing bytecode
during testing.

Change-Id: Ie2c5d9217982620ba62f8105cf8e4b2cfaefe885
2014-12-09 20:51:14 +01:00
Dmitry Tantsur
c8d73c0839 Refactoring: cap complexity at 15 and coverage at 90
Change-Id: I6e4de72ee6a3ecc825fe959b289d7e7e83e01bb9
2014-12-08 21:02:05 +01:00
Frederic Lepied
2a58ddc82d Pass toxinidir to the definition of requirements
Allow to run tox from any directory.

Change-Id: I5fcfa00e8bd6dd2f46e66e6405a3bb8031f6a67c
2014-11-26 17:29:58 +01:00
Dmitry Tantsur
baef340b28 Add CONTRIBUTING.rst
Change-Id: I813af096bc4ab6bcfd3f83018bbeebee2d5ff0ec
2014-11-20 14:05:39 +01:00
Dmitry Tantsur
969616eb2c Enable hacking
Change-Id: I7c26e11d83dee13e8bbcb024473d916a27f3e867
2014-11-14 15:34:32 +01:00
Dmitry Tantsur
5a28c1790d Post-migration updates for stackforge and launchpad
Change-Id: Id35cfe2ed3fa6a48d41efb29c3dab9e78bc7d051
2014-11-14 15:14:33 +01:00
Dmitry Tantsur
2e4db6e1db Rename tox job flake8 -> pep8 as per OpenStack standart 2014-11-10 14:14:59 +01:00
Dmitry Tantsur
b3a599ecb5 Raise tox coverage target to 80% 2014-10-27 11:47:13 +01:00
Dmitry Tantsur
afdc395379 Test coverage reporting and gating 2014-10-24 16:27:25 +02:00