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

        Attachments

          Activity

            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