Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Revert "Merge the missing changes"
Browse files Browse the repository at this point in the history
This reverts commit 12fdfb0.
  • Loading branch information
swgkg committed Nov 2, 2015
1 parent c960c14 commit 986684d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public Response addCartridge(
PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
int tenantId = carbonContext.getTenantId();

String cartridgeUuid = cartridgeType + "~" +UUID.randomUUID().toString();
String cartridgeUuid = cartridgeType + "~" +tenantId;//UUID.randomUUID().toString()

CartridgeBean cartridgeBean = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ public class StratosApiV41Utils {
public static final String APPLICATION_STATUS_DEPLOYED = "Deployed";
public static final String APPLICATION_STATUS_CREATED = "Created";
public static final String APPLICATION_STATUS_UNDEPLOYING = "Undeploying";
public static final String KUBERNETES_SERVICE_TYPE_NODEPORT = "NodePort";
public static final String KUBERNETES_SERVICE_TYPE_CLUSTERIP = "ClusterIP";
public static final String KUBERNETES_IAAS_PROVIDER = "kubernetes";
public static final int SUPER_TENANT_ID = -1234;

private static final Log log = LogFactory.getLog(StratosApiV41Utils.class);
Expand All @@ -137,14 +134,6 @@ public static void addCartridge(CartridgeBean cartridgeBean, String cartridgeUui
cartridgeBean.getType()));
}

boolean isKubernetesIaasProviderAvailable = false;

for (IaasProviderBean providers : iaasProviders) {
if (providers.getType().equals(KUBERNETES_IAAS_PROVIDER)) {
isKubernetesIaasProviderAvailable = true;
}
}

for (PortMappingBean portMapping : cartridgeBean.getPortMapping()) {
if (StringUtils.isBlank(portMapping.getName())) {
portMapping.setName(portMapping.getProtocol() + "-" + portMapping.getPort());
Expand All @@ -154,21 +143,6 @@ public static void addCartridge(CartridgeBean cartridgeBean, String cartridgeUui
cartridgeUuid, cartridgeBean.getType(), portMapping.getName()));
}
}

String type = portMapping.getKubernetesPortType();

if (isKubernetesIaasProviderAvailable) {
if (type == null) {
throw new RestAPIException((String.format("Type is not found in portmapping: %s - Possible " +
"values - %s and %s", portMapping.getName(), KUBERNETES_SERVICE_TYPE_NODEPORT,
KUBERNETES_SERVICE_TYPE_CLUSTERIP)));
} else if (!type.equals(KUBERNETES_SERVICE_TYPE_NODEPORT) && !type.equals(KUBERNETES_SERVICE_TYPE_CLUSTERIP)) {
throw new RestAPIException((String.format("Type is not found in portmapping: %s - Possible " +
"values - %s and %s", portMapping.getName(), KUBERNETES_SERVICE_TYPE_NODEPORT,
KUBERNETES_SERVICE_TYPE_CLUSTERIP)));
}
}

}

Cartridge cartridgeConfig = createCartridgeConfig(cartridgeBean, cartridgeUuid, tenantId);
Expand Down
2 changes: 1 addition & 1 deletion extensions/cep/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@

<modules>
<module>modules/distribution</module>

<module>modules/stratos-cep-extension</module>
</modules>
</project>

0 comments on commit 986684d

Please sign in to comment.