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

CloudStack: bugs in the method ex_authorize_security_group_ingress

    Details

      Description

      The method ex_authorize_security_group_ingress contains some bugs:

      • The docstring doesn't match parameters of the method.
      • Only ICMP and TCP is allowed even if the doc of the parameter "protocol" mention TCP and UDP.
      • Moreover ICMP cannot be used because there is no way to specify the two required parameters "icmptype" and "icmpcode".
      • The parameter endport is not used if it's defined.
      • The return type is not a list but a dict.
      • The unit test doesn't use parameters in the correct order.

      So I created a patch which aims to fix these bugs and also try to do the following:

      • Improve the docstring to be a bit more detailed (the previous one comes from the official Apache CloudStack documentation).
      • Add a kwargs to allow to provide extra parameters defined in the API and in the docstring.
      • Improve the unit test.
      • Add support for other protocols like AH, GRE, ESP which are available on some Cloud like Exoscale.

      I will provide the patch as a Pull Request in GitHub.

      Regards

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user schaubl opened a pull request:

        https://github.com/apache/libcloud/pull/580

        LIBCLOUD-749 CloudStack: fixed method ex_authorize_security_group_ingress

        Corresponding ticket in the issue tracker: LIBCLOUD-749(https://issues.apache.org/jira/browse/LIBCLOUD-749)

        This PR fixes the following bugs:

        • The docstring doesn't match parameters of the method.
        • Only `ICMP` and `TCP` is allowed even if the doc of the parameter `protocol` mention `TCP` and `UDP`.
        • Moreover `ICMP` cannot be used because there is no way to specify the two required parameters `icmptype` and `icmpcode`.
        • The parameter `endport` is not used if it's defined.
        • The return type is not a `list` but a `dict`.
        • The unit test doesn't use parameters in the correct order.

        This PR also does the following changes:

        • Improve the docstring to be a bit more detailed (the previous one comes from the official Apache CloudStack documentation).
        • Add a `kwargs` to allow to provide extra parameters defined in the API and in the docstring.
        • Improve the unit test.
        • Add support for other protocols like `AH`, `GRE` and `ESP` which are available on some Cloud like Exoscale.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/schaubl/libcloud LIBCLOUD-749_cloudstack-fixed-ex_authorize_security_group_ingress

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/libcloud/pull/580.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #580


        commit 84699dc524e57ac40de2b5eca5a92cfcee6cbc01
        Author: lionel <lionel@sixsq.com>
        Date: 2015-09-15T21:39:15Z

        LIBCLOUD-749 CloudStack: fixed method ex_authorize_security_group_ingress


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user schaubl opened a pull request: https://github.com/apache/libcloud/pull/580 LIBCLOUD-749 CloudStack: fixed method ex_authorize_security_group_ingress Corresponding ticket in the issue tracker: LIBCLOUD-749 ( https://issues.apache.org/jira/browse/LIBCLOUD-749 ) This PR fixes the following bugs: The docstring doesn't match parameters of the method. Only `ICMP` and `TCP` is allowed even if the doc of the parameter `protocol` mention `TCP` and `UDP`. Moreover `ICMP` cannot be used because there is no way to specify the two required parameters `icmptype` and `icmpcode`. The parameter `endport` is not used if it's defined. The return type is not a `list` but a `dict`. The unit test doesn't use parameters in the correct order. This PR also does the following changes: Improve the docstring to be a bit more detailed (the previous one comes from the official Apache CloudStack documentation). Add a `kwargs` to allow to provide extra parameters defined in the API and in the docstring. Improve the unit test. Add support for other protocols like `AH`, `GRE` and `ESP` which are available on some Cloud like Exoscale. You can merge this pull request into a Git repository by running: $ git pull https://github.com/schaubl/libcloud LIBCLOUD-749 _cloudstack-fixed-ex_authorize_security_group_ingress Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/580.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #580 commit 84699dc524e57ac40de2b5eca5a92cfcee6cbc01 Author: lionel <lionel@sixsq.com> Date: 2015-09-15T21:39:15Z LIBCLOUD-749 CloudStack: fixed method ex_authorize_security_group_ingress
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 550dcf44f97d73c858f43fe1508b3e42e152da92 in libcloud's branch refs/heads/trunk from lionel
        [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=550dcf4 ]

        LIBCLOUD-749 CloudStack: fixed method ex_authorize_security_group_ingress

        Closes #580

        Signed-off-by: Tomaz Muraus <tomaz@apache.org>

        Show
        jira-bot ASF subversion and git services added a comment - Commit 550dcf44f97d73c858f43fe1508b3e42e152da92 in libcloud's branch refs/heads/trunk from lionel [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=550dcf4 ] LIBCLOUD-749 CloudStack: fixed method ex_authorize_security_group_ingress Closes #580 Signed-off-by: Tomaz Muraus <tomaz@apache.org>
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 64876e9fc12d428fba99aafc4d3691db25d60598 in libcloud's branch refs/heads/trunk from lionel
        [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=64876e9 ]

        LIBCLOUD-749 CloudStack: minor fixes to comply with pep8.

        Closes #580

        Signed-off-by: Tomaz Muraus <tomaz@apache.org>

        Show
        jira-bot ASF subversion and git services added a comment - Commit 64876e9fc12d428fba99aafc4d3691db25d60598 in libcloud's branch refs/heads/trunk from lionel [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=64876e9 ] LIBCLOUD-749 CloudStack: minor fixes to comply with pep8. Closes #580 Signed-off-by: Tomaz Muraus <tomaz@apache.org>
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit a35bc7e536edc2f2c7c54d8f001d557029170562 in libcloud's branch refs/heads/trunk from lionel
        [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=a35bc7e ]

        LIBCLOUD-749 Fixed a minor issue with the docstring of the method ex_authorize_security_group_ingress

        Closes #580

        Signed-off-by: Tomaz Muraus <tomaz@apache.org>

        Show
        jira-bot ASF subversion and git services added a comment - Commit a35bc7e536edc2f2c7c54d8f001d557029170562 in libcloud's branch refs/heads/trunk from lionel [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=a35bc7e ] LIBCLOUD-749 Fixed a minor issue with the docstring of the method ex_authorize_security_group_ingress Closes #580 Signed-off-by: Tomaz Muraus <tomaz@apache.org>
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/libcloud/pull/580

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/libcloud/pull/580

          People

          • Assignee:
            Unassigned
            Reporter:
            schaubl L. Schaub
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 4h
              4h
              Remaining:
              Remaining Estimate - 4h
              4h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development