Examples of create()


Examples of org.jclouds.openstack.neutron.v2_0.features.SubnetApi.create()

         SubnetApi subnetApi = api.getSubnetApiForZone(zone);

         Network network = networkApi.create(CreateNetworkOptions.builder().name("jclouds-network-test").external(true).networkType(NetworkType.LOCAL).build());
         assertNotNull(network);

         Subnet subnet = subnetApi.create(network.getId(), 4, "192.168.0.0/16");
         assertNotNull(subnet);

         Router ref = routerApi.create(CreateRouterOptions.builder().name("jclouds-router-test")
            .externalGatewayInfo(ExternalGatewayInfo.builder().networkId(network.getId()).build()).build());
         assertNotNull(ref);

Examples of org.jclouds.openstack.nova.v2_0.extensions.FloatingIPApi.create()

      ip = Iterables.getLast(unassignedIps).getIp();
    }

    // if no unassigned IP is available, we'll try to allocate an IP.
    if (ip == null || ip.isEmpty()) {
      FloatingIP allocatedFloatingIP = floatingIp.create();
      if (allocatedFloatingIP == null) {
        String msg = "Failed to allocate an IP address.";
        log.error(msg);
        throw new CloudControllerException(msg);
      }

Examples of org.jclouds.openstack.nova.v2_0.extensions.KeyPairApi.create()

      Optional optKeyApi = Optional.of(keyApi);
     
      expect(api.getKeyPairExtensionForZone("zone")).andReturn(optKeyApi).atLeastOnce();

      expect(keyApi.create("group-1")).andReturn(pair);

      replay(api, keyApi);

      CreateUniqueKeyPair parser = Guice.createInjector(new AbstractModule() {

Examples of org.jclouds.openstack.nova.v2_0.extensions.VolumeApi.create()

        }
        ComputeServiceContext context = iaasInfo.getComputeService().getContext();
       
        RestContext<NovaApi, NovaAsyncApi> nova = context.unwrap();
        VolumeApi api = nova.getApi().getVolumeExtensionForZone(region).get();
        Volume volume = api.create(sizeGB, CreateVolumeOptions.Builder.availabilityZone(zone));
        if (volume == null) {
      log.fatal("Volume creation was unsuccessful. [region] : " + region+" [zone] : " + zone
          + " of Iaas : " + iaasInfo);
      return null;
    }

Examples of org.jclouds.openstack.nova.v2_0.features.ServerApi.create()

      return props;
   }
  
   protected Server createServerInZone(String zoneId) {
      ServerApi serverApi = api.getServerApiForZone(zoneId);
      ServerCreated server = serverApi.create(hostName, imageIdForZone(zoneId), flavorRefForZone(zoneId));
      blockUntilServerInState(server.getId(), serverApi, Status.ACTIVE);
      return serverApi.get(server.getId());
   }

   /**
 

Examples of org.jclouds.openstack.trove.v1.features.InstanceApi.create()

   public Instance getWorkingInstance(String zone, String name, String flavorId, int size) {
      InstanceApi instanceApi = api.getInstanceApiForZone(zone);
      for (int retries = 0; retries < 10; retries++) {
         Instance instance = null;
         try {
            instance = instanceApi.create(flavorId, size, name);
         } catch (Exception e) {

            Uninterruptibles.sleepUninterruptibly(15, TimeUnit.SECONDS);

            logger.error(e.getStackTrace().toString());

Examples of org.jclouds.sqs.features.QueueApi.create()

      QueueApi queueApi = api.getQueueApiForRegion(region);
      URI result = queueApi.get(queueName);
      if (result != null) {
         queueApi.delete(result);
      }
      URI queue = queueApi.create(queueName);
      assertQueueInList(region, queue);
      queues.add(queue);
      return queueName;
   }

Examples of org.jcoredb.fs.IFileSystem.create()

 
  @Test
  public void appendSingleThreadedTest() throws Exception
  {
    IFileSystem fs = new FileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.open();
   
    Block[] blocks = new Block[NUM_OF_BLOCKS_TO_APPEND];
   
    String testStr = "<test> <content> Hello world! </content> </test>";

Examples of org.jcoredb.fs.impl.FileSystem.create()

  @Test
  public void dropTest() throws Exception
  {
    //Create a File System
    IFileSystem fs = new FileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.create(Integer.MAX_VALUE);
    fs.close();
   
    //Open the File System
    fs = new FileSystem(Constants.ROOT_PATH);

Examples of org.jcoredb.fs.impl.MultiThreadedFileSystem.create()

  @Test
  public void appendMultiThreadedTest() throws Exception
  {
   
    IFileSystem fs = new MultiThreadedFileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.open();
   
    Block[] blocks = new Block[NUM_OF_BLOCKS_TO_APPEND];
   
    String testStr = "<test> <content> Hello world! </content> </test>";
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.