Package brooklyn.entity.container.docker

Examples of brooklyn.entity.container.docker.DockerInfrastructure


            if (dockerHostId != null) {
                name.append("-").append(dockerHostId);
            }
        }
        final String locationName =  name.toString();
        DockerInfrastructure infrastructure = (DockerInfrastructure) managementContext.getEntityManager().getEntity(infrastructureId);

        if (dockerHostId == null) {
            LocationSpec<DockerLocation> locationSpec = LocationSpec.create(DockerLocation.class)
                    .configure(flags)
                    .configure(DynamicLocation.OWNER, infrastructure)
                    .configure(LocationInternal.NAMED_SPEC_NAME, locationName)
                    .displayName(displayName);
            return managementContext.getLocationManager().createLocation(locationSpec);
        } else {
            DockerHost dockerHost = (DockerHost) managementContext.getEntityManager().getEntity(dockerHostId);

            LocationSpec<DockerHostLocation> locationSpec = LocationSpec.create(DockerHostLocation.class)
                    .parent(infrastructure.getDynamicLocation())
                    .configure(flags)
                    .configure(DynamicLocation.OWNER, dockerHost)
                    .configure(LocationInternal.NAMED_SPEC_NAME, locationName)
                    .displayName(displayName);
            return managementContext.getLocationManager().createLocation(locationSpec);
View Full Code Here

TOP

Related Classes of brooklyn.entity.container.docker.DockerInfrastructure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.