libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SElsharkawy <...@git.apache.org>
Subject [GitHub] libcloud pull request #1098: LIBCLOUD-926 - Propagated changes to azure_arm....
Date Tue, 29 Aug 2017 18:31:10 GMT
GitHub user SElsharkawy opened a pull request:

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

    LIBCLOUD-926 - Propagated changes to azure_arm.py from pull 1051

    ## Changes Title (Update: LIBCLOUD-926 - [BUG Azure_ARM] in ex_create_public_ip function
among other)
    
    ### Description
    
    This suggested update fixes the condition that checks for parameter "location" being None.
If the parameter is not None, the original code would still exit and raise ValueError exception.
    
    In the file libcloud/compute/drivers/azure_arm.py.
    There are some functions as ex_create_public_ip function that it needs a location parameter,
when this parameter is send, a error happen: "Location is required".
    Looking at the code I found with the following:
    
           if location is None and self.default_location:
                location = self.default_location
            else:
                raise ValueError("location is required.")
    This does not evaluate a possible parameter, only if the value is None.
    
    I suggested the following change:
    
            if location is None:
                if self.default_location:
                    location = self.default_location
                else:
                    raise ValueError("location is required.")
    The affected methods are:
    
       ex_create_network_security_group
       ex_delete_network_security_group
       ex_create_public_ip
    The same code has been used in several other places.
    
    ### Status
    
    done, ready for review
    
    ### Checklist (tick everything that applies)
    
    - [ ] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
(required, can be done after the PR checks)
    - [ ] Documentation
    - [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
    - [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
(required for bigger changes)


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

    $ git pull https://github.com/SElsharkawy/libcloud LIBCLOUD-926_pull-1051

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

    https://github.com/apache/libcloud/pull/1098.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 #1098
    
----
commit adadaf53882d6e15500079debc7344e5e2d28049
Author: Elsharkawy, Sameh <selsharkawy@card.core>
Date:   2017-08-29T18:18:19Z

    Propagated changes to azure_arm.py from pull 1051

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message