Package org.jclouds.vcloud.director.v1_5.admin

Examples of org.jclouds.vcloud.director.v1_5.admin.VCloudDirectorAdminApi


      assertEquals(api.getUserApi().edit(userHref, editUserSource()), editUser());
   }
  
   @Test
   public void testEditUserUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveUser, resolveUserResponse, edit, editResponse);
      assertEquals(api.getUserApi().edit(userUrn, editUserSource()), editUser());
   }
View Full Code Here


            .statusCode(204)
            .build();

   @Test
   public void testUnlockUserHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, unlock, unlockResponse);
      api.getUserApi().unlock(userHref);
   }
View Full Code Here

      api.getUserApi().unlock(userHref);
   }
  
   @Test(expectedExceptions = ResourceNotFoundException.class)
   public void testUnlockUserHrefNotFound() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, unlock,  HttpResponse.builder()
               .statusCode(403)
               .payload(payloadFromResourceWithContentType("/org/error400.xml", ERROR))
               .build());
      api.getUserApi().unlock(userHref);
   }
View Full Code Here

      api.getUserApi().unlock(userHref);
   }
  
   @Test
   public void testUnlockUserUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveUser, resolveUserResponse, unlock, unlockResponse);
      api.getUserApi().unlock(userUrn);
   }
View Full Code Here

            .statusCode(200)
            .build();
     
   @Test
   public void testRemoveUserHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, remove, removeResponse);
      api.getUserApi().remove(userHref);
   }
View Full Code Here

      api.getUserApi().remove(userHref);
   }

   @Test
   public void testRemoveUserUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveUser, resolveUserResponse, remove, removeResponse);
      api.getUserApi().remove(userUrn);
   }
View Full Code Here

         .href(URI.create(endpoint + "???"))
         .build();
  
   @Test( enabled = false )
   public void testGetVdc() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("GET", "/admin/vdc/???")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vdc/admin/vdc.xml",
                  VCloudDirectorMediaType.ADMIN_VDC)
            .httpResponseBuilder().build());

      AdminVdc expected = adminVdc();

      assertEquals(api.getVdcApi().get(vdcRef.getHref()), expected);
   }
View Full Code Here

   private Reference orgRef = Reference.builder()
            .href(URI.create(endpoint + "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")).build();

   @Test
   public void testGetOrg() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, new VcloudHttpRequestPrimer()
               .apiCommand("GET", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0").acceptAnyMedia()
               .httpRequestBuilder().build(),
               new VcloudHttpResponsePrimer().xmlFilePayload("/org/admin/org.xml", VCloudDirectorMediaType.ADMIN_ORG)
                        .httpResponseBuilder().build());

      AdminOrg expected = adminOrg();

      assertEquals(api.getOrgApi().get(orgRef.getHref()), expected);
   }
View Full Code Here

                        .build()).build();
   }

   @Test(enabled = false)
   public void testGetSettings() {
      VCloudDirectorAdminApi api = requestsSendResponses(
               loginRequest,
               sessionResponse,
               new VcloudHttpRequestPrimer()
                        .apiCommand("GET", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/settings/")
                        .acceptAnyMedia().httpRequestBuilder().build(),
               new VcloudHttpResponsePrimer()
                        .xmlFilePayload("/org/admin/settings.xml", VCloudDirectorMediaType.ORG_SETTINGS)
                        .httpResponseBuilder().build());

      OrgSettings expected = settings();

      assertEquals(api.getOrgApi().getSettings(orgRef.getHref()), expected);
   }
View Full Code Here

      assertEquals(api.getOrgApi().getSettings(orgRef.getHref()), expected);
   }

   @Test(enabled = false)
   public void testEditSettings() {
      VCloudDirectorAdminApi api = requestsSendResponses(
               loginRequest,
               sessionResponse,
               new VcloudHttpRequestPrimer()
                        .apiCommand("PUT", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/settings/")
                        .xmlFilePayload("/org/admin/editSettingsSource.xml", VCloudDirectorMediaType.ORG_SETTINGS)
                        .acceptMedia(VCloudDirectorMediaType.ORG_SETTINGS).httpRequestBuilder().build(),
               new VcloudHttpResponsePrimer()
                        .xmlFilePayload("/org/admin/editSettings.xml", VCloudDirectorMediaType.ORG_SETTINGS)
                        .httpResponseBuilder().build());

      OrgSettings expected = editSettings();

      assertEquals(api.getOrgApi().editSettings(orgRef.getHref(), expected), expected);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.admin.VCloudDirectorAdminApi

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.