@@ -0,0 +1,2463 @@
+/**%0A * Copyright (C) 2015 Red Hat, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage io.fabric8.openshift.examples;%0A%0Aimport io.fabric8.kubernetes.client.DefaultKubernetesClient;%0Aimport io.fabric8.kubernetes.client.KubernetesClient;%0Aimport io.fabric8.openshift.api.model.ProjectRequest;%0Aimport io.fabric8.openshift.api.model.ProjectRequestBuilder;%0Aimport io.fabric8.openshift.client.OpenShiftClient;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class ImageStreamTagExample %7B%0A  private static final Logger logger = LoggerFactory.getLogger(ImageStreamTagExample.class);%0A%0A  public static void main(String%5B%5D args) throws InterruptedException %7B%0A    KubernetesClient kubernetesClient = new DefaultKubernetesClient();%0A    OpenShiftClient client = kubernetesClient.adapt(OpenShiftClient.class);%0A%0A    try %7B%0A      // Create a namespace for all our stuff%0A      ProjectRequest proj = new ProjectRequestBuilder().withNewMetadata().withName(%22thisisatest%22).addToLabels(%22this%22, %22rocks%22).endMetadata().build();%0A      log(%22Created project%22, client.projectrequests().create(proj));%0A%0A      /* ---%0AapiVersion: %22v1%22%0Akind: %22ImageStreamTag%22%0Ametadata:%0A  name: %22bar1:1.0.12%22%0Atag:%0A  from:%0A    kind: %22ImageStreamImage%22%0A    name: %22bar1@sha256:1e924a1281084eea8e882d1bd96ee020cd077b48d71fea201de85f8ab3f67874%22%0A    namespace: %22default%22%0A  name: %221.0.12%22%0A  */%0A%0A      log(%22Created istag%22, client.imageStreamTags().createNew()%0A        .withNewMetadata().withName(%22bar1:1.0.12%22)%0A        .and()%0A        .withNewTag().withNewFrom().withKind(%22DockerImage%22).withName(%22openshift/wildfly-81-centos7:latest%22)%0A        .and()%0A        .and()%0A        .done()%0A      );%0A    %7Dfinally %7B%0A      kubernetesClient.namespaces().withName(%22thisisatest%22).delete();%0A      client.close();%0A    %7D%0A  %7D%0A%0A%0A  private static void log(String action, Object obj) %7B%0A    logger.info(%22%7B%7D: %7B%7D%22, action, obj);%0A  %7D%0A%0A  private static void log(String action) %7B%0A    logger.info(action);%0A  %7D%0A%7D%0A

Add ImageStreamTag example