use of com.cloud.agent.api.manager.EntityExistsCommand in project cloudstack by apache.
the class CommandsTest method testCommandEquals.
@Test
public void testCommandEquals() throws IllegalAccessException, InvocationTargetException, InstantiationException {
addCommandEqualityGroup(ApplyAclRuleVspCommand.class);
addCommandEqualityGroup(ImplementVspCommand.class);
addCommandEqualityGroup(ApplyStaticNatVspCommand.class);
addCommandEqualityGroup(ShutDownVpcVspCommand.class);
addCommandEqualityGroup(DeallocateVmVspCommand.class);
addCommandEqualityGroup(ImplementNetworkVspCommand.class);
addCommandEqualityGroup(ReserveVmInterfaceVspCommand.class);
addCommandEqualityGroup(TrashNetworkVspCommand.class);
addCommandEqualityGroup(SyncDomainCommand.class);
addCommandEqualityGroup(SyncNuageVspCmsIdCommand.class);
addCommandEqualityGroup(PingNuageVspCommand.class);
SupportedApiVersionCommand supportedApiVersionCommandA = new SupportedApiVersionCommand("3.2");
SupportedApiVersionCommand supportedApiVersionCommandB = new SupportedApiVersionCommand("3.2");
EntityExistsCommand entityExistsCommandA = new EntityExistsCommand(Command.class, "uuid");
EntityExistsCommand entityExistsCommandB = new EntityExistsCommand(Command.class, "uuid");
tester.addEqualityGroup(supportedApiVersionCommandA, supportedApiVersionCommandB).addEqualityGroup(entityExistsCommandA, entityExistsCommandB).testEquals();
}
use of com.cloud.agent.api.manager.EntityExistsCommand in project cloudstack by apache.
the class CommandsTest method testCommandGsonEquals.
@Test
public void testCommandGsonEquals() throws IllegalAccessException, InvocationTargetException, InstantiationException {
addCommandGsonEqualityGroup(ApplyAclRuleVspCommand.class);
addCommandGsonEqualityGroup(ImplementVspCommand.class);
addCommandGsonEqualityGroup(ApplyStaticNatVspCommand.class);
addCommandGsonEqualityGroup(ShutDownVpcVspCommand.class);
addCommandGsonEqualityGroup(DeallocateVmVspCommand.class);
addCommandGsonEqualityGroup(ImplementNetworkVspCommand.class);
addCommandGsonEqualityGroup(ReserveVmInterfaceVspCommand.class);
addCommandGsonEqualityGroup(TrashNetworkVspCommand.class);
addCommandGsonEqualityGroup(new SupportedApiVersionCommand("3.2"));
addCommandGsonEqualityGroup(SyncDomainCommand.class);
addCommandGsonEqualityGroup(SyncNuageVspCmsIdCommand.class);
addCommandGsonEqualityGroup(PingNuageVspCommand.class);
addCommandGsonEqualityGroup(new EntityExistsCommand(Command.class, "uuid"));
tester.testEquals();
}
use of com.cloud.agent.api.manager.EntityExistsCommand in project cloudstack by apache.
the class NuageVspManagerImpl method updateNuageUnderlayVlanIpRange.
@Override
public boolean updateNuageUnderlayVlanIpRange(long vlanIpRangeId, boolean enabled) {
VlanVO staticNatVlan = _vlanDao.findById(vlanIpRangeId);
HostVO nuageVspHost = getNuageVspHost(staticNatVlan.getPhysicalNetworkId());
EntityExistsCommand<Vlan> cmd = new EntityExistsCommand<Vlan>(Vlan.class, staticNatVlan.getUuid());
Answer answer = _agentMgr.easySend(nuageVspHost.getId(), cmd);
if (answer != null && !answer.getResult()) {
_vlanDetailsDao.addDetail(staticNatVlan.getId(), NuageVspManager.nuageUnderlayVlanIpRangeDetailKey, String.valueOf(enabled), false);
return true;
}
return false;
}
Aggregations