Use helper method to migrate router vm

This commit is contained in:
Miguel Ferreira 2015-12-24 11:10:18 +01:00 committed by nvazquez
parent 3dba689f31
commit f804c9756d
1 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,8 @@ from marvin.lib.common import (
get_template,
list_routers,
list_hosts,
findSuitableHostForMigration
findSuitableHostForMigration,
migrate_router
)
from nose.plugins.attrib import attr
from marvin.codes import (FAILED, PASS)
@ -408,8 +409,8 @@ class TestNiciraContoller(cloudstackTestCase):
self.logger.debug("Master Router VM is on the same host as VM")
host = findSuitableHostForMigration(self.api_client, router.id)
if host is not None:
router.migrate(self.api_client, host)
self.logger.debug("Migrated Master Router VM to host %s" % host)
migrate_router(self.api_client, router.id, host.id)
self.logger.debug("Migrated Master Router VM to host %s" % host.name)
else:
self.fail('No suitable host to migrate Master Router VM to')
else: