示例#1
0
    def test_allowed_gluster_replica_count(self, replica_count):
        def glusterVolumeInfo(volumeName=None, remoteServer=None):
            return {'music': {'replicaCount': replica_count}}

        storageServer.supervdsm.glusterVolumeInfo = glusterVolumeInfo

        gluster = GlusterFSConnection(spec="192.168.122.1:/music")
        gluster.validate()
示例#2
0
    def test_allowed_gluster_replica_count(self, replica_count):

        def glusterVolumeInfo(volumeName=None, remoteServer=None):
            return {'music': {'replicaCount': replica_count}}

        storageServer.supervdsm.glusterVolumeInfo = glusterVolumeInfo

        gluster = GlusterFSConnection(spec="192.168.122.1:/music")
        gluster.validate()
示例#3
0
    def test_allowed_gluster_replica_count(self, replica_count, supported):

        def glusterVolumeInfo(volumeName=None, remoteServer=None):
            return {'music': {'replicaCount': replica_count}}

        storageServer.supervdsm.glusterVolumeInfo = glusterVolumeInfo

        gluster = GlusterFSConnection(spec="192.168.122.1:/music")
        if supported:
            gluster.validate()
        else:
            self.assertRaises(se.UnsupportedGlusterVolumeReplicaCountError,
                              gluster.validate)
示例#4
0
    def test_validate(self):
        storageServer.supervdsm.glusterVolumeInfo = self.glusterVolumeInfo

        gluster = GlusterFSConnection(spec="192.168.122.1:/music")
        gluster.validate()
示例#5
0
    def test_validate(self):
        storageServer.supervdsm.glusterVolumeInfo = self.glusterVolumeInfo

        gluster = GlusterFSConnection(spec="192.168.122.1:/music")
        gluster.validate()