Merge pull request #220 from ryanpetrello/master

Fetch a new token before router boots (to avoid token expiration issues)
This commit is contained in:
Jeremy Hanmer 2015-03-16 15:37:05 -07:00
commit 885f319027
2 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,8 @@ class Nova(object):
# finally cleaned up.
LOG.debug('creating vm for router %s with image %s',
router.id, router_image_uuid)
self.client.client.unauthenticate()
self.client.client.authenticate()
server = self.client.servers.create(
'ak-' + router.id,
image=router_image_uuid,

View File

@ -92,6 +92,8 @@ class TestNovaWrapper(unittest.TestCase):
]
self.nova.create_router_instance(fake_router, 'GLANCE-IMAGE-123')
self.client.client.unauthenticate.assert_called_once()
self.client.client.authenticate.assert_called_once()
self.client.assert_has_calls(expected)
def test_get_instance(self):