From 69ed7b7acef5fa008250c301d57a81cee3d8f6fd Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Fri, 9 Mar 2012 11:07:23 -0800 Subject: [PATCH] Revert "bug 14151,14153: configuration variables are now hidden; added ldapRemove command" Temporarely reverting checkin that broke the build This reverts commit c9552df956d4f25aa71d5a1aad27d0919f7631e8. --- .../configuration/ConfigurationService.java | 3 -- client/tomcatconf/commands.properties.in | 1 - .../ConfigurationManagerImpl.java | 34 +++++-------------- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/api/src/com/cloud/configuration/ConfigurationService.java b/api/src/com/cloud/configuration/ConfigurationService.java index ce808410ace..452923f7f48 100644 --- a/api/src/com/cloud/configuration/ConfigurationService.java +++ b/api/src/com/cloud/configuration/ConfigurationService.java @@ -34,7 +34,6 @@ import com.cloud.api.commands.DeleteServiceOfferingCmd; import com.cloud.api.commands.DeleteVlanIpRangeCmd; import com.cloud.api.commands.DeleteZoneCmd; import com.cloud.api.commands.LDAPConfigCmd; -import com.cloud.api.commands.LDAPRemoveCmd; import com.cloud.api.commands.ListNetworkOfferingsCmd; import com.cloud.api.commands.UpdateCfgCmd; import com.cloud.api.commands.UpdateDiskOfferingCmd; @@ -249,6 +248,4 @@ public interface ConfigurationService { DiskOffering getDiskOffering(long diskOfferingId); boolean updateLDAP(LDAPConfigCmd cmd) throws NamingException; - - boolean removeLDAP(LDAPRemoveCmd cmd); } diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index 7d65341db99..b0d286bd967 100755 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -154,7 +154,6 @@ migrateSystemVm=com.cloud.api.commands.MigrateSystemVMCmd;1 updateConfiguration=com.cloud.api.commands.UpdateCfgCmd;1 listConfigurations=com.cloud.api.commands.ListCfgsByCmd;1 ldapConfig=com.cloud.api.commands.LDAPConfigCmd;1 -ldapRemove=com.cloud.api.commands.LDAPRemoveCmd;1 listCapabilities=com.cloud.api.commands.ListCapabilitiesCmd;15 #### pod commands diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 200e015360d..2c2d6e595b1 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -55,7 +55,6 @@ import com.cloud.api.commands.DeleteServiceOfferingCmd; import com.cloud.api.commands.DeleteVlanIpRangeCmd; import com.cloud.api.commands.DeleteZoneCmd; import com.cloud.api.commands.LDAPConfigCmd; -import com.cloud.api.commands.LDAPRemoveCmd; import com.cloud.api.commands.ListNetworkOfferingsCmd; import com.cloud.api.commands.UpdateCfgCmd; import com.cloud.api.commands.UpdateDiskOfferingCmd; @@ -1240,21 +1239,6 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura } - @Override - @DB - public boolean removeLDAP(LDAPRemoveCmd cmd) { - _configDao.expunge(LDAPParams.hostname.toString()); - _configDao.expunge(LDAPParams.port.toString()); - _configDao.expunge(LDAPParams.queryfilter.toString()); - _configDao.expunge(LDAPParams.searchbase.toString()); - _configDao.expunge(LDAPParams.usessl.toString()); - _configDao.expunge(LDAPParams.dn.toString()); - _configDao.expunge(LDAPParams.passwd.toString()); - _configDao.expunge(LDAPParams.truststore.toString()); - _configDao.expunge(LDAPParams.truststorepass.toString()); - return true; - } - @Override @DB public boolean updateLDAP(LDAPConfigCmd cmd) { @@ -1300,21 +1284,21 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura // store the result in DB COnfiguration ConfigurationVO cvo = _configDao.findByName(LDAPParams.hostname.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.hostname.toString(), null, "Hostname or ip address of the ldap server eg: my.ldap.com"); + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.hostname.toString(), null, "Hostname or ip address of the ldap server eg: my.ldap.com"); } cvo.setValue(hostname); _configDao.persist(cvo); cvo = _configDao.findByName(LDAPParams.port.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.port.toString(), null, "Specify the LDAP port if required, default is 389"); + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.port.toString(), null, "Specify the LDAP port if required, default is 389"); } cvo.setValue(port.toString()); _configDao.persist(cvo); cvo = _configDao.findByName(LDAPParams.queryfilter.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.queryfilter.toString(), null, + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.queryfilter.toString(), null, "You specify a query filter here, which narrows down the users, who can be part of this domain"); } cvo.setValue(queryFilter); @@ -1322,7 +1306,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura cvo = _configDao.findByName(LDAPParams.searchbase.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.searchbase.toString(), null, + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.searchbase.toString(), null, "The search base defines the starting point for the search in the directory tree Example: dc=cloud,dc=com."); } cvo.setValue(searchBase); @@ -1330,35 +1314,35 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura cvo = _configDao.findByName(LDAPParams.usessl.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.usessl.toString(), null, "Check Use SSL if the external LDAP server is configured for LDAP over SSL."); + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.usessl.toString(), null, "Check Use SSL if the external LDAP server is configured for LDAP over SSL."); } cvo.setValue(useSSL.toString()); _configDao.persist(cvo); cvo = _configDao.findByName(LDAPParams.dn.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.dn.toString(), null, "Specify the distinguished name of a user with the search permission on the directory"); + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.dn.toString(), null, "Specify the distinguished name of a user with the search permission on the directory"); } cvo.setValue(bindDN); _configDao.persist(cvo); cvo = _configDao.findByName(LDAPParams.passwd.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.passwd.toString(), null, "Enter the password"); + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.passwd.toString(), null, "Enter the password"); } cvo.setValue(DBEncryptionUtil.encrypt(bindPasswd)); _configDao.persist(cvo); cvo = _configDao.findByName(LDAPParams.truststore.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.truststore.toString(), null, "Enter the path to trusted keystore"); + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.truststore.toString(), null, "Enter the path to trusted keystore"); } cvo.setValue(trustStore); _configDao.persist(cvo); cvo = _configDao.findByName(LDAPParams.truststorepass.toString()); if (cvo == null) { - cvo = new ConfigurationVO("Hidden", "DEFAULT", "management-server", LDAPParams.truststorepass.toString(), null, "Enter the password for trusted keystore"); + cvo = new ConfigurationVO("Advanced", "DEFAULT", "management-server", LDAPParams.truststorepass.toString(), null, "Enter the password for trusted keystore"); } cvo.setValue(DBEncryptionUtil.encrypt(trustStorePassword)); _configDao.persist(cvo);