cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [19/20] git commit: updated refs/heads/4.3 to 67df5b9
Date Tue, 25 Nov 2014 19:05:15 GMT
CLOUDSTACK-6322 - Don't allow service instance creation with empty or null service-instance
"name".

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit 085911f0a6c256c5f2a439ec0bf79b5027cdc078)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java


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

Branch: refs/heads/4.3
Commit: df6172f93846455bb3eba2930bdfcce52dc21104
Parents: 192c706
Author: Sachchidanand Vaidya <vaidyasd@juniper.net>
Authored: Wed Apr 2 01:57:07 2014 -0700
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Nov 25 23:42:28 2014 +0530

----------------------------------------------------------------------
 .../contrail/api/command/CreateServiceInstanceCmd.java        | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df6172f9/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
index 62ab317..9d0e942 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
@@ -90,7 +90,8 @@ public class CreateServiceInstanceCmd extends BaseAsyncCreateCmd {
             description = "The service offering ID that defines the resources consumed by
the service appliance")
     private Long serviceOfferingId;
 
-    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING)
+    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING,
+               required = true, description = "The name of the service instance")
     private String name;
     
     /// Implementation
@@ -126,6 +127,10 @@ public class CreateServiceInstanceCmd extends BaseAsyncCreateCmd {
                 throw new InvalidParameterValueException("Invalid ID for right network "
+ rightNetworkId);
             }
 
+            if (name.isEmpty()) {
+                throw new InvalidParameterValueException("service instance name is empty");
+            }
+
             ServiceVirtualMachine svm = _vrouterService.createServiceInstance(zone, owner,
template, serviceOffering,
                                                                               name, left,
right);
             if (svm == null) {


Mime
View raw message