Package io.fabric8.activemq.facade

Examples of io.fabric8.activemq.facade.ConnectionViewFacade


        for (ReplicationControllerSchema item : items) {
            if (filter.matches(item)) {
                String id = item.getId();
                String labels = KubernetesHelper.toLabelsString(item.getLabels());
                Integer replicas = null;
                ControllerDesiredState desiredState = item.getDesiredState();
                ControllerCurrentState currentState = item.getCurrentState();
                String selector = null;
                if (desiredState != null) {
                    selector = KubernetesHelper.toLabelsString(desiredState.getReplicaSelector());
                }
                if (currentState != null) {
                    replicas = currentState.getReplicas();
                }
                table.row(id, labels, toPositiveNonZeroText(replicas), selector);
View Full Code Here


    protected static void listReplicationControllers(Kubernetes kube) {
        System.out.println("Looking up replicationControllers");
        ReplicationControllerListSchema replicationControllers = kube.getReplicationControllers();
        List<ReplicationControllerSchema> items = replicationControllers.getItems();
        for (ReplicationControllerSchema item : items) {
            ControllerDesiredState desiredState = item.getDesiredState();
            if (desiredState != null) {
                System.out.println("ReplicationController " + item.getId() + " labels: " + item.getLabels()
                        + " replicas: " + desiredState.getReplicas() + " replicatorSelector: " + desiredState.getReplicaSelector() + " podTemplate: " + desiredState.getPodTemplate());
            } else {
                System.out.println("ReplicationController " + item.getId() + " labels: " + item.getLabels() + " no desiredState");
            }
        }
        System.out.println();
View Full Code Here

        }
        Filter<PodSchema> filter = KubernetesHelper.createPodFilter(filterText.getValue());
        for (PodSchema item : items) {
            if (filter.matches(item)) {
                String id = item.getId();
                CurrentState currentState = item.getCurrentState();
                String status = "";
                String host = "";
                if (currentState != null) {
                    status = currentState.getStatus();
                    host = currentState.getHost();
                }
                Map<String, String> labelMap = item.getLabels();
                String labels = KubernetesHelper.toLabelsString(labelMap);
                DesiredState desiredState = item.getDesiredState();
                if (desiredState != null) {
View Full Code Here

        System.out.println("Labels: ");
        Map<String, String> labels = podInfo.getLabels();
        for (Map.Entry<String, String> entry : labels.entrySet()) {
            System.out.println(indent + entry.getKey() + " = " + entry.getValue());
        }
        CurrentState currentState = podInfo.getCurrentState();
        if (currentState != null) {
            printValue("Host", currentState.getHost());
            printValue("IP", currentState.getPodIP());
            printValue("Status", currentState.getStatus());
            PodContainerManifest manifest = currentState.getManifest();
        }
        DesiredState desiredState = podInfo.getDesiredState();
        if (desiredState != null) {
            Manifest manifest = desiredState.getManifest();
            if (manifest != null) {
View Full Code Here

                    status = currentState.getStatus();
                    host = currentState.getHost();
                }
                Map<String, String> labelMap = item.getLabels();
                String labels = KubernetesHelper.toLabelsString(labelMap);
                DesiredState desiredState = item.getDesiredState();
                if (desiredState != null) {
                    Manifest manifest = desiredState.getManifest();
                    if (manifest != null) {
                        List<ManifestContainer> containers = manifest.getContainers();
                        for (ManifestContainer container : containers) {
                            String image = container.getImage();
                            table.row(id, image, host, labels, status);
View Full Code Here

            printValue("Host", currentState.getHost());
            printValue("IP", currentState.getPodIP());
            printValue("Status", currentState.getStatus());
            PodContainerManifest manifest = currentState.getManifest();
        }
        DesiredState desiredState = podInfo.getDesiredState();
        if (desiredState != null) {
            Manifest manifest = desiredState.getManifest();
            if (manifest != null) {
                List<ManifestContainer> containers = manifest.getContainers();
                if (notEmpty(containers)) {
                    System.out.println("Containers:");
                    indentCount++;
View Full Code Here

        Map<String, String> labels = new HashMap<>();
        labels.put("fabric8", "true");
        labels.put("container", name);

        pod.setLabels(labels);
        DesiredState desiredState = new DesiredState();
        pod.setDesiredState(desiredState);
        Manifest manifest = new Manifest();
        manifest.setVersion(Manifest.Version.V_1_BETA_1);
        desiredState.setManifest(manifest);

        ManifestContainer manifestContainer = new ManifestContainer();
        manifestContainer.setName(name);
        manifestContainer.setImage(image);
View Full Code Here

        PodListSchema pods = kube.getPods();
        //System.out.println("Got pods: " + pods);
        List<PodSchema> items = pods.getItems();
        for (PodSchema item : items) {
            System.out.println("PodSchema " + item.getId() + " created: " + item.getCreationTimestamp());
            DesiredState desiredState = item.getDesiredState();
            if (desiredState != null) {
                Manifest manifest = desiredState.getManifest();
                if (manifest != null) {
                    List<ManifestContainer> containers = manifest.getContainers();
                    for (ManifestContainer container : containers) {
                        System.out.println("Container " + container.getImage() + " " + container.getCommand() + " ports: " + container.getPorts());
                    }
View Full Code Here

                }
                Map<String, String> labelMap = item.getLabels();
                String labels = KubernetesHelper.toLabelsString(labelMap);
                DesiredState desiredState = item.getDesiredState();
                if (desiredState != null) {
                    Manifest manifest = desiredState.getManifest();
                    if (manifest != null) {
                        List<ManifestContainer> containers = manifest.getContainers();
                        for (ManifestContainer container : containers) {
                            String image = container.getImage();
                            table.row(id, image, host, labels, status);

                            id = "";
View Full Code Here

            printValue("Status", currentState.getStatus());
            PodContainerManifest manifest = currentState.getManifest();
        }
        DesiredState desiredState = podInfo.getDesiredState();
        if (desiredState != null) {
            Manifest manifest = desiredState.getManifest();
            if (manifest != null) {
                List<ManifestContainer> containers = manifest.getContainers();
                if (notEmpty(containers)) {
                    System.out.println("Containers:");
                    indentCount++;
                    for (ManifestContainer container : containers) {
                        printValue("Name", container.getName());
                        printValue("Image", container.getImage());
                        printValue("Working Dir", container.getWorkingDir());
                        printValue("Command", container.getCommand());

                        List<Port> ports = container.getPorts();
                        if (notEmpty(ports)) {
                            println("Ports:");
                            indentCount++;
                            for (Port port : ports) {
                                printValue("Name", port.getName());
                                printValue("Protocol", port.getProtocol());
                                printValue("Host Port", port.getHostPort());
                                printValue("Container Port", port.getContainerPort());
                            }
                            indentCount--;
                        }

                        List<Env> envList = container.getEnv();
                        if (notEmpty(envList)) {
                            println("Environment:");
                            indentCount++;
                            for (Env env : envList) {
                                printValue(env.getName(), env.getValue());
                            }
                            indentCount--;
                        }
                        List<VolumeMount> volumeMounts = container.getVolumeMounts();
                        if (notEmpty(volumeMounts)) {
                            println("Volume Mounts:");
                            indentCount++;
                            for (VolumeMount volumeMount : volumeMounts) {
                                printValue("Name", volumeMount.getName());
                                printValue("Mount Path", volumeMount.getMountPath());
                                printValue("Read Only", volumeMount.getReadOnly());
                            }
                            indentCount--;
                        }
                    }
                }

                Set<Volume> volumes = manifest.getVolumes();
                if (volumes != null) {
                    System.out.println("Volumes: ");
                    for (Volume volume : volumes) {
                        System.out.println(indent + volume.getName());
                    }
View Full Code Here

TOP

Related Classes of io.fabric8.activemq.facade.ConnectionViewFacade

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.