-
Notifications
You must be signed in to change notification settings - Fork 95
Conversation
45e430d
to
d3dd501
Compare
@msterin Did you do any manual tests with the Admin CLI to ensure it all still works as expected? |
@andrewjstone not before you asked. There is nothing really impacted in admin cli, but I did run it now and it all good - at least
Admin CLI:
|
d3dd501
to
fae43b5
Compare
@msterin That seems good enough :) |
def list_vmdks(path): | ||
""" Return a list all VMDKs in a given path """ | ||
try: | ||
files = os.listdir(path) | ||
return [f for f in files | ||
return [f for f in os.listdir(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change :)
LGTM |
fae43b5
to
58da0d2
Compare
Implements the following design - each volume has short name (same as today) and fully qualified name (volume@datastore). - the '@datastore' part can be omitted , and it means "use current VM datastore' - default behavior (when using short names) is exactly as today - no changes - on 'create' , a volume can be created as '--name=volume@datastore' OR as '--name=volume -o datastore=datastore'. The result is the same - 'volume.vmdk' in datastore - if datastore is omitted, 'volume' is create on VMs's datastore and 'volume' is returned to Docker - if datastore is present, 'volume' is created on this store and 'volume@datastore' is returned to Docker - if datastore does not exits, a list of existing ones is returned in error message - 'list' operation shows short names for volumes on current datastore, and fully qualified names for others. E.g $ docker volume ls myVol vmdk myVol@vsanDatastore vmdk someOtherVolume vmdk
for file_name in list_vmdks(path): | ||
volumes.append({'path': path, | ||
'filename': file_name, | ||
'datastore': datastore}) | ||
return volumes | ||
|
||
|
||
def get_vmdk_name(path, vol_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should this be really get_vmdk_path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, fixed
LGTM. |
7bd21c2
to
bdcc12d
Compare
Fixes #288
Design
datastore
$ docker volume ls
myVol vmdk
myVol@vsanDatastore vmdk
someOtherVolume vmdk
Test
It would be too much to do now, so tested it manually (below)
make all
and CIManual test:
Test log: