예제 #1
0
 def test_volume_allocate_iscsi_target(self):
     host = 'host1'
     volume = db.volume_create(self.ctxt, {'host': host})
     db.iscsi_target_create_safe(self.ctxt, {'host': host,
                                             'target_num': 42})
     target_num = db.volume_allocate_iscsi_target(self.ctxt, volume['id'],
                                                  host)
     self.assertEqual(target_num, 42)
예제 #2
0
 def test_volume_allocate_iscsi_target(self):
     host = "host1"
     volume = db.volume_create(self.ctxt, {"host": host})
     db.iscsi_target_create_safe(self.ctxt, {"host": host, "target_num": 42})
     target_num = db.volume_allocate_iscsi_target(self.ctxt, volume["id"], host)
     self.assertEqual(target_num, 42)