Package org.jclouds.vcloud.director.v1_5.domain

Examples of org.jclouds.vcloud.director.v1_5.domain.AdminCatalog


                        .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


                        .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

                        .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

                        .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

                        .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

                        .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();
     
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, list, listResponse);


      OrgList expected = OrgList.builder()
            .org(Reference.builder()
               .type("application/vnd.vmware.vcloud.org+xml")
               .name("JClouds")
               .href(URI.create("https://vcloudbeta.bluelock.com/api/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0"))
               .build())
View Full Code Here

                        .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

                        .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

   @Test(description = "POST /admin/user/{id}/action/unlock", dependsOnMethods = { "testEditUser" })
   public void testUnlockUser() {
      // Need to know how many times to fail login to lock account
      AdminOrgApi adminOrgApi = adminContext.getApi().getOrgApi();
      OrgPasswordPolicySettings settingsToRevertTo = null;

      // session api isn't typically exposed to the user, as it is implicit
      SessionApi sessionApi = context.utils().injector().getInstance(SessionApi.class);
     
      OrgPasswordPolicySettings settings = adminOrgApi.getSettings(org.getId()).getPasswordPolicy();
      assertNotNull(settings);

      // Adjust account settings so we can lock the account - be careful to not set invalidLoginsBeforeLockout too low!
      if (!settings.isAccountLockoutEnabled()) {
         settingsToRevertTo = settings;
         settings = settings.toBuilder().accountLockoutEnabled(true).invalidLoginsBeforeLockout(5).build();
         settings = adminOrgApi.editPasswordPolicy(org.getId(), settings);
      }

      assertTrue(settings.isAccountLockoutEnabled());
     
      for (int i = 0; i < settings.getInvalidLoginsBeforeLockout() + 1; i++) {
         try {
            sessionApi.loginUserInOrgWithPassword(URI.create(endpoint + "/sessions"), user.getName(), org.getName(), "wrongpassword!");
            fail("Managed to login using the wrong password!");
         } catch (AuthorizationException e) {
         } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.AdminCatalog

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.