48 Commits

Author SHA1 Message Date
Jenkins
c9f96d6d79 Merge "Show transitions initiated by API requests" 2016-02-09 10:45:14 +00:00
Ruby Loo
4f8b97dff6 Show transitions initiated by API requests
This updates the state machine diagram and documentation to indicate
which transitions are initiated by API requests versus the ones that
are internally done by the conductor. Stable states are highlighted
a bit.

Change-Id: I1a2de81b14696286f1da47c06374ad235962c849
Closes-Bug: #1527316
2016-02-01 14:39:12 +00:00
Zhenguo Niu
29b37065d7 tox: make it possible to run pep8 on current patch only
This makes tox use a simple wrapper around flake8 like
Nova, which can be told to restrict the check to only
files changed in the current command. This can be invoked
in a simple manner with 'tox -epep8 -- -HEAD'. Since most
commits only touch a handful of files, this will usually
be far faster than checking all source files.

To check an entire branch for bisectability it can be
automated via

  git rebase -i master -x 'tox -epep8 -- -HEAD'

Change-Id: I75b1cfe3198b1217f8b25877714a4af47ae7069f
2016-01-05 09:55:48 +08:00
Lucas Alvares Gomes
b51f7d4d8c Run flake8 against the python scripts under tools/ and devstack/tools
This patch allows flake8 to run against the scripts under tools/ and
devstack/tools directories.

It also fix the current pep8 errors where it's needed.

Change-Id: I3f447564dd528c6efdee10a4a13f1ff1d7e1c3b1
2015-12-24 01:56:39 +00:00
Lucas Alvares Gomes
cd9975dc0a Add extensions to the scripts at devstack/tools/ironic/scripts
In order to easily determine the file type of the scripts in
devstack/tools/ironic/scripts directory, this patch is adding the
correspoding extension to each script.

Change-Id: Ifb53b768b7a3b38561031c92c279fa520e289b3d
2015-12-21 11:55:56 +00:00
Lucas Alvares Gomes
d7c41ebf9b Fix "No closing quotation" error when building with tox
Apparently # is treated as a comment inside the string and as
consequence the rest of the command gets stripped. This patch drops
those comments from the bashate command.

This patch also moves the bashate command to its own script under
tools/.

Change-Id: Ic44bb64419ca1465f69c91fd579e8c84d69f84b8
Closes-Bug: #1527562
2015-12-21 11:53:41 +00:00
Faizan Barmawer
7c138f01a0 Refactor disk partitioner code from ironic and use ironic-lib.
The disk partitioner related code from ironic/common/disk_partitioner.py
and ironic/drivers/modules/deploy_utils.py is being moved to ironic-lib.
The code in ironic needs to be removed and use ironic-lib to perform
disk related activities.

Change-Id: I7b1b1d8b45b947a7b5715f3c6ab49d84e84b6b90
2015-12-09 22:03:35 -08:00
Anton Arefiev
564f5f7cd7 Add SSL support to the Ironic API
Add posibility to configure the API to service requests via HTTPS instead
of HTTP using native ssl from oslo.service wsgi.

New options was added:
 * enable_ssl_api - turn on ssl support;
Options defined in oslo.service for configure certs:
 * ca_file - ca certificate file to use to verify connecting clients;
 * cert_file - certificate file to use when starting the server securely;
 * key_file - private key file to use when starting the server securely;

Closes-bug: #1430213
Change-Id: Id4b84d83f9aa6c7f898b3b9b59158d5b1a00e159
2015-11-18 12:04:18 +00:00
Jenkins
58769fbfc8 Merge "Refactor map_color()" 2015-09-02 17:43:55 +00:00
Michael Krotscheck
05f4a64aed Added CORS support middleware to Ironic
This adds the CORS support middleware to Ironic, allowing a deployer
to optionally configure rules under which a javascript client may
break the single-origin policy and access the API directly.

OpenStack Spec:
   https://review.openstack.org/#/c/179866/
Oslo_Middleware Docs:
   http://docs.openstack.org/developer/oslo.middleware/cors.html
OpenStack Cloud Admin Guide Documentation:
   http://docs.openstack.org/admin-guide-cloud/cross_project_cors.html

Co-Authored-By: Devananda van der Veen <devananda.vdv@gmail.com>
Depends-on: I2deed897f8f9ef87e4a74227c4fcea9afdb151e8
Change-Id: Ic55305607e44069d893baf2a261d5fe7da777303
2015-09-01 19:45:01 +00:00
Ruby Loo
5135544ffd Refactor map_color()
This refactors map_color() so that it returns a dictionary, instead
of the callers (of that method) doing that work.

Change-Id: I55a808d889fd3818c1f262dcab7af9ffa8c6e557
2015-09-01 13:56:47 +00:00
Jenkins
99d7b75ca1 Merge "Use automaton's converters/pydot" 2015-08-31 13:54:18 +00:00
Lucas Alvares Gomes
2e16a3cd7e Fix "tox -egenconfig" by avoiding the MODULEPATH env variable
MODULEPATH is apparently a well known variable from environment-modules
package and was causing the sample configuration generation to fail.

Change-Id: Ie9f1896c9480aa371c99a316511b172e92f52824
Closes-Bug: #1437904
2015-08-20 10:50:00 +01:00
Ruby Loo
d078ba6efb Use automaton's converters/pydot
This uses the automaton library's converters/pydot to
generate the state machine diagram.

Change-Id: I23888d035e108224fbd29b305f6dd418d584e54e
2015-07-28 21:24:48 +00:00
Sergey Vilgelm
0f4eba1854 Switch to oslo.service
oslo.service has graduated, so ironic should consume it.

Change-Id: Iaa1ca0d97b92b9a6858b2c2d50eb514cc2118762
Closes-Bug: #1466851
2015-06-29 10:49:15 +02:00
Vladyslav Drok
dfc44ca6a9 Remove tools/flakes.py
Remove it as it is not needed.

Change-Id: Ib9308b880193aafb618120b9782d4863635d9fc3
2015-06-12 15:20:45 +03:00
Davanum Srinivas
133c83180d Sync with latest oslo-incubator
Periodic sync with latest oslo-incubator code

Change-Id: Ia18335278da4c25240e537d53687658fe4fbaa6a
2015-06-10 11:31:17 -04:00
Ghe Rivero
aafeed2f85 Use oslo_log lib
Module 'log' from oslo-incubator was removed after release of oslo_log library.

Change-Id: I4261083dae076cea66c42ad16eb82a5faaeb1a65
2015-05-05 08:43:28 +02:00
Ghe Rivero
338c1f2d01 Adopt config generator
oslo.config.generator has been removed from olso-incubator so
we need to adopt it in order to generated up-to-date config
files.
Changes introduced:
- Move config/generator.py from openstack.common to ironic.common
- Update config generator to use new style list_opts discovery
- Split _print_opt function to reduce complexity and pass pep8 tests

Change-Id: I397504bf0604a86082f26e46952720117611f3a8
2015-05-04 20:38:13 +00:00
Joshua Harlow
4c7a7bdf64 Add a venv that can generate/write/update the states diagram
Instead of requiring manual understanding of how to generate
the states diagram, add an explicit virtualenv that can be
used to create and generate that docs diagram (and replace the
existing file with it).

Change-Id: I1738da9bf08bfda9b9be01489e8456569a31709e
2015-04-27 11:07:01 -07:00
Jenkins
9085486033 Merge "Sync with oslo.incubator" 2015-04-08 00:02:18 +00:00
Ghe Rivero
b2f15d07d3 Sync with oslo.incubator
Add oslo.policy and oslo.concurrency to oslo config generator extra
libraries to retrieve config options
Update oslo_incubator service module
Update oslo_incubator versionutils with new list_opts discovery

Change-Id: I5558f6f9f708b1643ebd6c8b2a213a1fae582a50
2015-04-06 12:54:56 +02:00
Devananda van der Veen
072372119a Fix formatting error in states_to_dot
Fixes the following error by correctly quoting the header:

  Warning: syntax error in line 1 near 'states'

Change-Id: I94fa3b18d355c68674b16f128e477aba8e1b542e
2015-03-24 03:16:00 -07:00
Lin Tan
1be0fd0a8e Generate keystone_authtoken options in sample config file
Adding keystonemiddleware.authtoken as extra libraries
to register its missing options, like admin_user.
Update sample conf by running 'tools/config/generate_sample.sh'

Closes-Bug: #1430115
Change-Id: Ic8666dc4a3a6b7c5855afb2929d8b14ebe21ca52
2015-03-19 13:56:34 +08:00
Joshua Harlow
cc31c0c524 Update the states generator and regenerate the image
Change-Id: I9ab9bd12547367ab65f225618aa6c4163645fb03
2015-02-23 16:11:04 -08:00
Joshua Harlow
92c4698678 Adjust the help strings to better reflect usage
The default format is png (and not svg) so we should
note that instead of having svg mentioned (this was
leftover from the clone of this from taskflow which
does default to svg).

Change-Id: I108857ecc606ed2c12e0d5b460a8e72eb95af740
2015-01-10 21:43:40 -08:00
Joshua Harlow
47b49a009c Add a fsm state -> dot diagram generator
Add a tool (derived from taskflow's similar tool)
that can turn the state machine defined in ironic
into a dot diagram.

This diagram is much easier to look at then trying
to mentally create a similar diagram; this makes it
easier to see issues and to visualize the state machines
valid states and transitions.

For this change we need to add back in the state machine
__iter__ method so that we can correctly iterate over the
states and transitions (and events that will cause those
transitions).

Change-Id: I9da09f65a46617aa1c837ae0fc71350276df8bea
2014-12-18 11:33:31 -08:00
Devananda van der Veen
50003a107d Use auth_token from keystonemiddleware
auth_token middleware in python-keystoneclient is deprecated and has
been moved to the keystonemiddleware repo.

This patch updates Ironic to use the new keystonemiddleware package.

Change-Id: Ifb48996867f9f51c4dbedde0e0d9476c2d2818b4
Closes-Bug: #1342274
2014-08-11 15:33:58 -07:00
Ghe Rivero
689052700c Sync oslo.incubator modules
Update the openstack.common modules from oslo.incubator
to have a current copy needed to start using new released
oslo libraries.

Change-Id: I60ea98b3381cbbc3d2905af224792ee68b423825
2014-08-05 22:28:25 +00:00
Victor Sergeyev
4d41e5cd86 Use oslo.db library
oslo.db library has been graduated from oslo-incubator,
so now we can use it instead of ironic.openstack.common.db.* code.

Co-Authored-By: Ghe Rivero <ghe.rivero@hp.com>

Implements: blueprint oslo.db

Change-Id: I250050a7dbd8735ba3af954223b54eabae793f59
2014-07-17 14:04:57 +03:00
Lucas Alvares Gomes
69dc8400db Port to oslo.messaging
The oslo.messaging library takes the existing RPC code from oslo and
wraps it in a sane API with well defined semantics around which we can
make a commitment to retain compatibility in future.

The patch is large and hard to be split into different patches, but the
changes can be summarized as:

* Remove openstack/common/{rpc, notifier, log_handler} modules dependency
(superceded by oslo.messaging)

* New config option `conductor.workers_pool_size` add to determine the
size of the workers greenthread pool.

* PeriodicService class refactored and renamed to RPCService, all periodic
tasks methods were moved to the ConductorManager class leaving RPCService
class to be resposable for setting up and starting the RPCServer from
oslo.messaging only.

* In oslo.messaging, a request context is expected to be a dict so the
method RequestContext.{to,from}_dict() was updated/added to the module.

* The allowed_rpc_exception_modules configuration option is replaced
by an allowed_remote_exmods get_transport() parameter. This is not
something that users ever need to configure, but it is something each
project using oslo.messaging needs to be able to customize.

* New common/rpc.py module added to wrap the global messaging state. It
also contains transport aliases for backwards compatibility with IceHouse
rpc_backend configuration values.

blueprint: oslo-messaging
Change-Id: I454e8898baed002a1cddb9eb76492ae9c2f1212b
2014-04-25 22:46:44 +01:00
yangxurong
daf7998996 Do not use __builtin__ in python3
__builtin__ does not exist in Python 3, use
six.moves.builtins instead.

Change-Id: I79b61b5ab67f491ce88015f799ff7d66c9eeb7ee
closes-bug: #1290234
2014-03-13 11:34:16 +08:00
Chris Krelle
f616e239c7 Import Nova "ironic" driver
Import the Nova "ironic" driver from the Nova review queue.
This Nova driver will not be present in the Icehouse release of Nova,
but is required for Ironic functionality and can be installed as an
out-of-tree driver.

Co-Author: Lucas Alvares Gomes <lucasagomes@gmail.com>
Co-Author: Devananda van der Veen <devananda.vdv@gmail.com>

Change-Id: I3351dee1a4b2dfb50317ce85dffe8012f0feca6c
2014-03-05 16:30:15 -08:00
He Yongli
110074a594 Remove extraneous vim configuration comments for ironic
Remove vim setting:

comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4

at the top of source code files, except for files in
openstack/common.

Change-Id: Ie80f76f08e27b7f5f747227c4cca8d79ad98bec6
Partial-Bug: #1229324
2014-02-26 09:24:48 +08:00
Victor Sergeyev
1fd5b44425 Sync common config module from Oslo
List of changes

1a6dfb9 Sanitize FQDN in config generator
e839886 Config generator fails with lazy messages
763eedf Fix DictOpt support in config sample generator
e3dddd7 generator: use EXTRA_* env vars in the bash script
e8e636c generator: add an EXTRA_LIBRARIES env variable
5dce17b Use entry points to discover options in libraries
dd9aa2b Remove unused variables
ad17a69 Fix filter() usage due to python 3 compability
7c18261 Temporary workaround for config generator
4b3e32b Sort the output of config/generator.py by group name
12bcdb7 Remove vim header
806272e Improve error reporting on import failures
6cd1c33 Clean up extra modules code

Updated ironic.conf.sample using new config generator.

Closes-Bug: #1282481
Change-Id: Ice3e527589bbf0e881d21f55229264513ea445d2
2014-02-25 11:13:06 +02:00
Devananda van der Veen
1f9917cc02 Add [keystone_authtoken] to ironic.conf.sample
Update the auto-generation of our sample config file by exporting a
variable to oslo.config.generator such that it will include the
keystone_authtoken section when building our config.

Change-Id: I8f0d93846cd948059ac6cbc6ec4024257e2c3f27
Closes-bug: 1271308
2014-01-21 12:29:45 -08:00
Devananda van der Veen
252ddedd6d Sync config module from oslo
Add 'config' to openstack-common so that it syncs from Oslo,
move tools/conf -> tools/config to be able to sync from Oslo,
and then sync the changes which are proposed in oslo-incubator
commit Iee6cc05cad70963f2a151f595ac376c9338f5774.

Change-Id: I32a80b0e2aa0e26b9fc78b7546c07e102639374e
2013-12-27 15:34:14 -08:00
Devananda van der Veen
6ba95e62a6 Add tools/conf/check_uptodate to tox.ini
To ensure that our sample config file, etc/ironic/ironic.conf.sample,
does not get out of sync with the code, this patch introduces a check
to tox that will compare the proposed ironic.conf.sample to a
freshly generated one, and error if they are not identical.

Ported from Nova's tools/config/check_uptodate.sh script.

Change-Id: Ic2898142754547e32bc4c03d23eca5d6a33721fc
Closes-bug: 1255621
2013-12-06 15:40:24 -08:00
Mark McLoughlin
0c5f6cbdfb Remove obsolete redhat-eventlet.patch
See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gorey details on
why this exists.

As of this fix:

  https://github.com/eventlet/eventlet/pull/34

which was released in eventlet 0.13, we no longer need the patch.

This has now been removed from oslo-incubator, so this is really just
syncing that removal.

Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353
2013-10-09 21:49:43 +01:00
Jenkins
6e189b2838 Merge "Sync install_venv_common from oslo" 2013-07-09 15:00:55 +00:00
Monty Taylor
dcf6886f38 Sync install_venv_common from oslo
The current version of install_venv_common uses the --distribute flag
in its creation of the virtualenv. This causes some upgrade problems
with the new versions of distribute and setuptools. The solution to
those problems is to get off of the distribute bandwagon.

Change-Id: Ie3de2504fe08f751dbf3f06e4973716a51d7e25b
2013-07-07 10:39:32 -04:00
Anita Kuno
cf84f2bf8a Add conf file generator.
Add oslo generator.py and generate_sample.sh similar to nova.
These files provide generator functionality for creating a conf file.

Fixes: bug #1191032
Change-Id: I5a239e41f822e2f51c95d7a44e8d62c38c62c8ac
2013-06-20 19:14:39 -04:00
Mark McLoughlin
22987dbdfb Copy the RHEL6 eventlet workaround from Oslo
Tests in oslo-incubator now need the horrendous hack to workaround an
issue with eventlet on RHEL6. We've moved the patch_tox_venv tool
and redhat-eventlet.patch into oslo-incubator, so add them to
openstack-common.conf.

Change-Id: I1acfec282b64d7582144b155119bedb1741db2f7
2013-05-27 06:45:21 +01:00
Devananda van der Veen
dd4521a3cc Fix pep8 errors and make it pass Jenkins tests.
Fix all existing pep8 errors.
Remove install_venv and friends, which were not needed.
Add a few ignores for nova code that is yet to be cleaned up.
Skip one failing test case, fixed by review 29394.
Import contrib/redhat-eventlet.patch from Nova.

Change-Id: I46b6ccaa272bd058757064672ce9221263ed7087
2013-05-16 18:40:38 -07:00
Devananda van der Veen
8ac57c720c Implement initial draft of a Pecan-based API. 2013-05-13 00:57:31 -07:00
Devananda van der Veen
0480834614 Rename files and fix things. 2013-05-07 16:47:55 -07:00
Devananda van der Veen
05e9ce4c48 Import add'l files from Nova
Import lots of files from Nova at rev
f0da3464ab17552f24977d22365fa9573702f5a8
2013-05-07 16:47:49 -07:00
Monty Taylor
84a7dc47e2 Added project infrastructure needs. 2013-05-02 14:55:43 -04:00