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

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


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

      Group expected = group();

      assertEquals(api.getGroupApi().get(groupRef.getHref()), expected);
   }
View Full Code Here


         .build();
   }
  
   @Test(enabled = false)
   public void testEditGroup() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("PUT", "/admin/group/fff")
            .xmlFilePayload("/group/editGroupSource.xml", VCloudDirectorMediaType.GROUP)
            .acceptMedia(VCloudDirectorMediaType.GROUP)
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/group/editGroup.xml", VCloudDirectorMediaType.GROUP)
            .httpResponseBuilder().build());

      Group expected = editGroup();

      assertEquals(api.getGroupApi().edit(groupRef.getHref(), expected), expected);
   }
View Full Code Here

      return null; // TODO chain onto group() then toBuilder() and edit?
   }
  
   @Test
   public void testRemoveGroup() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse,
            new VcloudHttpRequestPrimer()
               .apiCommand("DELETE", "/admin/group/fff")
               .acceptAnyMedia()
               .httpRequestBuilder().build(),
            new VcloudHttpResponsePrimer()
               .httpResponseBuilder().statusCode(204).build());
     
      api.getGroupApi().remove(groupRef.getHref());
   }
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

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

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

      OrgEmailSettings expected = emailSettings();

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

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

   @Test
   public void testEditEmailSettings() {
      VCloudDirectorAdminApi api = requestsSendResponses(
               loginRequest,
               sessionResponse,
               new VcloudHttpRequestPrimer()
                        .apiCommand("PUT", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/settings/email")
                        .xmlFilePayload("/org/admin/editEmailSettingsSource.xml",
                                 VCloudDirectorMediaType.ORG_EMAIL_SETTINGS)
                        .acceptMedia(VCloudDirectorMediaType.ORG_EMAIL_SETTINGS).httpRequestBuilder().build(),
               new VcloudHttpResponsePrimer()
                        .xmlFilePayload("/org/admin/editEmailSettings.xml",
                                 VCloudDirectorMediaType.ORG_EMAIL_SETTINGS).httpResponseBuilder().build());

      OrgEmailSettings expected = editEmailSettings();

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

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

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

      OrgGeneralSettings expected = generalSettings();

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

               .useServerBootSequence(false).delayAfterPowerOnSeconds(0).build();
   }

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

      OrgGeneralSettings expected = editGeneralSettings();

      assertEquals(api.getOrgApi().editGeneralSettings(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.