Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Support test and set of KV via vm listener #1626

Merged
merged 4 commits into from
Jul 26, 2017
Merged

Support test and set of KV via vm listener #1626

merged 4 commits into from
Jul 26, 2017

Conversation

govint
Copy link
Contributor

@govint govint commented Jul 24, 2017

Modified the disk_detach_int code path to include optional key, value params. The KV will be written with the given dict only if the current KV data matches the given key, value pair.

Ensuring a test-and-set of the KV in specific scenarios - right now just the VM listener.

@govint
Copy link
Contributor Author

govint commented Jul 24, 2017

Fixes #1621

Copy link
Contributor

@msterin msterin left a comment

Choose a reason for hiding this comment

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

LGTM pending the fix to address my comment (or a reply to it) and CI pass

@@ -1426,7 +1426,7 @@ def disk_detach_int(vmdk_path, vm, device):
logging.warning("%s\n%s", msg, "".join(traceback.format_tb(ex_traceback)))
return err(msg)

setStatusDetached(vmdk_path)
setStatusDetached(vmdk_path, key=None, value=None)
logging.info("Disk detached %s", vmdk_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to pass key and value here as None foe them is already default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, just cut-paste, fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants