Add support for volume driver and options

This commit is contained in:
Mohamed Akram 2021-12-29 18:49:19 +04:00 committed by Muayyad Alsadi
parent 377b5525c9
commit 56a4988481

View File

@ -303,6 +303,12 @@ def assert_volume(compose, mount_dict):
]
for item in norm_as_list(labels):
args.extend(["--label", item])
driver = vol.get("driver")
if driver:
args.extend(["--driver", driver])
driver_opts = vol.get("driver_opts", {})
for opt, value in driver_opts.items():
args.extend(["--opt", "{opt}={value}".format(opt=opt, value=value)])
args.append(vol_name)
compose.podman.output([], "volume", args)
out = compose.podman.output([], "volume", ["inspect", vol_name]).decode('utf-8')