mirror of https://github.com/apache/cloudstack.git
Fix build
This commit is contained in:
parent
012dd032e7
commit
2187fdde4c
|
|
@ -388,7 +388,7 @@ public class NsxResource implements ServerResource {
|
|||
String service = privatePort.contains("-") ? nsxApiClient.getServicePath(ruleName, privatePort, cmd.getProtocol(), null, null) :
|
||||
nsxApiClient.getNsxInfraServices(ruleName, privatePort, cmd.getProtocol(), null, null);
|
||||
if (nsxApiClient.doesPfRuleExist(ruleName, tier1GatewayName)) {
|
||||
LOGGER.debug(String.format("Port forward rule for port: %s exits on NSX, not adding it again", privatePort));
|
||||
logger.debug(String.format("Port forward rule for port: %s exits on NSX, not adding it again", privatePort));
|
||||
return new NsxAnswer(cmd, true, null);
|
||||
}
|
||||
nsxApiClient.createPortForwardingRule(ruleName, tier1GatewayName, cmd.getNetworkResourceName(), cmd.getPublicIp(),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ import org.junit.Test;
|
|||
import org.mockito.ArgumentMatchers;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Matchers;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
|
@ -102,7 +101,7 @@ public class NetworkModelImplTest {
|
|||
DataCenter zone = Mockito.mock(DataCenter.class);
|
||||
VpcVO vpc = Mockito.mock(VpcVO.class);
|
||||
Mockito.when(network.getVpcId()).thenReturn(1L);
|
||||
Mockito.doReturn(vpc).when(vpcDao).findById(Matchers.anyLong());
|
||||
Mockito.doReturn(vpc).when(vpcDao).findById(ArgumentMatchers.anyLong());
|
||||
// network, vpc and zone have valid dns
|
||||
prepareMocks(isIp6, network, zone, vpc, dns1[0], dns1[1], dns2[0], dns2[1], dns1[2], dns2[2]);
|
||||
Pair<String, String> result = isIp6 ? networkModel.getNetworkIp6Dns(network, zone) :
|
||||
|
|
|
|||
Loading…
Reference in New Issue