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)
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)