示例#1
0
class LibradosTest(TestCase):
    
    def setUp(self):
        self.cluster = Rados(conffile = CONFFILE, conf = dict (keyring = KEYRING))
           
    def tearDown(self):
        pass
    
    def test_connect(self):
        self.cluster.connect()
        
    def test_get_stats(self):
        cluster_stats = self.cluster.get_cluster_stats()
        for key, value in cluster_stats.iteritems():
            print (key, value)
            
    def test_osd_command(self, osdid=OSDID, cmd=CMD, inbuf=INBUF, timeout=0):
        ret = self.cluster.osd_command(self, osdid, cmd, inbuf, timeout)
        print (ret)
示例#2
0
 def setUp(self):
     self.cluster = Rados(conffile = CONFFILE, conf = dict (keyring = KEYRING))