Package io.fabric8.api

Examples of io.fabric8.api.Container


        dataStore.setContainerAttribute(containerName, DataStore.ContainerAttribute.PortMin, String.valueOf(minimumPort));
        dataStore.setContainerAttribute(containerName, DataStore.ContainerAttribute.PortMax, String.valueOf(maximumPort));
        inheritAddresses(fabricService.get(), parent.getId(), containerName, options);

        //We are creating a container instance, just for the needs of port registration.
        Container child = new ContainerImpl(parent, containerName, fabricService.get()) {
            @Override
            public String getIp() {
                return parent.getIp();
            }
        };
View Full Code Here


                    Thread.sleep(1000);
                }

                System.err.println(CommandSupport.executeCommand("ssh:ssh -l karaf -P karaf -p " + adminService.getInstance("smoke.childD").getSshPort() + " localhost " + joinCommand));
                ProvisionSupport.containersExist(Arrays.asList("smoke.childD"), ProvisionSupport.PROVISION_TIMEOUT);
                Container childD = fabricService.getContainer("smoke.childD");
                System.err.println(CommandSupport.executeCommand("fabric:container-list"));
                ProvisionSupport.containerStatus(Arrays.asList(childD), "success", ProvisionSupport.PROVISION_TIMEOUT);
                System.err.println(CommandSupport.executeCommand("fabric:container-list"));
            } finally {
                System.err.println(CommandSupport.executeCommand("admin:stop smoke.childD"));
View Full Code Here

                rc.setClientConnected(false);
            }

            if (rc.isClientValid() && rc.isClientConnected()) {

                Container c = fabricService.getCurrentContainer();

                try {
                    rc.setManaged(c.isManaged());
                } catch (Throwable t) {

                }
                try {
                    rc.setProvisionComplete(c.isProvisioningComplete());
                } catch (Throwable t) {

                }
            }
View Full Code Here

        return getContainer(name, BeanUtils.getFields(Container.class));
    }

    @Override
    public Map<String, Object> getContainer(String name, List<String> fields) {
        Container c = fabricService.getContainer(name);
        return BeanUtils.convertContainerToMap(fabricService, c, fields);
    }
View Full Code Here

        return BeanUtils.convertContainerToMap(fabricService, c, fields);
    }

    @Override
    public List<String> getContainerProvisionList(String name) {
        Container container = fabricService.getContainer(name);
        if (container != null) {
            return new ArrayList<String>();
        }
        throw new IllegalStateException(String.format("Container %s not found.", name));
    }
View Full Code Here

        }
    }

    @Override
    public void addProfilesToContainer(String container, List<String> profiles) {
        Container cont = fabricService.getContainer(container);
        cont.addProfiles(stringsToProfiles(cont.getVersion(), profiles));
    }
View Full Code Here

        cont.addProfiles(stringsToProfiles(cont.getVersion(), profiles));
    }

    @Override
    public void removeProfilesFromContainer(String container, List<String> profileIds) {
        Container cont = fabricService.getContainer(container);
        cont.removeProfiles(profileIds.toArray(new String[profileIds.size()]));
    }
View Full Code Here

        }
        return answer;
    }

    private CreateContainerMetadata<?> getContainerMetaData(String id) {
        Container container = fabricService.getContainer(id);
        return container.getMetadata();
    }
View Full Code Here

        return answer;
    }

    @Override
    public void setContainerProperty(String containerId, String property, Object value) {
        Container container = fabricService.getContainer(containerId);
        BeanUtils.setValue(container, property, value);
    }
View Full Code Here

     */
    @Override
    public Map<String, String> currentContainerConfigurationFiles() {
        String containerName = getCurrentContainerName();
        FabricServiceImpl service = fabricService;
        Container container = service.getContainer(containerName);
        if (container != null) {
            Profile[] profiles = container.getProfiles();
            return Profiles.getConfigurationFileNameMap(profiles);
        }
        return new HashMap<String, String>();
    }
View Full Code Here

TOP

Related Classes of io.fabric8.api.Container

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.