[jira] [Commented] (LIBCLOUD-852) Support filters in BaseEC2NodeDriver.list_volumes

2016-09-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LIBCLOUD-852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15497224#comment-15497224
 ] 

ASF GitHub Bot commented on LIBCLOUD-852:
-

GitHub user jbmchuck opened a pull request:

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

[LIBCLOUD-852] Support filtering in ec2 list_volumes

## Support filtering in EC2 list_volumes

### Description

There currently is not a way to filter volumes in the EC2 driver 
list_volumes.  This is a useful feature for identifying volumes with certain 
attributes - e.g. orphaned volumes.  The filtering param is already implicitly 
used in list_volumes to specify an attached instance-id, if node arg is 
provided.  This change allows additional explicit filters to be provided.

The particular issue I have run into motivating this change is - if I 
create a volume using create_volume and immediately attach it to a node using 
attach_volume I occasionally run into errors where the volume was created but 
is not yet ready for attachment.  I can use list_volumes to fetch everything 
and filter on my end, but I'd rather filter server side as I am with 
list_images and other similar functions.

I also added a docstring. 

### Status

done, ready for review

### Checklist (tick everything that applies)

- [x] [Code 
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
 (required, can be done after the PR checks)
- [x] 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/jbmchuck/libcloud 
LIBCLOUD-852_list_volume_filters

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

https://github.com/apache/libcloud/pull/859.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 #859


commit cc33fc23fdd271b83567e3149c698ea6a9c4e612
Author: Michaelchuck, Jon (DS) 
Date:   2016-09-16T19:48:17Z

[LIBCLOUD-852] Support filtering in ec2 list_volumes




> Support filters in BaseEC2NodeDriver.list_volumes
> -
>
> Key: LIBCLOUD-852
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-852
> Project: Libcloud
>  Issue Type: Improvement
>  Components: Compute
>Reporter: Jonathan Michaelchuck
>Priority: Minor
>
> Several ec2 functions allow ex_filters to be specified, however list_volumes 
> does not, it would be a helpful improvement in several cases - for instance, 
> determining if a recently added volume is ready to be attached, identifying 
> orphaned volumes, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] libcloud pull request #859: [LIBCLOUD-852] Support filtering in ec2 list_vol...

2016-09-16 Thread jbmchuck
GitHub user jbmchuck opened a pull request:

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

[LIBCLOUD-852] Support filtering in ec2 list_volumes

## Support filtering in EC2 list_volumes

### Description

There currently is not a way to filter volumes in the EC2 driver 
list_volumes.  This is a useful feature for identifying volumes with certain 
attributes - e.g. orphaned volumes.  The filtering param is already implicitly 
used in list_volumes to specify an attached instance-id, if node arg is 
provided.  This change allows additional explicit filters to be provided.

The particular issue I have run into motivating this change is - if I 
create a volume using create_volume and immediately attach it to a node using 
attach_volume I occasionally run into errors where the volume was created but 
is not yet ready for attachment.  I can use list_volumes to fetch everything 
and filter on my end, but I'd rather filter server side as I am with 
list_images and other similar functions.

I also added a docstring. 

### Status

done, ready for review

### Checklist (tick everything that applies)

- [x] [Code 
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
 (required, can be done after the PR checks)
- [x] 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/jbmchuck/libcloud 
LIBCLOUD-852_list_volume_filters

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

https://github.com/apache/libcloud/pull/859.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 #859


commit cc33fc23fdd271b83567e3149c698ea6a9c4e612
Author: Michaelchuck, Jon (DS) 
Date:   2016-09-16T19:48:17Z

[LIBCLOUD-852] Support filtering in ec2 list_volumes




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (LIBCLOUD-852) Support filters in BaseEC2NodeDriver.list_volumes

2016-09-16 Thread Jonathan Michaelchuck (JIRA)
Jonathan Michaelchuck created LIBCLOUD-852:
--

 Summary: Support filters in BaseEC2NodeDriver.list_volumes
 Key: LIBCLOUD-852
 URL: https://issues.apache.org/jira/browse/LIBCLOUD-852
 Project: Libcloud
  Issue Type: Improvement
  Components: Compute
Reporter: Jonathan Michaelchuck
Priority: Minor


Several ec2 functions allow ex_filters to be specified, however list_volumes 
does not, it would be a helpful improvement in several cases - for instance, 
determining if a recently added volume is ready to be attached, identifying 
orphaned volumes, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] libcloud pull request #858: Backup bug fix

2016-09-16 Thread relaxdiego
GitHub user relaxdiego opened a pull request:

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

Backup bug fix

### Description

This replaces PR #781.

Currently if a backup doesn't exists on a target, we return None, since 
we're using this value in getting a backup target we end up throwing an error
Also after linting, it looks like paginated responses were erroring out if 
paginated responses were empty.

### Status

ready for review

### Checklist (tick everything that applies)

- [x] [Code 
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
 (required, can be done after the PR checks)
- [ ] Documentation
- [X] [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/relaxdiego/libcloud backup_bug_fix

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

https://github.com/apache/libcloud/pull/858.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 #858


commit 418b4e02a05d2e857748aa30708a319b6d84fd8d
Author: Jeffrey Dunham 
Date:   2016-05-03T23:26:51Z

Bug fix on None type for return

commit 5fb0b924a66b9473fa490d7e74643fead9b0ec00
Author: Jeffrey Dunham 
Date:   2016-05-05T20:26:15Z

Fixing bug in paginated calls caused after linting, added tests to cover 
cases

commit 3c57360ea3d98c174449ae2614d33000334da231
Author: Jeffrey Dunham 
Date:   2016-05-05T20:31:26Z

Removing a print statement

commit 7fed326a2a0cc33bd73568a1cb76b239a51db582
Author: Jeffrey Dunham 
Date:   2016-05-05T21:57:04Z

Fixing copypasta assetId/assetName




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] libcloud pull request #857: Create volume is more robust on newer OpenStacks

2016-09-16 Thread allardhoeve
GitHub user allardhoeve opened a pull request:

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

Create volume is more robust on newer OpenStacks

## Make create_volume more robust on newer OpenStacks

### Description

On newer OpenStacks, things will fail if you do not provide `location` or 
if you do not provide `ex_volume_type`. The driver will pass the default `None` 
values to `self.driver.request`, which serializes them to `null`, which is an 
invalid value for `/os-volumes/` on newer incarnations of OpenStack.

This PR makes it so the OpenStack driver does not include these fields if 
they are None, so they are not refused by OpenStack's validation.

### Status

- done, ready for review

### Checklist (tick everything that applies)

- [x] [Code 
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
 (required, can be done after the PR checks)
- [ ] Documentation
- [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [x] 
[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/ByteInternet/libcloud 
create_volume_is_more_robust

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

https://github.com/apache/libcloud/pull/857.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 #857


commit 42d069e6d7255ab11d233e76ae34acdc942e7901
Author: Allard Hoeve 
Date:   2016-09-16T15:17:19Z

Create volume is more robust on newer OpenStacks




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---