summaryrefslogtreecommitdiffstats
path: root/nova/cmd
Commit message (Collapse)AuthorAgeFilesLines
* Baremetal_deploy_helper error message formatting.Dan Prince2013-06-211-12/+13
| | | | | | | Updates our baremetal_deploy_helper so our error message use formatting that works with translations. Change-Id: I8811df50f0e80c5680e6316c829a197b0ade5967
* Merge "Add err_msg param to baremetal_deploy_helper."Jenkins2013-06-201-0/+4
|\
| * Add err_msg param to baremetal_deploy_helper.Dan Prince2013-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the baremetal-deploy-helper so that we look for an option 'e' POST parameter which contains an optional error message string from the agent. This works with the associated DIB branch here: http://review.openstack.org/#/c/33341/ And is also fully backwards compatible with existing agent scripts which do not send the 'e' parameter. Change-Id: I9a5914e719c2db6d2ae6d002cd386a0e48fda18d
* | Retry the sfdisk command up to 3 times.Dan Prince2013-06-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Updates the nova baremetal-deploy-helper so that we retry the fdisk command up to 3 times. Previously the command would sometimes intermittently fail with 'Device or resource busy' errors. There doesn't seem to be a good way to check/verify this other than to retry. Fixes LP Bug #1191084. Change-Id: I9c0733432dee5d556d6d2460db42f844e277c8de
* | Merge "Remove trivial cases of unused variables (1)"Jenkins2013-06-181-9/+6
|\ \ | |/ |/|
| * Remove trivial cases of unused variables (1)Stanislaw Pitucha2013-06-131-9/+6
| | | | | | | | | | | | | | | | | | | | | | Kill some of the variables marked as unused by flakes8. This should allow to enable F841 check in the future. Only trivial cases with no function calls and obviously pure functions (like datetime.now(), or len()) are cleaned up here. Part 1, split to reduce conflicts. Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8
* | Fix the wrong reference by CONFGuangyu Suo2013-06-141-1/+1
|/ | | | | | | | CONF.set_defaults(CONF, web='/usr/share/novnc') should be CONF.set_default('web', '/usr/share/novnc') Fixes: bug #1190628 Change-Id: I7ff12d10ed423fa6518b8674b80d0e1cc1787a8b
* Merge "Revert "Fix local variable 'root_uuid' ref before assign""Jenkins2013-06-131-6/+13
|\
| * Revert "Fix local variable 'root_uuid' ref before assign"Devananda van der Veen2013-06-121-6/+13
| | | | | | | | | | | | | | | | | | This reverts commit 30bc1ef250f0230a9a1f562cd51b0f57d4a35912, which fixed a NameError but introduced a new bug in the deploy process that could cause silent failures in a deploy. Instead, we should log a more descriptive error and allow the exception to be raised. Change-Id: I0221984ce4f7c406990315ef820d9ce63fc6e015
* | Fix and enable H403 testsDirk Mueller2013-06-122-13/+31
|/ | | | | | Multi-line doc-strings should end on a new, separate line. Change-Id: I4cf0cfe92b634ef77971863a4df41ef43531bc20
* Merge "Use Instance Objects for Start/Stop"Jenkins2013-06-122-0/+8
|\
| * Use Instance Objects for Start/StopDan Smith2013-06-072-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the start and stop operations use the Instance object instead of passing SQLA-derived dicts over RPC. Until something more sophisticated is needed (and developed), it also adds a nova.object.register_all() function which just triggers imports of all the object models so that they are registered. When adding a new object type, that register function should be updated appropriately. Related to bp/unified-object-model Change-Id: I3c8d9cba07d34097a279502062906de802d19d1f
* | Fix local variable 'root_uuid' ref before assignDan Prince2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes an issue where the root_uuid variable gets used before it is assigned. This moves the switch_pxe_config function so that it only gets called if root_uuid is assigned. Fixes LP Bug #1190269. Change-Id: I1abaf391f3a80dcacc815d2e38c6da9ad1b099ff
* | Rename functions in nova.compute.flavors from instance_typeJoe Gordon2013-06-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | Second step in removing references to instance_types. Remove all references to instance_type in nova.compute.flavors. Also update compute devref to reflect changed name. Partially implements bp flavor-instance-type-dedup renamed: nova/tests/test_instance_types.py -> test_flavors.py Change-Id: I7413bf832c61d04ab90ec8b1370d3f01372c4172
* | Enhance group handling in extract_optsJulien Danjou2013-06-103-48/+62
|/ | | | | | | | | | | | | | When there's 2 options with the same name, the script gets confused and doesn't know in which group it goes. This fixes it, and fixes also the template generation which is broken for various reasons: - gettext.install was missing - nova-rootwrap when imported calls exit() because it doesn't find a valid configuration file, so let's exclude it entirely anyway - eventlet/greendns needs to be ignored for this Change-Id: Iaa4e9a806e79032ce1675b46a6b7a7628c3eff89 Signed-off-by: Julien Danjou <julien@danjou.info>
* Improve Python 3.x compatibilityDirk Mueller2013-06-011-1/+1
| | | | | | | | | Mechanical translation of the deprecated except x,y: construct with except x as y: The latter works with any Python >= 2.6. Add Hacking check. Change-Id: I845829d97d379c1cd9b3a77e7e5786586f263b64
* Convert Nova to use Oslo service infrastructure.Brian Elliott2013-05-132-7/+7
| | | | | | | | | | | | Convert Nova to use the Oslo versions of: * Service * Launchers Also add Service timers to the Service ThreadGroup. blueprint use-oslo-services Change-Id: Id8ab017f4525afd69fed322311f2d5cc3b6d6f98
* Fix flake8 errors in anticipation of flake8.Monty Taylor2013-05-171-4/+4
| | | | Change-Id: I7c713f95eb974d5998d2be50722df7d6f64a234e
* Merge "Fix header issue for baremetal_deploy_helper.py"Jenkins2013-05-161-1/+1
|\
| * Fix header issue for baremetal_deploy_helper.pyJay Lau2013-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | Fix header issue baremetal_deploy_helper.py is not a python script which can not be run directly, so there is no need to keep "#!/usr/bin/env python" but change it to "# vim: tabstop=4 shiftwidth=4 softtabstop=4" Change-Id: Ic4957673605cd71dc19fc38a2626bdaa35d102c0
* | Merge "Remove "#!/usr/bin/env python" from .py files under nova/cmd"Jenkins2013-05-1522-22/+1
|\ \
| * | Remove "#!/usr/bin/env python" from .py files under nova/cmdJay Lau2013-05-1422-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug 1178543 Now in Havana, all nova service script start up logic are moved to nova/cmd and those files are not simply python script but python files, so there is no need to still keep "#!/usr/bin/env python" for those files since they won't be run directly as scripts. Change-Id: Ic102215dc0200ec1f6b47951bef31d58b08022ef
* | | Merge "Cleanups for create-flavor"Jenkins2013-05-141-2/+3
|\ \ \ | |/ / |/| |
| * | Cleanups for create-flavorRick Harris2013-05-141-2/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | Instead of setting defaults values to None in the signature and then setting the *real* default in the function body, it's more concise/readable to set the value in the signature itself (when dealing with immutable types). Along with this, the handling of `memory_mb` and `vcpus` was detangled so the attributes were handled in one place and not across both the non-negative and positive int checks. Change-Id: I1c06768c2fd076adc8c0a647a492dabb67b7bf79
* | Merge "Remove duplicate gettext.install() calls"Jenkins2013-05-135-16/+0
|\ \ | |/ |/|
| * Remove duplicate gettext.install() callsMark McLoughlin2013-05-085-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | When commit 799a925 moved us to console scripts entry points, we moved the gettext.install() call into nova/cmd/__init__.py but forgot to remove it from some of the commands. Since that move, we've switched to using gettextutils.install() which supports a $NOVA_LOCALEDIR environment variable ... so calling install() from these commands will actually break that support. Change-Id: I1f959704551b35e95c5470a7aef900312db2e223
* | Merge "Update rootwrap with code from oslo."Jenkins2013-05-111-128/+0
|\ \
| * | Update rootwrap with code from oslo.Monty Taylor2013-05-091-128/+0
| | | | | | | | | | | | Change-Id: I30f1b8773840c098f1e38d09bf13f0863035289e
* | | Merge "Show exception details for failed deploys."Jenkins2013-05-101-1/+1
|\ \ \ | |/ / |/| |
| * | Show exception details for failed deploys.Robert Collins2013-05-111-1/+1
| |/ | | | | | | | | | | | | | | Without some detail errors are inscrutable and impossible to debug. Fixes bug 1178608 Change-Id: I0ed6164e8689c63bd194924d3f7cb50b49feb921
* / Rename nova.compute.instance_types to flavorsJoe Gordon2013-05-071-8/+8
|/ | | | | | | | | | | | | First step in removing references to instance_types. Rename instnace_types.py and update references to it. We currently use instance_type and flavor as synonyms, to reduce confusion we are picking one. We are going with our own terminology, flavors. renamed: nova/compute/instance_types.py -> nova/compute/flavors.py Partially implements bp flavor-instance-type-dedup Change-Id: I9dc04cf311aa8813be4f5329f23729d2c43cae6d
* Convert to using oslo's execute() method.Michael Still2013-05-041-2/+2
| | | | | | | | There are some small warts (mostly around other execute() like methods which reuse the exception). I will fix these warts in later reviews. Change-Id: Ice9cdbdc5f3e5a9f8365f5d99acf1863a9fe3e7a
* Deprecate show_host_resources() in scheduler managerHans Lindgren2013-05-021-4/+56
| | | | | | | | | | This method does not at all belong in the scheduler. Its only use is from being remotely called by nova-manage to whom it returns data fetched from the db. I think nova-manage is better of fetching this data on its own instead of making this extra round trip to the scheduler. Change-Id: I435300cdd15bdd041cbe5718ae064b98cec4cceb
* Merge "Allow listing fixed_ips for a given compute host."Jenkins2013-04-261-1/+2
|\
| * Allow listing fixed_ips for a given compute host.Michael Still2013-04-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | nova.db.fixed_ip_get_all_by_instance_host was removed in commit bb867ce3948ddc23cf928ca3dda100a1a977896a, but was still used in nova-manage. This patch works around the removal of the foreign key that led to this method being removed. Resolves bug 1163660. Change-Id: Ieccd37c752e245558827615c098604d11ad3d945
* | Merge "baremetal: Change input for sfdisk"Jenkins2013-04-221-1/+1
|\ \
| * | baremetal: Change input for sfdiskArata Notsu2013-04-131-1/+1
| |/ | | | | | | | | | | | | | | | | To prevent sfdisk stopping with "bad input", use a empty string instead of "-" (and doing so requires using "," as a separator). Fixes bug 1166112 Change-Id: I5e4cffaa326fbafd1583d55744f921a40b3ae76f
* | Improve Python 3.x compatibilityDirk Mueller2013-04-221-7/+7
| | | | | | | | | | | | | | A bit of mechanical translation to clean out the deprecated except x,y: construct Change-Id: I80883b6b0c014bdf4799e8b7b2c4a4a07d951a0b
* | Merge "Add NOVA_LOCALEDIR env variable"Jenkins2013-04-151-2/+2
|\ \ | |/ |/|
| * Add NOVA_LOCALEDIR env variableMark McLoughlin2013-04-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of fixing bug #995287 Syncs these two commits from oslo-incubator: Support overriding oslo localedir too Add a gettextutils.install() helper function to get a new gettextutils.install() function which allows the default localedir to be overwritten via an environment variable. Note that gettextutils.install() must be called before any other nova modules are imported since some modules attempt to translate strings at import time (e.g. the 'message' attributes on classes in nova.exception). This is broken and inefficient, but fixing it involves adding something like spinx's l_() function and would be very invaisve. Also, note that calling gettextutils.install() in nova.cmd.__init__ means that no program which uses a different translation domain should ever import any of the modules under nova.cmd. Change-Id: I86562b3a65d371673bb21f7179eecc7602bc0775
* | Merge "Define LOG globally in baremetal_deploy_helper"Jenkins2013-04-121-0/+1
|\ \
| * | Define LOG globally in baremetal_deploy_helperArata Notsu2013-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since LOG = getLogger() has been moved from the global scope to the function scope (main), the rest of the module could not find LOG. This patch makes LOG global again. Fixes bug 1165262 Change-Id: I2607802dcbed64135f75011a02ebce95519e4ea1
* | | Remove "undefined name" pyflake errorsStanislaw Pitucha2013-04-103-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of places tried to use undefined names. This included one powervm test which turned out to not check anything at all (used fake implementation of tested method) and needed to be moved. Make sure that this class of errors causes run_pep8 failure in the future. Change-Id: I82ccb63bbc6f6d2b20ecb7f06b2fc22f8f034a33
* | | Import eventlet in __init__.pyMichael Still2013-04-091-0/+17
| |/ |/| | | | | | | | | | | | | | | | | | | All of this is because if dnspython is present in your environment then eventlet monkeypatches socket.getaddrinfo() with an implementation which doesn't work for IPv6. To turn this off you need to set an environment variable before you do the import. Resolves bug 1164822. Change-Id: I2382db7b3ac4a2d940e0c45dfe3d48f499de2f16
* | nova-consoleauth start failed by consoleauth_manager option missing Zhi Yan Liu2013-04-071-0/+1
|/ | | | | | | | | Miss onsoleauth_manager option importing caused nova-consoleauth service start failure: "NoSuchOptError: no such option: consoleauth_manager". Fixes bug: 1164845 Change-Id: I59a15a423f49ee6c28401f905b4973c2231faaa6 Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* Only call getLogger after configuring logging.Davanum Srinivas2013-04-054-5/+5
| | | | | | | | | | | Logging needs to be setup properly before we try to log something. Fix a test case that loads the code but does not execute the code that results in the LOG being setup properly. Fixes LP# 1161031 Change-Id: I9d5bc6b87cfb25243f00e17b532d4485dc4454e4
* Move console scripts to entrypoints.Monty Taylor2013-04-0425-0/+3038
As part of the move of plugins to entrypoints, take advantage of the entrypoints based console scripts, which will make our command line scripts available for unittesting. Part of blueprint entrypoints-plugins Co-authored-by: Michael Still <mikal@stillhq.com> Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f