コード例 #1
0
ファイル: nfsSD.py プロジェクト: kanalun/vdsm
    def findDomainPath(sdUUID):
        for tmpSdUUID, domainPath in fileSD.scanDomains("*"):
            if tmpSdUUID == sdUUID and mount.isMounted(
                    os.path.join(domainPath, "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
コード例 #2
0
    def findDomainPath(sdUUID):
        for tmpSdUUID, domainPath in fileSD.scanDomains("*"):
            if tmpSdUUID == sdUUID and mount.isMounted(
                    os.path.join(domainPath, "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
コード例 #3
0
ファイル: glusterSD.py プロジェクト: rexhsu/vdsm-debian
    def findDomainPath(sdUUID):
        glusterDomPath = os.path.join(sd.GLUSTERSD_DIR, "*")
        for tmpSdUUID, domainPath in fileSD.scanDomains(glusterDomPath):
            if tmpSdUUID == sdUUID and mount.isMounted(
                    os.path.join(domainPath, "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
コード例 #4
0
ファイル: glusterSD.py プロジェクト: sshnaidm/vdsm
    def findDomainPath(sdUUID):
        glusterDomPath = os.path.join(sd.GLUSTERSD_DIR, "*")
        for tmpSdUUID, domainPath in fileSD.scanDomains(glusterDomPath):
            if tmpSdUUID == sdUUID and mount.isMounted(os.path.join(domainPath,
                                                       "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
コード例 #5
0
ファイル: nfsSD.py プロジェクト: ekohl/vdsm
    def selftest(self):
        """
        Run internal self test
        """
        if not mount.isMounted(self.mountpoint):
            raise se.StorageDomainFSNotMounted(self.mountpoint)

        # Run general part of selftest
        fileSD.FileStorageDomain.selftest(self)
コード例 #6
0
    def selftest(self):
        """
        Run internal self test
        """
        if not mount.isMounted(self.mountpoint):
            raise se.StorageDomainFSNotMounted(self.mountpoint)

        # Run general part of selftest
        fileSD.FileStorageDomain.selftest(self)
コード例 #7
0
ファイル: nfsSD.py プロジェクト: ekohl/vdsm
    def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg, version):
        # Some trivial resource validation
        if ":" not in typeSpecificArg:
            raise se.StorageDomainIllegalRemotePath(typeSpecificArg)

        sd.validateDomainVersion(version)

        # Make sure the underlying file system is mounted
        if not mount.isMounted(domPath):
            raise se.StorageDomainFSNotMounted(domPath)

        fileSD.validateDirAccess(domPath)

        # Make sure there are no remnants of other domain
        mdpat = os.path.join(domPath, "*", sd.DOMAIN_META_DATA)
        if len(oop.getProcessPool(sdUUID).glob.glob(mdpat)) > 0:
            raise se.StorageDomainNotEmpty(typeSpecificArg)
コード例 #8
0
    def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg,
                             storageType, version):
        # Some trivial resource validation
        # TODO Checking storageType==nfs in the nfs class is not clean
        if storageType == sd.NFS_DOMAIN and ":" not in typeSpecificArg:
            raise se.StorageDomainIllegalRemotePath(typeSpecificArg)

        sd.validateDomainVersion(version)

        # Make sure the underlying file system is mounted
        if not mount.isMounted(domPath):
            raise se.StorageDomainFSNotMounted(domPath)

        fileSD.validateDirAccess(domPath)
        fileSD.validateFileSystemFeatures(sdUUID, domPath)

        # Make sure there are no remnants of other domain
        mdpat = os.path.join(domPath, "*", sd.DOMAIN_META_DATA)
        if len(oop.getProcessPool(sdUUID).glob.glob(mdpat)) > 0:
            raise se.StorageDomainNotEmpty(typeSpecificArg)
コード例 #9
0
ファイル: blockSD.py プロジェクト: humblec/vdsm
 def validateMasterMount(self):
     return mount.isMounted(self.getMasterDir())
コード例 #10
0
ファイル: blockSD.py プロジェクト: oVirtorg/vdsm
 def validateMasterMount(self):
     return mount.isMounted(self.getMasterDir())