ChihweiLHBird commented on code in PR #2170:
URL: https://github.com/apache/libcloud/pull/2170#discussion_r3646749008


##########
libcloud/compute/drivers/linode.py:
##########
@@ -705,24 +726,33 @@ def ex_get_volume(self, volume_id):
         response = self.connection.request("/v4/volumes/%s" % volume_id).object
         return self._to_volume(response)
 
-    def get_image(self, image):
+    def get_image(
+        self,
+        image_id,
+    ):
         """
         Lookup a Linode image
 
-        :param image: The name to image to be looked up (required).\
-        :type name: `str`
+        :param image_id: The ID of the image to look up (required).
+        :type image_id: ``str``
 
         :rtype: :class: `NodeImage`
         """
+        image = image_id
         response = self.connection.request("/v4/images/%s" % image, 
method="GET")
         return self._to_image(response.object)
 
-    def create_image(self, disk, name=None, description=None):
+    def create_image(
+        self,
+        node,
+        name,
+        description=None,
+    ):
         """Creates a private image from a LinodeDisk.
          Images are limited to three per account.
 
-        :param disk: LinodeDisk to create the image from (required)
-        :type disk: :class:`LinodeDisk`
+        :param node: LinodeDisk to create the image from (required)
+        :type node: :class:`LinodeDisk`

Review Comment:
   Technically the node should be a Node class... but in Linode this is 
complicated because every node can have multiple config profiles for booting 
different disks and the disk is required for image creation API call, and there 
isn't a very obvious way to determine which config profile or disk booted the 
node most recently... I guess we can have this called `node` but typed with 
`LinodeDisk` for now. I can look into the way to fully resolve it in the future



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to