Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-562

Add support for Google-Containers project for VM Images

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Compute
    • Labels:
      None

      Description

      Recently Google have released a google VM Image that comes with docker preinstalled and supports docker provisioning via metadata.

      Toady in libcloud both debian and centos images are supported by matching against the VM name and then injecting the appropiate project name (debian-cloud and centos-cloud).

      To support Google Containers the method ex_get_image needs to look as follows for release 0.14.1 of libcloud:

      gce.py
          def ex_get_image(self, partial_name):
              """
              Return an NodeImage object based on the name or link provided.
      
              :param  partial_name: The name, partial name, or full path of a GCE
                                    image.
              :type   partial_name: ``str``
      
              :return:  NodeImage object based on provided information or None if an
                        image with that name is not found.
              :rtype:   :class:`NodeImage` or ``None``
              """
              if partial_name.startswith('https://'):
                  response = self.connection.request(partial_name, method='GET')
                  return self._to_node_image(response.object)
      
              image = self._match_images(None, partial_name)
              if not image:
                  if partial_name.startswith('debian'):
                      image = self._match_images('debian-cloud', partial_name)
                  elif partial_name.startswith('centos'):
                      image = self._match_images('centos-cloud', partial_name)
                  elif partial_name.startswith('container-vm'):
                      image = self._match_images('google-containers', partial_name)
      
              return image
      

      Where the new part is this clause:

                  elif partial_name.startswith('container-vm'):
                      image = self._match_images('google-containers', partial_name)
      

        Activity

        Hide
        magnusart Magnus Andersson added a comment -

        Github pull request takes care of this: https://github.com/apache/libcloud/pull/299

        Show
        magnusart Magnus Andersson added a comment - Github pull request takes care of this: https://github.com/apache/libcloud/pull/299

          People

          • Assignee:
            Unassigned
            Reporter:
            magnusart Magnus Andersson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development