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

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


            .statusCode(200)
            .build();
     
   @Test
   public void testRemoveUserHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, remove, removeResponse);
      api.getUserApi().remove(userHref);
   }
View Full Code Here


      api.getUserApi().remove(userHref);
   }

   @Test
   public void testRemoveUserUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveUser, resolveUserResponse, remove, removeResponse);
      api.getUserApi().remove(userUrn);
   }
View Full Code Here

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

      AdminVdc expected = adminVdc();

      assertEquals(api.getVdcApi().get(vdcRef.getHref()), expected);
   }
View Full Code Here

      HttpResponse queryResponse= HttpResponse.builder()
              .statusCode(200)
              .payload(payloadFromResourceWithContentType("/query/admin/allGroups.xml", VCloudDirectorMediaType.QUERY_RESULT_RECORDS + ";version=1.5"))
              .build();

      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, queryRequest, queryResponse);

      QueryResultRecords expected = QueryResultRecords.builder()
            .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/groups/query?page=1&pageSize=25&format=records"))
            .type("application/vnd.vmware.vcloud.query.records+xml")
            .name("group")
            .page(1)
            .pageSize(25)
            .total(0L)
            .link(Link.builder()
                        .rel("alternate")
                        .type("application/vnd.vmware.vcloud.query.references+xml")
                        .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/groups/query?page=1&pageSize=25&format=references"))
                        .build())
            .link(Link.builder()
                        .rel("alternate")
                        .type("application/vnd.vmware.vcloud.query.idrecords+xml")
                        .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/groups/query?page=1&pageSize=25&format=idrecords"))
                        .build())
            .build();
     
      assertEquals(api.getQueryApi().groupsQueryAll(), expected);
   }
View Full Code Here

      HttpResponse queryResponse= HttpResponse.builder()
              .statusCode(200)
              .payload(payloadFromResourceWithContentType("/query/admin/allRoles.xml", VCloudDirectorMediaType.QUERY_RESULT_RECORDS + ";version=1.5"))
              .build();

      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, queryRequest, queryResponse);

      QueryResultRecords expected = QueryResultRecords.builder()
            .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/roles/query?page=1&pageSize=25&format=records"))
            .type("application/vnd.vmware.vcloud.query.records+xml")
            .name("role")
            .page(1)
            .pageSize(25)
            .total(1L)
            .link(Link.builder()
                        .rel("alternate")
                        .type("application/vnd.vmware.vcloud.query.references+xml")
                        .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/roles/query?page=1&pageSize=25&format=references"))
                        .build())
            .link(Link.builder()
                        .rel("alternate")
                        .type("application/vnd.vmware.vcloud.query.idrecords+xml")
                        .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/roles/query?page=1&pageSize=25&format=idrecords"))
                        .build())
            .record(QueryResultRoleRecord.builder()
                        .href(URI.create("https://vcloudbeta.bluelock.com/api/admin/role/1bf4457f-a253-3cf1-b163-f319f1a31802"))
                        .name("vApp Author")
                        .isReadOnly(false)
                        .build())
            .build();
     
      assertEquals(api.getQueryApi().rolesQueryAll(), expected);
   }
View Full Code Here

      api.getCatalogApi().setOwner(catalogAdminHref, ownerToSet);
   }
  
   @Test
   public void testSetCatalogOwnerUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveCatalog, resolveCatalogResponse, setOwner, setOwnerResponse);
      api.getCatalogApi().setOwner(catalogUrn, ownerToSet);
   }
View Full Code Here

            .statusCode(204)
            .build();
  
   @Test
   public void testPublishCatalogHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, publishCatalog,
               publishCatalogResponse);
      api.getCatalogApi().publish(catalogAdminHref, PublishCatalogParams.builder().isPublished(true).build());
   }
View Full Code Here

      api.getCatalogApi().publish(catalogAdminHref, PublishCatalogParams.builder().isPublished(true).build());
   }

   @Test
   public void testPublishCatalogUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveCatalog,
               resolveCatalogResponse, publishCatalog, publishCatalogResponse);
      api.getCatalogApi().publish(catalogUrn, PublishCatalogParams.builder().isPublished(true).build());
   }
View Full Code Here

            .statusCode(204)
            .build();
  
   @Test
   public void testRemoveCatalogHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, removeCatalog,
               removeCatalogResponse);
      api.getCatalogApi().remove(catalogAdminHref);
   }
View Full Code Here

      api.getCatalogApi().remove(catalogAdminHref);
   }

   @Test
   public void testRemoveCatalogUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveCatalog,
               resolveCatalogResponse, removeCatalog, removeCatalogResponse);
      api.getCatalogApi().remove(catalogUrn);
   }
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.