def _get_disk_ids_used(cid): used = [] try: props = JBoxHostDiskVol.dckr().inspect_container(cid) for _cpath, hpath in JBoxVol.extract_mounts(props): if hpath.startswith(JBoxHostDiskVol.FS_LOC): used.append(hpath.split('/')[-1]) except: JBoxHostDiskVol.log_exception("error finding disk ids used in " + cid) return [] return used
def _get_disk_ids_used(cid): used = [] props = JBoxPolsarDiskVol.dckr().inspect_container(cid) try: for _cpath, hpath in JBoxVol.extract_mounts(props): if hpath.startswith(JBoxPolsarDiskVol.FS_LOC): used.append(hpath.split("/")[-1]) except: JBoxPolsarDiskVol.log_error("error finding polsar disk ids used in " + cid) return [] return used
def _get_disk_ids_used(cid): used = [] try: props = JBoxLoopbackVol.dckr().inspect_container(cid) for _cpath, hpath in JBoxVol.extract_mounts(props): if hpath.startswith(JBoxLoopbackVol.FS_LOC): used.append(int(hpath.split('/')[-1])) except: JBoxLoopbackVol.log_error("error finding disk ids used in " + cid) return [] return used
def _get_package_mounts_used(cid): used = [] props = JBoxDefaultPackagesVol.dckr().inspect_container(cid) try: for _cpath, hpath in JBoxVol.extract_mounts(props): if hpath.startswith(JBoxDefaultPackagesVol.FS_LOC): used.append(hpath.split('/')[-1]) except: JBoxDefaultPackagesVol.log_error("error finding package mount points used in " + cid) return [] return used