Merge pull request #511 from danikov/vcloud-director-bugfix

Issue 830: vCloud director Bugfix
This commit is contained in:
Adrian Cole 2012-03-22 08:36:06 -07:00
commit c04080c32d
5 changed files with 21 additions and 9 deletions

View File

@ -79,8 +79,8 @@ public interface OrgAsyncClient {
@JAXBResponseParser
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
ListenableFuture<ControlAccessParams> modifyControlAccess(@EndpointParam URI orgRef,
@PathParam("catalogId") String catalogId,
@BinderParam(BindToXMLPayload.class) ControlAccessParams params);
@PathParam("catalogId") String catalogId,
@BinderParam(BindToXMLPayload.class) ControlAccessParams params);
/**
* @see OrgClient#getControlAccess(URI, URI, ControlAccessParams)
@ -91,7 +91,7 @@ public interface OrgAsyncClient {
@JAXBResponseParser
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
ListenableFuture<ControlAccessParams> getControlAccess(@EndpointParam URI orgRef,
@PathParam("catalogId") String catalogId);
@PathParam("catalogId") String catalogId);
/**
* @return asynchronous access to {@link Metadata.Readable} features

View File

@ -19,6 +19,7 @@
package org.jclouds.vcloud.director.v1_5.features;
import static com.google.common.base.Objects.equal;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorLiveTestConstants.NOT_NULL_OBJ_FMT;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorLiveTestConstants.OBJ_DEL;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorLiveTestConstants.OBJ_FIELD_EQ;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorLiveTestConstants.OBJ_FIELD_UPDATABLE;
@ -173,6 +174,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
@Test(testName = "POST /admin/catalog/{id}/action/publish",
dependsOnMethods = { "testUpdateCatalog" } ) // FIXME: fails with a 403
public void testPublishCatalog() {
assertNotNull(catalog, String.format(NOT_NULL_OBJ_FMT, "Catalog"));
assertTrue(!catalog.isPublished(), String.format(OBJ_FIELD_EQ,
CATALOG, "isPublished", false, catalog.isPublished()));

View File

@ -84,14 +84,14 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
Checks.checkAdminOrg(adminOrg);
}
@Test(testName = "GET /admin/org/{id}/settings/emailSettings")
@Test(testName = "GET /admin/org/{id}/settings/email")
public void testGetEmailSettings() {
emailSettings = orgClient.getEmailSettings(orgRef.getHref());
Checks.checkEmailSettings(emailSettings);
}
@Test(testName = "PUT /admin/org/{id}/settings/emailSettings",
@Test(testName = "PUT /admin/org/{id}/settings/email",
dependsOnMethods = { "testGetEmailSettings" })
public void testUpdateEmailSettings() {
boolean isDefaultSmtpServer = emailSettings.isDefaultSmtpServer();
@ -159,14 +159,14 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
}
}
@Test(testName = "GET /admin/org/{id}/settings/generalSettings")
@Test(testName = "GET /admin/org/{id}/settings/general")
public void testGetGeneralSettings() {
generalSettings = orgClient.getGeneralSettings(orgRef.getHref());
Checks.checkGeneralSettings(generalSettings);
}
@Test(testName = "PUT /admin/org/{id}/settings/generalSettings",
@Test(testName = "PUT /admin/org/{id}/settings/general",
dependsOnMethods = { "testGetGeneralSettings" } )
public void testUpdateGeneralSettings() {
// FIXME: canPublishCatalogs does not update

View File

@ -26,6 +26,7 @@ import static org.testng.Assert.fail;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
import org.jclouds.vcloud.director.v1_5.domain.Checks;
import org.jclouds.vcloud.director.v1_5.domain.Group;
import org.jclouds.vcloud.director.v1_5.domain.OrgLdapSettings;
import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorClientLiveTest;
import org.testng.annotations.BeforeClass;
@ -52,11 +53,20 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest {
*/
private Reference groupRef;
private Group group;
private OrgLdapSettings oldLdapSettings, newLdapSettings;
@Override
@BeforeClass(inheritGroups = true)
public void setupRequiredClients() {
groupClient = context.getApi().getGroupClient();
Reference orgRef = null;
// TODO: requisite LDAP settings
// oldLdapSettings = context.getApi().getAdminOrgClient().getLdapSettings(orgRef.getHref());
// OrgLdapSettings newLdapSettings = oldLdapSettings.toBuilder()
// .ldapMode(OrgLdapSettings.LdapMode.SYSTEM)
// .build();
// context.getApi().getAdminOrgClient().updateLdapSettings(newLdapSettings);
}
@Test(testName = "POST /admin/org/{id}/groups")

View File

@ -48,7 +48,7 @@ import com.google.inject.Module;
* @author Adrian Cole
*/
@Listeners(FormatApiResultsListener.class)
@Test(groups = { "live", "user" }, testName = "SessionClientLiveTest")
@Test(groups = { "live", "user", "login" }, testName = "SessionClientLiveTest")
public class SessionClientLiveTest extends BaseVersionedServiceLiveTest {
public SessionClientLiveTest() {
provider = "vcloud-director";