Tabnine Logo
OfferingApi.listServiceOfferings
Code IndexAdd Tabnine to your IDE (free)

How to use
listServiceOfferings
method
in
org.jclouds.cloudstack.features.OfferingApi

Best Java code snippets using org.jclouds.cloudstack.features.OfferingApi.listServiceOfferings (Showing top 3 results out of 315)

origin: apache/jclouds

@Override
public Iterable<ServiceOffering> listHardwareProfiles() {
 // TODO: we may need to filter these
 return client.getOfferingApi().listServiceOfferings();
}
origin: apache/jclouds

public void testListServiceOfferings() throws Exception {
 Set<ServiceOffering> response = client.getOfferingApi().listServiceOfferings();
 assert null != response;
 long offeringCount = response.size();
 assertTrue(offeringCount >= 0);
 for (ServiceOffering offering : response) {
   ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingApi().listServiceOfferings(
      ListServiceOfferingsOptions.Builder.id(offering.getId())));
   assertEquals(offering, newDetails);
   assert offering.getId() != null : offering;
   assert offering.getName() != null : offering;
   assert offering.getDisplayText() != null : offering;
   assert offering.getCpuNumber() > 0 : offering;
   assert offering.getCpuSpeed() > 0 : offering;
   assert offering.getMemory() > 0 : offering;
   assert offering.getStorageType() != null && StorageType.UNRECOGNIZED != offering.getStorageType() : offering;
   assert offering.getTags() != null : offering;
 }
}
origin: apache/jclouds

public static VirtualMachine createVirtualMachineWithOptionsInZone(DeployVirtualMachineOptions options, String zoneId,
   String templateId, CloudStackApi client, Predicate<String> jobComplete,
   Predicate<VirtualMachine> virtualMachineRunning) {
 String serviceOfferingId = DEFAULT_SIZE_ORDERING.min(client.getOfferingApi().listServiceOfferings()).getId();
 System.out.printf("serviceOfferingId %s, templateId %s, zoneId %s, options %s%n", serviceOfferingId, templateId,
    zoneId, options);
 AsyncCreateResponse job = client.getVirtualMachineApi().deployVirtualMachineInZone(zoneId, serviceOfferingId,
    templateId, options);
 assertTrue(jobComplete.apply(job.getJobId()));
 AsyncJob<VirtualMachine> jobWithResult = client.getAsyncJobApi().<VirtualMachine> getAsyncJob(job.getJobId());
 if (jobWithResult.getError() != null)
   Throwables.propagate(new ExecutionException(String.format("job %s failed with exception %s", job.getId(),
      jobWithResult.getError().toString())) {
   });
 VirtualMachine vm = jobWithResult.getResult();
 if (vm.isPasswordEnabled()) {
   assert vm.getPassword() != null : vm;
 }
 assertTrue(virtualMachineRunning.apply(vm));
 assertEquals(vm.getServiceOfferingId(), serviceOfferingId);
 assertEquals(vm.getTemplateId(), templateId);
 assertEquals(vm.getZoneId(), zoneId);
 return vm;
}
org.jclouds.cloudstack.featuresOfferingApilistServiceOfferings

Javadoc

Lists service offerings

Popular methods of OfferingApi

  • getDiskOffering
    get a specific disk offering by id
  • getNetworkOffering
    get a specific service offering by id
  • listDiskOfferings
    Lists disk offerings
  • listNetworkOfferings
    Lists service offerings

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now