You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/05/08 00:01:34 UTC
[18/72] [abbrv] [partial] Moved most of the VOs and DAOs from server
package into engine-schema as well
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/cluster/dao/ManagementServerHostPeerDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/cluster/dao/ManagementServerHostPeerDaoImpl.java b/server/src/com/cloud/cluster/dao/ManagementServerHostPeerDaoImpl.java
deleted file mode 100644
index 8ad02cd..0000000
--- a/server/src/com/cloud/cluster/dao/ManagementServerHostPeerDaoImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.cluster.dao;
-
-import java.util.List;
-
-import javax.ejb.Local;
-
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
-import com.cloud.cluster.ManagementServerHost;
-import com.cloud.cluster.ManagementServerHostPeerVO;
-import com.cloud.utils.db.DB;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
-
-@Component
-@Local(value={ManagementServerHostPeerDao.class})
-public class ManagementServerHostPeerDaoImpl extends GenericDaoBase<ManagementServerHostPeerVO, Long> implements ManagementServerHostPeerDao {
- private static final Logger s_logger = Logger.getLogger(ManagementServerHostPeerDaoImpl.class);
-
- private final SearchBuilder<ManagementServerHostPeerVO> ClearPeerSearch;
- private final SearchBuilder<ManagementServerHostPeerVO> FindForUpdateSearch;
- private final SearchBuilder<ManagementServerHostPeerVO> CountSearch;
-
- public ManagementServerHostPeerDaoImpl() {
- ClearPeerSearch = createSearchBuilder();
- ClearPeerSearch.and("ownerMshost", ClearPeerSearch.entity().getOwnerMshost(), SearchCriteria.Op.EQ);
- ClearPeerSearch.done();
-
- FindForUpdateSearch = createSearchBuilder();
- FindForUpdateSearch.and("ownerMshost", FindForUpdateSearch.entity().getOwnerMshost(), SearchCriteria.Op.EQ);
- FindForUpdateSearch.and("peerMshost", FindForUpdateSearch.entity().getPeerMshost(), SearchCriteria.Op.EQ);
- FindForUpdateSearch.and("peerRunid", FindForUpdateSearch.entity().getPeerRunid(), SearchCriteria.Op.EQ);
- FindForUpdateSearch.done();
-
- CountSearch = createSearchBuilder();
- CountSearch.and("peerMshost", CountSearch.entity().getPeerMshost(), SearchCriteria.Op.EQ);
- CountSearch.and("peerRunid", CountSearch.entity().getPeerRunid(), SearchCriteria.Op.EQ);
- CountSearch.and("peerState", CountSearch.entity().getPeerState(), SearchCriteria.Op.EQ);
- CountSearch.done();
- }
-
- @Override
- @DB
- public void clearPeerInfo(long ownerMshost) {
- SearchCriteria<ManagementServerHostPeerVO> sc = ClearPeerSearch.create();
- sc.setParameters("ownerMshost", ownerMshost);
-
- expunge(sc);
- }
-
- @Override
- @DB
- public void updatePeerInfo(long ownerMshost, long peerMshost, long peerRunid, ManagementServerHost.State peerState) {
- Transaction txn = Transaction.currentTxn();
- try {
- txn.start();
-
- SearchCriteria<ManagementServerHostPeerVO> sc = FindForUpdateSearch.create();
- sc.setParameters("ownerMshost", ownerMshost);
- sc.setParameters("peerMshost", peerMshost);
- sc.setParameters("peerRunid", peerRunid);
- List<ManagementServerHostPeerVO> l = listBy(sc);
- if(l.size() == 1) {
- ManagementServerHostPeerVO peer = l.get(0);
- peer.setPeerState(peerState);
- update(peer.getId(), peer);
- } else {
- ManagementServerHostPeerVO peer = new ManagementServerHostPeerVO(ownerMshost, peerMshost, peerRunid, peerState);
- persist(peer);
- }
- txn.commit();
- } catch(Exception e) {
- s_logger.warn("Unexpected exception, ", e);
- txn.rollback();
- }
- }
-
- @Override
- @DB
- public int countStateSeenInPeers(long mshost, long runid, ManagementServerHost.State state) {
- SearchCriteria<ManagementServerHostPeerVO> sc = CountSearch.create();
- sc.setParameters("peerMshost", mshost);
- sc.setParameters("peerRunid", runid);
- sc.setParameters("peerState", state);
-
- List<ManagementServerHostPeerVO> l = listBy(sc);
- return l.size();
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/cluster/dao/StackMaidDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/cluster/dao/StackMaidDao.java b/server/src/com/cloud/cluster/dao/StackMaidDao.java
deleted file mode 100644
index eb13b5c..0000000
--- a/server/src/com/cloud/cluster/dao/StackMaidDao.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.cluster.dao;
-
-import java.util.Date;
-import java.util.List;
-
-import com.cloud.cluster.CheckPointVO;
-import com.cloud.utils.db.GenericDao;
-
-public interface StackMaidDao extends GenericDao<CheckPointVO, Long> {
- public long pushCleanupDelegate(long msid, int seq, String delegateClzName, Object context);
- public CheckPointVO popCleanupDelegate(long msid);
- public void clearStack(long msid);
-
- public List<CheckPointVO> listLeftoversByMsid(long msid);
- public List<CheckPointVO> listLeftoversByCutTime(Date cutTime);
-
- /**
- * Take over the task items of another management server and clean them up.
- *
- * @param takeOverMsid management server id to take over.
- * @param selfId the management server id of this node.
- * @return list of tasks to take over.
- */
- boolean takeover(long takeOverMsid, long selfId);
-
- List<CheckPointVO> listCleanupTasks(long selfId);
- List<CheckPointVO> listLeftoversByCutTime(Date cutTime, long msid);
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/cluster/dao/StackMaidDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/cluster/dao/StackMaidDaoImpl.java b/server/src/com/cloud/cluster/dao/StackMaidDaoImpl.java
deleted file mode 100644
index 243b00f..0000000
--- a/server/src/com/cloud/cluster/dao/StackMaidDaoImpl.java
+++ /dev/null
@@ -1,208 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.cluster.dao;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.TimeZone;
-
-import javax.ejb.Local;
-
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
-import com.cloud.cluster.CheckPointVO;
-import com.cloud.serializer.SerializerHelper;
-import com.cloud.utils.DateUtil;
-import com.cloud.utils.db.DB;
-import com.cloud.utils.db.Filter;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
-
-@Component
-@Local(value = { StackMaidDao.class }) @DB(txn=false)
-public class StackMaidDaoImpl extends GenericDaoBase<CheckPointVO, Long> implements StackMaidDao {
- private static final Logger s_logger = Logger.getLogger(StackMaidDaoImpl.class);
-
- private SearchBuilder<CheckPointVO> popSearch;
- private SearchBuilder<CheckPointVO> clearSearch;
- private final SearchBuilder<CheckPointVO> AllFieldsSearch;
-
- public StackMaidDaoImpl() {
- popSearch = createSearchBuilder();
- popSearch.and("msid", popSearch.entity().getMsid(), SearchCriteria.Op.EQ);
- popSearch.and("threadId", popSearch.entity().getThreadId(), SearchCriteria.Op.EQ);
-
- clearSearch = createSearchBuilder();
- clearSearch.and("msid", clearSearch.entity().getMsid(), SearchCriteria.Op.EQ);
-
- AllFieldsSearch = createSearchBuilder();
- AllFieldsSearch.and("msid", AllFieldsSearch.entity().getMsid(), Op.EQ);
- AllFieldsSearch.and("thread", AllFieldsSearch.entity().getThreadId(), Op.EQ);
- AllFieldsSearch.done();
- }
-
- @Override
- public boolean takeover(long takeOverMsid, long selfId) {
- CheckPointVO task = createForUpdate();
- task.setMsid(selfId);
- task.setThreadId(0);
-
- SearchCriteria<CheckPointVO> sc = AllFieldsSearch.create();
- sc.setParameters("msid", takeOverMsid);
- return update(task, sc) > 0;
-
- }
-
- @Override
- public List<CheckPointVO> listCleanupTasks(long msId) {
- SearchCriteria<CheckPointVO> sc = AllFieldsSearch.create();
- sc.setParameters("msid", msId);
- sc.setParameters("thread", 0);
-
- return this.search(sc, null);
- }
-
- @Override
- public long pushCleanupDelegate(long msid, int seq, String delegateClzName, Object context) {
- CheckPointVO delegateItem = new CheckPointVO();
- delegateItem.setMsid(msid);
- delegateItem.setThreadId(Thread.currentThread().getId());
- delegateItem.setSeq(seq);
- delegateItem.setDelegate(delegateClzName);
- delegateItem.setContext(SerializerHelper.toSerializedStringOld(context));
- delegateItem.setCreated(DateUtil.currentGMTTime());
-
- super.persist(delegateItem);
- return delegateItem.getId();
- }
-
- @Override
- public CheckPointVO popCleanupDelegate(long msid) {
- SearchCriteria<CheckPointVO> sc = popSearch.create();
- sc.setParameters("msid", msid);
- sc.setParameters("threadId", Thread.currentThread().getId());
-
- Filter filter = new Filter(CheckPointVO.class, "seq", false, 0L, (long)1);
- List<CheckPointVO> l = listIncludingRemovedBy(sc, filter);
- if(l != null && l.size() > 0) {
- expunge(l.get(0).getId());
- return l.get(0);
- }
-
- return null;
- }
-
- @Override
- public void clearStack(long msid) {
- SearchCriteria<CheckPointVO> sc = clearSearch.create();
- sc.setParameters("msid", msid);
-
- expunge(sc);
- }
-
- @Override
- @DB
- public List<CheckPointVO> listLeftoversByMsid(long msid) {
- List<CheckPointVO> l = new ArrayList<CheckPointVO>();
- String sql = "select * from stack_maid where msid=? order by msid asc, thread_id asc, seq desc";
-
- Transaction txn = Transaction.currentTxn();
- PreparedStatement pstmt = null;
- try {
- pstmt = txn.prepareAutoCloseStatement(sql);
- pstmt.setLong(1, msid);
-
- ResultSet rs = pstmt.executeQuery();
- while(rs.next()) {
- l.add(toEntityBean(rs, false));
- }
- } catch (SQLException e) {
- s_logger.error("unexcpected exception " + e.getMessage(), e);
- } catch (Throwable e) {
- s_logger.error("unexcpected exception " + e.getMessage(), e);
- } finally {
- txn.close();
- }
- return l;
- }
-
- @Override
- @DB
- public List<CheckPointVO> listLeftoversByCutTime(Date cutTime) {
-
- List<CheckPointVO> l = new ArrayList<CheckPointVO>();
- String sql = "select * from stack_maid where created < ? order by msid asc, thread_id asc, seq desc";
-
- Transaction txn = Transaction.open(Transaction.CLOUD_DB);
- PreparedStatement pstmt = null;
- try {
- pstmt = txn.prepareAutoCloseStatement(sql);
- String gmtCutTime = DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), cutTime);
- pstmt.setString(1, gmtCutTime);
-
- ResultSet rs = pstmt.executeQuery();
- while(rs.next()) {
- l.add(toEntityBean(rs, false));
- }
- } catch (SQLException e) {
- s_logger.error("unexcpected exception " + e.getMessage(), e);
- } catch (Throwable e) {
- s_logger.error("unexcpected exception " + e.getMessage(), e);
- } finally {
- txn.close();
- }
- return l;
- }
-
- @Override
- @DB
- public List<CheckPointVO> listLeftoversByCutTime(Date cutTime, long msid) {
-
- List<CheckPointVO> l = new ArrayList<CheckPointVO>();
- String sql = "select * from stack_maid where created < ? and msid = ? order by msid asc, thread_id asc, seq desc";
-
- Transaction txn = Transaction.open(Transaction.CLOUD_DB);
- PreparedStatement pstmt = null;
- try {
- pstmt = txn.prepareAutoCloseStatement(sql);
- String gmtCutTime = DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), cutTime);
- pstmt.setString(1, gmtCutTime);
- pstmt.setLong(2, msid);
-
- ResultSet rs = pstmt.executeQuery();
- while(rs.next()) {
- l.add(toEntityBean(rs, false));
- }
- } catch (SQLException e) {
- s_logger.error("unexcpected exception " + e.getMessage(), e);
- } catch (Throwable e) {
- s_logger.error("unexcpected exception " + e.getMessage(), e);
- } finally {
- txn.close();
- }
- return l;
- }
-}
-
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/configuration/dao/ConfigurationDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/dao/ConfigurationDao.java b/server/src/com/cloud/configuration/dao/ConfigurationDao.java
deleted file mode 100644
index 2b09901..0000000
--- a/server/src/com/cloud/configuration/dao/ConfigurationDao.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.configuration.dao;
-
-import java.util.Map;
-import java.util.List;
-
-import com.cloud.configuration.ConfigurationVO;
-import com.cloud.utils.db.GenericDao;
-
-public interface ConfigurationDao extends GenericDao<ConfigurationVO, String> {
-
- /**
- *
- * 1. params passed in.
- * 2. configuration for the instance.
- * 3. configuration for the DEFAULT instance.
- *
- * @param params parameters from the components.xml which will override the database values.
- * @return a consolidated look at the configuration parameters.
- */
- public Map<String, String> getConfiguration(String instance, Map<String, ? extends Object> params);
-
- public Map<String, String> getConfiguration(Map<String, ? extends Object> params);
-
- public Map<String, String> getConfiguration();
-
- /**
- * Updates a configuration value
- * @param value the new value
- * @return true if success, false if failure
- */
- public boolean update(String name, String value);
-
- /**
- * Gets the value for the specified configuration name
- * @return value
- */
- public String getValue(String name);
-
- public String getValueAndInitIfNotExist(String name, String category, String initValue);
-
-
- /**
- * returns whether or not this is a premium configuration
- * @return true if premium configuration, false otherwise
- */
- boolean isPremium();
-
- ConfigurationVO findByName(String name);
-
- boolean update(String name, String category, String value);
-
- void invalidateCache();
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java b/server/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java
deleted file mode 100644
index fe5f5ae..0000000
--- a/server/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java
+++ /dev/null
@@ -1,225 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.configuration.dao;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-import javax.ejb.Local;
-import javax.naming.ConfigurationException;
-
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
-import com.cloud.configuration.ConfigurationVO;
-import com.cloud.utils.component.ComponentLifecycle;
-import com.cloud.utils.crypt.DBEncryptionUtil;
-import com.cloud.utils.db.DB;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
-import com.cloud.utils.exception.CloudRuntimeException;
-
-@Component
-@Local(value={ConfigurationDao.class})
-public class ConfigurationDaoImpl extends GenericDaoBase<ConfigurationVO, String> implements ConfigurationDao {
- private static final Logger s_logger = Logger.getLogger(ConfigurationDaoImpl.class);
- private Map<String, String> _configs = null;
- private boolean _premium;
-
- final SearchBuilder<ConfigurationVO> InstanceSearch;
- final SearchBuilder<ConfigurationVO> NameSearch;
-
- public static final String UPDATE_CONFIGURATION_SQL = "UPDATE configuration SET value = ? WHERE name = ?";
-
- public ConfigurationDaoImpl () {
- InstanceSearch = createSearchBuilder();
- InstanceSearch.and("instance", InstanceSearch.entity().getInstance(), SearchCriteria.Op.EQ);
-
- NameSearch = createSearchBuilder();
- NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ);
- setRunLevel(ComponentLifecycle.RUN_LEVEL_SYSTEM_BOOTSTRAP);
- }
-
- @Override
- public boolean isPremium() {
- return _premium;
- }
-
- @Override
- public void invalidateCache() {
- _configs = null;
- }
-
- @Override
- public Map<String, String> getConfiguration(String instance, Map<String, ? extends Object> params) {
- if (_configs == null) {
- _configs = new HashMap<String, String>();
-
- SearchCriteria<ConfigurationVO> sc = InstanceSearch.create();
- sc.setParameters("instance", "DEFAULT");
-
- List<ConfigurationVO> configurations = listIncludingRemovedBy(sc);
-
- for (ConfigurationVO config : configurations) {
- if (config.getValue() != null)
- _configs.put(config.getName(), config.getValue());
- }
-
- if(!"DEFAULT".equals(instance)){
- //Default instance params are already added, need not add again
- sc = InstanceSearch.create();
- sc.setParameters("instance", instance);
-
- configurations = listIncludingRemovedBy(sc);
-
- for (ConfigurationVO config : configurations) {
- if (config.getValue() != null)
- _configs.put(config.getName(), config.getValue());
- }
- }
-
- }
-
- mergeConfigs(_configs, params);
- return _configs;
- }
-
- @Override
- public Map<String, String> getConfiguration(Map<String, ? extends Object> params) {
- return getConfiguration("DEFAULT", params);
- }
-
- @Override
- public Map<String, String> getConfiguration() {
- return getConfiguration("DEFAULT", new HashMap<String, Object>());
- }
-
- protected void mergeConfigs(Map<String, String> dbParams, Map<String, ? extends Object> xmlParams) {
- for (Map.Entry<String, ? extends Object> param : xmlParams.entrySet()) {
- dbParams.put(param.getKey(), (String)param.getValue());
- }
- }
-
- @Override
- public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
- super.configure(name, params);
-
- Object premium = params.get("premium");
- _premium = (premium != null) && ((String) premium).equals("true");
-
- return true;
- }
-
- //Use update method with category instead
- @Override @Deprecated
- public boolean update(String name, String value) {
- Transaction txn = Transaction.currentTxn();
- try {
- PreparedStatement stmt = txn.prepareStatement(UPDATE_CONFIGURATION_SQL);
- stmt.setString(1, value);
- stmt.setString(2, name);
- stmt.executeUpdate();
- return true;
- } catch (Exception e) {
- s_logger.warn("Unable to update Configuration Value", e);
- }
- return false;
- }
-
- @Override
- public boolean update(String name, String category, String value) {
- Transaction txn = Transaction.currentTxn();
- try {
- value = ("Hidden".equals(category) || "Secure".equals(category)) ? DBEncryptionUtil.encrypt(value) : value;
- PreparedStatement stmt = txn.prepareStatement(UPDATE_CONFIGURATION_SQL);
- stmt.setString(1, value);
- stmt.setString(2, name);
- stmt.executeUpdate();
- return true;
- } catch (Exception e) {
- s_logger.warn("Unable to update Configuration Value", e);
- }
- return false;
- }
-
- @Override
- public String getValue(String name) {
- ConfigurationVO config = findByName(name);
- return (config == null) ? null : config.getValue();
- }
-
- @Override
- @DB
- public String getValueAndInitIfNotExist(String name, String category, String initValue) {
- Transaction txn = Transaction.currentTxn();
- PreparedStatement stmt = null;
- PreparedStatement stmtInsert = null;
- String returnValue = initValue;
- try {
- txn.start();
- stmt = txn.prepareAutoCloseStatement("SELECT value FROM configuration WHERE name=?");
- stmt.setString(1, name);
- ResultSet rs = stmt.executeQuery();
- if(rs != null && rs.next()) {
- returnValue = rs.getString(1);
- if(returnValue != null) {
- txn.commit();
- if("Hidden".equals(category) || "Secure".equals(category)){
- return DBEncryptionUtil.decrypt(returnValue);
- } else {
- return returnValue;
- }
- } else {
- // restore init value
- returnValue = initValue;
- }
- }
- stmt.close();
-
- if("Hidden".equals(category) || "Secure".equals(category)){
- initValue = DBEncryptionUtil.encrypt(initValue);
- }
- stmtInsert = txn.prepareAutoCloseStatement(
- "INSERT INTO configuration(instance, name, value, description) VALUES('DEFAULT', ?, ?, '') ON DUPLICATE KEY UPDATE value=?");
- stmtInsert.setString(1, name);
- stmtInsert.setString(2, initValue);
- stmtInsert.setString(3, initValue);
- if(stmtInsert.executeUpdate() < 1) {
- throw new CloudRuntimeException("Unable to init configuration variable: " + name);
- }
- txn.commit();
- return returnValue;
- } catch (Exception e) {
- s_logger.warn("Unable to update Configuration Value", e);
- throw new CloudRuntimeException("Unable to init configuration variable: " + name);
- }
- }
-
- @Override
- public ConfigurationVO findByName(String name) {
- SearchCriteria<ConfigurationVO> sc = NameSearch.create();
- sc.setParameters("name", name);
- return findOneIncludingRemovedBy(sc);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/configuration/dao/ResourceCountDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/dao/ResourceCountDao.java b/server/src/com/cloud/configuration/dao/ResourceCountDao.java
deleted file mode 100644
index 111bcb1..0000000
--- a/server/src/com/cloud/configuration/dao/ResourceCountDao.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.configuration.dao;
-
-import java.util.List;
-import java.util.Set;
-
-import com.cloud.configuration.Resource.ResourceOwnerType;
-import com.cloud.configuration.Resource.ResourceType;
-import com.cloud.configuration.ResourceCountVO;
-import com.cloud.utils.db.GenericDao;
-
-public interface ResourceCountDao extends GenericDao<ResourceCountVO, Long> {
- /**
- * @param domainId the id of the domain to get the resource count
- * @param type the type of resource (e.g. user_vm, public_ip, volume)
- * @return the count of resources in use for the given type and domain
- */
- long getResourceCount(long ownerId, ResourceOwnerType ownerType, ResourceType type);
-
- /**
- * @param domainId the id of the domain to set the resource count
- * @param type the type of resource (e.g. user_vm, public_ip, volume)
- * @param the count of resources in use for the given type and domain
- */
- void setResourceCount(long ownerId, ResourceOwnerType ownerType, ResourceType type, long count);
-
- @Deprecated
- void updateDomainCount(long domainId, ResourceType type, boolean increment, long delta);
-
- boolean updateById(long id, boolean increment, long delta);
-
- void createResourceCounts(long ownerId, ResourceOwnerType ownerType);
-
- List<ResourceCountVO> listByOwnerId(long ownerId, ResourceOwnerType ownerType);
-
- ResourceCountVO findByOwnerAndType(long ownerId, ResourceOwnerType ownerType, ResourceType type);
-
- List<ResourceCountVO> listResourceCountByOwnerType(ResourceOwnerType ownerType);
-
- Set<Long> listAllRowsToUpdate(long ownerId, ResourceOwnerType ownerType, ResourceType type);
-
- Set<Long> listRowsToUpdateForDomain(long domainId, ResourceType type);
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java b/server/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
deleted file mode 100644
index 52bc746..0000000
--- a/server/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
+++ /dev/null
@@ -1,222 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.configuration.dao;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.configuration.Resource;
-import com.cloud.configuration.Resource.ResourceOwnerType;
-import com.cloud.configuration.Resource.ResourceType;
-import com.cloud.configuration.ResourceCountVO;
-import com.cloud.configuration.ResourceLimit;
-import com.cloud.domain.dao.DomainDao;
-import com.cloud.domain.dao.DomainDaoImpl;
-import com.cloud.exception.UnsupportedServiceException;
-import com.cloud.user.dao.AccountDao;
-import com.cloud.user.dao.AccountDaoImpl;
-import com.cloud.utils.db.DB;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
-
-@Component
-@Local(value={ResourceCountDao.class})
-public class ResourceCountDaoImpl extends GenericDaoBase<ResourceCountVO, Long> implements ResourceCountDao {
- private final SearchBuilder<ResourceCountVO> TypeSearch;
-
- private final SearchBuilder<ResourceCountVO> AccountSearch;
- private final SearchBuilder<ResourceCountVO> DomainSearch;
-
- @Inject protected DomainDao _domainDao;
- @Inject protected AccountDao _accountDao;
-
- public ResourceCountDaoImpl() {
- TypeSearch = createSearchBuilder();
- TypeSearch.and("type", TypeSearch.entity().getType(), SearchCriteria.Op.EQ);
- TypeSearch.and("accountId", TypeSearch.entity().getAccountId(), SearchCriteria.Op.EQ);
- TypeSearch.and("domainId", TypeSearch.entity().getDomainId(), SearchCriteria.Op.EQ);
- TypeSearch.done();
-
- AccountSearch = createSearchBuilder();
- AccountSearch.and("accountId", AccountSearch.entity().getAccountId(), SearchCriteria.Op.NNULL);
- AccountSearch.done();
-
- DomainSearch = createSearchBuilder();
- DomainSearch.and("domainId", DomainSearch.entity().getDomainId(), SearchCriteria.Op.NNULL);
- DomainSearch.done();
- }
-
- @Override
- public ResourceCountVO findByOwnerAndType(long ownerId, ResourceOwnerType ownerType, ResourceType type) {
- SearchCriteria<ResourceCountVO> sc = TypeSearch.create();
- sc.setParameters("type", type);
-
- if (ownerType == ResourceOwnerType.Account) {
- sc.setParameters("accountId", ownerId);
- return findOneIncludingRemovedBy(sc);
- } else if (ownerType == ResourceOwnerType.Domain) {
- sc.setParameters("domainId", ownerId);
- return findOneIncludingRemovedBy(sc);
- } else {
- return null;
- }
- }
-
- @Override
- public long getResourceCount(long ownerId, ResourceOwnerType ownerType, ResourceType type) {
- ResourceCountVO vo = findByOwnerAndType(ownerId, ownerType, type);
- if (vo != null) {
- return vo.getCount();
- } else {
- return 0;
- }
- }
-
- @Override
- public void setResourceCount(long ownerId, ResourceOwnerType ownerType, ResourceType type, long count) {
- ResourceCountVO resourceCountVO = findByOwnerAndType(ownerId, ownerType, type);
- if (count != resourceCountVO.getCount()) {
- resourceCountVO.setCount(count);
- update(resourceCountVO.getId(), resourceCountVO);
- }
- }
-
- @Override @Deprecated
- public void updateDomainCount(long domainId, ResourceType type, boolean increment, long delta) {
- delta = increment ? delta : delta * -1;
-
- ResourceCountVO resourceCountVO = findByOwnerAndType(domainId, ResourceOwnerType.Domain, type);
- resourceCountVO.setCount(resourceCountVO.getCount() + delta);
- update(resourceCountVO.getId(), resourceCountVO);
- }
-
- @Override
- public boolean updateById(long id, boolean increment, long delta) {
- delta = increment ? delta : delta * -1;
-
- ResourceCountVO resourceCountVO = findById(id);
- resourceCountVO.setCount(resourceCountVO.getCount() + delta);
- return update(resourceCountVO.getId(), resourceCountVO);
- }
-
- @Override
- public Set<Long> listRowsToUpdateForDomain(long domainId, ResourceType type) {
- Set<Long> rowIds = new HashSet<Long>();
- Set<Long> domainIdsToUpdate = _domainDao.getDomainParentIds(domainId);
- for (Long domainIdToUpdate : domainIdsToUpdate) {
- ResourceCountVO domainCountRecord = findByOwnerAndType(domainIdToUpdate, ResourceOwnerType.Domain, type);
- if (domainCountRecord != null) {
- rowIds.add(domainCountRecord.getId());
- }
- }
- return rowIds;
- }
-
- @Override
- public Set<Long> listAllRowsToUpdate(long ownerId, ResourceOwnerType ownerType, ResourceType type) {
- Set<Long> rowIds = new HashSet<Long>();
-
- if (ownerType == ResourceOwnerType.Account) {
- //get records for account
- ResourceCountVO accountCountRecord = findByOwnerAndType(ownerId, ResourceOwnerType.Account, type);
- if (accountCountRecord != null) {
- rowIds.add(accountCountRecord.getId());
- }
-
- //get records for account's domain and all its parent domains
- rowIds.addAll(listRowsToUpdateForDomain(_accountDao.findByIdIncludingRemoved(ownerId).getDomainId(),type));
- } else if (ownerType == ResourceOwnerType.Domain) {
- return listRowsToUpdateForDomain(ownerId, type);
- }
-
- return rowIds;
- }
-
- @Override @DB
- public void createResourceCounts(long ownerId, ResourceLimit.ResourceOwnerType ownerType){
-
- Transaction txn = Transaction.currentTxn();
- txn.start();
-
- ResourceType[] resourceTypes = Resource.ResourceType.values();
- for (ResourceType resourceType : resourceTypes) {
- if (!resourceType.supportsOwner(ownerType)) {
- continue;
- }
- ResourceCountVO resourceCountVO = new ResourceCountVO(resourceType, 0, ownerId, ownerType);
- persist(resourceCountVO);
- }
-
- txn.commit();
- }
-
- private List<ResourceCountVO> listByDomainId(long domainId) {
- SearchCriteria<ResourceCountVO> sc = TypeSearch.create();
- sc.setParameters("domainId", domainId);
-
- return listBy(sc);
- }
-
- private List<ResourceCountVO> listByAccountId(long accountId) {
- SearchCriteria<ResourceCountVO> sc = TypeSearch.create();
- sc.setParameters("accountId", accountId);
-
- return listBy(sc);
- }
-
- @Override
- public List<ResourceCountVO> listByOwnerId(long ownerId, ResourceOwnerType ownerType) {
- if (ownerType == ResourceOwnerType.Account) {
- return listByAccountId(ownerId);
- } else if (ownerType == ResourceOwnerType.Domain) {
- return listByDomainId(ownerId);
- } else {
- return new ArrayList<ResourceCountVO>();
- }
- }
-
- @Override
- public List<ResourceCountVO> listResourceCountByOwnerType(ResourceOwnerType ownerType) {
- if (ownerType == ResourceOwnerType.Account) {
- return listBy(AccountSearch.create());
- } else if (ownerType == ResourceOwnerType.Domain) {
- return listBy(DomainSearch.create());
- } else {
- return new ArrayList<ResourceCountVO>();
- }
- }
-
- @Override
- public ResourceCountVO persist(ResourceCountVO resourceCountVO){
- ResourceOwnerType ownerType = resourceCountVO.getResourceOwnerType();
- ResourceType resourceType = resourceCountVO.getType();
- if (!resourceType.supportsOwner(ownerType)) {
- throw new UnsupportedServiceException("Resource type " + resourceType + " is not supported for owner of type " + ownerType.getName());
- }
-
- return super.persist(resourceCountVO);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/configuration/dao/ResourceLimitDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/dao/ResourceLimitDao.java b/server/src/com/cloud/configuration/dao/ResourceLimitDao.java
deleted file mode 100644
index 5fd79b3..0000000
--- a/server/src/com/cloud/configuration/dao/ResourceLimitDao.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.configuration.dao;
-
-import java.util.List;
-
-import com.cloud.configuration.Resource.ResourceOwnerType;
-import com.cloud.configuration.ResourceCount;
-import com.cloud.configuration.ResourceLimitVO;
-import com.cloud.utils.db.GenericDao;
-
-public interface ResourceLimitDao extends GenericDao<ResourceLimitVO, Long> {
-
- List<ResourceLimitVO> listByOwner(Long ownerId, ResourceOwnerType ownerType);
-
- boolean update(Long id, Long max);
-
- ResourceCount.ResourceType getLimitType(String type);
-
- ResourceLimitVO findByOwnerIdAndType(long ownerId, ResourceOwnerType ownerType, ResourceCount.ResourceType type);
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/configuration/dao/ResourceLimitDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/dao/ResourceLimitDaoImpl.java b/server/src/com/cloud/configuration/dao/ResourceLimitDaoImpl.java
deleted file mode 100644
index d337070..0000000
--- a/server/src/com/cloud/configuration/dao/ResourceLimitDaoImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.configuration.dao;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.configuration.Resource;
-import com.cloud.configuration.Resource.ResourceOwnerType;
-import com.cloud.configuration.Resource.ResourceType;
-import com.cloud.configuration.ResourceCount;
-import com.cloud.configuration.ResourceLimitVO;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-
-@Component
-@Local(value = { ResourceLimitDao.class })
-public class ResourceLimitDaoImpl extends GenericDaoBase<ResourceLimitVO, Long> implements ResourceLimitDao {
- private SearchBuilder<ResourceLimitVO> IdTypeSearch;
-
- public ResourceLimitDaoImpl() {
- IdTypeSearch = createSearchBuilder();
- IdTypeSearch.and("type", IdTypeSearch.entity().getType(), SearchCriteria.Op.EQ);
- IdTypeSearch.and("domainId", IdTypeSearch.entity().getDomainId(), SearchCriteria.Op.EQ);
- IdTypeSearch.and("accountId", IdTypeSearch.entity().getAccountId(), SearchCriteria.Op.EQ);
- IdTypeSearch.done();
- }
-
- @Override
- public List<ResourceLimitVO> listByOwner(Long ownerId, ResourceOwnerType ownerType) {
- SearchCriteria<ResourceLimitVO> sc = IdTypeSearch.create();
-
- if (ownerType == ResourceOwnerType.Account) {
- sc.setParameters("accountId", ownerId);
- return listBy(sc);
- } else if (ownerType == ResourceOwnerType.Domain) {
- sc.setParameters("domainId", ownerId);
- return listBy(sc);
- } else {
- return new ArrayList<ResourceLimitVO>();
- }
- }
-
- @Override
- public boolean update(Long id, Long max) {
- ResourceLimitVO limit = findById(id);
- if (max != null)
- limit.setMax(max);
- else
- limit.setMax(new Long(-1));
- return update(id, limit);
- }
-
- @Override
- public ResourceCount.ResourceType getLimitType(String type) {
- ResourceType[] validTypes = Resource.ResourceType.values();
-
- for (ResourceType validType : validTypes) {
- if (validType.getName().equals(type)) {
- return validType;
- }
- }
- return null;
- }
-
- @Override
- public ResourceLimitVO findByOwnerIdAndType(long ownerId, ResourceOwnerType ownerType, ResourceCount.ResourceType type) {
- SearchCriteria<ResourceLimitVO> sc = IdTypeSearch.create();
- sc.setParameters("type", type);
-
- if (ownerType == ResourceOwnerType.Account) {
- sc.setParameters("accountId", ownerId);
- return findOneBy(sc);
- } else if (ownerType == ResourceOwnerType.Domain) {
- sc.setParameters("domainId", ownerId);
- return findOneBy(sc);
- } else {
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
index c4ad817..9a7a46f 100755
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -5,7 +5,7 @@
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
@@ -23,7 +23,6 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.UUID;
import javax.ejb.Local;
import javax.inject.Inject;
@@ -98,7 +97,6 @@ import com.cloud.resource.UnableDeleteHostException;
import com.cloud.server.ManagementServer;
import com.cloud.service.ServiceOfferingVO;
import com.cloud.service.dao.ServiceOfferingDao;
-import com.cloud.servlet.ConsoleProxyPasswordBasedEncryptor;
import com.cloud.storage.StorageManager;
import com.cloud.storage.StoragePoolStatus;
import com.cloud.storage.VMTemplateHostVO;
@@ -263,186 +261,6 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
private final GlobalLock _allocProxyLock = GlobalLock.getInternLock(getAllocProxyLockName());
- /*
- * private final String keyContent =
- * "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALV5vGlkiWwoZX4hTRplPXP8qtST\n"
- * + "hwZhko8noeY5vf8ECwmd+vrCTw/JvnOtkx/8oYNbg/SeUt1EfOsk6gqJdBblGFBZRMcUJlIpqE9z\n" +
- * "uv68U9G8Gfi/qvRSY336hibw0J5bZ4vn1QqmyHDB+Czea9AjFUV7AEVG15+vED7why+/AgMBAAEC\n"
- * + "gYBmFBPnNKYYMKDmUdUNA+WNWJK/ADzzWe8WlzR6TACTcbLDthl289WFC/YVG42mcHRpbxDKiEQU\n" +
- * "MnIR0rHTO34Qb/2HcuyweStU2gqR6omxBvMnFpJr90nD1HcOMJzeLHsphau0/EmKKey+gk4PyieD\n"
- * + "KqTM7LTjjHv8xPM4n+WAAQJBAOMNCeFKlJ4kMokWhU74B5/w/NGyT1BHUN0VmilHSiJC8JqS4BiI\n" +
- * "ZpAeET3VmilO6QTGh2XVhEDGteu3uZR6ipUCQQDMnRzMgQ/50LFeIQo4IBtwlEouczMlPQF4c21R\n"
- * + "1d720moxILVPT0NJZTQUDDmmgbL+B7CgtcCR2NlP5sKPZVADAkEAh4Xq1cy8dMBKYcVNgNtPQcqI\n" +
- * "PWpfKR3ISI5yXB0vRNAL6Vet5zbTcUZhKDVtNSbis3UEsGYH8NorEC2z2cpjGQJANhJi9Ow6c5Mh\n"
- * + "/DURBUn+1l5pyCKrZnDbvaALSLATLvjmFTuGjoHszy2OeKnOZmEqExWnKKE/VYuPyhy6V7i3TwJA\n" +
- * "f8skDgtPK0OsBCa6IljPaHoWBjPc4kFkSTSS1d56hUcWSikTmiuKdLyBb85AADSZYsvHWrte4opN\n" + "dhNukMJuRA==\n";
- *
- * private final String certContent = "-----BEGIN C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2h0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5j\n"
- * + "b20vcmVwb3NpdG9yeS8wgYAGCCsGAQUFBwEBBHQwcjAkBggrBgEFBQcwAYYYaHR0\n" +
- * "cDovL29jc3AuZ29kYWRkeS5jb20vMEoGCCsGAQUFBzAChj5odHRwOi8vY2VydGlm\n"
- * + "aWNhdGVzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkvZ2RfaW50ZXJtZWRpYXRlLmNy\n" +
- * "dDAfBgNVHSMEGDAWgBT9rGEyk2xF1uLuhV+auud2mWjM5zArBgNVHREEJDAighAq\n"
- * + "LnJlYWxob3N0aXAuY29tgg5yZWFsaG9zdGlwLmNvbTAdBgNVHQ4EFgQUHxwmdK5w\n" +
- * "9/YVeZ/3fHyi6nQfzoYwDQYJKoZIhvcNAQEFBQADggEBABv/XinvId6oWXJtmku+\n"
- * + "7m90JhSVH0ycoIGjgdaIkcExQGP08MCilbUsPcbhLheSFdgn/cR4e1MP083lacoj\n" +
- * "OGauY7b8f/cuquGkT49Ns14awPlEzRjjycQEjjLxFEuL5CFWa2t2gKRE1dSfhDQ+\n"
- * + "fJ6GBCs1XgZLuhkKS8fPf+YmG2ZjHzYDjYoSx7paDXgEm+kbYIZdCK51lA0BUAjP\n" +
- * "9ZMGhsu/PpAbh5U/DtcIqxY0xeqD4TeGsBzXg6uLhv+jKHDtXg5fYPe+z0n5DCEL\n"
- * + "k0fLF4+i/pt9hVCz0QrZ28RUhXf825+EOL0Gw+Uzt+7RV2cCaJrlu4cDrDom2FRy\n" + "E8I=\n" +
- * "-----END CERTIFICATE-----\n";
- */
- public static final String keyContent =
- "-----BEGIN PRIVATE KEY-----\n" +
- "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCDT9AtEfs+s/I8QXp6rrCw0iNJ\n" +
- "0+GgsybNHheU+JpL39LMTZykCrZhZnyDvwdxCoOfE38Sa32baHKNds+y2SHnMNsOkw8OcNucHEB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hPF\n" +
- "c6gWhwQLmTp0CuL2RPXcPUPFi6sN2iWWi3zxxi9Eyz+9uBn6AsOpo56N5MME/LiOnETO9TKb+Ib6\n" +
- "rQtKhjshcv3XkIqFPo2XdVvOAgglPO7vajX91iiXXuH7h7RmJud6l0y/lwKBgE+bi90gLuPtpoEr\n" +
- "VzIDKz40ED5bNYHT80NNy0rpT7J2GVN9nwStRYXPBBVeZq7xCpgqpgmO5LtDAWULeZBlbHlOdBwl\n" +
- "NhNKKl5wzdEUKwW0yBL1WSS5PQgWPwgARYP25/ggW22sj+49WIo1neXsEKPGWObk8e050f1fTt92\n" +
- "Vo1lAoGAb1gCoyBCzvi7sqFxm4V5oapnJeiQQJFjhoYWqGa26rQ+AvXXNuBcigIeDXNJPctSF0Uc\n" +
- "p11KbbCgiruBbckvM1vGsk6Sx4leRk+IFHRpJktFUek4o0eUg0shOsyyvyet48Dfg0a8FvcxROs0\n" +
- "gD+IYds5doiob/hcm1hnNB/3vk4=\n" +
- "-----END PRIVATE KEY-----\n";
-
- public static final String certContent =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIIFZTCCBE2gAwIBAgIHKBCduBUoKDANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE\n" +
- "BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY\n" +
- "BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMTMwMQYDVQQLEypodHRwOi8vY2VydGlm\n" +
- "aWNhdGVzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkxMDAuBgNVBAMTJ0dvIERhZGR5\n" +
- "IFNlY3VyZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTERMA8GA1UEBRMIMDc5Njky\n" +
- "ODcwHhcNMTIwMjAzMDMzMDQwWhcNMTcwMjA3MDUxMTIzWjBZMRkwFwYDVQQKDBAq\n" +
- "LnJlYWxob3N0aXAuY29tMSEwHwYDVQQLDBhEb21haW4gQ29udHJ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Wxob3N0\n" +
- "aXAuY29tgg5yZWFsaG9zdGlwLmNvbTAdBgNVHQ4EFgQUZyJz9/QLy5TWIIscTXID\n" +
- "E8Xk47YwDQYJKoZIhvcNAQEFBQADggEBAKiUV3KK16mP0NpS92fmQkCLqm+qUWyN\n" +
- "BfBVgf9/M5pcT8EiTZlS5nAtzAE/eRpBeR3ubLlaAogj4rdH7YYVJcDDLLoB2qM3\n" +
- "qeCHu8LFoblkb93UuFDWqRaVPmMlJRnhsRkL1oa2gM2hwQTkBDkP7w5FG1BELCgl\n" +
- "gZI2ij2yxjge6pOEwSyZCzzbCcg9pN+dNrYyGEtB4k+BBnPA3N4r14CWbk+uxjrQ\n" +
- "6j2Ip+b7wOc5IuMEMl8xwTyjuX3lsLbAZyFI9RCyofwA9NqIZ1GeB6Zd196rubQp\n" +
- "93cmBqGGjZUs3wMrGlm7xdjlX6GQ9UvmvkMub9+lL99A5W50QgCmFeI=\n" +
- "-----END CERTIFICATE-----\n";
-
- public static final String rootCa =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVMx\n" +
- "ITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g\n" +
- "RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMTYw\n" +
- "MTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UECBMH\n" +
- "QXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWRkeS5j\n" +
- "b20sIEluYy4xMzAxBgNVBAsTKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5j\n" +
- "b20vcmVwb3NpdG9yeTEwMC4GA1UEAxMnR28gRGFkZHkgU2VjdXJlIENlcnRpZmlj\n" +
- "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ABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v\n" +
- "UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu\n" +
- "IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC\n" +
- "W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd\n" +
- "-----END CERTIFICATE-----\n";
-
@Inject
private KeystoreDao _ksDao;
@Inject
@@ -781,7 +599,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
if(proxy.getActiveSession() >= _capacityPerProxy){
it.remove();
}
- }
+ }
if (s_logger.isTraceEnabled()) {
s_logger.trace("Running proxy pool size : " + runningList.size());
for (ConsoleProxyVO proxy : runningList) {
@@ -1338,7 +1156,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
//expunge the vm
boolean result = _itMgr.expunge(proxy, _accountMgr.getSystemUser(), _accountMgr.getSystemAccount());
if (result) {
- HostVO host = _hostDao.findByTypeNameAndZoneId(proxy.getDataCenterId(), proxy.getHostName(),
+ HostVO host = _hostDao.findByTypeNameAndZoneId(proxy.getDataCenterId(), proxy.getHostName(),
Host.Type.ConsoleProxy);
if (host != null) {
s_logger.debug("Removing host entry for proxy id=" + vmId);
@@ -1363,9 +1181,9 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
if (lock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_SYNC)) {
KeystoreVO ksVo = _ksDao.findByName(CERTIFICATE_NAME);
if (ksVo == null) {
- _ksDao.save(CERTIFICATE_NAME, certContent, keyContent, "realhostip.com");
+ _ksDao.save(CERTIFICATE_NAME, ConsoleProxyVO.certContent, ConsoleProxyVO.keyContent, "realhostip.com");
KeystoreVO caRoot = new KeystoreVO();
- caRoot.setCertificate(rootCa);
+ caRoot.setCertificate(ConsoleProxyVO.rootCa);
caRoot.setDomainSuffix("realhostip.com");
caRoot.setName("root");
caRoot.setIndex(0);
@@ -1906,5 +1724,5 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
@Override
public void prepareStop(VirtualMachineProfile<ConsoleProxyVO> profile) {
}
-
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/AccountVlanMapVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/AccountVlanMapVO.java b/server/src/com/cloud/dc/AccountVlanMapVO.java
deleted file mode 100644
index b1bf919..0000000
--- a/server/src/com/cloud/dc/AccountVlanMapVO.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import com.cloud.user.OwnedBy;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="account_vlan_map")
-public class AccountVlanMapVO implements OwnedBy, InternalIdentity {
-
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private long id;
-
- @Column(name="account_id")
- private long accountId;
-
- @Column(name="vlan_db_id")
- private long vlanDbId;
-
- public AccountVlanMapVO(long accountId, long vlanDbId) {
- this.accountId = accountId;
- this.vlanDbId = vlanDbId;
- }
-
- public AccountVlanMapVO() {
-
- }
-
- public long getId() {
- return id;
- }
-
- @Override
- public long getAccountId() {
- return accountId;
- }
-
- public long getVlanDbId() {
- return vlanDbId;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/ClusterDetailsDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/ClusterDetailsDao.java b/server/src/com/cloud/dc/ClusterDetailsDao.java
deleted file mode 100644
index 2c7e241..0000000
--- a/server/src/com/cloud/dc/ClusterDetailsDao.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import java.util.Map;
-
-import com.cloud.utils.db.GenericDao;
-
-public interface ClusterDetailsDao extends GenericDao<ClusterDetailsVO, Long> {
- Map<String, String> findDetails(long clusterId);
-
- void persist(long clusterId, Map<String, String> details);
- void persist(long clusterId, String name, String value);
-
- ClusterDetailsVO findDetail(long clusterId, String name);
-
- void deleteDetails(long clusterId);
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/ClusterDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/ClusterDetailsDaoImpl.java b/server/src/com/cloud/dc/ClusterDetailsDaoImpl.java
deleted file mode 100755
index d14e0e4..0000000
--- a/server/src/com/cloud/dc/ClusterDetailsDaoImpl.java
+++ /dev/null
@@ -1,133 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.utils.crypt.DBEncryptionUtil;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
-
-@Component
-@Local(value=ClusterDetailsDao.class)
-public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long> implements ClusterDetailsDao {
- protected final SearchBuilder<ClusterDetailsVO> ClusterSearch;
- protected final SearchBuilder<ClusterDetailsVO> DetailSearch;
-
- protected ClusterDetailsDaoImpl() {
- ClusterSearch = createSearchBuilder();
- ClusterSearch.and("clusterId", ClusterSearch.entity().getClusterId(), SearchCriteria.Op.EQ);
- ClusterSearch.done();
-
- DetailSearch = createSearchBuilder();
- DetailSearch.and("clusterId", DetailSearch.entity().getClusterId(), SearchCriteria.Op.EQ);
- DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ);
- DetailSearch.done();
- }
-
- @Override
- public ClusterDetailsVO findDetail(long clusterId, String name) {
- SearchCriteria<ClusterDetailsVO> sc = DetailSearch.create();
- // This is temporary fix to support list/update configuration api for cpu and memory overprovisioning ratios
- if(name.equalsIgnoreCase("cpu.overprovisioning.factor")) {
- name = "cpuOvercommitRatio";
- }
- if (name.equalsIgnoreCase("mem.overprovisioning.factor")) {
- name = "memoryOvercommitRatio";
- }
- sc.setParameters("clusterId", clusterId);
- sc.setParameters("name", name);
-
-
- ClusterDetailsVO detail = findOneIncludingRemovedBy(sc);
- if("password".equals(name) && detail != null){
- detail.setValue(DBEncryptionUtil.decrypt(detail.getValue()));
- }
- return detail;
- }
-
-
- @Override
- public Map<String, String> findDetails(long clusterId) {
- SearchCriteria<ClusterDetailsVO> sc = ClusterSearch.create();
- sc.setParameters("clusterId", clusterId);
-
- List<ClusterDetailsVO> results = search(sc, null);
- Map<String, String> details = new HashMap<String, String>(results.size());
- for (ClusterDetailsVO result : results) {
- if("password".equals(result.getName())){
- details.put(result.getName(), DBEncryptionUtil.decrypt(result.getValue()));
- } else {
- details.put(result.getName(), result.getValue());
- }
- }
- return details;
- }
-
- @Override
- public void deleteDetails(long clusterId) {
- SearchCriteria sc = ClusterSearch.create();
- sc.setParameters("clusterId", clusterId);
-
- List<ClusterDetailsVO> results = search(sc, null);
- for (ClusterDetailsVO result : results) {
- remove(result.getId());
- }
- }
-
- @Override
- public void persist(long clusterId, Map<String, String> details) {
- Transaction txn = Transaction.currentTxn();
- txn.start();
- SearchCriteria<ClusterDetailsVO> sc = ClusterSearch.create();
- sc.setParameters("clusterId", clusterId);
- expunge(sc);
-
- for (Map.Entry<String, String> detail : details.entrySet()) {
- String value = detail.getValue();
- if("password".equals(detail.getKey())){
- value = DBEncryptionUtil.encrypt(value);
- }
- ClusterDetailsVO vo = new ClusterDetailsVO(clusterId, detail.getKey(), value);
- persist(vo);
- }
- txn.commit();
- }
-
- @Override
- public void persist(long clusterId, String name, String value) {
- Transaction txn = Transaction.currentTxn();
- txn.start();
- SearchCriteria<ClusterDetailsVO> sc = DetailSearch.create();
- sc.setParameters("clusterId", clusterId);
- sc.setParameters("name", name);
- expunge(sc);
-
- ClusterDetailsVO vo = new ClusterDetailsVO(clusterId, name, value);
- persist(vo);
- txn.commit();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/ClusterDetailsVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/ClusterDetailsVO.java b/server/src/com/cloud/dc/ClusterDetailsVO.java
deleted file mode 100644
index 11a5525..0000000
--- a/server/src/com/cloud/dc/ClusterDetailsVO.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="cluster_details")
-public class ClusterDetailsVO implements InternalIdentity {
-
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private long id;
-
- @Column(name="cluster_id")
- private long clusterId;
-
- @Column(name="name")
- private String name;
-
- @Column(name="value")
- private String value;
-
- protected ClusterDetailsVO() {
- }
-
- public ClusterDetailsVO(long clusterId, String name, String value) {
- this.clusterId = clusterId;
- this.name = name;
- this.value = value;
- }
-
- public long getClusterId() {
- return clusterId;
- }
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public long getId() {
- return id;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/ClusterVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/ClusterVO.java b/server/src/com/cloud/dc/ClusterVO.java
deleted file mode 100644
index 4195b74..0000000
--- a/server/src/com/cloud/dc/ClusterVO.java
+++ /dev/null
@@ -1,189 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import java.util.Date;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.apache.cloudstack.api.Identity;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.org.Cluster;
-import com.cloud.org.Managed.ManagedState;
-import com.cloud.org.Grouping;
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="cluster")
-public class ClusterVO implements Cluster {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name="id")
- long id;
-
- @Column(name="name")
- String name;
-
- @Column(name="guid")
- String guid;
-
- @Column(name="data_center_id")
- long dataCenterId;
-
- @Column(name="pod_id")
- long podId;
-
- @Column(name="hypervisor_type")
- String hypervisorType;
-
- @Column(name="cluster_type")
- @Enumerated(value=EnumType.STRING)
- Cluster.ClusterType clusterType;
-
- @Column(name="allocation_state")
- @Enumerated(value=EnumType.STRING)
- AllocationState allocationState;
-
- @Column(name="managed_state")
- @Enumerated(value=EnumType.STRING)
- ManagedState managedState;
-
- @Column(name=GenericDao.REMOVED_COLUMN)
- private Date removed;
-
- @Column(name="uuid")
- String uuid;
-
- public ClusterVO() {
- clusterType = Cluster.ClusterType.CloudManaged;
- allocationState = Grouping.AllocationState.Enabled;
-
- this.uuid = UUID.randomUUID().toString();
- }
-
- public ClusterVO(long dataCenterId, long podId, String name) {
- this.dataCenterId = dataCenterId;
- this.podId = podId;
- this.name = name;
- this.clusterType = Cluster.ClusterType.CloudManaged;
- this.allocationState = Grouping.AllocationState.Enabled;
- this.managedState = ManagedState.Managed;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public long getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public long getDataCenterId() {
- return dataCenterId;
- }
-
- public long getPodId() {
- return podId;
- }
-
- public Cluster.ClusterType getClusterType() {
- return clusterType;
- }
-
- public void setClusterType(Cluster.ClusterType clusterType) {
- this.clusterType = clusterType;
- }
-
- public AllocationState getAllocationState() {
- return allocationState;
- }
-
- public void setAllocationState(AllocationState allocationState) {
- this.allocationState = allocationState;
- }
-
- public ManagedState getManagedState() {
- return managedState;
- }
-
- public void setManagedState(ManagedState managedState) {
- this.managedState = managedState;
- }
-
- public ClusterVO(long clusterId) {
- this.id = clusterId;
- }
-
- @Override
- public int hashCode() {
- return NumbersUtil.hash(id);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof ClusterVO)) {
- return false;
- }
- ClusterVO that = (ClusterVO)obj;
- return this.id == that.id;
- }
-
- public HypervisorType getHypervisorType() {
- return HypervisorType.getType(hypervisorType);
- }
-
- public void setHypervisorType(String hy) {
- hypervisorType = hy;
- }
-
- public String getGuid() {
- return guid;
- }
-
- public void setGuid(String guid) {
- this.guid = guid;
- }
-
- public Date getRemoved() {
- return removed;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String getUuid() {
- return this.uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/ClusterVSMMapVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/ClusterVSMMapVO.java b/server/src/com/cloud/dc/ClusterVSMMapVO.java
deleted file mode 100644
index a7fe748..0000000
--- a/server/src/com/cloud/dc/ClusterVSMMapVO.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Table;
-
-
-// NOTE: This particular table is totally internal to the CS MS.
-// Do not ever include a uuid/guid field in this table. We just
-// need it map cluster Ids with Cisco Nexus VSM Ids.
-
-@Entity
-@Table(name="cluster_vsm_map")
-public class ClusterVSMMapVO {
-
- @Column(name="cluster_id")
- long clusterId;
-
- @Column(name="vsm_id")
- long vsmId;
-
- public ClusterVSMMapVO(long clusterId, long vsmId) {
- this.clusterId = clusterId;
- this.vsmId = vsmId;
- }
-
- public ClusterVSMMapVO() {
- // Do nothing.
- }
-
- public long getClusterId() {
- return clusterId;
- }
-
- public long getVsmId() {
- return vsmId;
- }
-
- public void setClusterId(long clusterId) {
- this.clusterId = clusterId;
- }
-
- public void setVsmId(long vsmId) {
- this.vsmId = vsmId;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/DataCenterIpAddressVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DataCenterIpAddressVO.java b/server/src/com/cloud/dc/DataCenterIpAddressVO.java
deleted file mode 100755
index d92227f..0000000
--- a/server/src/com/cloud/dc/DataCenterIpAddressVO.java
+++ /dev/null
@@ -1,115 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@Table(name="op_dc_ip_address_alloc")
-public class DataCenterIpAddressVO implements InternalIdentity {
-
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- long id;
-
- @Column(name="ip_address", updatable=false, nullable=false)
- String ipAddress;
-
- @Column(name="taken")
- @Temporal(value=TemporalType.TIMESTAMP)
- private Date takenAt;
-
- @Column(name="data_center_id", updatable=false, nullable=false)
- private long dataCenterId;
-
- @Column(name="pod_id", updatable=false, nullable=false)
- private long podId;
-
- @Column(name="reservation_id")
- String reservationId;
-
- @Column(name="nic_id")
- private Long instanceId;
-
- @Column(name="mac_address")
- long macAddress;
-
- protected DataCenterIpAddressVO() {
- }
-
- public String getReservationId() {
- return reservationId;
- }
-
- public void setReservationId(String reservationId) {
- this.reservationId = reservationId;
- }
-
- public DataCenterIpAddressVO(String ipAddress, long dataCenterId, long podId) {
- this.ipAddress = ipAddress;
- this.dataCenterId = dataCenterId;
- this.podId = podId;
- }
-
- public long getId() {
- return id;
- }
-
- public Long getInstanceId() {
- return instanceId;
- }
-
- public void setInstanceId(Long instanceId) {
- this.instanceId = instanceId;
- }
-
- public long getPodId() {
- return podId;
- }
-
- public void setTakenAt(Date takenDate) {
- this.takenAt = takenDate;
- }
-
- public String getIpAddress() {
- return ipAddress;
- }
-
- public long getDataCenterId() {
- return dataCenterId;
- }
-
- public Date getTakenAt() {
- return takenAt;
- }
-
- public long getMacAddress() {
- return macAddress;
- }
-}