Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions test/integration/testpaths/testpath_same_vm_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from marvin.lib.common import (get_domain,
get_zone,
get_template,
)
)

from marvin.sshClient import SshClient
import time
Expand All @@ -45,6 +45,7 @@ def setUpClass(cls):
# Get Zone, Domain and templates
cls.domain = get_domain(cls.apiclient)
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
cls.hypervisor = cls.testClient.getHypervisorInfo()

cls.template = get_template(
cls.apiclient,
Expand Down Expand Up @@ -82,7 +83,7 @@ def setUpClass(cls):
UserName=cls.account_2.name,
DomainName=cls.account_2.domain
)
# Create Service offering
# Create Service offering
cls.service_offering = ServiceOffering.create(
cls.apiclient,
cls.testdata["service_offering"],
Expand All @@ -103,11 +104,11 @@ def RestartServer(cls):
"""Restart management server"""

sshClient = SshClient(
cls.mgtSvrDetails["mgtSvrIp"],
22,
cls.mgtSvrDetails["user"],
cls.mgtSvrDetails["passwd"]
)
cls.mgtSvrDetails["mgtSvrIp"],
22,
cls.mgtSvrDetails["user"],
cls.mgtSvrDetails["passwd"]
)
command = "service cloudstack-management restart"
sshClient.execute(command)

Expand All @@ -125,7 +126,9 @@ def setUp(self):
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
if self.skiptest:
self.skipTest("This test is to be checked on VMWare only Hence, skip for %s" % self.hypervisor)
self.skipTest(
"This test is to be checked on VMWare only \
Hence, skip for %s" % self.hypervisor)

def tearDown(self):
try:
Expand Down Expand Up @@ -160,8 +163,8 @@ def test_vms_with_same_name(self):
self.RestartServer()
time.sleep(120)

self.testdata["small"]["displayname"]="TestName"
self.testdata["small"]["name"]="TestName"
self.testdata["small"]["displayname"] = "TestName"
self.testdata["small"]["name"] = "TestName"
VirtualMachine.create(
self.userapiclient_1,
self.testdata["small"],
Expand Down