use of com.woorea.openstack.nova.model.InterfaceAttachmentForCreate in project AJSC by att.
the class OpenStackComputeService method attachPort.
/**
* @see com.att.cdp.zones.ComputeService#attachPort(com.att.cdp.zones.model.Server, com.att.cdp.zones.model.Port)
*/
@Override
public void attachPort(Server server, Port port) throws ZoneException {
checkArg(server, "server");
checkArg(port, "port");
connect();
trackRequest();
RequestState.put(RequestState.PORT, port.getId());
RequestState.put(RequestState.SERVER, server.getId());
RequestState.put(RequestState.SERVICE, "Compute");
RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
InterfaceAttachmentForCreate iafc = new InterfaceAttachmentForCreate();
iafc.setPortId(port.getId());
try {
nova.getClient().servers().createInterfaceAttachment(server.getId(), iafc).execute();
} catch (OpenStackConnectException | OpenStackResponseException e) {
ExceptionMapper.mapException(e);
}
}
use of com.woorea.openstack.nova.model.InterfaceAttachmentForCreate in project AJSC by att.
the class OpenStackComputeService method attachPort.
/**
* @see com.att.cdp.zones.ComputeService#attachPort(com.att.cdp.zones.model.Server,
* com.att.cdp.zones.model.Port)
*/
@Override
public void attachPort(Server server, Port port) throws ZoneException {
checkArg(server, "server");
checkArg(port, "port");
connect();
trackRequest();
RequestState.put(RequestState.PORT, port.getId());
RequestState.put(RequestState.SERVER, server.getId());
RequestState.put(RequestState.SERVICE, "Compute");
RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
InterfaceAttachmentForCreate iafc = new InterfaceAttachmentForCreate();
iafc.setPortId(port.getId());
try {
nova.getClient().servers().createInterfaceAttachment(server.getId(), iafc).execute();
} catch (OpenStackConnectException | OpenStackResponseException e) {
ExceptionMapper.mapException(e);
}
}
Aggregations