Search in sources :

Example 1 with DirectPublicEndpoint

use of org.platformlayer.service.cloud.direct.model.DirectPublicEndpoint in project platformlayer by platformlayer.

the class DirectPublicEndpointController method addChildren.

@Override
protected void addChildren() throws OpsException {
    DirectPublicEndpoint model = OpsContext.get().getInstance(DirectPublicEndpoint.class);
    DirectInstance directInstance = platformLayerClient.getItem(model.instance, DirectInstance.class);
    {
        DirectPublicPorts publicPorts = injected(DirectPublicPorts.class);
        publicPorts.backendItem = directInstance;
        publicPorts.tagItems.add(directInstance);
        publicPorts.tagItems.add(model);
        publicPorts.uuid = platformLayerClient.getOrCreateUuid(model).toString();
        publicPorts.backendPort = model.backendPort;
        publicPorts.publicPort = model.publicPort;
        publicPorts.publicPortCluster = model.publicPortCluster;
        if (model.transport != null) {
            publicPorts.transport = EnumUtils.valueOfCaseInsensitive(Transport.class, model.transport);
        }
        addChild(publicPorts);
    }
}
Also used : DirectPublicEndpoint(org.platformlayer.service.cloud.direct.model.DirectPublicEndpoint) DirectInstance(org.platformlayer.service.cloud.direct.model.DirectInstance)

Aggregations

DirectInstance (org.platformlayer.service.cloud.direct.model.DirectInstance)1 DirectPublicEndpoint (org.platformlayer.service.cloud.direct.model.DirectPublicEndpoint)1