diff options
| author | William Wolf <throughnothing@gmail.com> | 2011-05-02 18:07:30 -0400 |
|---|---|---|
| committer | William Wolf <throughnothing@gmail.com> | 2011-05-02 18:07:30 -0400 |
| commit | 64ebfab4cf8279a7ad8ffefebd6bc207aecb3122 (patch) | |
| tree | b49ecc53a5eee13c7458db393915eed3139711a8 /bin | |
| parent | f99c5f60d202e84f5defb63e771f60d20cf43df9 (diff) | |
| parent | c069337734e99d5833b5a1814e33ffb1fbb5fff6 (diff) | |
| download | nova-64ebfab4cf8279a7ad8ffefebd6bc207aecb3122.tar.gz nova-64ebfab4cf8279a7ad8ffefebd6bc207aecb3122.tar.xz nova-64ebfab4cf8279a7ad8ffefebd6bc207aecb3122.zip | |
merge updates from trunk
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-manage | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index c8230670a..3dff16f27 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -82,6 +82,7 @@ from nova import log as logging from nova import quota from nova import rpc from nova import utils +from nova import version from nova.api.ec2 import ec2utils from nova.auth import manager from nova.cloudpipe import pipelib @@ -385,10 +386,10 @@ class ProjectCommands(object): with open(filename, 'w') as f: f.write(rc) - def list(self): + def list(self, username=None): """Lists all projects - arguments: <none>""" - for project in self.manager.get_projects(): + arguments: [username]""" + for project in self.manager.get_projects(username): print project.name def quota(self, project_id, key=None, value=None): @@ -758,6 +759,17 @@ class DbCommands(object): print migration.db_version() +class VersionCommands(object): + """Class for exposing the codebase version.""" + + def __init__(self): + pass + + def list(self): + print _("%s (%s)") %\ + (version.version_string(), version.version_string_with_vcs()) + + class VolumeCommands(object): """Methods for dealing with a cloud in an odd state""" @@ -1049,7 +1061,8 @@ CATEGORIES = [ ('volume', VolumeCommands), ('instance_type', InstanceTypeCommands), ('image', ImageCommands), - ('flavor', InstanceTypeCommands)] + ('flavor', InstanceTypeCommands), + ('version', VersionCommands)] def lazy_match(name, key_value_tuples): @@ -1091,6 +1104,8 @@ def main(): script_name = argv.pop(0) if len(argv) < 1: + print _("\nOpenStack Nova version: %s (%s)\n") %\ + (version.version_string(), version.version_string_with_vcs()) print script_name + " category action [<args>]" print _("Available categories:") for k, _v in CATEGORIES: |
