Repository: libcloud Updated Branches: refs/heads/trunk 8570675d8 -> 774ffde90
Allow multiple preemptible instances to be created Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e384ce79 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e384ce79 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e384ce79 Branch: refs/heads/trunk Commit: e384ce79779050feeb7eb1f810dca33127a70217 Parents: 8570675 Author: John Baublitz <j...@cambridgesemantics.com> Authored: Wed Nov 9 12:21:49 2016 -0500 Committer: Anthony Shaw <anthonys...@apache.org> Committed: Tue Dec 27 19:39:08 2016 +1100 ---------------------------------------------------------------------- libcloud/compute/drivers/gce.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/e384ce79/libcloud/compute/drivers/gce.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py index 9412c0e..233ada7 100644 --- a/libcloud/compute/drivers/gce.py +++ b/libcloud/compute/drivers/gce.py @@ -4448,7 +4448,8 @@ class GCENodeDriver(NodeDriver): ex_service_accounts=None, timeout=DEFAULT_TASK_COMPLETION_TIMEOUT, description=None, ex_can_ip_forward=None, ex_disks_gce_struct=None, ex_nic_gce_struct=None, ex_on_host_maintenance=None, - ex_automatic_restart=None, ex_image_family=None): + ex_automatic_restart=None, ex_image_family=None, + ex_preemptible=None): """ Create multiple nodes and return a list of Node objects. @@ -4581,6 +4582,12 @@ class GCENodeDriver(NodeDriver): :return: A list of Node objects for the new nodes. :rtype: ``list`` of :class:`Node` + + :keyword ex_preemptible: Defines whether the instance is preemptible. + (If not supplied, the instance will + not be preemptible) + :type ex_preemptible: ``bool`` or ``None`` + """ if image and ex_disks_gce_struct: raise ValueError("Cannot specify both 'image' and " @@ -4627,7 +4634,8 @@ class GCENodeDriver(NodeDriver): 'ex_disks_gce_struct': ex_disks_gce_struct, 'ex_nic_gce_struct': ex_nic_gce_struct, 'ex_on_host_maintenance': ex_on_host_maintenance, - 'ex_automatic_restart': ex_automatic_restart} + 'ex_automatic_restart': ex_automatic_restart, + 'ex_preemptible': ex_preemptible} # List for holding the status information for disk/node creation. status_list = [] @@ -7639,7 +7647,8 @@ class GCENodeDriver(NodeDriver): ex_nic_gce_struct=node_attrs['ex_nic_gce_struct'], ex_on_host_maintenance=node_attrs['ex_on_host_maintenance'], ex_automatic_restart=node_attrs['ex_automatic_restart'], - ex_subnetwork=node_attrs['subnetwork']) + ex_subnetwork=node_attrs['subnetwork'], + ex_preemptible=node_attrs['ex_preemptible']) try: node_res = self.connection.request(request, method='POST',