Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.Tag


  @Handler
  public void doOperation() throws OpsException, IOException {
    ItemBase item = ops.getInstance(ItemBase.class);

    Tag parentTag = Tag.buildParentTag(item.getKey());

    PersistentInstance persistentInstanceTemplate = buildPersistentInstanceTemplate();

    persistentInstanceTemplate.getTags().add(parentTag);
View Full Code Here


    for (Object keyObject : properties.keySet()) {
      String key = (String) keyObject;
      // if (key.startsWith(PROPERTY_PREFIX_TAG)) {
      // String tagName = key.substring(PROPERTY_PREFIX_TAG.length());
      String tagName = key;
      Tag tag = Tag.build(tagName, properties.getProperty(key));
      tags.add(tag);
      // }
    }
    return tags;
  }
View Full Code Here

    }
    return matches;
  }

  public static String findUnique(List<Tag> tags, String key) {
    Tag tag = findUniqueTag(tags, key);
    if (tag == null) {
      return null;
    }
    return tag.getValue();
  }
View Full Code Here

  public void handler() throws OpsException {
    PublicEndpointBase endpoint = endpointProvider.get();

    if (OpsContext.isConfigure()) {
      // Create a DNS record
      Tag parentTag = Tag.buildParentTag(endpoint.getKey());

      List<EndpointInfo> endpoints = EndpointInfo.findEndpoints(endpoint.getTags(), destinationPort);
      if (endpoints.isEmpty()) {
        throw new OpsException("Cannot find endpoint for port: " + destinationPort);
      }
View Full Code Here

  }

  @Handler
  public void handler() throws OpsException {
    T itemTemplate = buildItemTemplate();
    Tag uniqueTag = getUniqueTag(itemTemplate);

    if (OpsContext.isConfigure()) {
      try {
        item = platformLayer.putItemByTag(itemTemplate, uniqueTag);
      } catch (PlatformLayerClientException e) {
View Full Code Here

  @Inject
  PlatformLayerCloudHelpers cloudHelpers;

  @Override
  public Machine createInstance(MachineCreationRequest request, PlatformLayerKey parent) throws OpsException {
    Tag uniqueTag = Tag.buildParentTag(parent);

    return cloudHelpers.putInstanceByTag(request, parent, uniqueTag);
  }
View Full Code Here

        if (Strings.isNullOrEmpty(sshKey)) {
          throw new OpsException("Unable to generate SSH key");
        }

        Tag tag = Tag.SSH_KEY.build(sshKey);
        platformlayer.addTag(jenkins.getKey(), tag);
      }

      if (OpsContext.isValidate()) {
        log.error("SSH Key not configured for Jenkins");
View Full Code Here

        SecretProvider secretProvider = SecretProvider.from(auth);

        if (uniqueTagKey != null) {
          boolean fetchTags = true;
          Tag uniqueTag = null;
          for (Tag tag : item.getTags()) {
            if (Objects.equal(tag.getKey(), uniqueTagKey)) {
              uniqueTag = tag;
            }
          }
View Full Code Here

  public ManagedItemCollection<ItemBase> listChildren(@QueryParam("deleted") boolean includeDeleted)
      throws OpsException, RepositoryException {
    boolean fetchTags = true;
    ItemBase item = getManagedItem(fetchTags);

    Tag parentTag = Tag.buildParentTag(item.getKey());
    Filter filter = TagFilter.byTag(parentTag);

    if (!includeDeleted) {
      filter = StateFilter.excludeDeleted(filter);
    }
View Full Code Here

TOP

Related Classes of org.platformlayer.core.model.Tag

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.