From d2974163b721159ad0f283ff3e3e167366be339c Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 24 Jun 2010 21:17:23 -0700 Subject: add more info to vpn list --- bin/nova-manage | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin') diff --git a/bin/nova-manage b/bin/nova-manage index f418e162b..ffb626b24 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -62,6 +62,8 @@ class VpnCommands(object): net = 'up' else: net = 'down' + print vpn['private_dns_name'], + print vpn['node_name'], print vpn['instance_id'], print vpn['state_description'], print net -- cgit From 5a1f5839b8850e32dbdd2a74f6176f37a3e36254 Mon Sep 17 00:00:00 2001 From: Devin Carlen Date: Tue, 29 Jun 2010 21:25:39 -0500 Subject: Updated licenses --- bin/nova-api | 29 +++++++++++++++++------------ bin/nova-compute | 23 ++++++++++++++--------- bin/nova-instancemonitor | 29 +++++++++++++++++------------ bin/nova-manage | 23 ++++++++++++++--------- bin/nova-objectstore | 29 +++++++++++++++++------------ bin/nova-volume | 33 +++++++++++++++++++-------------- 6 files changed, 98 insertions(+), 68 deletions(-) (limited to 'bin') diff --git a/bin/nova-api b/bin/nova-api index 8fea1da4d..5ea49692c 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -1,19 +1,24 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright [2010] [Anso Labs, LLC] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +# Copyright 2010 Anso Labs, LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + """ Tornado daemon for the main API endpoint. """ diff --git a/bin/nova-compute b/bin/nova-compute index f89bc86b1..b1a6354b8 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -1,19 +1,24 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright [2010] [Anso Labs, LLC] +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright 2010 Anso Labs, LLC # -# http://www.apache.org/licenses/LICENSE-2.0 +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + """ Twistd daemon for the nova compute nodes. Receives messages via AMQP, manages pool of worker threads diff --git a/bin/nova-instancemonitor b/bin/nova-instancemonitor index 2cfd5fc35..d21732a15 100755 --- a/bin/nova-instancemonitor +++ b/bin/nova-instancemonitor @@ -1,19 +1,24 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright [2010] [Anso Labs, LLC] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +# Copyright 2010 Anso Labs, LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + """ Daemon for Nova RRD based instance resource monitoring. """ diff --git a/bin/nova-manage b/bin/nova-manage index d25de6cda..c9f36ad32 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -1,19 +1,24 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright [2010] [Anso Labs, LLC] +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright 2010 Anso Labs, LLC # -# http://www.apache.org/licenses/LICENSE-2.0 +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + """ CLI interface for nova management. Connects to the running ADMIN api in the api daemon. diff --git a/bin/nova-objectstore b/bin/nova-objectstore index 38a23f1ff..26dcd2676 100755 --- a/bin/nova-objectstore +++ b/bin/nova-objectstore @@ -1,19 +1,24 @@ #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright [2010] [Anso Labs, LLC] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +# Copyright 2010 Anso Labs, LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + """ Tornado daemon for nova objectstore. Supports S3 API. """ diff --git a/bin/nova-volume b/bin/nova-volume index e36954cd3..f3f8cb9a4 100755 --- a/bin/nova-volume +++ b/bin/nova-volume @@ -1,19 +1,24 @@ #!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop - -# Copyright [2010] [Anso Labs, LLC] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +# Copyright 2010 Anso Labs, LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + """ Tornado Storage daemon manages AoE volumes via AMQP messaging. """ -- cgit From 10b8e5bdaa8ca601b1e0b0268a6acfec6f5712ad Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Tue, 29 Jun 2010 21:25:59 -0500 Subject: Removed trailing whitespace from header --- bin/nova-api | 2 +- bin/nova-compute | 2 +- bin/nova-instancemonitor | 2 +- bin/nova-manage | 2 +- bin/nova-objectstore | 2 +- bin/nova-volume | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/nova-api b/bin/nova-api index 5ea49692c..e9772ec81 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -2,7 +2,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 Anso Labs, LLC diff --git a/bin/nova-compute b/bin/nova-compute index b1a6354b8..cc738e87f 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -2,7 +2,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 Anso Labs, LLC diff --git a/bin/nova-instancemonitor b/bin/nova-instancemonitor index d21732a15..1f22b424e 100755 --- a/bin/nova-instancemonitor +++ b/bin/nova-instancemonitor @@ -2,7 +2,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 Anso Labs, LLC diff --git a/bin/nova-manage b/bin/nova-manage index c9f36ad32..f418e162b 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -2,7 +2,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 Anso Labs, LLC diff --git a/bin/nova-objectstore b/bin/nova-objectstore index 26dcd2676..f6d7b1270 100755 --- a/bin/nova-objectstore +++ b/bin/nova-objectstore @@ -2,7 +2,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 Anso Labs, LLC diff --git a/bin/nova-volume b/bin/nova-volume index f3f8cb9a4..2720e12cd 100755 --- a/bin/nova-volume +++ b/bin/nova-volume @@ -2,7 +2,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. +# Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 Anso Labs, LLC -- cgit From ccd01c6975070ad67e895e805c1a2048440b5f70 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 6 Jul 2010 17:34:43 +0200 Subject: Add a default flag file for nova-manage to help it find the CA. --- bin/nova-manage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/nova-manage b/bin/nova-manage index f418e162b..cb987f330 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -218,7 +218,7 @@ def methods_of(obj): if __name__ == '__main__': - utils.default_flagfile() + utils.default_flagfile('/etc/nova-manage.conf') argv = FLAGS(sys.argv) script_name = argv.pop(0) if len(argv) < 1: -- cgit From b7ea2f70581f6acd927ea7b65adaffeeb4b8d2ba Mon Sep 17 00:00:00 2001 From: Joshua McKenty Date: Wed, 7 Jul 2010 12:06:34 -0700 Subject: Capture signals from dnsmasq and use them to update network state. --- bin/dhcpleasor.py | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 bin/dhcpleasor.py (limited to 'bin') diff --git a/bin/dhcpleasor.py b/bin/dhcpleasor.py new file mode 100755 index 000000000..07e63884f --- /dev/null +++ b/bin/dhcpleasor.py @@ -0,0 +1,68 @@ +#!/opt/local/bin/python + +# Copyright [2010] [Anso Labs, LLC] +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +dhcpleasor.py + +Handle lease database updates from DHCP servers. +""" + +import sys +import os +import logging +sys.path.append(os.path.abspath(os.path.join(__file__, "../../"))) + +logging.debug(sys.path) +import getopt +from os import environ +from nova.compute import network +from nova import flags +FLAGS = flags.FLAGS + + +def add_lease(mac, ip, hostname, interface): + pass + +def old_lease(mac, ip, hostname, interface): + pass + +def del_lease(mac, ip, hostname, interface): + # TODO - get net from interface instead + net = network.get_network_by_address(ip) + net.release_ip(ip) + +def init_leases(interface): + return "" + + +def main(argv=None): + if argv is None: + argv = sys.argv + interface = environ.get('DNSMASQ_INTERFACE', 'br0') + old_redis_db = FLAGS.redis_db + FLAGS.redis_db = int(environ.get('REDIS_DB', '0')) + action = argv[1] + if action in ['add','del','old']: + mac = argv[2] + ip = argv[3] + hostname = argv[4] + logging.debug("Called %s for mac %s with ip %s and hostname %s on interface %s" % (action, mac, ip, hostname, interface)) + globals()[action+'_lease'](mac, ip, hostname, interface) + else: + print init_leases(interface) + FLAGS.redis_db = old_redis_db + +if __name__ == "__main__": + sys.exit(main()) -- cgit From dbe324f7254dd3e01de44bb908150fb8397fe118 Mon Sep 17 00:00:00 2001 From: Joshua McKenty Date: Wed, 7 Jul 2010 12:15:11 -0700 Subject: Got dhcpleasor working, with test ENV for testing, and rpc.cast for real world. --- bin/dhcpleasor.py | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/dhcpleasor.py b/bin/dhcpleasor.py index 07e63884f..63ed52420 100755 --- a/bin/dhcpleasor.py +++ b/bin/dhcpleasor.py @@ -27,32 +27,50 @@ sys.path.append(os.path.abspath(os.path.join(__file__, "../../"))) logging.debug(sys.path) import getopt from os import environ +from nova.compute import linux_net from nova.compute import network +from nova import rpc + from nova import flags FLAGS = flags.FLAGS def add_lease(mac, ip, hostname, interface): - pass + if FLAGS.fake_rabbit: + network.lease_ip(ip) + else: + rpc.cast(FLAGS.cloud_topic, {"method": "lease_ip", + "args" : {"address": ip}}) def old_lease(mac, ip, hostname, interface): - pass + logging.debug("Adopted old lease or got a change of mac/hostname") def del_lease(mac, ip, hostname, interface): - # TODO - get net from interface instead - net = network.get_network_by_address(ip) - net.release_ip(ip) + if FLAGS.fake_rabbit: + network.release_ip(ip) + else: + rpc.cast(FLAGS.cloud_topic, {"method": "release_ip", + "args" : {"address": ip}}) def init_leases(interface): - return "" + net = network.get_network_by_interface(interface) + res = "" + for host_name in net.hosts: + res += "%s\n" % linux_net.hostDHCP(net, host_name, net.hosts[host_name]) + return res def main(argv=None): if argv is None: argv = sys.argv interface = environ.get('DNSMASQ_INTERFACE', 'br0') - old_redis_db = FLAGS.redis_db - FLAGS.redis_db = int(environ.get('REDIS_DB', '0')) + if int(environ.get('TESTING', '0')): + FLAGS.fake_rabbit = True + FLAGS.redis_db = 8 + FLAGS.network_size = 32 + FLAGS.fake_libvirt=True + FLAGS.fake_network=True + FLAGS.fake_users = True action = argv[1] if action in ['add','del','old']: mac = argv[2] @@ -62,7 +80,7 @@ def main(argv=None): globals()[action+'_lease'](mac, ip, hostname, interface) else: print init_leases(interface) - FLAGS.redis_db = old_redis_db + exit(0) if __name__ == "__main__": sys.exit(main()) -- cgit From faada0612d8e8580a2a932626c8972b7c2a4ef59 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 7 Jul 2010 12:25:22 -0700 Subject: whitespace fixes and header changes --- bin/dhcpleasor.py | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'bin') diff --git a/bin/dhcpleasor.py b/bin/dhcpleasor.py index 63ed52420..30f8fbdc3 100755 --- a/bin/dhcpleasor.py +++ b/bin/dhcpleasor.py @@ -1,18 +1,24 @@ -#!/opt/local/bin/python +#!/usr/bin/env python +# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright [2010] [Anso Labs, LLC] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +# Copyright 2010 Anso Labs, LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + """ dhcpleasor.py @@ -37,21 +43,21 @@ FLAGS = flags.FLAGS def add_lease(mac, ip, hostname, interface): if FLAGS.fake_rabbit: - network.lease_ip(ip) + network.lease_ip(ip) else: rpc.cast(FLAGS.cloud_topic, {"method": "lease_ip", "args" : {"address": ip}}) def old_lease(mac, ip, hostname, interface): logging.debug("Adopted old lease or got a change of mac/hostname") - + def del_lease(mac, ip, hostname, interface): if FLAGS.fake_rabbit: - network.release_ip(ip) + network.release_ip(ip) else: rpc.cast(FLAGS.cloud_topic, {"method": "release_ip", - "args" : {"address": ip}}) - + "args" : {"address": ip}}) + def init_leases(interface): net = network.get_network_by_interface(interface) res = "" -- cgit From 730faa785921f43b342e27e9a40ebe88a68a35d8 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 12 Jul 2010 10:39:01 -0500 Subject: Move nova related configuration files into /etc/nova/. --- bin/nova-manage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/nova-manage b/bin/nova-manage index cb987f330..c79718673 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -218,7 +218,7 @@ def methods_of(obj): if __name__ == '__main__': - utils.default_flagfile('/etc/nova-manage.conf') + utils.default_flagfile('/etc/nova/nova-manage.conf') argv = FLAGS(sys.argv) script_name = argv.pop(0) if len(argv) < 1: -- cgit From 09f69254b5af4b9ee40f9848e47f1b2187599cb5 Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Wed, 14 Jul 2010 19:38:41 -0400 Subject: Whitespace fix. --- bin/nova-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/nova-api b/bin/nova-api index f0f79a236..893eb201d 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -20,7 +20,7 @@ # under the License. """ -Tornado daemon for the main API endpoint. +Tornado daemon for the main API endpoint. """ import logging -- cgit From ced951677c72307f173d37ef6d119d3202ace355 Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Wed, 14 Jul 2010 19:51:38 -0400 Subject: Finish singletonizing UserManager usage. --- bin/nova-api | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/nova-api b/bin/nova-api index 893eb201d..1bef778c5 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -43,13 +43,11 @@ FLAGS = flags.FLAGS def main(_argv): - user_manager = users.UserManager() - host_manager = model.Host controllers = { 'Cloud': cloud.CloudController(), - 'Admin': admin.AdminController(user_manager, host_manager) + 'Admin': admin.AdminController() } - _app = api.APIServerApplication(user_manager, controllers) + _app = api.APIServerApplication(controllers) conn = rpc.Connection.instance() consumer = rpc.AdapterConsumer(connection=conn, -- cgit From 1b2eaa8fd1dd8a68de956a1a15c67499f96da88d Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Wed, 14 Jul 2010 19:57:41 -0400 Subject: unhardcode the binary name --- bin/nova-compute | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/nova-compute b/bin/nova-compute index ed829ecc8..1b438f6a7 100755 --- a/bin/nova-compute +++ b/bin/nova-compute @@ -75,7 +75,8 @@ def main(): topic='%s.%s' % (FLAGS.compute_topic, FLAGS.node_name), proxy=n) - pulse = task.LoopingCall(n.report_state, FLAGS.node_name, 'nova-compute') + bin_name = os.path.basename(__file__) + pulse = task.LoopingCall(n.report_state, FLAGS.node_name, bin_name) pulse.start(interval=FLAGS.node_report_state_interval, now=False) injected = consumer_all.attach_to_twisted() @@ -83,7 +84,7 @@ def main(): # This is the parent service that twistd will be looking for when it # parses this file, return it so that we can get it into globals below - application = service.Application('nova-compute') + application = service.Application(bin_name) n.setServiceParent(application) return application -- cgit