DaanHoogland commented on code in PR #13647:
URL: https://github.com/apache/cloudstack/pull/13647#discussion_r3925895108
##########
test/integration/smoke/test_hostha_kvm.py:
##########
@@ -151,12 +151,27 @@ def getHostHaDisableCmd(self):
return cmd
def configureAndEnableHostHa(self):
- #Adding sleep between configuring and enabling
+ self.setupDummyOOBM()
self.apiclient.configureHAForHost(self.getHostHaConfigCmd())
response = self.apiclient.enableHAForHost(self.getHostHaEnableCmd())
self.assertEqual(response.haenable, True)
+
+ def setupDummyOOBM(self):
+ from apache.cloudstack.api.command.admin.outOfBandManagement import
configureOutOfBandManagementForHost, enableOutOfBandManagementForHost
+ oobm_cmd =
configureOutOfBandManagementForHost.configureOutOfBandManagementForHostCmd()
+ oobm_cmd.hostid = self.host.id
+ oobm_cmd.address = "10.1.1.1"
+ oobm_cmd.driver = "ipmitool"
+ oobm_cmd.username = "admin"
+ oobm_cmd.password = "password"
+ self.apiclient.configureOutOfBandManagementForHost(oobm_cmd)
+
+ enable_oobm_cmd =
enableOutOfBandManagementForHost.enableOutOfBandManagementForHostCmd()
+ enable_oobm_cmd.hostid = self.host.id
+ self.apiclient.enableOutOfBandManagementForHost(enable_oobm_cmd)
Review Comment:
this code is repeated in both test files. maybe we can move it to a utility
or parent clase
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]