Merge "fix physical id should not be 'UNKNOWN'"

This commit is contained in:
Jenkins 2017-08-17 05:13:08 +00:00 committed by Gerrit Code Review
commit 4c8c6647a3
2 changed files with 3 additions and 2 deletions

View File

@ -849,7 +849,7 @@ class ServerProfile(base.Profile):
kwargs['scheduler_hints'] = hints
server = None
resource_id = 'UNKNOWN'
resource_id = None
try:
server = self.compute(obj).server_create(**kwargs)
self.compute(obj).wait_for_server(server.id)

View File

@ -491,7 +491,7 @@ class TestNovaServerBasic(base.SenlinTestCase):
cc.wait_for_server.side_effect = err
ex = self.assertRaises(exc.EResourceCreation, profile.do_create,
node_obj)
self.assertEqual('FAKE_ID', ex.resource_id)
self.assertEqual('Failed in creating server: TIMEOUT.',
six.text_type(ex))
cc.wait_for_server.assert_called_once_with('FAKE_ID')
@ -522,6 +522,7 @@ class TestNovaServerBasic(base.SenlinTestCase):
# assertions
self.assertEqual('Failed in creating server: creation failed.',
six.text_type(ex))
self.assertIsNone(ex.resource_id)
self.assertEqual(0, cc.wait_for_server.call_count)
self.assertEqual(0, mock_zone_info.call_count)