2828from marvin .lib .common import (get_domain ,
2929 get_zone ,
3030 get_template ,
31- )
31+ )
3232
3333from marvin .sshClient import SshClient
3434import time
@@ -45,6 +45,7 @@ def setUpClass(cls):
4545 # Get Zone, Domain and templates
4646 cls .domain = get_domain (cls .apiclient )
4747 cls .zone = get_zone (cls .apiclient , testClient .getZoneForTests ())
48+ cls .hypervisor = cls .testClient .getHypervisorInfo ()
4849
4950 cls .template = get_template (
5051 cls .apiclient ,
@@ -82,7 +83,7 @@ def setUpClass(cls):
8283 UserName = cls .account_2 .name ,
8384 DomainName = cls .account_2 .domain
8485 )
85- # Create Service offering
86+ # Create Service offering
8687 cls .service_offering = ServiceOffering .create (
8788 cls .apiclient ,
8889 cls .testdata ["service_offering" ],
@@ -103,11 +104,11 @@ def RestartServer(cls):
103104 """Restart management server"""
104105
105106 sshClient = SshClient (
106- cls .mgtSvrDetails ["mgtSvrIp" ],
107- 22 ,
108- cls .mgtSvrDetails ["user" ],
109- cls .mgtSvrDetails ["passwd" ]
110- )
107+ cls .mgtSvrDetails ["mgtSvrIp" ],
108+ 22 ,
109+ cls .mgtSvrDetails ["user" ],
110+ cls .mgtSvrDetails ["passwd" ]
111+ )
111112 command = "service cloudstack-management restart"
112113 sshClient .execute (command )
113114
@@ -125,7 +126,9 @@ def setUp(self):
125126 self .dbclient = self .testClient .getDbConnection ()
126127 self .cleanup = []
127128 if self .skiptest :
128- self .skipTest ("This test is to be checked on VMWare only Hence, skip for %s" % self .hypervisor )
129+ self .skipTest (
130+ "This test is to be checked on VMWare only \
131+ Hence, skip for %s" % self .hypervisor )
129132
130133 def tearDown (self ):
131134 try :
@@ -160,8 +163,8 @@ def test_vms_with_same_name(self):
160163 self .RestartServer ()
161164 time .sleep (120 )
162165
163- self .testdata ["small" ]["displayname" ]= "TestName"
164- self .testdata ["small" ]["name" ]= "TestName"
166+ self .testdata ["small" ]["displayname" ] = "TestName"
167+ self .testdata ["small" ]["name" ] = "TestName"
165168 VirtualMachine .create (
166169 self .userapiclient_1 ,
167170 self .testdata ["small" ],
0 commit comments