summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSandy Walsh <sandy.walsh@rackspace.com>2011-09-06 07:37:03 -0700
committerSandy Walsh <sandy.walsh@rackspace.com>2011-09-06 07:37:03 -0700
commit2a8b4b9912feb848f047273cb66721997856f59d (patch)
treee65d8f0db5ec7f172440f392e9c0c24d6b688093 /bin
parent9bfdf239df25496e5ff13fbe3cf086f4cd1d4df2 (diff)
parent78a63bcad5f29c8927151556229271668b0f9e2b (diff)
downloadnova-2a8b4b9912feb848f047273cb66721997856f59d.tar.gz
nova-2a8b4b9912feb848f047273cb66721997856f59d.tar.xz
nova-2a8b4b9912feb848f047273cb66721997856f59d.zip
trunk merge
Diffstat (limited to 'bin')
-rwxr-xr-xbin/instance-usage-audit5
-rwxr-xr-xbin/nova-ajax-console-proxy12
-rwxr-xr-xbin/nova-manage6
3 files changed, 11 insertions, 12 deletions
diff --git a/bin/instance-usage-audit b/bin/instance-usage-audit
index a06c6b1b3..7ce5732e7 100755
--- a/bin/instance-usage-audit
+++ b/bin/instance-usage-audit
@@ -102,9 +102,8 @@ if __name__ == '__main__':
logging.setup()
begin, end = time_period(FLAGS.instance_usage_audit_period)
print "Creating usages for %s until %s" % (str(begin), str(end))
- instances = db.instance_get_active_by_window(context.get_admin_context(),
- begin,
- end)
+ ctxt = context.get_admin_context()
+ instances = db.instance_get_active_by_window_joined(ctxt, begin, end)
print "%s instances" % len(instances)
for instance_ref in instances:
usage_info = utils.usage_from_instance(instance_ref,
diff --git a/bin/nova-ajax-console-proxy b/bin/nova-ajax-console-proxy
index 0a789b4b9..23fb42fb5 100755
--- a/bin/nova-ajax-console-proxy
+++ b/bin/nova-ajax-console-proxy
@@ -113,11 +113,10 @@ class AjaxConsoleProxy(object):
AjaxConsoleProxy.tokens[kwargs['token']] = \
{'args': kwargs, 'last_activity': time.time()}
- conn = rpc.create_connection(new=True)
- consumer = rpc.create_consumer(
- conn,
- FLAGS.ajax_console_proxy_topic,
- TopicProxy)
+ self.conn = rpc.create_connection(new=True)
+ self.conn.create_consumer(
+ FLAGS.ajax_console_proxy_topic,
+ TopicProxy)
def delete_expired_tokens():
now = time.time()
@@ -129,7 +128,7 @@ class AjaxConsoleProxy(object):
for k in to_delete:
del AjaxConsoleProxy.tokens[k]
- utils.LoopingCall(consumer.fetch, enable_callbacks=True).start(0.1)
+ self.conn.consume_in_thread()
utils.LoopingCall(delete_expired_tokens).start(1)
if __name__ == '__main__':
@@ -142,3 +141,4 @@ if __name__ == '__main__':
server = wsgi.Server("AJAX Console Proxy", acp, port=acp_port)
service.serve(server)
service.wait()
+ self.conn.close()
diff --git a/bin/nova-manage b/bin/nova-manage
index c9cf4266d..c3b2c71ce 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -166,7 +166,7 @@ class VpnCommands(object):
print address,
print vpn['host'],
print ec2utils.id_to_ec2_id(vpn['id']),
- print vpn['state_description'],
+ print vpn['vm_state'],
print state
else:
print None
@@ -869,7 +869,7 @@ class VmCommands(object):
instance['hostname'],
instance['host'],
instance['instance_type'].name,
- instance['state_description'],
+ instance['vm_state'],
instance['launched_at'],
instance['image_ref'],
instance['kernel_id'],
@@ -1223,7 +1223,7 @@ class VsaCommands(object):
type=vc['instance_type']['name'],
fl_ip=floating_addr,
fx_ip=fixed_addr,
- stat=vc['state_description'],
+ stat=vc['vm_state'],
host=vc['host'],
time=str(vc['created_at']))