deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Fojtik (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DTACLOUD-297) Update the Python client bundled with Deltacloud
Date Tue, 21 Aug 2012 11:43:38 GMT

     [ https://issues.apache.org/jira/browse/DTACLOUD-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michal Fojtik resolved DTACLOUD-297.
------------------------------------

    Resolution: Fixed

The patches posted here are not applicable due to whitespace conflicts... I merge Tomas branch
from github instead: https://github.com/tomassedovic/deltacloud

ACK && PUSH


commit 286eb19da42dd84b0f84c0739d306327fa5d2f35
Author: Tomas Sedovic <tomas@sedovic.cz>
Date:   Thu Aug 9 15:26:45 2012 +0200

    Python client: Use JSON instead of XML
    
    The data structures returned by Deltacloud are more easilly manipulated
    in the Python dictionary form -- to which JSON maps better than XML.
    
    As a side benefit, this cuts the number of required external
    dependencies from 2 to 1.
    
    Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>

commit bc5d15ba91d10c999859d374937bcf8e80a8795d
Author: Tomas Sedovic <tomas@sedovic.cz>
Date:   Wed Aug 8 16:19:51 2012 +0200

    Python client: update instance after action
    
    Previously, the instance's XML representation wasn't being updated upon
    completing an action:
    
        >>> i = client.instances()
        >>> i.actions()
        ['start', 'destroy', 'run', 'create_image']
        >>> i.start()
        True
        >>> i.actions()
        ['start', 'destroy', 'run', 'create_image']
    
    The last call shows "start" as an available action even though the
    instance is already running.
    
    This fix updates the instance's internal representation when an action
    is finished successfully.
    
    Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>

commit 4362ee16df47e9d9ff0bad17a4338810ef0d7004
Author: Tomas Sedovic <tomas@sedovic.cz>
Date:   Wed Aug 8 15:50:33 2012 +0200

    Python client: use correct methods for actions
    
    The code for calling instance actions (stop, destroy, etc.) didn't
    honour the methods advertised by the API (e.g. it used POST instead of
    DELETE for the `destroy` action).
    
    This fixes the issue and deduplicates the code.
    
    Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>

commit 8ad1c7ac74eb72a1f9afa3cb46190efa301ec410
Author: Tomas Sedovic <tomas@sedovic.cz>
Date:   Wed Aug 8 15:26:26 2012 +0200

    Python client: simplify making requests
    
    This removes the code duplication in the GET, POST, DELETE and PUT
    methods and adds a generic `do_request` method that where the caller can
    specify the HTTP method.
    
    We will need that in order to respect the HTTP methods returned by the
    Deltacloud API calls instead of hardcoding them.
    
    Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>

commit 0e44bdb1dae77b8e9afa323af0bede0bc1aaf929
Author: Tomas Sedovic <tomas@sedovic.cz>
Date:   Wed Aug 8 15:03:43 2012 +0200

    Python client: fix instances listing
    
    Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>

commit 06de8247441f2da9ad82245fe1bc86f95e373122
Author: Tomas Sedovic <tomas@sedovic.cz>
Date:   Wed Aug 8 14:54:28 2012 +0200

    Python client: update indentation
    
    Python code should 4 spaces for indentation:
    
    http://www.python.org/dev/peps/pep-0008/#indentation
    
    Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>

commit 1bde18780a812f8aacd823d4179ec2471666c957
Author: Tomas Sedovic <tomas@sedovic.cz>
Date:   Wed Aug 8 13:45:52 2012 +0200

    .gitignore *.pyc files
    
    Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>

commit e6a49a54daabf5c10b34655eea9601e618b59334
Author: Martin Packman <martin.packman@canonical.com>
Date:   Mon May 14 17:15:51 2012 +0100

    Trivial whitespace cleanup in Python deltacloud client

                
> Update the Python client bundled with Deltacloud
> ------------------------------------------------
>
>                 Key: DTACLOUD-297
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-297
>             Project: DeltaCloud
>          Issue Type: Improvement
>          Components: Client (Ruby)
>            Reporter: Tomas Sedovic
>            Assignee: Michal Fojtik
>              Labels: python
>         Attachments: 0001-.gitignore-.pyc-files.patch, 0002-Python-client-update-indentation.patch,
0003-Python-client-fix-instances-listing.patch, 0004-Python-client-simplify-making-requests.patch,
0005-Python-client-use-correct-methods-for-actions.patch, 0006-Python-client-update-instance-after-action.patch,
0007-Python-client-Use-JSON-instead-of-XML.patch
>
>
> The Python client bundled with Deltacloud[1] wan't updated for over a year. It offers
only a limited functionality and has a few serious bugs (e.g. creating and listing instances
results in an exception).
> Since I need working Python bindings for my work, I'm happy to get involved with getting
the client up to snuff.
> [1]: https://git-wip-us.apache.org/repos/asf?p=deltacloud.git;a=blob;f=clients/python/deltacloud.py;h=8dc72eb943baafab05eccc7ef25008a0b08fba6a;hb=HEAD

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message