Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.TagChanges


    {
      OpsProvider<TagChanges> tagChanges = new OpsProvider<TagChanges>() {
        @Override
        public TagChanges get() {
          TagChanges tagChanges = new TagChanges();

          InetSocketAddress socketAddress = assignPublicAddress.get();
          if (socketAddress == null) {
            return null;
          }
View Full Code Here


    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());
    UntypedItem ret = client.getItemUntyped(key, Format.XML);

    TagChanges tagChanges = new TagChanges();
    for (Tag tag : ret.getTags()) {
      if (!tagKey.equals(tag.getKey())) {
        continue;
      }
View Full Code Here

    {
      OpsProvider<TagChanges> tagChanges = new OpsProvider<TagChanges>() {
        @Override
        public TagChanges get() {
          TagChanges tagChanges = new TagChanges();

          tagChanges.addTags.add(Tag.INSTANCE_KEY.build(model.getKey()));

          AddressModel ipv4 = address4.get();
          AddressModel ipv6 = address6.get();
View Full Code Here

  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey resolved = path.resolve(getContext());

    TagChanges tagChanges = new TagChanges();
    Tag tag = Tag.build(tagKey, tagValue);
    tagChanges.addTags.add(tag);

    return client.changeTags(resolved, tagChanges, null);
  }
View Full Code Here

      }

      Assignment assignment = new Assignment(owner.getUrl(), assignedItem, subkey);
      Tag assignmentTag = assignment.asTag();

      TagChanges tagChanges = new TagChanges();
      tagChanges.addTags.add(assignmentTag);
      if (null != platformLayer.changeTags(resourceKey, tagChanges, resource.getVersion())) {
        return adapter.toItem(assignedItem);
      }
View Full Code Here

        throw new OpsException("Resource not held");
      }

      Tag assignmentTag = assigned.asTag();

      TagChanges tagChanges = new TagChanges();
      tagChanges.removeTags.add(assignmentTag);
      if (null != platformLayer.changeTags(resourceKey, tagChanges, resource.getVersion())) {
        return;
      }
View Full Code Here

      final DirectInstance model = OpsContext.get().getInstance(DirectInstance.class);

      OpsProvider<TagChanges> tagChanges = new OpsProvider<TagChanges>() {
        @Override
        public TagChanges get() {
          TagChanges tagChanges = new TagChanges();

          tagChanges.addTags.add(Tag.INSTANCE_KEY.build(model.getKey()));

          AddressModel ipv4 = address4.get();
          AddressModel ipv6 = address6.get();
View Full Code Here

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

    // Tag the recipe with the image ID
    {
      TagChanges tagChanges = new TagChanges();
      tagChanges.addTags.add(Tag.IMAGE_ID.build(imageId));
      platformLayer.changeTags(image.getKey(), tagChanges);
    }

    // Our pessimism proved unfounded...
View Full Code Here

    {
      OpsProvider<TagChanges> tagChanges = new OpsProvider<TagChanges>() {
        @Override
        public TagChanges get() {
          TagChanges tagChanges = new TagChanges();
          String address = ingress.getPublicAddress();
          if (Strings.isNullOrEmpty(address)) {
            throw new IllegalStateException();
          }
View Full Code Here

      OpsProvider<TagChanges> tagChanges = new OpsProvider<TagChanges>() {
        @Override
        public TagChanges get() {
          OpenstackComputeMachine machine = OpsContext.get().getInstance(OpenstackComputeMachine.class);

          TagChanges tagChanges = new TagChanges();
          tagChanges.addTags.add(Tag.INSTANCE_KEY.build(model.getKey()));
          tagChanges.addTags.addAll(machine.buildAddressTags());

          return tagChanges;
        }
View Full Code Here

TOP

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

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.