def rio_bound(stack, vname): fullVolName = (f"{stack}/{vname}") state = 'bound' util.wait_for_state(fullVolName, state) inspect = util.rioInspect(fullVolName) return inspect['state']
def rio_bind_workload(stack, vname, wrklname): fullVolName = (f"{stack}/{vname}") fullWklName = (f"{stack}/{wrklname}") util.wait_for_state(fullVolName, "active") util.run(f"rio exec {fullVolName} touch /persistentvolumes/helloworld") cmd = (f"rio run -n {fullWklName} -v data-{vname}-0:/data nginx") util.runwait(cmd, fullWklName) output = util.run(f"rio exec {fullWklName} ls /data") print(f'OUTPUT = {output}') return output