Skip to content

[LIBCLOUD-758] Standardize volumesnapshot state#602

Merged
asfgit merged 1 commit into
apache:trunkfrom
ByteInternet:standardize-volumesnapshot-state
Nov 3, 2015
Merged

[LIBCLOUD-758] Standardize volumesnapshot state#602
asfgit merged 1 commit into
apache:trunkfrom
ByteInternet:standardize-volumesnapshot-state

Conversation

@allardhoeve
Copy link
Copy Markdown
Contributor

No description provided.

@allardhoeve
Copy link
Copy Markdown
Contributor Author

anyone? @Kami? otherwise I'll merge 😄

@vdloo
Copy link
Copy Markdown
Member

vdloo commented Oct 21, 2015

would like this as well

@Kami
Copy link
Copy Markdown
Member

Kami commented Oct 21, 2015

Sorry, didn't have time to review it yet.
On Oct 21, 2015 11:47 AM, "Allard Hoeve" notifications@github.com wrote:

anyone? @Kami https://github.com/kami? otherwise I'll merge [image:
😄]


Reply to this email directly or view it on GitHub
#602 (comment).

Comment thread libcloud/compute/types.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.

In newer parts of the code we decided to replace numeric enum values with string values (e.g. RecordType enum).

Strings makes it easier to see what's going on since you don't need to check the enum type definition to see to which enum name a particular value maps to.

I would appreciate if you can update the code to use string values (e.g. AVAILABLE = 'available', ERROR = ' error', etc.).

In the future I also plan to clean and improve the legacy code and update NodeState to also use string values.

@Kami
Copy link
Copy Markdown
Member

Kami commented Nov 1, 2015

Sorry for the delay.

I've added one comment - besides that the code looks good to me. I would appreciate if you can address that and when you do, feel free to merge the PR.

Thanks!

@allardhoeve allardhoeve force-pushed the standardize-volumesnapshot-state branch 2 times, most recently from 8416356 to 81ce457 Compare November 3, 2015 10:40
@allardhoeve
Copy link
Copy Markdown
Contributor Author

Changed to strings. Will merge.

@allardhoeve allardhoeve force-pushed the standardize-volumesnapshot-state branch 2 times, most recently from 20550df to 533ded5 Compare November 3, 2015 10:44
LIBCLOUD-759
closes: apache#602

Signed-off-by: Allard Hoeve <allard@byte.nl>
@allardhoeve allardhoeve force-pushed the standardize-volumesnapshot-state branch from 533ded5 to 728bd88 Compare November 3, 2015 10:49
@asfgit asfgit merged commit 728bd88 into apache:trunk Nov 3, 2015
@allardhoeve allardhoeve deleted the standardize-volumesnapshot-state branch November 3, 2015 10:52
Comment thread libcloud/compute/types.py
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.

Sorry, for a late comment, I missed this in the previous pass.

For consistency, it would be great if you can change "INUSE" to "IN_USE" and "BACKUP" to "SNAPSHOTING" (this way it's a verb and it's consistent with other states).

Thanks!

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.

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.

True, but I personally find "backup" state a bit confusing (backuping is also better, imo, but snapshotting is more provider agnostic) :)

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.

4 participants