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

Allow for a null VC uuid for a VM to allow the plugin to be used on standalone hosts. #1997

Merged
merged 4 commits into from
Nov 27, 2017

Conversation

govint
Copy link
Contributor

@govint govint commented Nov 21, 2017

Modified ESX service to allow vc uuid to be zero length string in cases where user has a standalone ESX host with no VC.

Test:

docker volume create -d vsphere vc_vol_1
vc_vol_1
docker volume inspect vc_vol_1
[
{
"Driver": "vsphere",
"Labels": {},
"Mountpoint": "/mnt/vmdk/vc_vol_1/",
"Name": "vc_vol_1",
"Options": {},
"Scope": "global",
"Status": {
"access": "read-write",
"attach-as": "independent_persistent",
"capacity": {
"allocated": "13MB",
"size": "100MB"
},
"clone-from": "None",
"created": "Tue Nov 21 13:02:21 2017",
"created by VM": "master-VM0.0",
"datastore": "sharedVmfs-0",
"diskformat": "thin",
"fstype": "ext4",
"status": "detached"
}
}
]

docker run --rm -it -v vc_vol_1:/mnt centos
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
d9aaf4d82f24: Pull complete
Digest: sha256:4565fe2dd7f4770e825d4bd9c761a81b26e49cc9e3c9631c58cfc3188be9505a
Status: Downloaded newer image for centos:latest

exit
docker volume rm vc_vol_1
vc_vol_1

@govint
Copy link
Contributor Author

govint commented Nov 23, 2017

Test failed because of a host issue, will restart the CI.

from vmware.esxcli.Session import Session, SessionOptions, IsInVisor, \

ImportError: No module named esxcli.Session

Copy link
Contributor

@shuklanirdesh82 shuklanirdesh82 left a comment

Choose a reason for hiding this comment

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

LGTM!

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