bug 10409: added domainSuffix parameters to account/domain objects

Conflicts:

	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/upgrade/dao/Upgrade228to229.java
	server/src/com/cloud/user/AccountManagerImpl.java
	setup/db/db/schema-228to229.sql
This commit is contained in:
alena 2011-07-19 10:47:07 -07:00
parent 3100d4b22f
commit 8b100f7c4d
4 changed files with 7 additions and 3 deletions

View File

@ -3024,6 +3024,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
return result;
}
protected String getZoneNetworkDomain(long zoneId) {
return _dcDao.findById(zoneId).getDomain();
}

View File

@ -66,6 +66,7 @@ public class Upgrade228to229 implements DbUpgrade {
return null;
}
private void dropKeysIfExist(Connection conn) {
HashMap<String, List<String>> indexes = new HashMap<String, List<String>>();
HashMap<String, List<String>> foreignKeys = new HashMap<String, List<String>>();

View File

@ -1289,8 +1289,8 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
user.setTimezone(timezone);
if(userType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN){
//set registration token
byte[] bytes = (domainId + accountName + username + System.currentTimeMillis()).getBytes();
//set registration token
byte[] bytes = (domainId + accountName + username + System.currentTimeMillis()).getBytes();
String registrationToken = UUID.nameUUIDFromBytes(bytes).toString();
user.setRegistrationToken(registrationToken);
}

View File

@ -5,9 +5,11 @@
ALTER TABLE `cloud`.`account` ADD COLUMN `network_domain` varchar(255);
ALTER TABLE `cloud`.`domain` ADD COLUMN `network_domain` varchar(255);
ALTER TABLE `cloud`.`cluster` ADD CONSTRAINT `fk_cluster__data_center_id` FOREIGN KEY (`data_center_id`) REFERENCES `cloud`.`data_center`(`id`) ON DELETE CASCADE;
INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'network.dns.basiczone.updates', 'all', 'This parameter can take 2 values: all (default) and pod. It defines if DHCP/DNS requests have to be send to all dhcp servers in cloudstack, or only to the one in the same pod');
ALTER TABLE `cloud`.`op_host_capacity` DROP FOREIGN KEY `fk_op_host_capacity__pod_id`;
ALTER TABLE `cloud`.`op_host_capacity` DROP FOREIGN KEY `fk_op_host_capacity__data_center_id`;
ALTER TABLE `cloud`.`op_host_capacity` DROP FOREIGN KEY `fk_op_host_capacity__cluster_id`;
ALTER TABLE `cloud`.`op_host_capacity` DROP FOREIGN KEY `fk_op_host_capacity__cluster_id`;