cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject [48/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 6a8c2bd
Date Fri, 31 May 2013 07:49:46 GMT
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

Support for custom field "cloud.zone" for datacenter object in vCenter.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>


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

Branch: refs/heads/vmware-datamodel
Commit: abbf0043d26d791eed567d6acb57bd211aaf31c4
Parents: 3115ddf
Author: Sateesh Chodapuneedi <sateesh@apache.org>
Authored: Thu May 23 12:23:06 2013 +0530
Committer: Sateesh Chodapuneedi <sateesh@apache.org>
Committed: Thu May 30 17:09:32 2013 +0530

----------------------------------------------------------------------
 .../hypervisor/vmware/mo/CustomFieldConstants.java |    1 +
 .../cloud/hypervisor/vmware/mo/DatacenterMO.java   |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/abbf0043/vmware-base/src/com/cloud/hypervisor/vmware/mo/CustomFieldConstants.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/CustomFieldConstants.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/CustomFieldConstants.java
index 4cd5f9b..11bc157 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/CustomFieldConstants.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/CustomFieldConstants.java
@@ -21,4 +21,5 @@ public interface CustomFieldConstants {
 	public final static String CLOUD_GC = "cloud.gc";
 	public final static String CLOUD_GC_DVP = "cloud.gc.dvp";	
 	public final static String CLOUD_NIC_MASK = "cloud.nic.mask";
+    public final static String CLOUD_ZONE = "cloud.zone";
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/abbf0043/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
index 0a3e20b..cabb60a 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
@@ -488,4 +488,9 @@ public class DatacenterMO extends BaseMO {
         dvSwitchMor = _context.getVimClient().getDecendentMoRef(networkFolderMor, "VmwareDistributedVirtualSwitch",
dvSwitchName);
         return dvSwitchMor;
     }
+
+    public boolean ensureCustomFieldDef(String fieldName) throws Exception {
+        CustomFieldsManagerMO cfmMo = new CustomFieldsManagerMO(_context, _context.getServiceContent().getCustomFieldsManager());
+        return cfmMo.ensureCustomFieldDef("Datacenter", fieldName) > 0;
+    }
 }


Mime
View raw message