Package io.fabric8.utils

Examples of io.fabric8.utils.TablePrinter.columns()


        return tableResults(table);
    }

    protected TablePrinter podsAsTable(PodListSchema pods) {
        TablePrinter table = new TablePrinter();
        table.columns("id", "image(s)", "host", "labels", "status");
        List<PodSchema> items = pods.getItems();
        if (items == null) {
            items = Collections.EMPTY_LIST;
        }
        Filter<PodSchema> filter = KubernetesHelper.createPodFilter(filterText.getValue());
View Full Code Here


        return null;
    }

    private void printReplicationControllers(ReplicationControllerListSchema replicationControllers, PrintStream out) {
        TablePrinter table = new TablePrinter();
        table.columns("id", "labels", "replicas", "replica selector");
        List<ReplicationControllerSchema> items = replicationControllers.getItems();
        if (items == null) {
            items = Collections.EMPTY_LIST;
        }
        Filter<ReplicationControllerSchema> filter = KubernetesHelper.createReplicationControllerFilter(filterText.getValue());
View Full Code Here

        return null;
    }

    private void printServices(ServiceListSchema services, PrintStream out) {
        TablePrinter table = new TablePrinter();
        table.columns("id", "labels", "selector", "port");
        List<ServiceSchema> items = services.getItems();
        if (items == null) {
            items = Collections.EMPTY_LIST;
        }
        Filter<ServiceSchema> filter = KubernetesHelper.createServiceFilter(filterText.getValue());
View Full Code Here

    @Override
    protected Object doExecute() throws Exception {
        IOpenShiftConnection connection = getOrCreateConnection();

        TablePrinter printer = new TablePrinter();
        printer.columns("domain", "application id");

        for (IDomain domain : connection.getDomains()) {
            if (domainId == null || domainId.equals(domain.getId())) {
                String displayDomain = domain.getId();
                domain.refresh();
View Full Code Here

            for (Container container : fabricService.getContainers()) {
                containerIds.add(container.getId());
            }
        }
        TablePrinter table = new TablePrinter();
        table.columns("id", "resolver", "local hostname", "local ip", "public hostname", "public ip", "manual ip");
        for (String containerId : containerIds) {
            Container container = fabricService.getContainer(containerId);
            String localHostName = container.getLocalHostname();
            String localIp = container.getLocalIp();
            String publicHostName = container.getPublicHostname();
View Full Code Here

    @Override
    protected Object doExecute() throws Exception {

        TablePrinter table = new TablePrinter();
        if (verbose) {
            table.columns("groupId", "artifactId", "version", "description");
        } else {
            table.columns("artifactId", "description");
        }

        for (Archetype archetype : archetypeService.listArchetypes()) {
View Full Code Here

        TablePrinter table = new TablePrinter();
        if (verbose) {
            table.columns("groupId", "artifactId", "version", "description");
        } else {
            table.columns("artifactId", "description");
        }

        for (Archetype archetype : archetypeService.listArchetypes()) {
            if (verbose) {
                table.row(archetype.groupId, archetype.artifactId, archetype.version, archetype.description);
View Full Code Here

        return null;
    }

    protected void printVersions(Container[] containers, List<String> versions, String defaultVersionId, PrintStream out) {
        TablePrinter table = new TablePrinter();
        table.columns("version", "default", "# containers", "description");

        // they are sorted in the correct order by default
        for (String versionId : versions) {
            boolean isDefault = versionId.equals(defaultVersionId);
            Version version = profileService.getRequiredVersion(versionId);
View Full Code Here

        return null;
    }

    protected void printStatus(PrintStream out, AutoScaleStatus status) {
        TablePrinter table = new TablePrinter();
        table.columns("auto scale profile", "status", "message");
        List<AutoScaleProfileStatus> profileStatuses = status.getProfileStatuses();
        for (AutoScaleProfileStatus profile : profileStatuses) {
            table.row(getStringOrBlank(profile.getProfile()),
                    getStringOrBlank(profile.getStatus()),
                    getStringOrBlank(profile.getMessage()));
View Full Code Here

                }
            }
        }

        TablePrinter table = new TablePrinter();
        table.columns("cluster", "masters", "slaves", "services");

        for (String clusterName : clusters.keySet()) {
            Map<String, ClusterNode> nodes = clusters.get(clusterName);
            table.row(clusterName, "", "", "", "");
            for (String nodeName : nodes.keySet()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.