wido commented on a change in pull request #3639: Multiple networks support for
vms in advanced zone with security group (and kvm support)
URL: https://github.com/apache/cloudstack/pull/3639#discussion_r339295518
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
##########
@@ -3511,7 +3512,117 @@ public boolean destroyNetworkRulesForVM(final Connect
conn, final String vmName)
return true;
}
- public boolean defaultNetworkRules(final Connect conn, final String
vmName, final NicTO nic, final Long vmId, final String secIpStr) {
+ /**
+ * Function to destroy the security group rules applied to the nic's
+ * @param conn
+ * @param vmName
+ * @param nic
+ * @return
+ * true : If success
+ * false : If failure
+ */
+ public boolean destroyNetworkRulesForNic(final Connect conn, final String
vmName, final NicTO nic) {
+ if (!_canBridgeFirewall) {
+ return false;
+ }
+ final List<String> nicSecIps = nic.getNicSecIps();
+ String secIpsStr;
+ final StringBuilder sb = new StringBuilder();
+ if (nicSecIps != null) {
+ for (final String ip : nicSecIps) {
+ sb.append(ip).append(";");
+ }
+ secIpsStr = sb.toString();
+ } else {
+ secIpsStr = "0;";
Review comment:
I would use that separator here as well
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services