Package org.jclouds.vcloud.director.v1_5.user

Examples of org.jclouds.vcloud.director.v1_5.user.VCloudDirectorApi


      assertEquals(actual, expected);
   }

   @Test(enabled = false)
   public void testReset() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("POST", vAppId + "/power/action/reset")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/resetTask.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

      Task expected = resetTask();

      assertEquals(api.getVAppApi().reset(vAppURI), expected);
   }
View Full Code Here


      assertEquals(api.getVAppApi().reset(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testShutdown() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("POST", vAppId + "/power/action/shutdown")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/shutdownTask.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

      Task expected = shutdownTask();

      assertEquals(api.getVAppApi().shutdown(vAppURI), expected);
   }
View Full Code Here

      assertEquals(api.getVAppApi().shutdown(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testSuspend() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("POST", vAppId + "/power/action/suspend")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/suspend.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

    Task expected = suspendTask();

    assertEquals(api.getVAppApi().suspend(vAppURI), expected);
   }
View Full Code Here

    assertEquals(api.getVAppApi().suspend(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testGetControlAccesss() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("GET", vAppId + "/controlAccess")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getAccessControl.xml", VCloudDirectorMediaType.VAPP)
            .httpResponseBuilder().build());

      ControlAccessParams expected = getAccessControlParams();

      assertEquals(api.getVAppApi().getAccessControl(vAppURI), expected);
   }
View Full Code Here

      assertEquals(api.getVAppApi().getAccessControl(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testGetLeaseSettingsSection() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("GET", vAppId + "/leaseSettingsSection")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getLeaseSettingsSection.xml", VCloudDirectorMediaType.LEASE_SETTINGS_SECTION)
            .httpResponseBuilder().build());

      LeaseSettingsSection expected = getLeaseSettingsSection();

      assertEquals(api.getVAppApi().getLeaseSettingsSection(vAppURI), expected);
   }
View Full Code Here

      assertEquals(api.getVAppApi().getLeaseSettingsSection(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testEditLeaseSettingsSection() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("PUT", vAppId + "/leaseSettingsSection")
            .xmlFilePayload("/vApp/editLeaseSettingsSection.xml", VCloudDirectorMediaType.LEASE_SETTINGS_SECTION)
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/editLeaseSettingsSectionTask.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

      LeaseSettingsSection section = getLeaseSettingsSection().toBuilder()
            .build();

    Task expected = editLeaseSettingsSectionTask();

    assertEquals(api.getVAppApi().editLeaseSettingsSection(vAppURI, section), expected);
   }
View Full Code Here

    assertEquals(api.getVAppApi().editLeaseSettingsSection(vAppURI, section), expected);
   }

   @Test(enabled = false)
   public void testGetNetworkConfigSection() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("GET", vAppId + "/networkConfigSection")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getNetworkConfigSection.xml", VCloudDirectorMediaType.NETWORK_CONFIG_SECTION)
            .httpResponseBuilder().build());

    NetworkConfigSection expected = getNetworkConfigSection();

    assertEquals(api.getVAppApi().getNetworkConfigSection(vAppURI), expected);
   }
View Full Code Here

    assertEquals(api.getVAppApi().getNetworkConfigSection(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testEditNetworkConfigSection() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("PUT", vAppId + "/networkConfigSection")
            .xmlFilePayload("/vApp/editNetworkConfigSection.xml", VCloudDirectorMediaType.NETWORK_CONFIG_SECTION)
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/editNetworkConfigSectionTask.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

    NetworkConfigSection section = getNetworkConfigSection().toBuilder()
          .build();

    Task expected = editNetworkConfigSectionTask();

    assertEquals(api.getVAppApi().editNetworkConfigSection(vAppURI, section), expected);
   }
View Full Code Here

    assertEquals(api.getVAppApi().editNetworkConfigSection(vAppURI, section), expected);
   }

   @Test(enabled = false)
   public void testGetNetworkSection() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("GET", vAppId + "/networkSection")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getNetworkSection.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

    NetworkSection expected = getNetworkSection();

    assertEquals(api.getVAppApi().getNetworkSection(vAppURI), expected);
   }
View Full Code Here

    assertEquals(api.getVAppApi().getNetworkSection(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testGetOwner() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("GET", vAppId + "/owner")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getOwner.xml", VCloudDirectorMediaType.OWNER)
            .httpResponseBuilder().build());

         Owner expected = getOwner();

         assertEquals(api.getVAppApi().getOwner(vAppURI), expected);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.user.VCloudDirectorApi

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.