GitHub user allardhoeve opened a pull request:

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

    Add state to StorageVolume

    1. Currently, volume state is defined by the driver in a key in `extra`. 
This key varies between drivers. Also, the value varies between drivers.
    1. However, it is a commonly accessed attribute that should be unified 
across drivers, just as `Node` state is unified in `NodeState`.
    1. This PR does exactly that.
    
    Some caveats:
    
    1. The list of possible states is probably not exaustive.
      1. I could not find an exhaustive list of volume states for EC2, nor for 
OpenStack.
      2. I have, however, manually checked the life-cycle of volumes on both.
    1. Except for OS and EC2, all other drivers return StorageVolume objects 
with state `UNKNOWN`.
      1. I have no access to GCE.
      1. I could find no exhaustive list of GCE disk states.
      1. The same holds for all the other drivers.
      1. I do not think this is a problem, because the instance variable does 
not currently exist at all :wink: 


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

    $ git pull https://github.com/ByteInternet/libcloud add-volume-state

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

    https://github.com/apache/libcloud/pull/476.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 #476
    
----
commit 96bcff4d66837e2cebedce13a907608e3142a470
Author: Allard Hoeve <[email protected]>
Date:   2015-03-04T15:41:07Z

    Add state to StorageVolume

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to