Examples of metadata()


Examples of org.jclouds.googlecomputeengine.domain.InstanceTemplate.metadata()

      }

      LoginCredentials credentials = getFromImageAndOverrideIfRequired(template.getImage(), options);

      ImmutableMap.Builder<String, String> metadataBuilder = metatadaFromTemplateOptions.apply(options);
      instanceTemplate.metadata(metadataBuilder.build());
      instanceTemplate.tags(options.getTags());
      instanceTemplate.serviceAccounts(options.getServiceAccounts());
      instanceTemplate.image(checkNotNull(template.getImage().getUri(), "image URI is null"));

      Operation operation = api.getInstanceApiForProject(userProject.get())
View Full Code Here

Examples of org.jclouds.joyent.cloudapi.v6_5.options.CreateMachineOptions.metadata()

      LoginCredentials.Builder credentialsBuilder = LoginCredentials.builder();

      CreateMachineOptions options = new CreateMachineOptions();
      options.name(name);
      options.packageName(template.getHardware().getProviderId());
      options.metadata(metadataAndTagsAsCommaDelimitedValue(template.getOptions()));

      String datacenterId = template.getLocation().getId();
      String datasetURN = template.getImage().getProviderId();

      logger.debug(">> creating new machine datacenter(%s) datasetURN(%s) options(%s)", datacenterId, datasetURN,
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.options.CreateServerOptions.metadata()

      LoginCredentials.Builder credentialsBuilder = LoginCredentials.builder();
      NovaTemplateOptions templateOptions = template.getOptions().as(NovaTemplateOptions.class);

      CreateServerOptions options = new CreateServerOptions();
      options.metadata(metadataAndTagsAsCommaDelimitedValue(template.getOptions()));
      if (templateOptions.getSecurityGroupNames().isPresent())
         options.securityGroupNames(templateOptions.getSecurityGroupNames().get());
      options.userData(templateOptions.getUserData());
      options.diskConfig(templateOptions.getDiskConfig());
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.Account.metadata()

         assertTrue(accountApi.deleteMetadata(meta));
         Account account = accountApi.get();
         for (Entry<String, String> entry : meta.entrySet()) {
            // note keys are returned in lower-case!
            assertFalse(account.metadata().containsKey(entry.getKey().toLowerCase()));
         }
      }
   }

   static void accountHasMetadata(AccountApi accountApi, Map<String, String> meta) {
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.Container.metadata()

         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         Container container = api.containerApiInRegion("DFW").get("myContainer");
         assertEquals(container.name(), "myContainer");
         assertEquals(container.objectCount(), 42l);
         assertEquals(container.bytesUsed(), 323479l);
         for (Entry<String, String> entry : container.metadata().entrySet()) {
            assertEquals(container.metadata().get(entry.getKey().toLowerCase()), entry.getValue());
         }

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.SwiftObject.metadata()

         assertNotNull(etagOfEtags);

         SwiftObject bigObject = api.objectApiInRegionForContainer(regionId, containerName).head(name);
         assertNotEquals(bigObject.etag(), etagOfEtags);
         assertEquals(bigObject.payload().getContentMetadata().getContentLength(), new Long(2 * 1024 * 1024));
         assertEquals(bigObject.metadata(), ImmutableMap.of("myfoo", "Bar"));

         // segments are visible
         assertEquals(api.containerApiInRegion(regionId).get(containerName).objectCount(), 3);
      }
   }
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.SwiftObject.Builder.metadata()

      to.etag(from.getETag());
      to.lastModified(from.getLastModified());
      long bytes = from.getContentMetadata().getContentLength();
      String contentType = from.getContentMetadata().getContentType();
      to.payload(payload(bytes, contentType));
      to.metadata(from.getUserMetadata());
      return to.build();
   }

   private static final byte[] NO_CONTENT = new byte[] {};
View Full Code Here

Examples of org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer.Builder.metadata()

         if (lb.virtualIps == null)
            builder.virtualIPs(ImmutableSet.<VirtualIPWithId> of());
         else
            builder.virtualIPs(lb.virtualIps);
         if (lb.metadata == null)
            builder.metadata(new Metadata());
         else
            builder.metadata(ParseMetadata.transformCLBMetadataToMetadata(lb.metadata));
        
         int indexOfLB = endpoint.toString().lastIndexOf(LOAD_BALANCERS);
         String path = endpoint.toString().substring(0, indexOfLB + LOAD_BALANCERS.length());
View Full Code Here

Examples of org.jvnet.hk2.component.Inhabitant.metadata()

                        }
                        if (m!=null)
                            currentBundleName = m.getName();

                        w.append(reason + " called from " + caller.getClassName()
                                + "." + caller.getMethodName() + ":" + caller.getLineNumber()+" metadata \n" + reason.metadata()+"\n");
                        w.append("\n");

                    }

                }
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.