You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ma...@apache.org on 2014/11/09 07:40:23 UTC
stratos git commit: Refacter CLI describe service group command
Repository: stratos
Updated Branches:
refs/heads/docker-grouping-merge 21e3d2241 -> b43f02bc6
Refacter CLI describe service group command
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b43f02bc
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b43f02bc
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b43f02bc
Branch: refs/heads/docker-grouping-merge
Commit: b43f02bc672ab46d876d5583ea77f1f90bc3c256
Parents: 21e3d22
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Sun Nov 9 06:39:21 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Sun Nov 9 06:39:21 2014 +0000
----------------------------------------------------------------------
.../stratos/cli/RestCommandLineService.java | 10 +++---
.../serviceGroups/ServiceGroupBean.java | 33 ++++++++++++++++++++
.../serviceGroups/ServiceGroupList.java | 33 --------------------
3 files changed, 38 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/b43f02bc/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 5cf36a4..1b97031 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -52,7 +52,7 @@ import org.apache.stratos.cli.beans.cartridge.PortMapping;
import org.apache.stratos.cli.beans.cartridge.ServiceDefinitionBean;
import org.apache.stratos.cli.beans.grouping.applications.Application;
import org.apache.stratos.cli.beans.grouping.applications.ApplicationBean;
-import org.apache.stratos.cli.beans.grouping.serviceGroups.ServiceGroupList;
+import org.apache.stratos.cli.beans.grouping.serviceGroups.ServiceGroupBean;
import org.apache.stratos.cli.beans.kubernetes.KubernetesGroup;
import org.apache.stratos.cli.beans.kubernetes.KubernetesGroupList;
import org.apache.stratos.cli.beans.kubernetes.KubernetesHost;
@@ -1875,16 +1875,16 @@ public class RestCommandLineService {
// This method helps to describe service group definition
public void describeServiceGroup (String groupDefinitionName) {
try {
- ServiceGroupList list = (ServiceGroupList) restClient.listEntity(ENDPOINT_LIST_SERVICE_GROUP.replace("{groupDefinitionName}", groupDefinitionName),
- ServiceGroupList.class, "serviceGroup");
+ ServiceGroupBean bean = (ServiceGroupBean) restClient.listEntity(ENDPOINT_LIST_SERVICE_GROUP.replace("{groupDefinitionName}", groupDefinitionName),
+ ServiceGroupBean.class, "serviceGroup");
- if ((list == null) || (list.getServiceGroupDefinition() == null)) {
+ if ((bean == null) || (bean.getServiceGroupDefinition() == null)) {
System.out.println("Service group not found: " + groupDefinitionName);
return;
}
System.out.println("Service Group : " + groupDefinitionName);
- System.out.println(getGson().toJson(list.getServiceGroupDefinition()));
+ System.out.println(getGson().toJson(bean.getServiceGroupDefinition()));
} catch (Exception e) {
String message = "Error in describing service group: " + groupDefinitionName;
System.out.println(message);
http://git-wip-us.apache.org/repos/asf/stratos/blob/b43f02bc/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupBean.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupBean.java
new file mode 100644
index 0000000..b7dcafb
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupBean.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cli.beans.grouping.serviceGroups;
+
+public class ServiceGroupBean {
+ private ServiceGroupDefinition serviceGroup;
+
+ public ServiceGroupDefinition getServiceGroupDefinition ()
+ {
+ return serviceGroup;
+ }
+
+ public void setServiceGroupDefinition (ServiceGroupDefinition serviceGroupDefinition)
+ {
+ this.serviceGroup = serviceGroupDefinition;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/b43f02bc/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupList.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupList.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupList.java
deleted file mode 100644
index f8a20b3..0000000
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/serviceGroups/ServiceGroupList.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cli.beans.grouping.serviceGroups;
-
-public class ServiceGroupList {
- private ServiceGroupDefinition serviceGroup;
-
- public ServiceGroupDefinition getServiceGroupDefinition ()
- {
- return serviceGroup;
- }
-
- public void setServiceGroupDefinition (ServiceGroupDefinition serviceGroupDefinition)
- {
- this.serviceGroup = serviceGroupDefinition;
- }
-}