You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2013/10/24 08:44:43 UTC
[1/2] git commit: adding the new APIs
Updated Branches:
refs/heads/master ecef467e8 -> 92b4fb0d5
adding the new APIs
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/cdbbd3bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/cdbbd3bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/cdbbd3bc
Branch: refs/heads/master
Commit: cdbbd3bc570787457e601976a20a1abfc32ed02b
Parents: c8795ce
Author: rekathiru <rt...@gmail.com>
Authored: Thu Oct 24 12:13:46 2013 +0530
Committer: rekathiru <rt...@gmail.com>
Committed: Thu Oct 24 12:13:46 2013 +0530
----------------------------------------------------------------------
.../controller/deployers/CartridgeDeployer.java | 4 +--
.../impl/CloudControllerServiceImpl.java | 15 ++++++--
.../interfaces/CloudControllerService.java | 38 ++++++++++++++++++--
3 files changed, 48 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdbbd3bc/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployers/CartridgeDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployers/CartridgeDeployer.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployers/CartridgeDeployer.java
index 39c3300..7b2ebe2 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployers/CartridgeDeployer.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployers/CartridgeDeployer.java
@@ -100,9 +100,7 @@ public class CartridgeDeployer extends AbstractDeployer{
f.renameTo(new File(deploymentFileData.getAbsolutePath()+".back"));
log.error(msg, e);
throw new DeploymentException(msg, e);
- }
-
-
+ }
}
private void validateCartridge(AxiomXpathParser parser) throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdbbd3bc/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
index b2395e0..48385ee 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
@@ -473,6 +473,11 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
+ @Override
+ public String startInstance(String clusterId, LocationScope locationScope, int noOfInstancesToBeSpawned) {
+ //TODO
+ return null;
+ }
/**
* Appends this ip to the Service Context's
@@ -611,9 +616,13 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
@Override
- public boolean terminateInstance(String instanceId) {
- //TODO
- return false;
+ public boolean terminateInstance(String noOfInstances, String clusterId, LocationScope locationScope) {
+ return false; //TODO
+ }
+
+ @Override
+ public boolean terminateInstance(List<String> instancesToBeTerminated) {
+ return false; //TODO
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cdbbd3bc/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
index 4f35100..ccf6fcd 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
@@ -24,6 +24,8 @@ import org.apache.stratos.cloud.controller.util.CartridgeInfo;
import org.apache.stratos.cloud.controller.util.LocationScope;
import org.apache.stratos.cloud.controller.util.Properties;
+import java.util.List;
+
/**
* This Interface provides a way to communicate with underline
* Infrastructure which are supported by <i>JClouds</i>.
@@ -75,6 +77,21 @@ public interface CloudControllerService {
* @return public IP which is associated with the newly started instance.
*/
public String startInstance(String clusterId, LocationScope locationScope);
+
+ /**
+ * Calling this method will spawn more than one ininstances in the
+ * specified locationScope for the particular cluster
+ *
+ * @param clusterId
+ * cluster ID of the instance to be started up.
+ * @param noOfInstancesToBeSpawned
+ * no of instances to be started up.
+ * @param locationScope
+ * It contains the region, zone, network and host of a IaaS where
+ * an instance need to be started.
+ * @return public IP which is associated with the newly started instance.
+ */
+ public String startInstance(String clusterId, LocationScope locationScope, int noOfInstancesToBeSpawned);
/**
* Calling this method will result in termination of an instance which is belong
@@ -89,15 +106,30 @@ public interface CloudControllerService {
*/
public boolean terminateInstance(String clusterId, LocationScope locationScope);
+ /**
+ * Calling this method will result in termination of an instance which is belong
+ * to the provided cluster Id and the location scope..
+ *
+ * @param noOfInstances
+ * no of instances to be started up
+ * @param clusterId
+ * cluster ID of the instance to be terminated.
+ * @param locationScope
+ * It contains the region, zone, network and host of a IaaS where
+ * an instance need to be terminated..
+ * @return whether an instance terminated successfully or not.
+ */
+ public boolean terminateInstance(String noOfInstances, String clusterId, LocationScope locationScope);
+
/**
* Calling this method will result in termination of an instance which is belong
* to the provided instance Id.
*
- * @param instanceId
- * instance Id of the instance to be terminated.
+ * @param instancesToBeTerminated
+ * list of instance Ids to be terminated.
* @return whether an instance terminated successfully or not.
*/
- public boolean terminateInstance(String instanceId);
+ public boolean terminateInstance(List<String> instancesToBeTerminated);
/**
* Calling this method will result in termination of all instances belong
[2/2] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by re...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/92b4fb0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/92b4fb0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/92b4fb0d
Branch: refs/heads/master
Commit: 92b4fb0d5b6a05ce68c9bf948e29a8ebdacdec88
Parents: cdbbd3b ecef467
Author: rekathiru <rt...@gmail.com>
Authored: Thu Oct 24 12:14:19 2013 +0530
Committer: rekathiru <rt...@gmail.com>
Committed: Thu Oct 24 12:14:19 2013 +0530
----------------------------------------------------------------------
.../stratos/lb/endpoint/RequestDelegator.java | 108 ++++++++
.../stratos/lb/endpoint/RequestProcessor.java | 111 --------
.../TenantAwareLoadBalanceEndpoint.java | 21 +-
.../org.apache.stratos.rest.endpoint/pom.xml | 86 ++++++
.../apache/stratos/rest/endpoint/Constants.java | 28 ++
.../stratos/rest/endpoint/ServiceHolder.java | 61 +++++
.../annotation/AuthorizationAction.java | 38 +++
.../endpoint/annotation/SuperTenantService.java | 34 +++
.../handlers/StratosAuthenticationHandler.java | 99 +++++++
.../handlers/StratosAuthorizingHandler.java | 274 +++++++++++++++++++
.../endpoint/security/StratosPrincipal.java | 53 ++++
.../security/StratosSecurityContext.java | 48 ++++
.../rest/endpoint/services/AbstractAdmin.java | 57 ++++
.../rest/endpoint/services/StratosAdmin.java | 135 +++++++++
.../src/main/resources/addTenantRequest.txt | 4 +
.../src/main/resources/getTenantList.txt | 1 +
.../webapp/META-INF/webapp-classloading.xml | 35 +++
.../src/main/webapp/WEB-INF/cxf-servlet.xml | 45 +++
.../src/main/webapp/WEB-INF/web.xml | 40 +++
19 files changed, 1161 insertions(+), 117 deletions(-)
----------------------------------------------------------------------