cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/4.2 to 22a3ba1
Date Thu, 01 Aug 2013 12:07:19 GMT
Updated Branches:
  refs/heads/4.2 087b1dcfc -> 22a3ba18c


=CLOUDSTACK-3102 ResourceDetail API - If you add detail for any resource other than volume
and nic then throw an exception


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/22a3ba18
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/22a3ba18
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/22a3ba18

Branch: refs/heads/4.2
Commit: 22a3ba18c380f3c2ab68304f0ec6ccb17b287710
Parents: 087b1dc
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Thu Aug 1 17:36:40 2013 +0530
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Thu Aug 1 17:37:00 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22a3ba18/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java b/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
index 23708f8..f4b7639 100644
--- a/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
+++ b/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
@@ -214,9 +214,11 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements
Resource
                 if(resourceType == TaggedResourceType.Volume){
                     VolumeDetailVO v = new VolumeDetailVO(id, key, value);
                     _volumeDetailDao.persist(v);
-                }else {
+                }else if (resourceType == TaggedResourceType.Nic){
                     NicDetailVO n = new NicDetailVO(id, key, value);
                     _nicDetailDao.persist(n);
+                }else{
+                    throw new InvalidParameterValueException("The resource type " + resourceType
+ " is not supported by the API yet");
                 }
 
         }


Mime
View raw message