Skip to content

LIBCLOUD 473 Add EBS Volume Attributes#210

Closed
cderamus wants to merge 4 commits into
apache:trunkfrom
DivvyCloud:LIBCLOUD-473_Add_EBS_Volume_Attributes
Closed

LIBCLOUD 473 Add EBS Volume Attributes#210
cderamus wants to merge 4 commits into
apache:trunkfrom
DivvyCloud:LIBCLOUD-473_Add_EBS_Volume_Attributes

Conversation

@cderamus
Copy link
Copy Markdown
Contributor

Comment thread libcloud/compute/drivers/ec2.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now shadows name argument which is passed to this function.

Maybe a better approach would be to use name argument which is passed to the function (if available), otherwise fall back to retrieving a name from the tags (`name = name if name else tags.get('Name', volId)).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are at it, I would also do the following changes:

  1. Modify _to_volume method signature and default name to None
  2. Modify self._to_volume(el,``) call to omit name argument (empty string) all together
  3. Add a docstring which explains that if not provided, name is obtained from the tags (if available)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a problem, will do.

…ctionary

Changed _to_volume to default name to None
Updated the extra_attributes_map to cast_func and removed an unnecessary if condition
@cderamus
Copy link
Copy Markdown
Contributor Author

Assuming that you're okay with these changes I will create a new branch later today to convert all extra_attributes_map dictionaries from type -> cast_func to remain consistent and also will set up the new utility function that we previously discussed. Thanks!

@Kami
Copy link
Copy Markdown
Member

Kami commented Dec 27, 2013

@cderamus Yeah, sounds good.

I've squashed the commits, updated the docstring and merged patch into trunk. Thanks!

@cderamus cderamus closed this Dec 27, 2013
@cderamus cderamus deleted the LIBCLOUD-473_Add_EBS_Volume_Attributes branch December 27, 2013 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants