summaryrefslogtreecommitdiff
path: root/nova/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'nova/cmd')
-rw-r--r--nova/cmd/__init__.py1
-rw-r--r--nova/cmd/baremetal_deploy_helper.py9
-rw-r--r--nova/cmd/conductor.py3
-rw-r--r--nova/cmd/consoleauth.py2
-rw-r--r--nova/cmd/manage.py10
-rw-r--r--nova/cmd/novncproxy.py31
-rw-r--r--nova/cmd/spicehtml5proxy.py29
7 files changed, 45 insertions, 40 deletions
diff --git a/nova/cmd/__init__.py b/nova/cmd/__init__.py
index 39f834aeff..cbe5ae351e 100644
--- a/nova/cmd/__init__.py
+++ b/nova/cmd/__init__.py
@@ -30,6 +30,7 @@ if ('eventlet' in sys.modules and
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
import eventlet
+
from nova import debugger
if debugger.enabled():
diff --git a/nova/cmd/baremetal_deploy_helper.py b/nova/cmd/baremetal_deploy_helper.py
index 08f665f7d2..fd997ce8e1 100644
--- a/nova/cmd/baremetal_deploy_helper.py
+++ b/nova/cmd/baremetal_deploy_helper.py
@@ -16,16 +16,15 @@
"""Starter script for Bare-Metal Deployment Service."""
-import os
-import sys
-import threading
-import time
-
import cgi
+import os
import Queue
import re
import socket
import stat
+import sys
+import threading
+import time
from wsgiref import simple_server
from nova import config
diff --git a/nova/cmd/conductor.py b/nova/cmd/conductor.py
index 7a6ffe51a4..776e368917 100644
--- a/nova/cmd/conductor.py
+++ b/nova/cmd/conductor.py
@@ -21,6 +21,7 @@ from oslo.config import cfg
from nova import config
from nova import objects
from nova.openstack.common import log as logging
+from nova.openstack.common import processutils
from nova.openstack.common.report import guru_meditation_report as gmr
from nova import service
from nova import utils
@@ -41,6 +42,6 @@ def main():
server = service.Service.create(binary='nova-conductor',
topic=CONF.conductor.topic,
manager=CONF.conductor.manager)
- workers = CONF.conductor.workers or utils.cpu_count()
+ workers = CONF.conductor.workers or processutils.get_worker_count()
service.serve(server, workers=workers)
service.wait()
diff --git a/nova/cmd/consoleauth.py b/nova/cmd/consoleauth.py
index 7cc491b7a1..238007ffc9 100644
--- a/nova/cmd/consoleauth.py
+++ b/nova/cmd/consoleauth.py
@@ -20,6 +20,7 @@ import sys
from oslo.config import cfg
from nova import config
+from nova import objects
from nova.openstack.common import log as logging
from nova.openstack.common.report import guru_meditation_report as gmr
from nova import service
@@ -31,6 +32,7 @@ CONF = cfg.CONF
def main():
config.parse_args(sys.argv)
logging.setup("nova")
+ objects.register_all()
gmr.TextGuruMeditation.setup_autorun(version)
diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py
index b41684541a..5f75cb0223 100644
--- a/nova/cmd/manage.py
+++ b/nova/cmd/manage.py
@@ -55,10 +55,10 @@
from __future__ import print_function
import argparse
-import decorator
import os
import sys
+import decorator
import netaddr
from oslo.config import cfg
from oslo import messaging
@@ -508,7 +508,9 @@ class NetworkCommands(object):
help='Number of networks to create')
@args('--network_size', metavar='<number>',
help='Number of IPs per network')
- @args('--vlan', dest='vlan_start', metavar='<vlan id>', help='vlan id')
+ @args('--vlan', metavar='<vlan id>', help='vlan id')
+ @args('--vlan_start', dest='vlan_start', metavar='<vlan start id>',
+ help='vlan start id')
@args('--vpn', dest='vpn_start', help='vpn start')
@args('--fixed_range_v6', dest='cidr_v6',
help='IPv6 subnet (ex: fe80::/64')
@@ -529,8 +531,8 @@ class NetworkCommands(object):
help='Project id')
@args('--priority', metavar="<number>", help='Network interface priority')
def create(self, label=None, cidr=None, num_networks=None,
- network_size=None, multi_host=None, vlan_start=None,
- vpn_start=None, cidr_v6=None, gateway=None,
+ network_size=None, multi_host=None, vlan=None,
+ vlan_start=None, vpn_start=None, cidr_v6=None, gateway=None,
gateway_v6=None, bridge=None, bridge_interface=None,
dns1=None, dns2=None, project_id=None, priority=None,
uuid=None, fixed_cidr=None):
diff --git a/nova/cmd/novncproxy.py b/nova/cmd/novncproxy.py
index e1faa66457..fe5ae84208 100644
--- a/nova/cmd/novncproxy.py
+++ b/nova/cmd/novncproxy.py
@@ -67,24 +67,23 @@ def main():
print("Can not find novnc html/js/css files at %s." % CONF.web)
return(-1)
+ logging.setup("nova")
+
gmr.TextGuruMeditation.setup_autorun(version)
# Create and start the NovaWebSockets proxy
server = websocketproxy.NovaWebSocketProxy(
- listen_host=CONF.novncproxy_host,
- listen_port=CONF.novncproxy_port,
- source_is_ipv6=CONF.source_is_ipv6,
- verbose=CONF.verbose,
- cert=CONF.cert,
- key=CONF.key,
- ssl_only=CONF.ssl_only,
- daemon=CONF.daemon,
- record=CONF.record,
- web=CONF.web,
- file_only=True,
- no_parent=True,
- target_host='ignore',
- target_port='ignore',
- wrap_mode='exit',
- wrap_cmd=None)
+ listen_host=CONF.novncproxy_host,
+ listen_port=CONF.novncproxy_port,
+ source_is_ipv6=CONF.source_is_ipv6,
+ verbose=CONF.verbose,
+ cert=CONF.cert,
+ key=CONF.key,
+ ssl_only=CONF.ssl_only,
+ daemon=CONF.daemon,
+ record=CONF.record,
+ traffic=CONF.verbose and not CONF.daemon,
+ web=CONF.web,
+ file_only=True,
+ RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
server.start_server()
diff --git a/nova/cmd/spicehtml5proxy.py b/nova/cmd/spicehtml5proxy.py
index 38bd6b7a9b..eb25cf36e5 100644
--- a/nova/cmd/spicehtml5proxy.py
+++ b/nova/cmd/spicehtml5proxy.py
@@ -27,6 +27,7 @@ from oslo.config import cfg
from nova import config
from nova.console import websocketproxy
+from nova.openstack.common import log as logging
from nova.openstack.common.report import guru_meditation_report as gmr
from nova import version
@@ -67,22 +68,22 @@ def main():
print("Can not find spice html/js/css files at %s." % CONF.web)
return(-1)
+ logging.setup("nova")
+
gmr.TextGuruMeditation.setup_autorun(version)
# Create and start the NovaWebSockets proxy
server = websocketproxy.NovaWebSocketProxy(
- listen_host=CONF.spice.html5proxy_host,
- listen_port=CONF.spice.html5proxy_port,
- source_is_ipv6=CONF.source_is_ipv6,
- verbose=CONF.verbose,
- cert=CONF.cert,
- key=CONF.key,
- ssl_only=CONF.ssl_only,
- daemon=CONF.daemon,
- record=CONF.record,
- web=CONF.web,
- target_host='ignore',
- target_port='ignore',
- wrap_mode='exit',
- wrap_cmd=None)
+ listen_host=CONF.spice.html5proxy_host,
+ listen_port=CONF.spice.html5proxy_port,
+ source_is_ipv6=CONF.source_is_ipv6,
+ verbose=CONF.verbose,
+ cert=CONF.cert,
+ key=CONF.key,
+ ssl_only=CONF.ssl_only,
+ daemon=CONF.daemon,
+ record=CONF.record,
+ traffic=CONF.verbose and not CONF.daemon,
+ web=CONF.web,
+ RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
server.start_server()