This commit is contained in:
Sandy Walsh 2011-11-16 08:47:37 -08:00
parent 4f107d7463
commit 69c5327363
4 changed files with 8 additions and 7 deletions

View File

@ -186,8 +186,9 @@ class OpenStackComputeShell(object):
"via --url or via"
"env[NOVA_URL")
self.cs = self.get_api_class(options.version)(user, password, projectid,
url, insecure, region_name=region_name,
self.cs = self.get_api_class(options.version)(user, password,
projectid, url, insecure,
region_name=region_name,
endpoint_name=endpoint_name)
try:

View File

@ -113,8 +113,7 @@ class BootingManagerWithFind(base.ManagerWithFind):
# The mapping is in the format:
# <id>:[<type>]:[<size(GB)>]:[<delete_on_terminate>]
#
bdm_dict = {
'device_name': device_name }
bdm_dict = {'device_name': device_name}
mapping_parts = mapping.split(':')
id = mapping_parts[0]

View File

@ -355,8 +355,8 @@ class ServerManager(local_base.BootingManagerWithFind):
:param key_name: (optional extension) name of previously created
keypair to inject into the instance.
:param availability_zone: The :class:`Zone`.
:param block_device_mapping: (optional extension) A dict of block device
mappings for this server.
:param block_device_mapping: (optional extension) A dict of block
device mappings for this server.
:param nics: (optional extension) an ordered list of nics to be
added to this server, with information about
connected networks, fixed ips, etc.

View File

@ -115,7 +115,7 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
for nic_str in args.nics:
nic_info = {"net-id": "", "v4-fixed-ip": ""}
for kv_str in nic_str.split(","):
k,v = kv_str.split("=")
k, v = kv_str.split("=")
nic_info[k] = v
nics.append(nic_info)
@ -905,6 +905,7 @@ def do_volume_detach(cs, args):
cs.volumes.delete_server_volume(_find_server(cs, args.server).id,
args.attachment_id)
def do_volume_snapshot_list(cs, args):
"""List all the snapshots."""
snapshots = cs.volume_snapshots.list()