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

Examples of org.jclouds.vcloud.director.v1_5.domain.params.CloneVAppParams$ConcreteBuilder


                        .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

                        .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

                        .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

               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

               new VcloudHttpResponsePrimer()
                        .xmlFilePayload("/org/admin/editVAppLeaseSettings.xml",
                                 VCloudDirectorMediaType.ORG_VAPP_TEMPLATE_LEASE_SETTINGS).httpResponseBuilder()
                        .build());

      OrgVAppTemplateLeaseSettings expected = editVAppTemplateLeaseSettings();

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

               String.format(OBJ_FIELD_EQ, "VAppTemplate", "name", name, capturedVAppTemplate.getName()));
   }

   @Test(description = "POST /vdc/{id}/action/cloneVApp", dependsOnMethods = { "testInstantiateVAppTemplate" })
   public void testCloneVApp() {
      CloneVAppParams cloneVappParams = CloneVAppParams.builder().source(instantiatedVApp.getHref())
          .name(name("vappClone-"))
          .deploy(true)
          // TODO: test optional params
          // .description("")
          // .isSourceDelete(true)
View Full Code Here

               .httpResponseBuilder().build());
     
      VApp expected = cloneVApp();

      // TODO: configure params
      CloneVAppParams params = CloneVAppParams.builder()
        
         .build();
     
      assertEquals(api.getVdcApi().cloneVApp(vdcURI, params), expected);
   }
View Full Code Here

               String.format(OBJ_FIELD_EQ, "VAppTemplate", "name", name, capturedVAppTemplate.getName()));
   }

   @Test(description = "POST /vdc/{id}/action/cloneVApp", dependsOnMethods = { "testInstantiateVAppTemplate" })
   public void testCloneVApp() {
      CloneVAppParams cloneVappParams = CloneVAppParams.builder().source(instantiatedVApp.getHref())
          .name(name("vappClone-"))
          .deploy(true)
          // TODO: test optional params
          // .description("")
          // .isSourceDelete(true)
View Full Code Here

               .httpResponseBuilder().build());
     
      VApp expected = cloneVApp();

      // TODO: configure params
      CloneVAppParams params = CloneVAppParams.builder()
        
         .build();
     
      assertEquals(api.getVdcApi().cloneVApp(vdcURI, params), expected);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.params.CloneVAppParams$ConcreteBuilder

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.