Beispiel #1
0
 def get_disk_from_container(cid):
     props = JBoxVol.dckr().inspect_container(cid)
     vols = props['Volumes']
     for _cpath, hpath in vols.iteritems():
         if hpath.startswith(JBoxLoopbackVol.FS_LOC):
             return JBoxLoopbackVol.get_disk_from_container(cid)
         elif VolMgr.HAS_EBS and hpath.startswith(JBoxEBSVol.FS_LOC):
             return JBoxEBSVol.get_disk_from_container(cid)
     return None
Beispiel #2
0
 def get_disk_from_container(cid):
     props = JBoxVol.dckr().inspect_container(cid)
     vols = props['Volumes']
     for _cpath, hpath in vols.iteritems():
         if hpath.startswith(JBoxLoopbackVol.FS_LOC):
             return JBoxLoopbackVol.get_disk_from_container(cid)
         elif VolMgr.HAS_EBS and hpath.startswith(JBoxEBSVol.FS_LOC):
             return JBoxEBSVol.get_disk_from_container(cid)
     return None
Beispiel #3
0
    def get_disk_from_container(cid):
        props = JBoxVol.dckr().inspect_container(cid)
        try:
            vols = props['Volumes']
            for _cpath, hpath in vols.iteritems():
                if hpath.startswith(JBoxLoopbackVol.FS_LOC):
                    return JBoxLoopbackVol.get_disk_from_container(cid)
                elif VolMgr.HAS_EBS and hpath.startswith(JBoxEBSVol.FS_LOC):
                    return JBoxEBSVol.get_disk_from_container(cid)
        except:
            VolMgr.log_error("error finding disk ids used in " + cid)

        return None
Beispiel #4
0
    def get_disk_from_container(cid):
        props = JBoxVol.dckr().inspect_container(cid)
        try:
            vols = props['Volumes']
            for _cpath, hpath in vols.iteritems():
                if hpath.startswith(JBoxLoopbackVol.FS_LOC):
                    return JBoxLoopbackVol.get_disk_from_container(cid)
                elif VolMgr.HAS_EBS and hpath.startswith(JBoxEBSVol.FS_LOC):
                    return JBoxEBSVol.get_disk_from_container(cid)
        except:
            VolMgr.log_error("error finding disk ids used in " + cid)

        return None