Merge pull request #31 from SandyWalsh/master
2.5.8 and all public/private ips shown
This commit is contained in:
commit
25596fef72
@ -58,6 +58,7 @@ You'll find complete documentation on the shell by running
|
||||
|
||||
Positional arguments:
|
||||
<subcommand>
|
||||
add-fixed-ip Add a new fixed IP address to a servers network.
|
||||
backup-schedule Show or edit the backup schedule for a server.
|
||||
backup-schedule-delete
|
||||
Delete the backup schedule for a server.
|
||||
@ -82,6 +83,7 @@ You'll find complete documentation on the shell by running
|
||||
migrate Migrate a server to a new host in the same zone.
|
||||
reboot Reboot a server.
|
||||
rebuild Shutdown, re-image, and re-boot a server.
|
||||
remove-fixed-ip Remove an IP address from a server.
|
||||
rename Rename a server.
|
||||
rescue Rescue a server.
|
||||
resize Resize a server.
|
||||
|
@ -47,7 +47,7 @@ copyright = u'Rackspace, based on work by Jacob Kaplan-Moss'
|
||||
# The short X.Y version.
|
||||
version = '2.5'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.5.7'
|
||||
release = '2.5.8'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -2,6 +2,13 @@
|
||||
Release notes
|
||||
=============
|
||||
|
||||
2.5.8 (July 11, 2011)
|
||||
=====================
|
||||
* returns all public/private ips, not just first one
|
||||
* better 'nova list' search options
|
||||
|
||||
2.5.7 - 2.5.6 = minor tweaks
|
||||
|
||||
2.5.5 (June 21, 2011)
|
||||
=====================
|
||||
* zone-boot min/max instance count added thanks to comstud
|
||||
|
@ -18,7 +18,7 @@
|
||||
novaclient module.
|
||||
"""
|
||||
|
||||
__version__ = '2.4'
|
||||
__version__ = '2.5'
|
||||
|
||||
from novaclient.accounts import Account, AccountManager
|
||||
from novaclient.backup_schedules import (
|
||||
|
@ -34,6 +34,7 @@ class OpenStackClient(httplib2.Http):
|
||||
self.apikey = apikey
|
||||
self.projectid = projectid
|
||||
self.auth_url = auth_url
|
||||
self.version = 'v1.0'
|
||||
|
||||
self.management_url = None
|
||||
self.auth_token = None
|
||||
@ -120,12 +121,21 @@ class OpenStackClient(httplib2.Http):
|
||||
return self._cs_request(url, 'DELETE', **kwargs)
|
||||
|
||||
def authenticate(self):
|
||||
scheme, netloc, path, query, frag = urlparse.urlsplit(
|
||||
self.auth_url)
|
||||
path_parts = path.split('/')
|
||||
for part in path_parts:
|
||||
if len(part) > 0 and part[0] == 'v':
|
||||
self.version = part
|
||||
break
|
||||
|
||||
headers = {'X-Auth-User': self.user,
|
||||
'X-Auth-Key': self.apikey}
|
||||
if self.projectid:
|
||||
headers['X-Auth-Project-Id'] = self.projectid
|
||||
resp, body = self.request(self.auth_url, 'GET', headers=headers)
|
||||
self.management_url = resp['x-server-management-url']
|
||||
|
||||
self.auth_token = resp['x-auth-token']
|
||||
|
||||
def _munge_get_url(self, url):
|
||||
|
@ -186,7 +186,7 @@ class Server(base.Resource):
|
||||
"""
|
||||
if len(self.addresses['public']) == 0:
|
||||
return ""
|
||||
return self.addresses['public'][0]
|
||||
return self.addresses['public']
|
||||
|
||||
@property
|
||||
def private_ip(self):
|
||||
@ -195,7 +195,7 @@ class Server(base.Resource):
|
||||
"""
|
||||
if len(self.addresses['private']) == 0:
|
||||
return ""
|
||||
return self.addresses['private'][0]
|
||||
return self.addresses['private']
|
||||
|
||||
|
||||
class ServerManager(base.BootingManagerWithFind):
|
||||
|
@ -884,7 +884,9 @@ def print_list(objs, fields, formatters={}):
|
||||
if field in formatters:
|
||||
row.append(formatters[field](o))
|
||||
else:
|
||||
row.append(getattr(o, field.lower().replace(' ', '_'), ''))
|
||||
field_name = field.lower().replace(' ', '_')
|
||||
data = getattr(o, field_name, '')
|
||||
row.append(data)
|
||||
pt.add_row(row)
|
||||
|
||||
pt.printt(sortby=fields[0])
|
||||
|
Loading…
x
Reference in New Issue
Block a user