Examples of PodListSchema


Examples of io.fabric8.kubernetes.api.model.PodListSchema

    }

    @Override
    public Result execute(UIExecutionContext uiExecutionContext) throws Exception {
        Kubernetes kubernetes = getKubernetes();
        PodListSchema pods = kubernetes.getPods();
        KubernetesHelper.removeEmptyPods(pods);
        TablePrinter table = podsAsTable(pods);
        return tableResults(table);
    }
View Full Code Here

Examples of io.fabric8.kubernetes.api.model.PodListSchema

        // populate autocompletion options
        podId.setCompleter(new UICompleter<String>() {
            @Override
            public Iterable<String> getCompletionProposals(UIContext context, InputComponent<?, String> input, String value) {
                List<String> list = new ArrayList<String>();
                PodListSchema pods = getKubernetes().getPods();
                if (pods != null) {
                    List<PodSchema> items = pods.getItems();
                    if (items != null) {
                        for (PodSchema item : items) {
                            String id = item.getId();
                            list.add(id);
                        }
View Full Code Here

Examples of io.fabric8.kubernetes.api.model.PodListSchema

    PodSchema pod1 = new PodSchema();
    pod1.setId("test1");
   
    PodSchema pod2 = new PodSchema();
   
    PodListSchema podSchema = new PodListSchema();
    podSchema.getItems().add(pod1);
    podSchema.getItems().add(pod2);
   
    KubernetesHelper.removeEmptyPods(podSchema);
   
    assertNotNull(podSchema);
    assertEquals(1, podSchema.getItems().size());
  }
View Full Code Here

Examples of io.fabric8.kubernetes.api.model.PodListSchema

        System.out.println();
    }

    protected static void listPods(Kubernetes kube) {
        System.out.println("Looking up pods");
        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();
View Full Code Here

Examples of io.fabric8.kubernetes.api.model.PodListSchema

    public int complete(String buffer, int cursor, List<String> candidates) {
        StringsCompleter delegate = new StringsCompleter();
        try {
            Kubernetes kubernetes = kubernetesService.getKubernetes();
            if (kubernetes != null) {
                PodListSchema pods = kubernetes.getPods();
                if (pods != null) {
                    List<PodSchema> items = pods.getItems();
                    if (items != null) {
                        for (PodSchema item : items) {
                            String id = item.getId();
                            delegate.getStrings().add(id);
                        }
View Full Code Here

Examples of io.fabric8.kubernetes.api.model.PodListSchema

    @Override
    protected Object doExecute() throws Exception {
        Kubernetes kubernetes = kubernetesService.getKubernetes();
        Objects.notNull(kubernetes, "kubernetes");

        PodListSchema pods = kubernetes.getPods();
        KubernetesHelper.removeEmptyPods(pods);
        printContainers(pods, System.out);
       
        return null;
    }
View Full Code Here

Examples of io.fabric8.kubernetes.api.model.PodListSchema

        return getPodMap(kubernetes, null);
    }


    public static Map<String, PodSchema> getPodMap(Kubernetes kubernetes, String selector) {
        PodListSchema podSchema = kubernetes.getPods();
        return toPodMap(podSchema, selector);
    }
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.