diff options
| author | Mike Scherbakov <mihgen@gmail.com> | 2011-07-12 11:07:30 -0700 |
|---|---|---|
| committer | Mike Scherbakov <mihgen@gmail.com> | 2011-07-12 11:07:30 -0700 |
| commit | 915c7d52fa1b2afe6af9686210982d5bc043be97 (patch) | |
| tree | e686dc39ca415402c9c345a4cc9e183ae4942bd9 | |
| parent | 4227264153e06d576387f76b267f3d35ff17f391 (diff) | |
| download | nova-915c7d52fa1b2afe6af9686210982d5bc043be97.tar.gz nova-915c7d52fa1b2afe6af9686210982d5bc043be97.tar.xz nova-915c7d52fa1b2afe6af9686210982d5bc043be97.zip | |
Renamed 'nova-manage server list' -> 'nova-manage host list' to differentiate physical hosts from VMs
| -rwxr-xr-x | bin/nova-manage | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index 8ba78a56a..94ab22092 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -816,11 +816,11 @@ class ServiceCommands(object): {"method": "update_available_resource"}) -class ServerCommands(object): - """List servers""" +class HostCommands(object): + """List hosts""" def list(self, zone=None): - """Show a list of all servers. Filter by zone. + """Show a list of all physical hosts. Filter by zone. args: [zone]""" print "%-25s\t%-15s" % (_('host'), _('zone')) @@ -829,13 +829,13 @@ class ServerCommands(object): services = db.service_get_all(ctxt) if zone: services = [s for s in services if s['availability_zone'] == zone] - servers = [] + hosts = [] for srv in services: - if not [s for s in servers if s['host'] == srv['host']]: - servers.append(srv) + if not [h for h in hosts if h['host'] == srv['host']]: + hosts.append(srv) - for srv in servers: - print "%-25s\t%-15s" % (srv['host'], srv['availability_zone']) + for h in hosts: + print "%-25s\t%-15s" % (h['host'], h['availability_zone']) class DbCommands(object): @@ -1211,13 +1211,13 @@ CATEGORIES = [ ('fixed', FixedIpCommands), ('flavor', InstanceTypeCommands), ('floating', FloatingIpCommands), + ('host', HostCommands), ('instance_type', InstanceTypeCommands), ('image', ImageCommands), ('network', NetworkCommands), ('project', ProjectCommands), ('role', RoleCommands), ('service', ServiceCommands), - ('server', ServerCommands), ('shell', ShellCommands), ('user', UserCommands), ('version', VersionCommands), |
