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

Examples of org.jclouds.vcloud.director.v1_5.domain.params.ControlAccessParams


      assertVAppStatus(vAppUrn, Status.POWERED_OFF);
   }

   @Test(groups = { "live", "user" }, description = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testGetVApp" })
   public void testControlAccessUser() {
      ControlAccessParams params = ControlAccessParams
               .builder()
               .notSharedToEveryone()
               .accessSetting(
                        AccessSetting.builder()
                                 .subject(Reference.builder().href(user.getHref()).type(ADMIN_USER).build())
                                 .accessLevel("ReadOnly").build()).build();

      // The method under test
      ControlAccessParams modified = vAppApi.editControlAccess(vAppUrn, params);

      // Check the retrieved object is well formed
      checkControlAccessParams(modified);
      // Check the required fields are set
      assertEquals(modified, params, String.format(ENTITY_EQUAL, "ControlAccessParams"));
View Full Code Here


   }

   @Test(groups = { "live", "user" }, description = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testControlAccessUser" })
   public void testControlAccessEveryone() {

      ControlAccessParams params = ControlAccessParams.builder().sharedToEveryone().everyoneAccessLevel("FullControl")
               .build();

      // The method under test
      ControlAccessParams modified = vAppApi.editControlAccess(vAppUrn, params);

      // Check the retrieved object is well formed
      checkControlAccessParams(modified);

      // Check entities are equal
View Full Code Here

   }

   @Test(groups = { "live", "user" }, description = "GET /vApp/{id}/controlAccess", dependsOnMethods = { "testGetVApp" })
   public void testGetControlAccess() {
      // The method under test
      ControlAccessParams controlAccess = vAppApi.getAccessControl(vAppUrn);

      // Check the retrieved object is well formed
      checkControlAccessParams(controlAccess);
   }
View Full Code Here

      return task;
   }

   public static ControlAccessParams controlAccessParams() {
      ControlAccessParams params = ControlAccessParams.builder()
            .build();

      return params;
   }
View Full Code Here

      return task;
   }

   public static ControlAccessParams getAccessControlParams() {
      ControlAccessParams params = ControlAccessParams.builder()
            .build();

      return params;
   }
View Full Code Here

      return task;
   }

   public static ControlAccessParams controlAccessParams() {
      ControlAccessParams params = ControlAccessParams.builder()
            .build();

      return params;
   }
View Full Code Here

      return task;
   }

   public static ControlAccessParams getAccessControlParams() {
      ControlAccessParams params = ControlAccessParams.builder()
            .build();

      return params;
   }
View Full Code Here

               String.format(NOT_EMPTY_OBJECT_FMT, "CatalogRecord", "QueryResultRecords"));
   }

   @Test(description = "GET /catalogs/query?format=references", dependsOnMethods = { "testQueryAllCatalogs" })
   public void testQueryAllCatalogReferences() {
      CatalogReferences catalogReferences = queryApi.catalogReferencesQueryAll();
      assertFalse(catalogReferences.getReferences().isEmpty(),
               String.format(NOT_EMPTY_OBJECT_FMT, "CatalogReference", "CatalogReferences"));
   }
View Full Code Here

   }

   @Test(description = "GET /query")
   public void testQuery() {
      VAppTemplate vAppTemplate = lazyGetVAppTemplate();
      QueryResultRecords queryResult = queryApi
               .query("vAppTemplate", String.format("name==%s", vAppTemplate.getName()));
      Set<URI> hrefs = toHrefs(queryResult);

      assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP_TEMPLATE, null),
               QueryResultVAppTemplateRecord.class);
View Full Code Here

               + vAppTemplate.getHref() + "; but only has " + hrefs);
   }

   @Test(description = "GET /catalogs/query")
   public void testQueryAllCatalogs() {
      QueryResultRecords catalogRecords = queryApi.catalogsQueryAll();
      assertFalse(catalogRecords.getRecords().isEmpty(),
               String.format(NOT_EMPTY_OBJECT_FMT, "CatalogRecord", "QueryResultRecords"));
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.params.ControlAccessParams

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.