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

Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.3.0
    • 0.3.0
    • Core
    • None
    • Any

    Description

      Linode driver throws exception if "location" keyword argument not supplied to node_create() even though comments indicate otherwise. All of the other keyword arguments are also not defaulted which does not match the base.py create_node documentation.

      The comments in drivers/linode.py say:

      1. As Linode requires choosing a datacenter, a little logic is done.

      and then go onto describe a process for automatically choosing a datacenter and/or calling linode_set_datacenter.

      Unfortunately, the "location" keyword still has to be passed in or the function fails since line 239 directly references the parameter (and all the others as well) without the traditional default handling for non-required keyword arguments.

      Presumably, the default should be properly handled by coding the "little logic" in place of the comments about it...

      Alternatively, handling the linode_set_datacenter setting of self.datacenter could be used to provide a sensible default.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ssteinerx Steve Steiner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment