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

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


      .build();
   }

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

      OrgLdapSettings expected = ldapSettings();

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


               .ldapMode("NONE").build();
   }

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

      OrgPasswordPolicySettings expected = passwordPolicy();

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

               .accountLockoutEnabled(false).invalidLoginsBeforeLockout(5).accountLockoutIntervalMinutes(10).build();
   }

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

      OrgPasswordPolicySettings expected = editOrgPasswordPolicy();

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

               .accountLockoutIntervalMinutes(11).build();
   }

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

      OrgLeaseSettings expected = vAppLeaseSettings();

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

               .storageLeaseSeconds(0).build();
   }

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

      OrgLeaseSettings expected = editVAppLeaseSettings();

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

      .build();
   }

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

      OrgVAppTemplateLeaseSettings expected = vAppTemplateLeaseSettings();

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

            .payload(payloadFromResourceWithContentType("/network/network.xml", ORG + ";version=1.5"))
            .build();
   
   @Test
   public void testGetNetworkHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, get, getResponse);
      assertEquals(api.getNetworkApi().get(networkAdminHref), network());
   }
View Full Code Here

           .payload(payloadFromStringWithContentType(networkEntity, ENTITY + ";version=1.5"))
           .build();
  
   @Test
   public void testGetNetworkUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveNetwork, resolveNetworkResponse, get, getResponse);
      assertEquals(api.getNetworkApi().get(networkUrn), network());
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/network/admin/editNetworkTask.xml", TASK))
            .build();

   @Test
   public void testEditNetworkHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, edit, editResponse);
      assertEquals(api.getNetworkApi().edit(networkAdminHref, editNetwork()), editNetworkTask());
   }
View Full Code Here

      assertEquals(api.getNetworkApi().edit(networkAdminHref, editNetwork()), editNetworkTask());
   }
  
   @Test
   public void testEditNetworkUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveNetwork, resolveNetworkResponse, edit, editResponse);
      assertEquals(api.getNetworkApi().edit(networkUrn, editNetwork()), editNetworkTask());
   }
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.