libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erjoh...@apache.org
Subject libcloud git commit: [google compute] Add "WINDOWS" guestOsFeatures option.
Date Mon, 26 Sep 2016 19:09:12 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 93c467c3e -> 0ae5c1062


[google compute] Add "WINDOWS" guestOsFeatures option.

Closes #861

Signed-off-by: Eric Johnson <erjohnso@google.com>


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0ae5c106
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0ae5c106
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0ae5c106

Branch: refs/heads/trunk
Commit: 0ae5c1062a322d772f3a0678aadb56d4c21437f7
Parents: 93c467c
Author: Max Illfelder <illfelder@google.com>
Authored: Wed Sep 21 14:57:36 2016 -0700
Committer: Eric Johnson <erjohnso@google.com>
Committed: Mon Sep 26 19:07:34 2016 +0000

----------------------------------------------------------------------
 CHANGES.rst                                             |  4 ++++
 libcloud/compute/drivers/gce.py                         |  4 ++--
 .../gce/projects_coreos-cloud_global_images.json        |  3 +++
 libcloud/test/compute/test_gce.py                       | 12 ++++++++----
 4 files changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0ae5c106/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 764ae7d..2d60534 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -7,6 +7,10 @@ Changes in current version of Apache Libcloud
 Compute
 ~~~~~~~
 
+- [google compute] Add "WINDOWS" guestOsFeatures option.
+  (GITHUB-861)
+  [Max Illfelder]
+
 - When creating volumes on OpenStack with defaults for `location` or `volume_type`,
   newer OpenStack versions would throw errors. The OpenStack driver will now only
   post those arguments if non-`NoneType`.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0ae5c106/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 44ebdac..f815ab0 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1297,7 +1297,7 @@ class GCENodeDriver(NodeDriver):
         "windows-cloud": ["windows"],
     }
 
-    GUEST_OS_FEATURES = ['VIRTIO_SCSI_MULTIQUEUE']
+    GUEST_OS_FEATURES = ['VIRTIO_SCSI_MULTIQUEUE', 'WINDOWS']
 
     def __init__(self, user_id, key=None, datacenter=None, project=None,
                  auth_type=None, scopes=None, credential_file=None, **kwargs):
@@ -2606,7 +2606,7 @@ class GCENodeDriver(NodeDriver):
         :keywork  guest_os_features: Features of the guest operating system,
                                      valid for bootable images only. Possible
                                      values include \'VIRTIO_SCSI_MULTIQUEUE\'
-                                     if specified.
+                                     and \'WINDOWS\' if specified.
         :type     guest_os_features: ``list`` of ``str`` or ``None``
 
         :keyword  use_existing: If True and an image with the given name

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0ae5c106/libcloud/test/compute/fixtures/gce/projects_coreos-cloud_global_images.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/gce/projects_coreos-cloud_global_images.json b/libcloud/test/compute/fixtures/gce/projects_coreos-cloud_global_images.json
index 5e48b10..0703233 100644
--- a/libcloud/test/compute/fixtures/gce/projects_coreos-cloud_global_images.json
+++ b/libcloud/test/compute/fixtures/gce/projects_coreos-cloud_global_images.json
@@ -1330,6 +1330,9 @@
    "guestOsFeatures": [
     {
       "type": "VIRTIO_SCSI_MULTIQUEUE"
+    },
+    {
+      "type": "WINDOWS"
     }
    ],
    "sourceType": "RAW",

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0ae5c106/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 1fdd9f0..ebfed8c 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -484,8 +484,10 @@ class GCENodeDriverTest(GoogleTestCase, TestCaseMixin):
         description = 'CoreOS beta 522.3.0'
         name = 'coreos'
         family = 'coreos'
-        guest_os_features = ['VIRTIO_SCSI_MULTIQUEUE']
-        expected_features = [{'type': 'VIRTIO_SCSI_MULTIQUEUE'}]
+        guest_os_features = ['VIRTIO_SCSI_MULTIQUEUE', 'WINDOWS']
+        expected_features = [
+            {'type': 'VIRTIO_SCSI_MULTIQUEUE'},
+            {'type': 'WINDOWS'}]
         mock_request = mock.Mock()
         mock_request.side_effect = self.driver.connection.async_request
         self.driver.connection.async_request = mock_request
@@ -512,8 +514,10 @@ class GCENodeDriverTest(GoogleTestCase, TestCaseMixin):
         url = 'gs://storage.core-os.net/coreos/amd64-generic/247.0.0/coreos_production_gce.tar.gz'
         description = 'CoreOS beta 522.3.0'
         family = 'coreos'
-        guest_os_features = ['VIRTIO_SCSI_MULTIQUEUE']
-        expected_features = [{'type': 'VIRTIO_SCSI_MULTIQUEUE'}]
+        guest_os_features = ['VIRTIO_SCSI_MULTIQUEUE', 'WINDOWS']
+        expected_features = [
+            {'type': 'VIRTIO_SCSI_MULTIQUEUE'},
+            {'type': 'WINDOWS'}]
         image = self.driver.ex_copy_image(name, url, description=description,
                                           family=family,
                                           guest_os_features=guest_os_features)


Mime
View raw message