cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/master to 2a3cfe4
Date Tue, 04 Jun 2013 11:46:16 GMT
Updated Branches:
  refs/heads/master c8f143e3a -> 2a3cfe4b2


CLOUDSTACK-2782:UI Support to add VMware DC to CloudStack zone through the zone wizard


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

Branch: refs/heads/master
Commit: 2a3cfe4b227d43815aa1ab926e3ff1495c64a5c5
Parents: c8f143e
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Tue Jun 4 16:58:32 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Tue Jun 4 16:58:32 2013 +0530

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |   45 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2a3cfe4b/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 04ed495..c07ef34 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -3366,6 +3366,49 @@
           }
           array1.push("&clustername=" + todb(clusterName));
 
+           if(args.data.cluster.hypervisor == "VMware"){
+
+              var vmwareData = {
+
+                 zoneId: args.data.returnedZone.id,
+                 username: args.data.cluster.vCenterUsername,
+                 password: args.data.cluster.vCenterPassword,
+                 name: args.data.cluster.vCenterDatacenter
+
+              };
+
+              $.ajax({
+                        url: createURL('addVmwareDc&url=' + todb(url)),
+                        data: vmwareData,
+                        success: function(json) {
+                           var item = json.addvmwaredcresponse.vmwaredc;
+                           if(item.id != null){
+                           $.ajax({
+                             url: createURL("addCluster" + array1.join("")),
+                             dataType: "json",
+                             async: true,
+                             success: function(json) {
+                                     stepFns.addPrimaryStorage({
+                                     data: $.extend(args.data, {
+                                     returnedCluster: json.addclusterresponse.cluster[0]
+                                       })
+                                    });
+
+                               },
+                                error: function(XMLHttpResponse) {
+                                    var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
+                                    error('addCluster', errorMsg, { fn: 'addCluster', args:
args });
+                               }
+                          });
+                         }
+
+                        }
+                      });
+
+          }
+
+         else{
+
           $.ajax({
             url: createURL("addCluster" + array1.join("")),
             dataType: "json",
@@ -3391,6 +3434,8 @@
               error('addCluster', errorMsg, { fn: 'addCluster', args: args });
             }
           });
+
+         }
         },
 
         addHost: function(args) {


Mime
View raw message