Commit Graph

61 Commits

Author SHA1 Message Date
Stephen Finucane 02eb9cffe6 Remove 'nova-xvpvncproxy'
This legacy service is no longer used and was deprecated during the
Stein cycle [1]. It's time to say adios and remove them in their
entirety. This is pretty straightforward, with the sole exception of
schema for the 'remote-consoles' API, which has to continue supporting
requests for type 'xvpvnc' even if we can't fulfil those requests now.

[1] https://review.opendev.org/#/c/610076/

Part of blueprint remove-xvpvncproxy

Depends-On: https://review.opendev.org/695853
Change-Id: I2f7f2379d0cd54e4d0a91008ddb44858cfc5a4cf
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-12-23 14:20:28 +00:00
Stephen Finucane 0c7262cce4 objects: Remove ConsoleAuthToken.to_dict
This is only used in three places now, each of which can be removed.

Part of blueprint remove-consoleauth

Change-Id: I89df8f8fa111b730ddd0aa73ae09a8cd5d152dad
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-04-16 11:26:23 +01:00
Stephen Finucane 97aa7bb85a xvp: Remove use of '_LI' marker
We don't translate logs anymore.

Change-Id: Ic1f2b3787315504fd072a34273c42dd803a3899d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-19 10:04:45 +01:00
Stephen Finucane e9a27f7c73 xvp: Start using consoleauth tokens
This service is EOL and likely unused in the wild. However, it was still
using the nova-consoleauth service for authentication. Correct this,
allowing us to remove nova-consoleauth.

Part of blueprint remove-consoleauth

Change-Id: If14244559b68276eb1e43c59c821978ec591ae14
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-19 10:04:45 +01:00
Stephen Finucane 4e6cffe45e Deprecate the nova-xvpvncproxy service
This is a relic that has long since been replaced by the noVNC proxy
service. Start preparing for its removal.

Change-Id: Icb225dec3ad291b751e475bd3703ce0eb30b44db
2018-10-15 10:03:13 +01:00
Stephen Finucane db14cc587e config options: Centralise 'vnc' options
Move "vnc" config options to the central location 'nova/conf'. This
includes some typo fixes for the help strings along with removing some
unnecessary 'deprecated_name' args.

Change-Id: I5da0ad8cd42ef8b969ec05c07c497238e92f1f41
Implements: bp centralize-config-options
2016-02-03 13:36:20 +00:00
Shih-Hao Li 08b661b7a9 Fix xvpvncproxy config path when running n-xvnc
Fix xvpvncproxy config path due to Change
I1e34a0f98de125c8b8b145377835d95035e2b472.

Change-Id: I119ae7f2cb674294bc9d8c662959dc8d04a924a3
2016-02-01 13:16:58 -08:00
jichenjc e17be81ed8 config options: Make xvp proxy into vnc group
Make all vnc configuration into [vnc] group.

Change-Id: I1e34a0f98de125c8b8b145377835d95035e2b472
2016-01-19 11:11:59 +00:00
Jenkins 55251dbb96 Merge "Add hacking check for eventlet.spawn()" 2015-10-08 03:43:00 +00:00
Eric Brown ec59ea8db7 Use min and max on IntOpt option types
The latest oslo.config supports a minimum and maximum value for
IntOpt options.  This patch utilizes this for a number of options
with well known ranges.

Change-Id: I897d8870fdf67a095915c8fcdf239024b092e9e3
2015-08-14 04:37:21 +00:00
Ryan Rossiter 6179854ae7 Add hacking check for eventlet.spawn()
Change Id52c30bb5ded2184d772e6026b0f04f9a0efeb55 added a hacking check
for greenthread.spawn(). Since eventlet.spawn() calls
greenthread.spawn() under the covers, it should also be checked. Because
there are still occurrences of eventlet.spawn(), these were also cleaned
up in order to pass the added hacking check.

Co-Authored-By: Qin Zhao <chaochin@gmail.com>

Change-Id: Ia125b4ad5e84bf48091af5a7a483b89629f0ec31
Related-Bug: #1404268
Closes-Bug: #1468513
2015-08-13 20:44:41 +00:00
Diana Clarke 380c4d750f Register the vnc config options under group 'vnc'
Also renamed 'vnc_enabled' to 'enabled', and 'vnc_keymap' to 'keymap' now
that those options are prefixed by the 'vnc' group.

Change-Id: I2ff668d4ebd8e6ebf9bf4e8ca5b077958f051144
Closes-Bug: #1447528
2015-06-22 13:39:00 -04:00
Davanum Srinivas 97d63d8745 Use oslo.log
Convert the use of the incubated version of the log module
to the new oslo.log library.

Sync oslo-incubator modules to update their imports as well.

Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
Change-Id: Ic4932e3f58191869c30bd07a010a6e9fdcb2a12c
2015-02-22 07:56:40 -05:00
Davanum Srinivas 69d0c64361 switch LOG.audit to LOG.info
oslo.log does not have AUDIT level. This was a conscious
decision documented in blueprint:
https://blueprints.launchpad.net/oslo.log/+spec/remove-context-adapter

which was implemented in:
I10240f8af6c42508124659b3ed62c5ab93552953

So to prep for switching to oslo.log, this changeset removes
usage of LOG.audit and replaces it with LOG.info

Change-Id: I9cb1293529b2079b8a4778e27d60c6c760dfb622
2015-02-22 07:56:09 -05:00
Davanum Srinivas af2d6c9576 Switch to using oslo_* instead of oslo.*
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.

This commit includes:
- using oslo_utils instead of oslo.utils
- using oslo_serialization instead of oslo.serialization
- using oslo_db instead of oslo.db
- using oslo_i18n instead of oslo.i18n
- using oslo_middleware instead of oslo.middleware
- using oslo_config instead of oslo.config
- using oslo_messaging instead of "from oslo import messaging"
- using oslo_vmware instead of oslo.vmware

Change-Id: I3e2eb147b321ce3e928817b62abcb7d023c5f13f
2015-02-06 06:03:10 -05:00
Ian Wienand e154c2cefe Deduplicate some INFO and AUDIT level messages
I'm trying to debug a problem where the last thing in the logs is
"Starting instance...".  Unfortunately this occurs twice in the same
source file, so it's hard to figure out a priori which log statement
it came from.  Audit and info messages don't disambiguate their
function/line number, all you get is the logger name like:

2014-04-06 19:51:01.871 8288 AUDIT
  nova.compute.manager [req-...] [instance: ...] Starting instance...

I think it doesn't hurt to to make sure all logs at this level are
unique, even if upstream were to log the function (see [1]).  Most
duplicate LOG.info and LOG.audit level messages are in separate files
so we can disambiguate by the name, but there are a few that overlap.

For reference, the less-then-perfect but useful check I used was:
 $ grep -r 'LOG.audit' * | sed 's/:\s*/ /' | sort -k1 | uniq -f1 -c

[1] https://review.openstack.org/#/c/85638/

Change-Id: If1ff573ffed1d12fcadfbdfd3365aae68a5fb977
2014-11-13 15:25:40 +11:00
Davanum Srinivas 826aed0ec7 Use oslo.i18n
oslo.i18n provides the i18n functions that were provided by
oslo-incubator's gettextutils module. Some tests that were
using internal details of the library were removed.

Change-Id: I44cfd5552e0dd86af21073419d31622f5fdb28e0
2014-07-18 14:28:09 -04:00
Davanum Srinivas f3dc6eefe7 Fix and gate on H305 and H307
Both H305 and H307 are part of the OpenStack style guide.

Ensure that there are 3 groups of imports, stdlib,
third-party and project specific. Within each category
ensure that imports are in alphabetical order.

Change-Id: Id4994551c135c3c1a4982153f0c6cacba6176b95
2014-07-15 01:13:26 +00:00
liu-sheng 74f953a1d7 Remove vi modelines
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.

Also a check is added to hacking to detect if they are re-added.

Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
2014-02-03 14:19:44 +00:00
Andreas Jaeger bc10b3c2b2 Small edits on help strings
These were initially noted during import into the manuals at
https://review.openstack.org/67502

Fixes include rework of text, missing or extra spaces, wrong
capitalization and no sentence style capitalization.

A hacking check has been added that tests that all config options
start with a capital letter.

Change-Id: I0a1c333bbb3a812932d3972a7403f94da0bff341
Co-Authored-By: Daniel Berrange <berrange@redhat.com>
Co-Authored-By: Diane Fleming <diane.fleming@rackspace.com>
2014-01-23 20:05:50 +01:00
Alex Gaynor cd9d8e45c6 Remove the monkey patching of _ into the builtins
Previous _ was monkey patched into builtins whenever
certain modules were imported. This removes that and
simply imports it when it is needed.

Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
2013-07-26 07:31:17 -07:00
Stanislaw Pitucha 9f7eaca80d Remove trivial cases of unused variables (1)
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
2013-06-13 17:04:08 +00:00
Kurt Taylor d17f9ab13d Update OpenStack LLC to Foundation
Update all references of "LLC" to "Foundation".

Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
2013-02-26 19:15:29 -05:00
Mark McLoughlin 706a137005 Use oslo-config-2013.1b4
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.

Add the 2013.1b4 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.

Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.

Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.

Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already
does for paste. It turns out imp.find_module() doesn't correct handle
namespace packages.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-19 21:16:32 -08:00
Daniel P. Berrange 481d6ff142 Remove obsolete VCS version info completely
The VCS version string in nova/version.py has been hardcoded
to 'LOCALBRANCH:LOCALVERSION' since change

  0bbb0e8cb1

The only places which use this info are some logging calls,
and since 'nova-manager version' command. The latter would
more usefully output the distro specific package string.

Delete the VCS related methods in version.py and replace their
usage with a new method version_string_with_package() which
appends the distro-specific package tag

Change-Id: I972b79c329198cb5376d537c6b672830094cd759
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-19 18:54:17 +00:00
Daniel P. Berrange 30ddc85a10 Fix typos in vncserver_listen config param help description
Fix missing space between words, and capitalize "IP" fully
in vncserver_listen config param

Change-Id: Ica525910a883e8ff99793e950316d640e1750f98
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-12-18 22:46:31 +00:00
Mark McLoughlin 94d87bce21 Remove nova.config.CONF
Modules import nova.config for two reasons right now - firstly, to
reference nova.config.CONF and, secondly, if they use one of the
options defined in nova.config.

Often modules import nova.openstack.common.cfg and nova.config
which is a bit pointless since they could just use cfg.CONF if
they just want to nova.config in order to reference CONF.

Let's just use cfg.CONF everywhere and we can explicitly state
where we actually require options defined in nova.config.

Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
2012-11-20 00:00:21 +00:00
Mark McLoughlin 6e92a67fc3 Remove nova.flags
Now that options have all moved from nova.flags to nova.config, we can
safely remove the nova.flags imports and replace them with nova.config
imports.

Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
2012-11-17 16:30:03 +00:00
Mark McLoughlin 637e805634 Switch from FLAGS to CONF in misc modules
Use the global CONF variable instead of FLAGS. This is purely a cleanup
since FLAGS is already just another reference to CONF.

We leave the nova.flags imports until a later cleanup commit since
removing them may cause unpredictable problems due to config options not
being registered.

Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
2012-11-04 21:46:35 +00:00
Andrew Bogott d335457f48 Switch to common logging.
I only just moved logging from nova to common, so behavior should remain the same.

Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
2012-07-02 15:57:09 -05:00
Zhongyue Luo 6228acd7ff Unused imports cleanup (folsom-2)
Fixes bug #1008023

Change-Id: Ifb8ecbb7430fdabd7b5d81ab23df66942abd9cb7
2012-06-03 13:26:35 +08:00
Brian Waldon 317378f742 Update pep8 dependency to v1.1
The latest release of pep8 adds stricter rules for extraneous
whitespace within lines. This patch also addresses these new
violations acoss the codebase.

Change-Id: Ib7e50281870473df1704ed50868c5c2e26bdb02e
2012-05-24 06:59:05 -07:00
Russell Bryant 9ec9fdce62 Add version to consoleauth rpc API.
Part of blueprint versioned-rpc-apis.

Change-Id: I9682bdbd06d744141b94385992b37cd2e55b8f5e
2012-05-17 12:16:14 -04:00
Joe Gordon a58a50e060 Fix OpenStack Capitalization
Openstack => OpenStack
for nova/*py

Change-Id: Ibcfae4776422a515a109e59510fc84f8b63c00b9
2012-03-15 16:10:53 -07:00
Jason Kölker c9ca372b0b Standardize logging delaration and use
* Make modules use getLogger(__name__) and log to the result

Change-Id: Ib6d69b4be140ec89affc86ed11e65e422d551df1
2012-02-14 13:02:43 -06:00
Mark McLoughlin d1888a3359 Remove the last of the gflags shim layer
Make FLAGS a ConfigOpts instance and fix up all the places where we
expected FlagValues behaviour.

Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89
2012-02-10 06:31:56 +00:00
Mark McLoughlin 9871c5f963 Move cfg to nova.openstack.common
Move it here so that it can be kept in sync with openstack-common using
the new update.py script for code in openstack-common's incubation area.

See here for more details:

  http://wiki.openstack.org/CommonLibrary#Incubation

Note: this commit just moves the existing code in Nova with no other
changes. A subsequent commit will sync it with latest openstack-common
so that it is easier see the new changes.

Change-Id: If88d678b1b9bad3d37117de7f7159d7fea8ab4c8
2012-02-03 19:21:54 +00:00
Mark McLoughlin 82049af90e Refactor away the flags.DEFINE_* helpers
The next obvious step in porting to cfg is to define all options using
cfg schemas directly rather than using the flags.DEFINE_* helpers.

This is a large change, but it is almost entirely pure refactoring and
does not result in any functional changes.

The only change to note is that the default values for glance_host,
glance_api_servers and default_publisher_id options are now using opt
value interpolation i.e.

 -glance_host=_get_my_ip()
 +glance_host='$my_ip'

 -glance_api_servers=['%s:%d' % (FLAGS.glance_host, FLAGS.glance_port)]
 +glance_api_servers=['$glance_host:$glance_port']

 -default_publisher_id=FLAGS.host
 +default_publisher_id='$host'

Also note that the lower_bound check on the {report,periodic}_interval
options are no more, but this has been true since cfg was first added.

Change-Id: Ia58c8f0aaf61628bb55b1b8485118a2a9852ed17
2012-01-28 12:37:16 +00:00
Vishvananda Ishaya 78f6d9f15a Fix missing imports and bad call caught by pyflakes
Change-Id: Ib2735fff18d76152baa7f9c61af7ddf4594c722b
2012-01-18 21:06:44 -08:00
Anthony Young a444e8ff39 Allow config of vncserver_proxyclient_address.
* Improves deployment flexibility by allowing deployers to choose which address proxies like nova-xvpvncserver should use to to connect to instance proxies.  For xenserver, this will generally be the management ip of dom0.  For libvirt, this will be the management ip of the host.
 * Fixes bug 918451
 * Renames vncserver_host to vncserver_listen for slightly better usage clarity
 * Updates docs

Change-Id: I85c9850c57ffac3dfecaec4510eb808a6a2af79c
2012-01-18 16:04:15 -08:00
Anthony Young 8d010cacb5 Implements blueprint vnc-console-cleanup
* Creates a unified way to access vnc consoles for xenserver and libvirt
 * Now supports both java and websocket clients
 * Removes nova-vncproxy - a replacement version of this (nova-novncproxy) can be found as described in vncconsole.rst
 * Adds nova-xvpvncproxy, which supports a java vnc client
 * Adds api extension to access java and novnc access_urls
 * Fixes proxy server to close/shutdown sockets more cleanly
 * Address style feedback
 * Use new-style extension format
 * Fix setup.py
 * utils.gen_uuid must be wrapped like str(utils.gen_uuid()) or it can't be serialized

Change-Id: I5e42e2f160e8e3476269bd64b0e8aa77e66c918c
2012-01-17 14:18:31 -08:00
Vishvananda Ishaya 20b4d89512 Remove a whole bunch of unused imports
Change-Id: I6759e5b6250c48cc0deb4b198b44c948c64c47d1
2012-01-13 13:55:38 -08:00
Ewan Mellor 43214c6e99 Bug #896997: nova-vncproxy's flash socket policy port is not configurable
Add flags called vncproxy_flash_socket_policy_port and
vncproxy_flash_socket_policy_host, to allow the admin to configure
the Flash socket policy listener.

Change-Id: If42839ccd86f1c8723221049d7c76b6f5ad0aa2d
2011-11-29 19:55:25 -08:00
Vishvananda Ishaya a870dfae7d Add nova-all to run all services
* Cleans up service for objectstore and vncproxy
 * Fixes virt.fake to be runnable via a flag

Change-Id: I18e05a4d727bbbd3481063623dc3b6ad52e233d4
2011-09-28 11:36:19 -07:00
Matthew Hooker f34a6fb9ef Remove instances of the "diaper pattern"
Anywhere "except:" occurs, I tried to replace it with an explicit except on
known error types. If none were known, Except was used.

In the process I've been able to unearth a few evasive bugs and clean up some
adjacent code.
2011-08-03 19:17:08 -04:00
Masanori Itoh d44299be90 Add vnc_keymap flag and enable setting keymap for vnc console. 2011-05-17 01:00:16 +09:00
Vishvananda Ishaya 7856df88b2 fix localization for multiple replacement strings 2011-03-29 22:41:15 -07:00
Anthony Young 3cdc2a90f0 add line 2011-03-29 14:58:10 -07:00
Anthony Young f5c072de1e incorporate feedback from termie 2011-03-29 14:53:38 -07:00
Anthony Young 8175722658 move functions around 2011-03-29 13:49:49 -07:00