Package org.jclouds.openstack.v2_0.features

Examples of org.jclouds.openstack.v2_0.features.ExtensionApi


      Limits limits = api.list();
      assertEquals(limits.getAbsoluteLimits().get("records per domain"), Integer.valueOf(500));
      assertEquals(limits.getAbsoluteLimits().get("domains"), Integer.valueOf(500));
      assertEquals(Iterables.size(limits.getRateLimits()), 2);
     
      RateLimit statusRateLimit = Iterables.tryFind(limits.getRateLimits(), isStatusRateLimit()).orNull();
      assertEquals(statusRateLimit.getRegex(), ".*/v\\d+\\.\\d+/(\\d+/status).*");
      assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getVerb(), "GET");
      assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getValue(), 5);
      assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getRemaining().get(), Integer.valueOf(5));
      assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getUnit(), "SECOND");
   }
View Full Code Here


     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions")
    public void testListExtensions() throws Exception {
       for (String zoneId : zones) {
          ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
          Set<? extends Extension> response = extensionApi.list();
          assertNotNull(response);
          assertFalse(response.isEmpty());
           for (Extension extension : response) {
              assertNotNull(extension.getId());
              assertNotNull(extension.getName());
View Full Code Here

     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions/{alias}", dependsOnMethods = { "testListExtensions" })
    public void testGetExtensionByAlias() throws Exception {
       for (String zoneId : zones) {
           ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
           Set<? extends Extension> response = extensionApi.list();
           for (Extension extension : response) {
              Extension details = extensionApi.get(extension.getId());
              assertNotNull(details);
              assertEquals(details.getId(), extension.getId());
              assertEquals(details.getName(), extension.getName());
              assertEquals(details.getDescription(), extension.getDescription());
              assertEquals(details.getNamespace(), extension.getNamespace());
View Full Code Here

     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions")
    public void testListExtensions() throws Exception {
       for (String zoneId : zones) {
          ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
          Set<? extends Extension> response = extensionApi.list();
          assertNotNull(response);
          assertFalse(response.isEmpty());
           for (Extension extension : response) {
              assertNotNull(extension.getId());
              assertNotNull(extension.getName());
View Full Code Here

     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions/{alias}", dependsOnMethods = { "testListExtensions" })
    public void testGetExtensionByAlias() throws Exception {
       for (String zoneId : zones) {
           ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
           Set<? extends Extension> response = extensionApi.list();
           for (Extension extension : response) {
              Extension details = extensionApi.get(extension.getId());
              assertNotNull(details);
              assertEquals(details.getId(), extension.getId());
              assertEquals(details.getName(), extension.getName());
              assertEquals(details.getDescription(), extension.getDescription());
              assertEquals(details.getNamespace(), extension.getNamespace());
View Full Code Here

     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions")
    public void testListExtensions() throws Exception {
       for (String zoneId : zones) {
          ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
          Set<? extends Extension> response = extensionApi.list();
          assertNotNull(response);
          assertFalse(response.isEmpty());
           for (Extension extension : response) {
              assertNotNull(extension.getId());
              assertNotNull(extension.getName());
View Full Code Here

     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions/{alias}", dependsOnMethods = { "testListExtensions" })
    public void testGetExtensionByAlias() throws Exception {
       for (String zoneId : zones) {
           ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
           Set<? extends Extension> response = extensionApi.list();
           for (Extension extension : response) {
              Extension details = extensionApi.get(extension.getId());
              assertNotNull(details);
              assertEquals(details.getId(), extension.getId());
              assertEquals(details.getName(), extension.getName());
              assertEquals(details.getDescription(), extension.getDescription());
              assertEquals(details.getNamespace(), extension.getNamespace());
View Full Code Here

     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions")
    public void testListExtensions() throws Exception {
       for (String regionId : regions) {
          ExtensionApi extensionApi = api.getExtensionApi(regionId);
          Set<? extends Extension> response = extensionApi.list();
          assertNotNull(response);
          assertFalse(response.isEmpty());
           for (Extension extension : response) {
              assertNotNull(extension.getId());
              assertNotNull(extension.getName());
View Full Code Here

     * @throws Exception
     */
    @Test(description = "GET /v${apiVersion}/{tenantId}/extensions/{alias}", dependsOnMethods = { "testListExtensions" })
    public void testGetExtensionByAlias() throws Exception {
       for (String regionId : regions) {
           ExtensionApi extensionApi = api.getExtensionApi(regionId);
           Set<? extends Extension> response = extensionApi.list();
           for (Extension extension : response) {
              Extension details = extensionApi.get(extension.getId());
              assertNotNull(details);
              assertEquals(details.getId(), extension.getId());
              assertEquals(details.getName(), extension.getName());
              assertEquals(details.getDescription(), extension.getDescription());
              assertEquals(details.getNamespace(), extension.getNamespace());
View Full Code Here

      String flavorRef = "performance1-2";
      // Rackspace CentOS 6.5 image
      String imageRef = "3ab30cc6-c503-41d3-8a37-106fda7848a7";
      for (String regionId : regions) {
         ServerApi serverApi = api.getServerApi(regionId);
         ExtensionApi extensionApi = api.getExtensionApi(regionId);

         // check for the existence of the block mapping v2 boot extension
         if (extensionApi.get("os-block-device-mapping-v2-boot") != null) {
            try {
               BlockDeviceMapping blockDeviceMappings = BlockDeviceMapping.builder()
                     .uuid(imageRef).sourceType("image").destinationType("volume")
                     .volumeSize(100).bootIndex(0).build();
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.v2_0.features.ExtensionApi

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.