cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.4 to 891ec9b
Date Wed, 11 Jun 2014 08:08:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 99aa7a096 -> 891ec9bd5


CLOUDSTACK-6890:createVPC invoked by admin does not observe start flag.
(cherry picked from commit 09a357fb90b48ed6e2725ea60e632a2ad5529f79)


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

Branch: refs/heads/4.4
Commit: 891ec9bd54089d07255aade40ecf3ef14bc519f4
Parents: 99aa7a0
Author: Min Chen <min.chen@citrix.com>
Authored: Tue Jun 10 17:23:20 2014 -0700
Committer: Daan Hoogland <daan@onecht.net>
Committed: Wed Jun 11 10:08:40 2014 +0200

----------------------------------------------------------------------
 .../api/command/admin/vpc/CreateVPCCmdByAdmin.java          | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/891ec9bd/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCCmdByAdmin.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCCmdByAdmin.java
b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCCmdByAdmin.java
index f063cdb..25e6325 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCCmdByAdmin.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCCmdByAdmin.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.vpc;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
 import org.apache.cloudstack.api.ResponseObject.ResponseView;
 import org.apache.cloudstack.api.ServerApiException;
@@ -37,10 +38,14 @@ public class CreateVPCCmdByAdmin extends CreateVPCCmd {
     @Override
     public void execute() {
         Vpc vpc = null;
+        boolean success = true;
         try {
-             if (_vpcService.startVpc(getEntityId(), true)) {
-                vpc = _entityMgr.findById(Vpc.class, getEntityId());
+            if (isStart()) {
+                success = _vpcService.startVpc(getEntityId(), true);
+            } else {
+                s_logger.debug("Not starting VPC as " + ApiConstants.START + "=false was
passed to the API");
              }
+            vpc = _entityMgr.findById(Vpc.class, getEntityId());
         } catch (ResourceUnavailableException ex) {
             s_logger.warn("Exception: ", ex);
             throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());


Mime
View raw message