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/07 11:15:43 UTC
[1/7] stratos git commit: Implement list-service-group command
Repository: stratos
Updated Branches:
refs/heads/docker-grouping-merge 5d2b33a2d -> 46edc50db
Implement list-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/289d5e2c
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/289d5e2c
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/289d5e2c
Branch: refs/heads/docker-grouping-merge
Commit: 289d5e2c8db997cf471ce619a3574029a966f300
Parents: 6805c11
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Fri Nov 7 05:42:50 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Fri Nov 7 05:42:50 2014 +0000
----------------------------------------------------------------------
.../stratos/cli/RestCommandLineService.java | 22 +++++++
.../apache/stratos/cli/StratosApplication.java | 3 +
.../definitions/DependencyDefinitions.java | 50 +++++++++++++++
.../definitions/ServiceGroupDefinition.java | 65 +++++++++++++++++++
.../grouping/definitions/ServiceGroupList.java | 41 ++++++++++++
.../definitions/StartupOrderDefinition.java | 43 +++++++++++++
.../cli/commands/ListServiceGroupCommand.java | 67 ++++++++++++++++++++
7 files changed, 291 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/289d5e2c/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 e52e659..9b0a3d0 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
@@ -50,6 +50,8 @@ import org.apache.stratos.cli.beans.cartridge.Cartridge;
import org.apache.stratos.cli.beans.cartridge.CartridgeInfoBean;
import org.apache.stratos.cli.beans.cartridge.PortMapping;
import org.apache.stratos.cli.beans.cartridge.ServiceDefinitionBean;
+import org.apache.stratos.cli.beans.grouping.definitions.ServiceGroupDefinition;
+import org.apache.stratos.cli.beans.grouping.definitions.ServiceGroupList;
import org.apache.stratos.cli.beans.kubernetes.KubernetesGroup;
import org.apache.stratos.cli.beans.kubernetes.KubernetesGroupList;
import org.apache.stratos.cli.beans.kubernetes.KubernetesHost;
@@ -104,6 +106,7 @@ public class RestCommandLineService {
private static final String ENDPOINT_LIST_USERS = "/stratos/admin/user/list";
private static final String ENDPOINT_LIST_KUBERNETES_GROUPS = "/stratos/admin/kubernetes/group";
private static final String ENDPOINT_LIST_KUBERNETES_HOSTS = "/stratos/admin/kubernetes/hosts/{groupId}";
+ private static final String ENDPOINT_LIST_SERVICE_GROUP = "/stratos/admin/group/definition/{groupDefinitionName}";
private static final String ENDPOINT_GET_CARTRIDGE_OF_TENANT = "/stratos/admin/cartridge/info/{id}";
private static final String ENDPOINT_GET_CLUSTER_OF_TENANT = "/stratos/admin/cluster/";
@@ -1822,6 +1825,25 @@ public class RestCommandLineService {
restClient.undeployEntity(ENDPOINT_UNDEPLOY_SERVICE_GROUP, "service group", groupDefinitionName);
}
+ public void listServiceGroup (String groupDefinitionName) {
+ try {
+
+ ServiceGroupDefinition list = (ServiceGroupDefinition) restClient.listEntity(ENDPOINT_LIST_SERVICE_GROUP.replace("{groupDefinitionName}", groupDefinitionName),
+ ServiceGroupDefinition.class, "serviceGroup");
+
+ if ((list == null) || (list.getName() == null)) {
+ System.out.println("null");
+ System.out.println("Service group not found: " + groupDefinitionName);
+ return;
+ }
+
+ System.out.println(getGson().toJson(list));
+ } catch (Exception e) {
+ String message = "Error in describing service group: " + groupDefinitionName;
+ System.out.println(message);
+ log.error(message, e);
+ }
+ }
// This method helps to deploy applications
public void deployApplication (String entityBody) {
restClient.deployEntity(ENDPOINT_DEPLOY_APPLICATION, entityBody, "application");
http://git-wip-us.apache.org/repos/asf/stratos/blob/289d5e2c/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
index 9fc783b..fc7d99b 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
@@ -216,6 +216,9 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
command = new DeployServiceGroupCommand();
commands.put(command.getName(), command);
+ command = new ListServiceGroupCommand();
+ commands.put(command.getName(), command);
+
command = new UndeployServiceGroupCommand();
commands.put(command.getName(), command);
http://git-wip-us.apache.org/repos/asf/stratos/blob/289d5e2c/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/DependencyDefinitions.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/DependencyDefinitions.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/DependencyDefinitions.java
new file mode 100644
index 0000000..4d74778
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/DependencyDefinitions.java
@@ -0,0 +1,50 @@
+/*
+ * 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.definitions;
+
+import java.util.List;
+
+public class DependencyDefinitions {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ private List<String> startupOrders;
+
+ private String terminationBehaviour;
+
+ public String getTerminationBehaviour() {
+ return terminationBehaviour;
+ }
+
+ public void setTerminationBehaviour(String terminationBehaviour) {
+ this.terminationBehaviour = terminationBehaviour;
+ }
+
+ public List<String> getStartupOrders() {
+ return startupOrders;
+ }
+
+ public void setStartupOrders(List<String> startupOrders) {
+ this.startupOrders = startupOrders;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/289d5e2c/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java
new file mode 100644
index 0000000..d3af12f
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java
@@ -0,0 +1,65 @@
+/*
+ * 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.definitions;
+
+import java.util.List;
+
+public class ServiceGroupDefinition {
+
+ private String name;
+
+ private List<String> subGroups;
+
+ private List<String> cartridges;
+
+ private DependencyDefinitions dependencies;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public List<String> getSubGroups() {
+ return subGroups;
+ }
+
+ public void setSubGroups(List<String> subGroups) {
+ this.subGroups = subGroups;
+ }
+
+ public List<String> getCartridges() {
+ return cartridges;
+ }
+
+ public void setCartridges(List<String> cartridges) {
+ this.cartridges = cartridges;
+ }
+
+ public DependencyDefinitions getDependencies() {
+ return dependencies;
+ }
+
+ public void setDependencies(DependencyDefinitions dependencies) {
+ this.dependencies = dependencies;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/289d5e2c/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupList.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupList.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupList.java
new file mode 100644
index 0000000..25949c8
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupList.java
@@ -0,0 +1,41 @@
+/**
+ * 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.definitions;
+
+import java.util.ArrayList;
+
+/**
+ * Service group list.
+ */
+public class ServiceGroupList {
+ private ArrayList<ServiceGroupDefinition> serviceGroup;
+
+ public ArrayList<ServiceGroupDefinition> getServiceGroup() {
+ return serviceGroup;
+ }
+
+ public void setServiceGroup(ArrayList<ServiceGroupDefinition> serviceGroup) {
+ this.serviceGroup = serviceGroup;
+ }
+
+ ServiceGroupList () {
+ serviceGroup = new ArrayList<ServiceGroupDefinition>();
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/289d5e2c/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/StartupOrderDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/StartupOrderDefinition.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/StartupOrderDefinition.java
new file mode 100644
index 0000000..8e437e1
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/StartupOrderDefinition.java
@@ -0,0 +1,43 @@
+/*
+ * 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.definitions;
+
+public class StartupOrderDefinition {
+
+ private String start;
+
+ private String after;
+
+ public String getStart() {
+ return start;
+ }
+
+ public void setStart(String start) {
+ this.start = start;
+ }
+
+ public String getAfter() {
+ return after;
+ }
+
+ public void setAfter(String after) {
+ this.after = after;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/289d5e2c/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java
new file mode 100644
index 0000000..4af8bd1
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java
@@ -0,0 +1,67 @@
+/**
+ * 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.commands;
+
+import org.apache.commons.cli.Options;
+import org.apache.stratos.cli.Command;
+import org.apache.stratos.cli.RestCommandLineService;
+import org.apache.stratos.cli.StratosCommandContext;
+import org.apache.stratos.cli.exception.CommandException;
+import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ListServiceGroupCommand implements Command<StratosCommandContext> {
+
+ private static final Logger logger = LoggerFactory.getLogger(ListServiceGroupCommand.class);
+
+ public ListServiceGroupCommand() {
+ }
+
+ public String getName() {
+ return "list-service-group";
+ }
+
+ public String getDescription() {
+ return "List service groups";
+ }
+
+ public String getArgumentSyntax() {
+ return "[group-definition-name]";
+ }
+
+ public int execute(StratosCommandContext context, String[] args) throws CommandException {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Executing command: ", getName());
+ }
+ if ((args == null) || (args.length == 0)) {
+ context.getStratosApplication().printUsage(getName());
+ return CliConstants.COMMAND_FAILED;
+ } else {
+ String groupId = args[0];
+ RestCommandLineService.getInstance().listServiceGroup(groupId);
+ return CliConstants.COMMAND_SUCCESSFULL;
+ }
+ }
+
+ public Options getOptions() {
+ return null;
+ }
+}
[3/7] stratos git commit: Merge branch 'docker-grouping-merge' of
https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Posted by ma...@apache.org.
Merge branch 'docker-grouping-merge' of https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0ffe7cf7
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0ffe7cf7
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0ffe7cf7
Branch: refs/heads/docker-grouping-merge
Commit: 0ffe7cf73cb53f41228bd52cfb4451cfe433211a
Parents: 284a7d9 cbe535a
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Fri Nov 7 06:12:21 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Fri Nov 7 06:12:21 2014 +0000
----------------------------------------------------------------------
.../rest/endpoint/api/StratosApiV41.java | 49 +++++++++++---------
1 file changed, 26 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
[2/7] stratos git commit: Merge branch 'docker-grouping-merge' of
https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Posted by ma...@apache.org.
Merge branch 'docker-grouping-merge' of https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Conflicts:
components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/284a7d96
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/284a7d96
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/284a7d96
Branch: refs/heads/docker-grouping-merge
Commit: 284a7d96098c2ac1c0e92a200ec209bcbe1bdfc4
Parents: 289d5e2 f171ae5
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Fri Nov 7 05:46:14 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Fri Nov 7 05:46:14 2014 +0000
----------------------------------------------------------------------
.../parser/DefaultApplicationParser.java | 1 +
.../pojo/ApplicationClusterContext.java | 12 ++
.../client/CloudControllerClient.java | 1 +
.../monitor/cluster/ClusterMonitorFactory.java | 2 -
.../stratos/cli/RestCommandLineService.java | 115 +++++++++----------
.../impl/CloudControllerServiceImpl.java | 5 +
.../rest/endpoint/api/StratosApiV41.java | 10 +-
.../modules/distribution/src/assembly/bin.xml | 14 ++-
8 files changed, 94 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/284a7d96/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 9b0a3d0,d2adc34..8bc5770
--- 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
@@@ -76,56 -74,56 +76,57 @@@ public class RestCommandLineService
private RestClient restClient;
// REST endpoints
- private static final String ENDPOINT_INIT_COOKIE = "/stratos/admin/cookie";
-
- private static final String ENDPOINT_ADD_TENANT = "/stratos/admin/tenant";
- private static final String ENDPOINT_ADD_USER = "/stratos/admin/user";
-
- private static final String ENDPOINT_DEPLOY_CARTRIDGE = "/stratos/admin/cartridge/definition";
- private static final String ENDPOINT_DEPLOY_PARTITION = "/stratos/admin/policy/deployment/partition";
- private static final String ENDPOINT_DEPLOY_AUTOSCALING_POLICY = "/stratos/admin/policy/autoscale";
- private static final String ENDPOINT_DEPLOY_DEPLOYMENT_POLICY = "/stratos/admin/policy/deployment";
- private static final String ENDPOINT_DEPLOY_SERVICE = "/stratos/admin/service/definition";
- private static final String ENDPOINT_DEPLOY_KUBERNETES_GROUP = "/stratos/admin/kubernetes/deploy/group";
- private static final String ENDPOINT_DEPLOY_KUBERNETES_HOST = "/stratos/admin/kubernetes/deploy/host";
- private static final String ENDPOINT_DEPLOY_SERVICE_GROUP = "/stratos/admin/group/definition";
- private static final String ENDPOINT_DEPLOY_APPLICATION = "/stratos/admin/application/definition";
-
- private static final String ENDPOINT_UNDEPLOY_KUBERNETES_GROUP = "/stratos/admin/kubernetes/group/{id}";
- private static final String ENDPOINT_UNDEPLOY_KUBERNETES_HOST = "/stratos/admin/kubernetes/host/{id}";
- private static final String ENDPOINT_UNDEPLOY_SERVICE_GROUP = "/stratos/admin/group/definition/{id}";
- private static final String ENDPOINT_UNDEPLOY_APPLICATION = "/stratos/admin/application/definition/{id}";
-
- private static final String ENDPOINT_LIST_PARTITIONS = "/stratos/admin/partition";
- private static final String ENDPOINT_LIST_AUTOSCALING_POLICIES = "/stratos/admin/policy/autoscale";
- private static final String ENDPOINT_LIST_DEPLOYMENT_POLICIES = "/stratos/admin/policy/deployment";
- private static final String ENDPOINT_LIST_CARTRIDGES = "/stratos/admin/cartridge/available/list";
- private static final String ENDPOINT_LIST_CARTRIDGE_SUBSCRIPTIONS = "/stratos/admin/cartridge/list/subscribed";
- private static final String ENDPOINT_LIST_SERVICES = "/stratos/admin/service";
- private static final String ENDPOINT_LIST_TENANTS = "/stratos/admin/tenant/list";
- private static final String ENDPOINT_LIST_USERS = "/stratos/admin/user/list";
- private static final String ENDPOINT_LIST_KUBERNETES_GROUPS = "/stratos/admin/kubernetes/group";
- private static final String ENDPOINT_LIST_KUBERNETES_HOSTS = "/stratos/admin/kubernetes/hosts/{groupId}";
- private static final String ENDPOINT_LIST_SERVICE_GROUP = "/stratos/admin/group/definition/{groupDefinitionName}";
-
- private static final String ENDPOINT_GET_CARTRIDGE_OF_TENANT = "/stratos/admin/cartridge/info/{id}";
- private static final String ENDPOINT_GET_CLUSTER_OF_TENANT = "/stratos/admin/cluster/";
- private static final String ENDPOINT_GET_KUBERNETES_GROUP = "/stratos/admin/kubernetes/group/{id}";
- private static final String ENDPOINT_GET_KUBERNETES_MASTER = "/stratos/admin/kubernetes/master/{id}";
- private static final String ENDPOINT_GET_KUBERNETES_HOST = "/stratos/admin/kubernetes/hosts/{id}";
-
- private static final String ENDPOINT_UPDATE_KUBERNETES_MASTER = "/stratos/admin/kubernetes/update/master";
- private static final String ENDPOINT_UPDATE_KUBERNETES_HOST = "/stratos/admin/kubernetes/update/host";
-
- private static final String ENDPOINT_SUBSCRIBE_CARTRIDGE = "/stratos/admin/cartridge/subscribe";
- private static final String ENDPOINT_UNSUBSCRIBE_CARTRIDGE_OF_TENANT = "/stratos/admin/cartridge/unsubscribe";
- private static final String ENDPOINT_SYNCHRONIZE_ARTIFACTS = "/stratos/admin/cartridge/sync";
- private static final String ENDPOINT_ACTIVATE_TENANT = "/stratos/admin/tenant/activate";
- private static final String ENDPOINT_DEACTIVATE_TENANT = "/stratos/admin/tenant/deactivate";
-
- private static final String ENDPOINT_UPDATE_SUBSCRIPTION_PROPERTIES = "/stratos/admin/subscriptions/{alias}/properties";
- private static final String ENDPOINT_UPDATE_DEPLOYMENT_POLICY = "/stratos/admin/policy/deployment";
- private static final String ENDPOINT_UPDATE_AUTOSCALING_POLICY = "/stratos/admin/policy/autoscale";
+ private static final String API_CONTEXT = "/api/v4.1";
+ private static final String ENDPOINT_INIT = API_CONTEXT + "/init";
+
+ private static final String ENDPOINT_ADD_TENANT = API_CONTEXT + "/tenant";
+ private static final String ENDPOINT_ADD_USER = API_CONTEXT + "/user";
+
+ private static final String ENDPOINT_DEPLOY_CARTRIDGE = API_CONTEXT + "/cartridge/definition";
+ private static final String ENDPOINT_DEPLOY_PARTITION = API_CONTEXT + "/policy/deployment/partition";
+ private static final String ENDPOINT_DEPLOY_AUTOSCALING_POLICY = API_CONTEXT + "/policy/autoscale";
+ private static final String ENDPOINT_DEPLOY_DEPLOYMENT_POLICY = API_CONTEXT + "/policy/deployment";
+ private static final String ENDPOINT_DEPLOY_SERVICE = API_CONTEXT + "/service/definition";
+ private static final String ENDPOINT_DEPLOY_KUBERNETES_GROUP = API_CONTEXT + "/kubernetes/deploy/group";
+ private static final String ENDPOINT_DEPLOY_KUBERNETES_HOST = API_CONTEXT + "/kubernetes/deploy/host";
+ private static final String ENDPOINT_DEPLOY_SERVICE_GROUP = API_CONTEXT + "/group/definition";
+ private static final String ENDPOINT_DEPLOY_APPLICATION = API_CONTEXT + "/application/definition";
+
+ private static final String ENDPOINT_UNDEPLOY_KUBERNETES_GROUP = API_CONTEXT + "/kubernetes/group/{id}";
+ private static final String ENDPOINT_UNDEPLOY_KUBERNETES_HOST = API_CONTEXT + "/kubernetes/host/{id}";
+ private static final String ENDPOINT_UNDEPLOY_SERVICE_GROUP = API_CONTEXT + "/group/definition/{id}";
+ private static final String ENDPOINT_UNDEPLOY_APPLICATION = API_CONTEXT + "/application/definition/{id}";
+
+ private static final String ENDPOINT_LIST_PARTITIONS = API_CONTEXT + "/partition";
+ private static final String ENDPOINT_LIST_AUTOSCALING_POLICIES = API_CONTEXT + "/policy/autoscale";
+ private static final String ENDPOINT_LIST_DEPLOYMENT_POLICIES = API_CONTEXT + "/policy/deployment";
+ private static final String ENDPOINT_LIST_CARTRIDGES = API_CONTEXT + "/cartridge/available/list";
+ private static final String ENDPOINT_LIST_CARTRIDGE_SUBSCRIPTIONS = API_CONTEXT + "/cartridge/list/subscribed";
+ private static final String ENDPOINT_LIST_SERVICES = API_CONTEXT + "/service";
+ private static final String ENDPOINT_LIST_TENANTS = API_CONTEXT + "/tenant/list";
+ private static final String ENDPOINT_LIST_USERS = API_CONTEXT + "/user/list";
+ private static final String ENDPOINT_LIST_KUBERNETES_GROUPS = API_CONTEXT + "/kubernetes/group";
+ private static final String ENDPOINT_LIST_KUBERNETES_HOSTS = API_CONTEXT + "/kubernetes/hosts/{groupId}";
++ private static final String ENDPOINT_LIST_SERVICE_GROUP = API_CONTEXT + "/group/definition/{groupDefinitionName}";
+
+ private static final String ENDPOINT_GET_CARTRIDGE_OF_TENANT = API_CONTEXT + "/cartridge/info/{id}";
+ private static final String ENDPOINT_GET_CLUSTER_OF_TENANT = API_CONTEXT + "/cluster/";
+ private static final String ENDPOINT_GET_KUBERNETES_GROUP = API_CONTEXT + "/kubernetes/group/{id}";
+ private static final String ENDPOINT_GET_KUBERNETES_MASTER = API_CONTEXT + "/kubernetes/master/{id}";
+ private static final String ENDPOINT_GET_KUBERNETES_HOST = API_CONTEXT + "/kubernetes/hosts/{id}";
+
+ private static final String ENDPOINT_UPDATE_KUBERNETES_MASTER = API_CONTEXT + "/kubernetes/update/master";
+ private static final String ENDPOINT_UPDATE_KUBERNETES_HOST = API_CONTEXT + "/kubernetes/update/host";
+
+ private static final String ENDPOINT_SUBSCRIBE_CARTRIDGE = API_CONTEXT + "/cartridge/subscribe";
+ private static final String ENDPOINT_UNSUBSCRIBE_CARTRIDGE_OF_TENANT = API_CONTEXT + "/cartridge/unsubscribe";
+ private static final String ENDPOINT_SYNCHRONIZE_ARTIFACTS = API_CONTEXT + "/cartridge/sync";
+ private static final String ENDPOINT_ACTIVATE_TENANT = API_CONTEXT + "/tenant/activate";
+ private static final String ENDPOINT_DEACTIVATE_TENANT = API_CONTEXT + "/tenant/deactivate";
+
+ private static final String ENDPOINT_UPDATE_SUBSCRIPTION_PROPERTIES = API_CONTEXT + "/subscriptions/{alias}/properties";
+ private static final String ENDPOINT_UPDATE_DEPLOYMENT_POLICY = API_CONTEXT + "/policy/deployment";
+ private static final String ENDPOINT_UPDATE_AUTOSCALING_POLICY = API_CONTEXT + "/policy/autoscale";
private static class SingletonHolder {
[7/7] stratos git commit: Refactor list-service-group to
describe-service-group
Posted by ma...@apache.org.
Refactor list-service-group to describe-service-group
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/46edc50d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/46edc50d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/46edc50d
Branch: refs/heads/docker-grouping-merge
Commit: 46edc50db508981c8d9cc78243ad8f5f047f9c47
Parents: dc0edc9
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Fri Nov 7 10:14:49 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Fri Nov 7 10:14:49 2014 +0000
----------------------------------------------------------------------
.../stratos/cli/RestCommandLineService.java | 2 +-
.../apache/stratos/cli/StratosApplication.java | 2 +-
.../commands/DescribeServiceGroupCommand.java | 67 ++++++++++++++++++++
.../cli/commands/ListServiceGroupCommand.java | 67 --------------------
4 files changed, 69 insertions(+), 69 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/46edc50d/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 0699979..3011a8c 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
@@ -1824,7 +1824,7 @@ public class RestCommandLineService {
restClient.undeployEntity(ENDPOINT_UNDEPLOY_SERVICE_GROUP, "service group", groupDefinitionName);
}
- public void listServiceGroup (String groupDefinitionName) {
+ public void describeServiceGroup (String groupDefinitionName) {
try {
ServiceGroupDefinition list = (ServiceGroupDefinition) restClient.listEntity(ENDPOINT_LIST_SERVICE_GROUP.replace("{groupDefinitionName}", groupDefinitionName),
ServiceGroupDefinition.class, "serviceGroup");
http://git-wip-us.apache.org/repos/asf/stratos/blob/46edc50d/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
index fc7d99b..dedd6c6 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
@@ -216,7 +216,7 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
command = new DeployServiceGroupCommand();
commands.put(command.getName(), command);
- command = new ListServiceGroupCommand();
+ command = new DescribeServiceGroupCommand();
commands.put(command.getName(), command);
command = new UndeployServiceGroupCommand();
http://git-wip-us.apache.org/repos/asf/stratos/blob/46edc50d/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeServiceGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeServiceGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeServiceGroupCommand.java
new file mode 100644
index 0000000..81e3ad4
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeServiceGroupCommand.java
@@ -0,0 +1,67 @@
+/**
+ * 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.commands;
+
+import org.apache.commons.cli.Options;
+import org.apache.stratos.cli.Command;
+import org.apache.stratos.cli.RestCommandLineService;
+import org.apache.stratos.cli.StratosCommandContext;
+import org.apache.stratos.cli.exception.CommandException;
+import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DescribeServiceGroupCommand implements Command<StratosCommandContext> {
+
+ private static final Logger logger = LoggerFactory.getLogger(DescribeServiceGroupCommand.class);
+
+ public DescribeServiceGroupCommand() {
+ }
+
+ public String getName() {
+ return "describe-service-group";
+ }
+
+ public String getDescription() {
+ return "Describe service groups";
+ }
+
+ public String getArgumentSyntax() {
+ return "[group-definition-name]";
+ }
+
+ public int execute(StratosCommandContext context, String[] args) throws CommandException {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Executing command: ", getName());
+ }
+ if ((args == null) || (args.length == 0)) {
+ context.getStratosApplication().printUsage(getName());
+ return CliConstants.COMMAND_FAILED;
+ } else {
+ String groupId = args[0];
+ RestCommandLineService.getInstance().describeServiceGroup(groupId);
+ return CliConstants.COMMAND_SUCCESSFULL;
+ }
+ }
+
+ public Options getOptions() {
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/46edc50d/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java
deleted file mode 100644
index 4af8bd1..0000000
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListServiceGroupCommand.java
+++ /dev/null
@@ -1,67 +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.commands;
-
-import org.apache.commons.cli.Options;
-import org.apache.stratos.cli.Command;
-import org.apache.stratos.cli.RestCommandLineService;
-import org.apache.stratos.cli.StratosCommandContext;
-import org.apache.stratos.cli.exception.CommandException;
-import org.apache.stratos.cli.utils.CliConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ListServiceGroupCommand implements Command<StratosCommandContext> {
-
- private static final Logger logger = LoggerFactory.getLogger(ListServiceGroupCommand.class);
-
- public ListServiceGroupCommand() {
- }
-
- public String getName() {
- return "list-service-group";
- }
-
- public String getDescription() {
- return "List service groups";
- }
-
- public String getArgumentSyntax() {
- return "[group-definition-name]";
- }
-
- public int execute(StratosCommandContext context, String[] args) throws CommandException {
- if (logger.isDebugEnabled()) {
- logger.debug("Executing command: ", getName());
- }
- if ((args == null) || (args.length == 0)) {
- context.getStratosApplication().printUsage(getName());
- return CliConstants.COMMAND_FAILED;
- } else {
- String groupId = args[0];
- RestCommandLineService.getInstance().listServiceGroup(groupId);
- return CliConstants.COMMAND_SUCCESSFULL;
- }
- }
-
- public Options getOptions() {
- return null;
- }
-}
[5/7] stratos git commit: Merge branch 'docker-grouping-merge' of
https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Posted by ma...@apache.org.
Merge branch 'docker-grouping-merge' of https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/ba533ba0
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/ba533ba0
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/ba533ba0
Branch: refs/heads/docker-grouping-merge
Commit: ba533ba06b558a4447396dde810103afd1a8ec3e
Parents: f236bda 5d2b33a
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Fri Nov 7 08:43:58 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Fri Nov 7 08:43:58 2014 +0000
----------------------------------------------------------------------
.../pom.xml | 35 +
.../python_cartridgeagent/__init__.py | 0
.../cartridgeagent/__init__.py | 16 +
.../cartridgeagent/agent.conf | 61 +
.../cartridgeagent/agent.py | 349 ++++
.../cartridgeagent/logging.ini | 52 +
.../cartridgeagent/modules/__init__.py | 16 +
.../modules/artifactmgt/__init__.py | 17 +
.../modules/artifactmgt/git/__init__.py | 17 +
.../modules/artifactmgt/git/agentgithandler.py | 574 +++++++
.../modules/artifactmgt/git/gitrepository.py | 48 +
.../artifactmgt/repositoryinformation.py | 37 +
.../cartridgeagent/modules/config/__init__.py | 17 +
.../config/cartridgeagentconfiguration.py | 346 ++++
.../modules/databridge/__init__.py | 17 +
.../cartridgeagent/modules/databridge/agent.py | 225 +++
.../modules/databridge/thrift/__init__.py | 17 +
.../databridge/thrift/gen/Data/__init__.py | 1 +
.../databridge/thrift/gen/Data/constants.py | 8 +
.../databridge/thrift/gen/Data/ttypes.py | 320 ++++
.../databridge/thrift/gen/Exception/__init__.py | 1 +
.../thrift/gen/Exception/constants.py | 8 +
.../databridge/thrift/gen/Exception/ttypes.py | 473 ++++++
.../ThriftEventTransmissionService-remote | 117 ++
.../ThriftEventTransmissionService.py | 1143 +++++++++++++
.../ThriftEventTransmissionService/__init__.py | 1 +
.../ThriftEventTransmissionService/constants.py | 8 +
.../ThriftEventTransmissionService/ttypes.py | 21 +
.../ThriftSecureEventTransmissionService-remote | 131 ++
.../ThriftSecureEventTransmissionService.py | 1495 ++++++++++++++++++
.../__init__.py | 1 +
.../constants.py | 8 +
.../ttypes.py | 21 +
.../modules/databridge/thrift/gen/__init__.py | 0
.../modules/databridge/thrift/publisher.py | 110 ++
.../modules/databridge/thrift/thrift/TSCons.py | 35 +
.../databridge/thrift/thrift/TSerialization.py | 38 +
.../databridge/thrift/thrift/TTornado.py | 153 ++
.../modules/databridge/thrift/thrift/Thrift.py | 170 ++
.../databridge/thrift/thrift/__init__.py | 20 +
.../databridge/thrift/thrift/protocol/TBase.py | 81 +
.../thrift/thrift/protocol/TBinaryProtocol.py | 261 +++
.../thrift/thrift/protocol/TCompactProtocol.py | 405 +++++
.../thrift/thrift/protocol/TJSONProtocol.py | 552 +++++++
.../thrift/thrift/protocol/TProtocol.py | 406 +++++
.../thrift/thrift/protocol/__init__.py | 20 +
.../thrift/thrift/protocol/fastbinary.c | 1219 ++++++++++++++
.../thrift/thrift/server/THttpServer.py | 87 +
.../thrift/thrift/server/TNonblockingServer.py | 346 ++++
.../thrift/thrift/server/TProcessPoolServer.py | 118 ++
.../databridge/thrift/thrift/server/TServer.py | 269 ++++
.../databridge/thrift/thrift/server/__init__.py | 20 +
.../thrift/thrift/transport/THttpClient.py | 147 ++
.../thrift/thrift/transport/TSSLSocket.py | 214 +++
.../thrift/thrift/transport/TSocket.py | 176 +++
.../thrift/thrift/transport/TTransport.py | 330 ++++
.../thrift/thrift/transport/TTwisted.py | 221 +++
.../thrift/thrift/transport/TZlibTransport.py | 249 +++
.../thrift/thrift/transport/__init__.py | 20 +
.../modules/datapublisher/__init__.py | 18 +
.../modules/datapublisher/exception/__init__.py | 17 +
.../exception/datapublisherexception.py | 33 +
.../modules/datapublisher/logpublisher.py | 273 ++++
.../cartridgeagent/modules/event/__init__.py | 0
.../modules/event/instance/__init__.py | 16 +
.../modules/event/instance/notifier/__init__.py | 17 +
.../modules/event/instance/notifier/events.py | 77 +
.../modules/event/instance/status/__init__.py | 17 +
.../modules/event/instance/status/events.py | 98 ++
.../modules/event/tenant/__init__.py | 16 +
.../modules/event/tenant/events.py | 147 ++
.../modules/event/topology/__init__.py | 17 +
.../modules/event/topology/events.py | 280 ++++
.../modules/exception/__init__.py | 16 +
.../exception/parameternotfoundexception.py | 35 +
.../modules/extensions/__init__.py | 16 +
.../extensions/abstractextensionhandler.py | 78 +
.../extensions/defaultextensionhandler.py | 793 ++++++++++
.../modules/healthstatspublisher/__init__.py | 16 +
.../abstracthealthstatisticspublisher.py | 62 +
.../modules/healthstatspublisher/healthstats.py | 249 +++
.../modules/publisher/__init__.py | 16 +
.../publisher/cartridgeagentpublisher.py | 165 ++
.../modules/subscriber/__init__.py | 17 +
.../modules/subscriber/eventsubscriber.py | 96 ++
.../cartridgeagent/modules/tenant/__init__.py | 16 +
.../modules/tenant/tenantcontext.py | 184 +++
.../cartridgeagent/modules/topology/__init__.py | 16 +
.../modules/topology/topologycontext.py | 454 ++++++
.../cartridgeagent/modules/util/__init__.py | 16 +
.../modules/util/asyncscheduledtask.py | 71 +
.../modules/util/cartridgeagentconstants.py | 135 ++
.../modules/util/cartridgeagentutils.py | 168 ++
.../modules/util/extensionutils.py | 494 ++++++
.../cartridgeagent/modules/util/log.py | 55 +
.../python_cartridgeagent/tests/__init__.py | 16 +
.../python_cartridgeagent/tests/asynctest.txt | 1 +
.../python_cartridgeagent/tests/test_util.py | 133 ++
components/pom.xml | 2 +
products/python-cartridge-agent/__init__.py | 0
.../cartridgeagent/__init__.py | 16 -
.../cartridgeagent/agent.conf | 61 -
.../cartridgeagent/agent.py | 349 ----
.../cartridgeagent/logging.ini | 52 -
.../cartridgeagent/modules/__init__.py | 16 -
.../modules/artifactmgt/__init__.py | 17 -
.../modules/artifactmgt/git/__init__.py | 17 -
.../modules/artifactmgt/git/agentgithandler.py | 574 -------
.../modules/artifactmgt/git/gitrepository.py | 48 -
.../artifactmgt/repositoryinformation.py | 37 -
.../cartridgeagent/modules/config/__init__.py | 17 -
.../config/cartridgeagentconfiguration.py | 346 ----
.../modules/databridge/__init__.py | 17 -
.../cartridgeagent/modules/databridge/agent.py | 225 ---
.../modules/databridge/thrift/__init__.py | 17 -
.../databridge/thrift/gen/Data/__init__.py | 1 -
.../databridge/thrift/gen/Data/constants.py | 8 -
.../databridge/thrift/gen/Data/ttypes.py | 320 ----
.../databridge/thrift/gen/Exception/__init__.py | 1 -
.../thrift/gen/Exception/constants.py | 8 -
.../databridge/thrift/gen/Exception/ttypes.py | 473 ------
.../ThriftEventTransmissionService-remote | 117 --
.../ThriftEventTransmissionService.py | 1143 -------------
.../ThriftEventTransmissionService/__init__.py | 1 -
.../ThriftEventTransmissionService/constants.py | 8 -
.../ThriftEventTransmissionService/ttypes.py | 21 -
.../ThriftSecureEventTransmissionService-remote | 131 --
.../ThriftSecureEventTransmissionService.py | 1495 ------------------
.../__init__.py | 1 -
.../constants.py | 8 -
.../ttypes.py | 21 -
.../modules/databridge/thrift/gen/__init__.py | 0
.../modules/databridge/thrift/publisher.py | 110 --
.../modules/databridge/thrift/thrift/TSCons.py | 35 -
.../databridge/thrift/thrift/TSerialization.py | 38 -
.../databridge/thrift/thrift/TTornado.py | 153 --
.../modules/databridge/thrift/thrift/Thrift.py | 170 --
.../databridge/thrift/thrift/__init__.py | 20 -
.../databridge/thrift/thrift/protocol/TBase.py | 81 -
.../thrift/thrift/protocol/TBinaryProtocol.py | 261 ---
.../thrift/thrift/protocol/TCompactProtocol.py | 405 -----
.../thrift/thrift/protocol/TJSONProtocol.py | 552 -------
.../thrift/thrift/protocol/TProtocol.py | 406 -----
.../thrift/thrift/protocol/__init__.py | 20 -
.../thrift/thrift/protocol/fastbinary.c | 1219 --------------
.../thrift/thrift/server/THttpServer.py | 87 -
.../thrift/thrift/server/TNonblockingServer.py | 346 ----
.../thrift/thrift/server/TProcessPoolServer.py | 118 --
.../databridge/thrift/thrift/server/TServer.py | 269 ----
.../databridge/thrift/thrift/server/__init__.py | 20 -
.../thrift/thrift/transport/THttpClient.py | 147 --
.../thrift/thrift/transport/TSSLSocket.py | 214 ---
.../thrift/thrift/transport/TSocket.py | 176 ---
.../thrift/thrift/transport/TTransport.py | 330 ----
.../thrift/thrift/transport/TTwisted.py | 221 ---
.../thrift/thrift/transport/TZlibTransport.py | 249 ---
.../thrift/thrift/transport/__init__.py | 20 -
.../modules/datapublisher/__init__.py | 18 -
.../modules/datapublisher/exception/__init__.py | 17 -
.../exception/datapublisherexception.py | 33 -
.../modules/datapublisher/logpublisher.py | 273 ----
.../cartridgeagent/modules/event/__init__.py | 0
.../modules/event/instance/__init__.py | 16 -
.../modules/event/instance/notifier/__init__.py | 17 -
.../modules/event/instance/notifier/events.py | 77 -
.../modules/event/instance/status/__init__.py | 17 -
.../modules/event/instance/status/events.py | 98 --
.../modules/event/tenant/__init__.py | 16 -
.../modules/event/tenant/events.py | 147 --
.../modules/event/topology/__init__.py | 17 -
.../modules/event/topology/events.py | 280 ----
.../modules/exception/__init__.py | 16 -
.../exception/parameternotfoundexception.py | 35 -
.../modules/extensions/__init__.py | 16 -
.../extensions/abstractextensionhandler.py | 78 -
.../extensions/defaultextensionhandler.py | 793 ----------
.../modules/healthstatspublisher/__init__.py | 16 -
.../abstracthealthstatisticspublisher.py | 62 -
.../modules/healthstatspublisher/healthstats.py | 249 ---
.../modules/publisher/__init__.py | 16 -
.../publisher/cartridgeagentpublisher.py | 165 --
.../modules/subscriber/__init__.py | 17 -
.../modules/subscriber/eventsubscriber.py | 96 --
.../cartridgeagent/modules/tenant/__init__.py | 16 -
.../modules/tenant/tenantcontext.py | 184 ---
.../cartridgeagent/modules/topology/__init__.py | 16 -
.../modules/topology/topologycontext.py | 454 ------
.../cartridgeagent/modules/util/__init__.py | 16 -
.../modules/util/asyncscheduledtask.py | 71 -
.../modules/util/cartridgeagentconstants.py | 135 --
.../modules/util/cartridgeagentutils.py | 168 --
.../modules/util/extensionutils.py | 494 ------
.../cartridgeagent/modules/util/log.py | 55 -
.../python-cartridge-agent/tests/__init__.py | 16 -
.../python-cartridge-agent/tests/asynctest.txt | 1 -
.../python-cartridge-agent/tests/test_util.py | 133 --
196 files changed, 15614 insertions(+), 15577 deletions(-)
----------------------------------------------------------------------
[6/7] stratos git commit: Add list-service-group command in CLI
Posted by ma...@apache.org.
Add list-service-group command in CLI
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/dc0edc91
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dc0edc91
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dc0edc91
Branch: refs/heads/docker-grouping-merge
Commit: dc0edc9127170bede644cfbf1dd49fa2203e3e3d
Parents: ba533ba
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Fri Nov 7 10:09:27 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Fri Nov 7 10:09:27 2014 +0000
----------------------------------------------------------------------
.../main/java/org/apache/stratos/cli/RestCommandLineService.java | 4 +---
.../cli/beans/grouping/definitions/ServiceGroupDefinition.java | 1 +
.../manager/grouping/definitions/ServiceGroupDefinition.java | 2 +-
.../java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java | 2 +-
4 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/dc0edc91/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 8bc5770..0699979 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
@@ -188,7 +188,7 @@ public class RestCommandLineService {
DefaultHttpClient httpClient = new DefaultHttpClient();
try {
if (validateLogin) {
- HttpResponse response = restClient.doPost(httpClient, restClient.getBaseURL() + ENDPOINT_INIT, null);
+ HttpResponse response = restClient.doGet(httpClient, restClient.getBaseURL() + ENDPOINT_INIT);
if (response != null) {
int responseCode = response.getStatusLine().getStatusCode();
@@ -1826,12 +1826,10 @@ public class RestCommandLineService {
public void listServiceGroup (String groupDefinitionName) {
try {
-
ServiceGroupDefinition list = (ServiceGroupDefinition) restClient.listEntity(ENDPOINT_LIST_SERVICE_GROUP.replace("{groupDefinitionName}", groupDefinitionName),
ServiceGroupDefinition.class, "serviceGroup");
if ((list == null) || (list.getName() == null)) {
- System.out.println("null");
System.out.println("Service group not found: " + groupDefinitionName);
return;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/dc0edc91/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java
index d3af12f..18b3099 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/grouping/definitions/ServiceGroupDefinition.java
@@ -19,6 +19,7 @@
package org.apache.stratos.cli.beans.grouping.definitions;
+import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
public class ServiceGroupDefinition {
http://git-wip-us.apache.org/repos/asf/stratos/blob/dc0edc91/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/definitions/ServiceGroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/definitions/ServiceGroupDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/definitions/ServiceGroupDefinition.java
index ac8321f..ac890e8 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/definitions/ServiceGroupDefinition.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/definitions/ServiceGroupDefinition.java
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;
-@XmlRootElement(name = "serviceGroup")
+@XmlRootElement
public class ServiceGroupDefinition implements Serializable {
private String name;
http://git-wip-us.apache.org/repos/asf/stratos/blob/dc0edc91/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index a7702c1..e1f41ee 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -298,7 +298,7 @@ public class StratosApiV41 extends AbstractApi {
@Produces("application/json")
@Consumes("application/json")
@AuthorizationAction("/permission/admin/manage/view/partition")
- public Response getPartition(@PathParam("partitionId") String partitionId) throws RestAPIException {
+ public Response getPartition(@PathParam("partitiotnId") String partitionId) throws RestAPIException {
return Response.ok().entity(StratosApiV41Utils.getPartition(partitionId)).build();
}
[4/7] stratos git commit: Merge branch 'docker-grouping-merge' of
https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Posted by ma...@apache.org.
Merge branch 'docker-grouping-merge' of https://git-wip-us.apache.org/repos/asf/stratos into docker-grouping-merge
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f236bdaa
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f236bdaa
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f236bdaa
Branch: refs/heads/docker-grouping-merge
Commit: f236bdaaeb7c19a0152e413fe2a3ff88f016ff96
Parents: 0ffe7cf 4f170eb
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Fri Nov 7 06:47:09 2014 +0000
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Fri Nov 7 06:47:09 2014 +0000
----------------------------------------------------------------------
.../cluster/KubernetesServiceClusterMonitor.java | 2 +-
.../deployer/DefaultServiceGroupDeployer.java | 11 +++++++----
.../stratos/rest/endpoint/api/StratosApiV40.java | 2 +-
.../main/webapp/api-test/WEB-INF/cxf-servlet.xml | 16 +++++++++++++++-
.../src/main/webapp/api/WEB-INF/cxf-servlet.xml | 3 +++
5 files changed, 27 insertions(+), 7 deletions(-)
----------------------------------------------------------------------