pep8
This commit is contained in:
parent
4f107d7463
commit
69c5327363
novaclient
@ -186,8 +186,9 @@ class OpenStackComputeShell(object):
|
|||||||
"via --url or via"
|
"via --url or via"
|
||||||
"env[NOVA_URL")
|
"env[NOVA_URL")
|
||||||
|
|
||||||
self.cs = self.get_api_class(options.version)(user, password, projectid,
|
self.cs = self.get_api_class(options.version)(user, password,
|
||||||
url, insecure, region_name=region_name,
|
projectid, url, insecure,
|
||||||
|
region_name=region_name,
|
||||||
endpoint_name=endpoint_name)
|
endpoint_name=endpoint_name)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -113,8 +113,7 @@ class BootingManagerWithFind(base.ManagerWithFind):
|
|||||||
# The mapping is in the format:
|
# The mapping is in the format:
|
||||||
# <id>:[<type>]:[<size(GB)>]:[<delete_on_terminate>]
|
# <id>:[<type>]:[<size(GB)>]:[<delete_on_terminate>]
|
||||||
#
|
#
|
||||||
bdm_dict = {
|
bdm_dict = {'device_name': device_name}
|
||||||
'device_name': device_name }
|
|
||||||
|
|
||||||
mapping_parts = mapping.split(':')
|
mapping_parts = mapping.split(':')
|
||||||
id = mapping_parts[0]
|
id = mapping_parts[0]
|
||||||
|
@ -355,8 +355,8 @@ class ServerManager(local_base.BootingManagerWithFind):
|
|||||||
:param key_name: (optional extension) name of previously created
|
:param key_name: (optional extension) name of previously created
|
||||||
keypair to inject into the instance.
|
keypair to inject into the instance.
|
||||||
:param availability_zone: The :class:`Zone`.
|
:param availability_zone: The :class:`Zone`.
|
||||||
:param block_device_mapping: (optional extension) A dict of block device
|
:param block_device_mapping: (optional extension) A dict of block
|
||||||
mappings for this server.
|
device mappings for this server.
|
||||||
:param nics: (optional extension) an ordered list of nics to be
|
:param nics: (optional extension) an ordered list of nics to be
|
||||||
added to this server, with information about
|
added to this server, with information about
|
||||||
connected networks, fixed ips, etc.
|
connected networks, fixed ips, etc.
|
||||||
|
@ -115,7 +115,7 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
|
|||||||
for nic_str in args.nics:
|
for nic_str in args.nics:
|
||||||
nic_info = {"net-id": "", "v4-fixed-ip": ""}
|
nic_info = {"net-id": "", "v4-fixed-ip": ""}
|
||||||
for kv_str in nic_str.split(","):
|
for kv_str in nic_str.split(","):
|
||||||
k,v = kv_str.split("=")
|
k, v = kv_str.split("=")
|
||||||
nic_info[k] = v
|
nic_info[k] = v
|
||||||
nics.append(nic_info)
|
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,
|
cs.volumes.delete_server_volume(_find_server(cs, args.server).id,
|
||||||
args.attachment_id)
|
args.attachment_id)
|
||||||
|
|
||||||
|
|
||||||
def do_volume_snapshot_list(cs, args):
|
def do_volume_snapshot_list(cs, args):
|
||||||
"""List all the snapshots."""
|
"""List all the snapshots."""
|
||||||
snapshots = cs.volume_snapshots.list()
|
snapshots = cs.volume_snapshots.list()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user