Search in sources :

Example 1 with NetworkResponse

use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.network.NetworkResponse in project cloudbreak by hortonworks.

the class NetworkToNetworkResponseConverter method convert.

@Override
public NetworkResponse convert(Stack source) {
    NetworkResponse networkResp = null;
    Network network = source.getNetwork();
    if (network != null) {
        networkResp = new NetworkResponse();
        networkResp.setNetworkCidrs(network.getNetworkCidrs());
        networkResp.setOutboundInternetTraffic(network.getOutboundInternetTraffic());
        if (network.getAttributes() != null) {
            Map<String, Object> parameters = cleanMap(network.getAttributes().getMap());
            providerParameterCalculator.parse(parameters, networkResp);
        }
    }
    return networkResp;
}
Also used : Network(com.sequenceiq.freeipa.entity.Network) NetworkResponse(com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.network.NetworkResponse)

Aggregations

NetworkResponse (com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.network.NetworkResponse)1 Network (com.sequenceiq.freeipa.entity.Network)1