You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2013/12/30 15:38:07 UTC
[1/2] git commit: updated refs/heads/master to db8d5f6
Updated Branches:
refs/heads/master 013f10007 -> db8d5f602
CLOUDSTACK-5422: Changing XenServer Tools Version 6.1 + doesnt work.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/db8d5f60
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/db8d5f60
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/db8d5f60
Branch: refs/heads/master
Commit: db8d5f602a37472977a480706f8893c2bfa341ae
Parents: a782d17
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Mon Dec 30 19:59:46 2013 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Mon Dec 30 20:01:06 2013 +0530
----------------------------------------------------------------------
.../src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/db8d5f60/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
index d1cb531..f73eeac 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -46,9 +46,11 @@ import com.cloud.uservm.UserVm;
import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
+import com.cloud.vm.UserVmDetailVO;
import com.cloud.vm.VirtualMachine.State;
import com.cloud.vm.VmDetailConstants;
import com.cloud.vm.VmStats;
+import com.cloud.vm.dao.UserVmDetailsDao;
@Component
@Local(value = {UserVmJoinDao.class})
@@ -57,6 +59,8 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
@Inject
private ConfigurationDao _configDao;
+ @Inject
+ private UserVmDetailsDao _userVmDetailsDao;
private final SearchBuilder<UserVmJoinVO> VmDetailSearch;
private final SearchBuilder<UserVmJoinVO> activeVmByIsoSearch;
@@ -260,10 +264,11 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
}
// set resource details map
- // only hypervisortoolsversion can be returned to the end user }
- if (userVm.getDetailName() != null && userVm.getDetailName().equalsIgnoreCase(VmDetailConstants.HYPERVISOR_TOOLS_VERSION)) {
+ // only hypervisortoolsversion can be returned to the end user
+ UserVmDetailVO hypervisorToolsVersion = _userVmDetailsDao.findDetail(userVm.getId(), VmDetailConstants.HYPERVISOR_TOOLS_VERSION);
+ if (hypervisorToolsVersion != null) {
Map<String, String> resourceDetails = new HashMap<String, String>();
- resourceDetails.put(userVm.getDetailName(), userVm.getDetailValue());
+ resourceDetails.put(hypervisorToolsVersion.getName(), hypervisorToolsVersion.getValue());
userVmResponse.setDetails(resourceDetails);
}
[2/2] git commit: updated refs/heads/master to db8d5f6
Posted by sa...@apache.org.
CLOUDSTACK-3806: OS Preference can not be set.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a782d17c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a782d17c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a782d17c
Branch: refs/heads/master
Commit: a782d17caa33d94805d9357a9d85e0bcebe2bac9
Parents: 013f100
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Mon Dec 30 17:09:05 2013 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Mon Dec 30 20:01:06 2013 +0530
----------------------------------------------------------------------
.../com/cloud/resource/ResourceManagerImpl.java | 26 ++++++++++++--------
ui/scripts/system.js | 2 +-
2 files changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a782d17c/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java
index d1eba11..c9e2e7a 100755
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -1274,23 +1274,29 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
if (guestOSCategoryId != null) {
// Verify that the guest OS Category exists
- if (guestOSCategoryId > 0) {
- if (_guestOSCategoryDao.findById(guestOSCategoryId) == null) {
- throw new InvalidParameterValueException("Please specify a valid guest OS category.");
- }
+ if (!(guestOSCategoryId > 0) || _guestOSCategoryDao.findById(guestOSCategoryId) == null) {
+ throw new InvalidParameterValueException("Please specify a valid guest OS category.");
}
GuestOSCategoryVO guestOSCategory = _guestOSCategoryDao.findById(guestOSCategoryId);
- Map<String, String> hostDetails = _hostDetailsDao.findDetails(hostId);
+ DetailVO guestOSDetail = _hostDetailsDao.findDetail(hostId, "guest.os.category.id");
- if (guestOSCategory != null) {
- // Save a new entry for guest.os.category.id
- hostDetails.put("guest.os.category.id", String.valueOf(guestOSCategory.getId()));
+ if (guestOSCategory != null && !GuestOSCategoryVO.CATEGORY_NONE.equalsIgnoreCase(guestOSCategory.getName())) {
+ // Create/Update an entry for guest.os.category.id
+ if (guestOSDetail != null) {
+ guestOSDetail.setValue(String.valueOf(guestOSCategory.getId()));
+ _hostDetailsDao.update(guestOSDetail.getId(), guestOSDetail);
+ } else {
+ Map<String, String> detail = new HashMap<String, String>();
+ detail.put("guest.os.category.id", String.valueOf(guestOSCategory.getId()));
+ _hostDetailsDao.persist(hostId, detail);
+ }
} else {
// Delete any existing entry for guest.os.category.id
- hostDetails.remove("guest.os.category.id");
+ if (guestOSDetail != null) {
+ _hostDetailsDao.remove(guestOSDetail.getId());
+ }
}
- _hostDetailsDao.persist(hostId, hostDetails);
}
List<String> hostTags = cmd.getHostTags();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a782d17c/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 6c49bf1..24e76e6 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -14252,7 +14252,7 @@
var oscategoryObjs = json.listoscategoriesresponse.oscategory;
var items = [{
id: '',
- description: _l('label.none')
+ description: _l('')
}];
$(oscategoryObjs).each(function() {
items.push({