libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdloo <...@git.apache.org>
Subject [GitHub] libcloud pull request #1267: fix OpenStack_2_NodeDriver.detach_volume
Date Mon, 10 Dec 2018 12:51:46 GMT
GitHub user vdloo opened a pull request:

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

    fix OpenStack_2_NodeDriver.detach_volume

    Since https://github.com/apache/libcloud/pull/1242 the OpenStack_2_NodeDriver uses a volume
object returned via volumev2_connection. This object will not contain serverId but server_id.
This PR makes the detach_volume method compatible with v2 volumes.
    
    Fixes:
    ```
    return connection.detach_volume(volume)
    File "/usr/local/venv/project/src/apache-libcloud/libcloud/compute/drivers/openstack.py",
line 328, in detach_volume
    (attachment['serverId'], attachment['id']),
    KeyError: 'serverId'
    ```

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

    $ git pull https://github.com/vdloo/libcloud fix-detach-volume-OpenStack_2_NodeDriver

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

    https://github.com/apache/libcloud/pull/1267.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 #1267
    
----
commit 79cdd3a95295538239721122ba4be320c43c553c
Author: Rick van de Loo <rickvandeloo@...>
Date:   2018-12-10T12:47:21Z

    fix OpenStack_2_NodeDriver.detach_volume
    
    Since https://github.com/apache/libcloud/pull/1242 the
    OpenStack_2_NodeDriver uses a volume object returned via
    volumev2_connection. This object will not contain serverId
    but server_id. This PR makes the detach_volume method
    compatible with v2 volumes.
    
    Fixes:
    ```
    return connection.detach_volume(volume)
    File "/usr/local/venv/project/src/apache-libcloud/libcloud/compute/drivers/openstack.py",
line 328, in detach_volume
    (attachment['serverId'], attachment['id']),
    KeyError: 'serverId'
    ```

----


---

Mime
View raw message