updates per review
This commit is contained in:
@@ -36,6 +36,7 @@ from nova import flags
|
|||||||
from nova import utils
|
from nova import utils
|
||||||
from nova import wsgi
|
from nova import wsgi
|
||||||
|
|
||||||
|
|
||||||
FLAGS = flags.FLAGS
|
FLAGS = flags.FLAGS
|
||||||
flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port')
|
flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port')
|
||||||
flags.DEFINE_string('osapi_host', '0.0.0.0', 'OpenStack API host')
|
flags.DEFINE_string('osapi_host', '0.0.0.0', 'OpenStack API host')
|
||||||
@@ -43,14 +44,10 @@ flags.DEFINE_integer('ec2api_port', 8773, 'EC2 API port')
|
|||||||
flags.DEFINE_string('ec2api_host', '0.0.0.0', 'EC2 API host')
|
flags.DEFINE_string('ec2api_host', '0.0.0.0', 'EC2 API host')
|
||||||
|
|
||||||
|
|
||||||
def main():
|
if __name__ == '__main__':
|
||||||
|
utils.default_flagfile()
|
||||||
FLAGS(sys.argv)
|
FLAGS(sys.argv)
|
||||||
server = wsgi.Server()
|
server = wsgi.Server()
|
||||||
server.start(api.API('os'), FLAGS.osapi_port, host=FLAGS.osapi_host)
|
server.start(api.API('os'), FLAGS.osapi_port, host=FLAGS.osapi_host)
|
||||||
server.start(api.API('ec2'), FLAGS.ec2api_port, host=FLAGS.ec2api_host)
|
server.start(api.API('ec2'), FLAGS.ec2api_port, host=FLAGS.ec2api_host)
|
||||||
server.wait()
|
server.wait()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
utils.default_flagfile()
|
|
||||||
main()
|
|
||||||
|
@@ -40,9 +40,6 @@ from nova import utils
|
|||||||
from nova import wsgi
|
from nova import wsgi
|
||||||
|
|
||||||
|
|
||||||
FLAGS = flags.FLAGS
|
|
||||||
flags.DEFINE_integer('api_port', 8773, 'API port')
|
|
||||||
|
|
||||||
FLAGS = flags.FLAGS
|
FLAGS = flags.FLAGS
|
||||||
flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port')
|
flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port')
|
||||||
flags.DEFINE_string('osapi_host', '0.0.0.0', 'OpenStack API host')
|
flags.DEFINE_string('osapi_host', '0.0.0.0', 'OpenStack API host')
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
""" Starter script for Nova Scheduler."""
|
"""Starter script for Nova Scheduler."""
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
eventlet.monkey_patch()
|
eventlet.monkey_patch()
|
||||||
|
@@ -188,7 +188,6 @@ class AdapterConsumer(TopicConsumer):
|
|||||||
node_func = getattr(self.proxy, str(method))
|
node_func = getattr(self.proxy, str(method))
|
||||||
node_args = dict((str(k), v) for k, v in args.iteritems())
|
node_args = dict((str(k), v) for k, v in args.iteritems())
|
||||||
# NOTE(vish): magic is fun!
|
# NOTE(vish): magic is fun!
|
||||||
# pylint: disable-msg=W0142
|
|
||||||
try:
|
try:
|
||||||
rval = node_func(context=ctxt, **node_args)
|
rval = node_func(context=ctxt, **node_args)
|
||||||
if msg_id:
|
if msg_id:
|
||||||
|
@@ -91,8 +91,6 @@ class ServiceTestCase(test.TestCase):
|
|||||||
self.mox.StubOutWithMock(rpc,
|
self.mox.StubOutWithMock(rpc,
|
||||||
'AdapterConsumer',
|
'AdapterConsumer',
|
||||||
use_mock_anything=True)
|
use_mock_anything=True)
|
||||||
#self.mox.StubOutWithMock(
|
|
||||||
# service.task, 'LoopingCall', use_mock_anything=True)
|
|
||||||
rpc.AdapterConsumer(connection=mox.IgnoreArg(),
|
rpc.AdapterConsumer(connection=mox.IgnoreArg(),
|
||||||
topic=topic,
|
topic=topic,
|
||||||
proxy=mox.IsA(service.Service)).AndReturn(
|
proxy=mox.IsA(service.Service)).AndReturn(
|
||||||
@@ -106,17 +104,6 @@ class ServiceTestCase(test.TestCase):
|
|||||||
rpc.AdapterConsumer.attach_to_eventlet()
|
rpc.AdapterConsumer.attach_to_eventlet()
|
||||||
rpc.AdapterConsumer.attach_to_eventlet()
|
rpc.AdapterConsumer.attach_to_eventlet()
|
||||||
|
|
||||||
# Stub out looping call a bit needlessly since we don't have an easy
|
|
||||||
# way to cancel it (yet) when the tests finishes
|
|
||||||
#service.task.LoopingCall(mox.IgnoreArg()).AndReturn(
|
|
||||||
# service.task.LoopingCall)
|
|
||||||
#service.task.LoopingCall.start(interval=mox.IgnoreArg(),
|
|
||||||
# now=mox.IgnoreArg())
|
|
||||||
#service.task.LoopingCall(mox.IgnoreArg()).AndReturn(
|
|
||||||
# service.task.LoopingCall)
|
|
||||||
#service.task.LoopingCall.start(interval=mox.IgnoreArg(),
|
|
||||||
# now=mox.IgnoreArg())
|
|
||||||
|
|
||||||
service_create = {'host': host,
|
service_create = {'host': host,
|
||||||
'binary': binary,
|
'binary': binary,
|
||||||
'topic': topic,
|
'topic': topic,
|
||||||
|
@@ -46,7 +46,6 @@ import __main__
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
from twisted.scripts import trial as trial_script
|
from twisted.scripts import trial as trial_script
|
||||||
|
|
||||||
from nova import flags
|
from nova import flags
|
||||||
@@ -66,8 +65,6 @@ from nova.tests.rpc_unittest import *
|
|||||||
from nova.tests.scheduler_unittest import *
|
from nova.tests.scheduler_unittest import *
|
||||||
from nova.tests.service_unittest import *
|
from nova.tests.service_unittest import *
|
||||||
from nova.tests.twistd_unittest import *
|
from nova.tests.twistd_unittest import *
|
||||||
from nova.tests.validator_unittest import *
|
|
||||||
from nova.tests.virt_unittest import *
|
|
||||||
from nova.tests.virt_unittest import *
|
from nova.tests.virt_unittest import *
|
||||||
from nova.tests.volume_unittest import *
|
from nova.tests.volume_unittest import *
|
||||||
|
|
||||||
@@ -85,8 +82,6 @@ if __name__ == '__main__':
|
|||||||
config = OptionsClass()
|
config = OptionsClass()
|
||||||
argv = config.parseOptions()
|
argv = config.parseOptions()
|
||||||
|
|
||||||
argv = FLAGS(sys.argv)
|
|
||||||
|
|
||||||
FLAGS.verbose = True
|
FLAGS.verbose = True
|
||||||
|
|
||||||
# TODO(termie): these should make a call instead of doing work on import
|
# TODO(termie): these should make a call instead of doing work on import
|
||||||
|
Reference in New Issue
Block a user