use of com.cloud.agent.api.guru.ImplementNetworkVspCommand in project cloudstack by apache.
the class NuageVspResourceTest method testImplementNetworkVspCommand.
@Test
public void testImplementNetworkVspCommand() throws Exception {
_resource.configure("NuageVspResource", _hostDetails);
VspNetwork vspNetwork = buildVspNetwork();
VspDhcpDomainOption vspDhcpOptions = buildspDhcpDomainOption();
ImplementNetworkVspCommand cmd = new ImplementNetworkVspCommand(vspNetwork, vspDhcpOptions);
com.cloud.agent.api.Answer implNtwkAns = _resource.executeRequest(cmd);
assertTrue(implNtwkAns.getResult());
verify(_mockNuageVspGuruClient).implement(vspNetwork, vspDhcpOptions);
}
use of com.cloud.agent.api.guru.ImplementNetworkVspCommand in project cloudstack by apache.
the class NuageVspGuestNetworkGuru method implement.
private boolean implement(long physicalNetworkId, VspNetwork vspNetwork, VspDhcpDomainOption vspDhcpDomainOption) {
HostVO nuageVspHost = _nuageVspManager.getNuageVspHost(physicalNetworkId);
ImplementNetworkVspCommand cmd = new ImplementNetworkVspCommand(vspNetwork, vspDhcpDomainOption);
Answer answer = _agentMgr.easySend(nuageVspHost.getId(), cmd);
if (answer == null || !answer.getResult()) {
s_logger.error("ImplementNetworkVspCommand for network " + vspNetwork.getUuid() + " failed on Nuage VSD " + nuageVspHost.getDetail("hostname"));
if ((null != answer) && (null != answer.getDetails())) {
s_logger.error(answer.getDetails());
}
return false;
}
return true;
}
Aggregations