Skip to content

Commit b3bb9c1

Browse files
author
Victor Mendes Eduardo
committed
Correcoes na criacao/remocao de instancias em redes ipv6
1 parent 622a338 commit b3bb9c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎plugins/network-elements/globonetwork/src/com/globo/globonetwork/cloudstack/resource/GloboNetworkResource.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ public Answer execute(UnregisterEquipmentAndIpInGloboNetworkCommand cmd) {
519519
// Doesn't exist, ignore
520520
s_logger.warn("IP was removed from GloboNetwork before being destroyed in Cloudstack. This is not critical, logging inconsistency: IP " + cmd.getNicIp());
521521
} else {
522-
_globoNetworkApi.getEquipmentAPI().removeIP(equipment.getId(), ip.getId());
522+
_globoNetworkApi.getEquipmentAPI().removeIP(equipment.getId(), ip.getId(), cmd.isv6());
523523
}
524524
}
525525

@@ -921,7 +921,7 @@ private Answer createVipResponse(Vip vip, Command cmd) {
921921

922922
private Answer createResponse(Vlan vlan, Command cmd) {
923923

924-
if (vlan.getIpv4Networks().isEmpty() || vlan.getIpv6Networks().isEmpty()) {
924+
if (vlan.getIpv4Networks().isEmpty() && vlan.getIpv6Networks().isEmpty()) {
925925
// Error code 116 from GloboNetwork: 116 : VlanNaoExisteError,
926926
return new GloboNetworkErrorAnswer(cmd, 116, "No networks in this VLAN");
927927
}

0 commit comments

Comments
 (0)