Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDSTACK: Add option to expunge vm on destroy #382

Closed
wants to merge 1 commit into from
Closed

CLOUDSTACK: Add option to expunge vm on destroy #382

wants to merge 1 commit into from

Conversation

boul
Copy link
Contributor

@boul boul commented Nov 7, 2014

No description provided.

"""
@inherits: :class:`NodeDriver.reboot_node`
:type node: :class:`CloudStackNode`

:keyword ex_expunge: If true is passed, the vm is expunged
immediately. False by default.
Copy link
Member

Choose a reason for hiding this comment

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

might be better to set it to False by default then, and check if it's True before passing it.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, the docstring even says it defaults to False.

@boul
Copy link
Contributor Author

boul commented Nov 12, 2014

Check, changed the default to be False and only passing the arg when True as Cloudstack defaults to False so there is no need to send False to Cloudstack, this way it should also work with older CS versions which do not expose this feature.

'id': node.id,
}

if ex_expunge is not False:
Copy link
Member

Choose a reason for hiding this comment

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

even better with:

if ex_expunge:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Less is more :) Done.

@asfgit asfgit closed this in 680e23b Nov 13, 2014
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.

None yet

3 participants