You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Steve Steiner (JIRA)" <ji...@apache.org> on 2010/06/25 03:28:49 UTC

[libcloud] [jira] Created: (LIBCLOUD-41) Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

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

                 Key: LIBCLOUD-41
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-41
             Project: Libcloud
          Issue Type: Bug
          Components: Core
    Affects Versions: 0.3.0
         Environment: Any
            Reporter: Steve Steiner
             Fix For: 0.3.0


Linode driver throws exception if "location" keyword argument not supplied 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:

        #   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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[libcloud] [jira] Updated: (LIBCLOUD-41) Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

Posted by "Steve Steiner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LIBCLOUD-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Steiner updated LIBCLOUD-41:
----------------------------------

    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:

        #   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.

  was:
Linode driver throws exception if "location" keyword argument not supplied 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:

        #   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.


> Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-41
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-41
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.3.0
>         Environment: Any
>            Reporter: Steve Steiner
>             Fix For: 0.3.0
>
>
> 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:
>         #   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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[libcloud] [jira] Commented: (LIBCLOUD-41) Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

Posted by "Steve Steiner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883223#action_12883223 ] 

Steve Steiner commented on LIBCLOUD-41:
---------------------------------------

In my opinion, having required "extra" parameters without sensible defaults kind of defeats the purpose of libcloud.

The intention expressed in the original code would have sensibly defaulted this and someone who needed finer grained control could have passed the parameter as needed, when needed.

S



> Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-41
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-41
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.3.0
>         Environment: Any
>            Reporter: Steve Steiner
>             Fix For: 0.3.0
>
>
> 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:
>         #   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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[libcloud] [jira] Commented: (LIBCLOUD-41) Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

Posted by "Jed Smith (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883226#action_12883226 ] 

Jed Smith commented on LIBCLOUD-41:
-----------------------------------

Did you look at the revision? linode_set_datacenter is obeyed now, which was your alternative, acceptable solution. I apologize for (apparently) implying that I only removed the comments.

Thanks

JS

> Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-41
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-41
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.3.0
>         Environment: Any
>            Reporter: Steve Steiner
>             Fix For: 0.3.0
>
>
> 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:
>         #   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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[libcloud] [jira] Commented: (LIBCLOUD-41) Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

Posted by "Steve Steiner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883229#action_12883229 ] 

Steve Steiner commented on LIBCLOUD-41:
---------------------------------------

Originally I didn't know that a location was required, so I was just happy at finding the parameter, then figuring out what to put in it.

Thanks for the tip, though, I'll go look at linode_set_datacenter; I saw the comments in there about that, but wasn't sure whether that solution had been implemented either at that point.

S


> Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-41
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-41
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.3.0
>         Environment: Any
>            Reporter: Steve Steiner
>             Fix For: 0.3.0
>
>
> 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:
>         #   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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[libcloud] [jira] Resolved: (LIBCLOUD-41) Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

Posted by "Jerry Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LIBCLOUD-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Chen resolved LIBCLOUD-41.
--------------------------------

    Resolution: Fixed

Resolved by Jed

> Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-41
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-41
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.3.0
>         Environment: Any
>            Reporter: Steve Steiner
>             Fix For: 0.3.0
>
>
> 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:
>         #   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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[libcloud] [jira] Commented: (LIBCLOUD-41) Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise

Posted by "Jed Smith (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LIBCLOUD-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883215#action_12883215 ] 

Jed Smith commented on LIBCLOUD-41:
-----------------------------------

You are correct - the comment I left there was the intention when I wrote it, and it didn't work out that way. That the comment structure got left in is an oversight, and thank you for pointing it out.

Resolved in r958637. I will mark it as such when I have JIRA access to do so, unless someone wants to do me a favor.

> Linode driver throws exception if "location" keyword argument not supplied even though comments indicate otherwise
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-41
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-41
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.3.0
>         Environment: Any
>            Reporter: Steve Steiner
>             Fix For: 0.3.0
>
>
> 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:
>         #   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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.