nvazquez commented on a change in pull request #5128:
URL: https://github.com/apache/cloudstack/pull/5128#discussion_r659112454
##########
File path: test/integration/smoke/test_persistent_network.py
##########
@@ -52,6 +52,22 @@ def setUpClass(cls):
cls.testClient = super(TestL2PersistentNetworks,
cls).getClsTestClient()
cls.api_client = cls.testClient.getApiClient()
cls.hypervisor = cls.testClient.getHypervisorInfo()
+
+ isKVM = cls.hypervisor.lower() in ["kvm"]
+ isOVSEnabled = False
+ hostConfig =
cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
+ if isKVM :
+ # Test only if all the hosts use OVS
+ grepCmd = 'grep "network.bridge.type=openvswitch"
/etc/cloudstack/agent/agent.properties'
+ hosts = list_hosts(cls.api_client, type='Routing',
hypervisor='kvm')
+ if len(hosts) > 0 :
+ isOVSEnabled = True
+ for host in hosts :
+ isOVSEnabled = isOVSEnabled or len(SshClient(host.ipaddress,
port=22, user=hostConfig["username"],
Review comment:
Ignore that, I see that `isOvsEnabled` is set to true if there are
hosts. New question: why do we even check for the second part of the OR if the
first part is always true? The for loop may not be needed
--
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]