You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by er...@apache.org on 2015/05/13 22:02:53 UTC
libcloud git commit: [google compute] fixes LIBCLOUD-697: allow
string for ex_boot_disk on create_node
Repository: libcloud
Updated Branches:
refs/heads/trunk 5c1a95bf1 -> 8664118c8
[google compute] fixes LIBCLOUD-697: allow string for ex_boot_disk on create_node
Closes #520
Signed-off-by: Eric Johnson <er...@google.com>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8664118c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8664118c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8664118c
Branch: refs/heads/trunk
Commit: 8664118c877a43f1434a576bd46223707589b078
Parents: 5c1a95b
Author: Eric Johnson <er...@google.com>
Authored: Wed May 13 19:53:32 2015 +0000
Committer: Eric Johnson <er...@google.com>
Committed: Wed May 13 20:01:46 2015 +0000
----------------------------------------------------------------------
libcloud/compute/drivers/gce.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8664118c/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 22f3f9a..4f15715 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -2253,7 +2253,7 @@ class GCENodeDriver(NodeDriver):
:type ex_metadata: ``dict`` or ``None``
:keyword ex_boot_disk: The boot disk to attach to the instance.
- :type ex_boot_disk: :class:`StorageVolume` or ``str``
+ :type ex_boot_disk: :class:`StorageVolume` or ``str`` or ``None``
:keyword use_existing_disk: If True and if an existing disk with the
same name/location is found, use that
@@ -2265,7 +2265,7 @@ class GCENodeDriver(NodeDriver):
used. If 'None', then no external address will
be used. To use an existing static IP address,
a GCEAddress object should be passed in.
- :type external_ip: :class:`GCEAddress` or ``str`` or None
+ :type external_ip: :class:`GCEAddress` or ``str`` or ``None``
:keyword ex_disk_type: Specify a pd-standard (default) disk or pd-ssd
for an SSD disk.
@@ -2356,6 +2356,8 @@ n
image = self.ex_get_image(image)
if not hasattr(ex_disk_type, 'name'):
ex_disk_type = self.ex_get_disktype(ex_disk_type, zone=location)
+ if ex_boot_disk and not hasattr(ex_boot_disk, 'name'):
+ ex_boot_disk = self.ex_get_disk(ex_boot_disk, zone=location)
# Use disks[].initializeParams to auto-create the boot disk
if not ex_disks_gce_struct and not ex_boot_disk:
@@ -4601,7 +4603,7 @@ n
is made to ensure proper formatting of
the disks[] structure. Using this
structure obviates the need of using
- other disk params like 'ex_boot_disk',
+ other disk params like 'boot_disk',
etc. See the GCE docs for specific
details.
:type ex_disks_gce_struct: ``list`` or ``None``
@@ -4840,7 +4842,7 @@ n
request, node_data = self._create_node_req(
status['name'], node_attrs['size'], node_attrs['image'],
node_attrs['location'], node_attrs['network'], node_attrs['tags'],
- node_attrs['metadata'], boot_disk=status['disk'],
+ node_attrs['metadata'],
external_ip=node_attrs['external_ip'],
ex_service_accounts=node_attrs['ex_service_accounts'],
description=node_attrs['description'],