API: use baymodel_ident to update a baymodel

Currently, we can not update a baymodel with baymodel name, this patch fixes
it by passing baymodel_ident instead of using baymodel_uuid.

Closes-Bug: #1516900
Change-Id: Ib372c06762fdb3918f391aefd25c43e6a2a5fca3
This commit is contained in:
Eli Qiao 2015-11-17 17:17:20 +08:00
parent bfce3974c7
commit 4ab97bc403
1 changed files with 2 additions and 2 deletions

View File

@ -131,12 +131,12 @@ class BayModelTest(base.BaseMagnumTest):
bay_model_client.get_baymodel, 'fooo')
@testtools.testcase.attr('negative')
def test_update_baymodel_invalid_uuid(self):
def test_update_baymodel_name_not_found(self):
patch_model = datagen.random_baymodel_name_patch_data()
bay_model_client = cli.BayModelClient.as_user('default')
self.assertRaises(
exceptions.BadRequest,
exceptions.NotFound,
bay_model_client.patch_baymodel, 'fooo', patch_model)
@testtools.testcase.attr('negative')