Examples of Tags


Examples of org.platformlayer.core.model.Tags

      }

      tagChanges.removeTags.add(tag);
    }

    Tags newTags = client.changeTags(key, tagChanges, null);
    return newTags;
  }
View Full Code Here

Examples of org.platformlayer.core.model.Tags

    return client.changeTags(resolved, tagChanges, null);
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Tags tags = (Tags) o;
    for (Tag tag : tags.tags) {
      writer.println(tag.getKey() + "\t" + tag.getValue());
    }
  }
View Full Code Here

Examples of org.platformlayer.core.model.Tags

    if (!instanceTypes.contains(rootElementInfo.elementName)) {
      consider = false;
    }

    if (consider) {
      Tags itemTags = untypedItem.getTags();

      for (InetAddress address : Tag.NETWORK_ADDRESS.find(itemTags)) {
        found.add(address);
      }
    }
View Full Code Here

Examples of org.platformlayer.core.model.Tags

      byte[] data = serialize(item, itemSecret);
      byte[] secretData = itemSecrets.encodeItemSecret(itemSecret);

      int itemId = db.insertItem(item, data, secretData);

      Tags tags = item.tags;
      if (tags != null && !tags.isEmpty()) {
        db.insertTags(itemId, tags);
      }

      return item;
    } catch (SQLException e) {
View Full Code Here

Examples of org.platformlayer.core.model.Tags

      if (ifVersion != null) {
        log.warn("CAS version swapping not implemented");
      }

      Tags tags = new Tags();
      mapToTags(db.listTagsForItem(itemId), tags);

      if (changeTags.addTags != null) {
        for (Tag addTag : changeTags.addTags) {
          if (tags.hasTag(addTag)) {
            continue;
          }
          db.insertTag(itemId, addTag);
          tags.add(addTag);
        }
      }

      if (changeTags.removeTags != null) {
        for (Tag removeTag : changeTags.removeTags) {
          boolean removed = tags.remove(removeTag);
          if (!removed) {
            continue;
          }
          db.removeTag(itemId, removeTag);
        }
View Full Code Here

Examples of org.platformlayer.core.model.Tags

    // }

    values.put("key", Utils.formatUrl(context, item.getKey()));
    values.put("state", item.getState());

    Tags tags = item.getTags();
    values.put("tags", tagsToString(context, tags));

    NodeList childNodes = dataElement.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
      Node node = childNodes.item(i);
View Full Code Here

Examples of org.platformlayer.core.model.Tags

    String imageId;

    // Upload & tag the image with the recipe ID
    {
      Tags tags = new Tags();
      tags.add(Tag.buildParentTag(recipe.getKey()));
      tags.add(imageFormat.toTag());

      imageId = cloud.getImageStore(targetCloud).uploadImage(target, tags, uploadImageFile, imageInfo.size);
    }

    // Tag the recipe with the image ID
View Full Code Here

Examples of org.platformlayer.core.model.Tags

  @Inject
  OpenstackCloudHelpers openstackHelpers;

  @Handler
  public void doOperation() throws OpsException, IOException {
    Tags instanceTags = instance.getTags();

    OpenstackCloud cloud = findCloud();
    if (cloud == null) {
      throw new OpsException("Could not find cloud");
    }
    OpenstackComputeClient computeClient = openstack.getComputeClient(cloud);

    getRecursionState().pushChildScope(cloud);

    List<String> assignedInstanceIds = instanceTags.findAll(Tag.ASSIGNED);
    if (assignedInstanceIds.isEmpty()) {
      if (createInstance && !OpsContext.isDelete()) {
        MachineCreationRequest request = buildMachineCreationRequest();

        PlatformLayerKey instanceKey = instance.getKey();
View Full Code Here

Examples of org.platformlayer.core.model.Tags

    // request.securityGroups;
    request.hostPolicy = instance.hostPolicy;
    request.hostname = instance.hostname;
    request.publicPorts = instance.publicPorts;

    Tags tags = new Tags();
    request.tags = tags;
    return request;
  }
View Full Code Here

Examples of org.platformlayer.core.model.Tags

  }

  public Tags changeTags(ServiceType serviceType, ItemType itemType, ManagedItemId id, TagChanges tagChanges)
      throws PlatformLayerClientException {
    String url = buildRelativePath(serviceType, itemType, id) + "/tags";
    Tags retval = doRequest(HttpMethod.POST, url, Tags.class, Format.XML, tagChanges, Format.XML);
    return retval;
  }
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.