You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/08/12 12:26:00 UTC
[1/3] stratos git commit: Merge branch 'tenant-isolation' of
https://github.com/apache/stratos into tenant-isolation-v1
Repository: stratos
Updated Branches:
refs/heads/tenant-isolation b5fddd3ba -> 265b7a2dc
Merge branch 'tenant-isolation' of https://github.com/apache/stratos into tenant-isolation-v1
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/1d14c416
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/1d14c416
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/1d14c416
Branch: refs/heads/tenant-isolation
Commit: 1d14c4160d8d15603bec73eb047432f6177006d9
Parents: 5806387 4c94b48
Author: Dinithi <di...@wso2.com>
Authored: Wed Aug 12 13:55:47 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Wed Aug 12 13:55:47 2015 +0530
----------------------------------------------------------------------
.../apache/stratos/cloud/controller/domain/ClusterContext.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[3/3] stratos git commit: Merge branch 'tenant-isolation-v1' of
https://github.com/dinithis/stratos into tenant-isolation
Posted by ga...@apache.org.
Merge branch 'tenant-isolation-v1' of https://github.com/dinithis/stratos into tenant-isolation
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/265b7a2d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/265b7a2d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/265b7a2d
Branch: refs/heads/tenant-isolation
Commit: 265b7a2dce0dd41f363abb77481f4a66f0f60936
Parents: b5fddd3 d9c80c4
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Wed Aug 12 15:43:42 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Wed Aug 12 15:43:42 2015 +0530
----------------------------------------------------------------------
.../impl/CloudControllerServiceImpl.java | 2 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 31 +++++++++++++++-----
2 files changed, 24 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/265b7a2d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
[2/3] stratos git commit: Fixing minor issues when adding deployment
policy with non-existing network partition
Posted by ga...@apache.org.
Fixing minor issues when adding deployment policy with non-existing network partition
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d9c80c4d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d9c80c4d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d9c80c4d
Branch: refs/heads/tenant-isolation
Commit: d9c80c4d1db4661e999eeae7af25ca6c71680eb8
Parents: 1d14c41
Author: Dinithi <di...@wso2.com>
Authored: Wed Aug 12 14:53:11 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Wed Aug 12 14:53:11 2015 +0530
----------------------------------------------------------------------
.../impl/CloudControllerServiceImpl.java | 2 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 31 +++++++++++++++-----
2 files changed, 24 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9c80c4d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
index 6e93e53..9da8934 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -790,7 +790,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
}
- String msg = "Could not find cartridge: [cartridge-type] [tenant-id] " + cartridgeType + tenantId;
+ String msg = "Could not find cartridge: [cartridge-type]" + cartridgeType;
throw new CartridgeNotFoundException(msg);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9c80c4d/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 389b43f..417dd15 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -726,18 +726,26 @@ public class StratosApiV41Utils {
(carbonContext.getTenantId());
String[] networkPartitions = applicationPolicy.getNetworkPartitions();
String[] networkPartitionsUuid = new String[applicationPolicy.getNetworkPartitions().length];
- for (int i = 0; i < networkPartitions.length; i++) {
- for (NetworkPartition networkPartition : existingNetworkPartitions) {
- if (networkPartitions[i].equals(networkPartition.getId()) && (tenantId == networkPartition
- .getTenantId())) {
- networkPartitionsUuid[i] = networkPartition.getUuid();
+
+ for (int i = 0; i < networkPartitions.length; i++) {
+ if (existingNetworkPartitions != null) {
+ for (NetworkPartition networkPartition : existingNetworkPartitions) {
+ if (networkPartitions[i].equals(networkPartition.getId()) && (tenantId == networkPartition
+ .getTenantId())) {
+ networkPartitionsUuid[i] = networkPartition.getUuid();
+ }
+ }
+ } else {
+ String message = String.format("Network partition not found: for [application-policy-id] %s" +
+ "[network-partition-id] %s", applicationPolicyBean.getId(),
+ networkPartitions[i]);
+ throw new RestAPIException(message);
}
}
- }
+
applicationPolicy.setNetworkPartitionsUuid(networkPartitionsUuid);
serviceClient.addApplicationPolicy(applicationPolicy);
-
} catch (RemoteException e) {
String msg = "Could not add application policy. " + e.getLocalizedMessage();
log.error(msg, e);
@@ -2859,7 +2867,14 @@ public class StratosApiV41Utils {
org.apache.stratos.cloud.controller.stub.domain.NetworkPartition networkPartition =
serviceClient.getNetworkPartitionByTenant(networkPartitionId, tenantId);
- String networkPartitionUuid = networkPartition.getUuid();
+ String networkPartitionUuid;
+ if (networkPartition != null) {
+ networkPartitionUuid = networkPartition.getUuid();
+ } else {
+ String message = String .format("Network partition not found [network-partition-id] %s", networkPartitionId);
+ log.error(message);
+ throw new RestAPIException(message);
+ }
DeploymentPolicy[] deploymentPolicies = autoscalerServiceClient.getDeploymentPoliciesByTenant(carbonContext.getTenantId());