Commit 7b58dce3 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added ec2 type credential

parent 317bbf97
...@@ -86,18 +86,18 @@ services: ...@@ -86,18 +86,18 @@ services:
- "27017:27017" - "27017:27017"
manager: #manager:
depends_on: #depends_on:
- rabbit #- rabbit
- mongo #- mongo
- sure-tosca #- sure-tosca
image: manager:3.0.0 #image: manager:3.0.0
environment: #environment:
RABBITMQ_HOST: rabbit #RABBITMQ_HOST: rabbit
MONGO_HOST: mongo #MONGO_HOST: mongo
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0 #SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
ports: #ports:
- "30000:8080" #- "30000:8080"
sure-tosca: sure-tosca:
image: sure-tosca:3.0.0 image: sure-tosca:3.0.0
...@@ -112,14 +112,14 @@ services: ...@@ -112,14 +112,14 @@ services:
#environment: #environment:
#RABBITMQ_HOST: rabbit #RABBITMQ_HOST: rabbit
provisioner: #provisioner:
depends_on: #depends_on:
- rabbit #- rabbit
- sure-tosca #- sure-tosca
image: provisioner:3.0.0 #image: provisioner:3.0.0
environment: #environment:
RABBITMQ_HOST: rabbit #RABBITMQ_HOST: rabbit
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0 #SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
#deployer: #deployer:
#depends_on: #depends_on:
......
...@@ -406,16 +406,9 @@ public class ServiceTests { ...@@ -406,16 +406,9 @@ public class ServiceTests {
@Test @Test
public void testSetProvisionerOperation() throws FileNotFoundException, IOException, MissingCredentialsException, ApiException, TypeExeption, JsonProcessingException, TimeoutException, InterruptedException, NotFoundException, MissingVMTopologyException { public void testSetProvisionerOperation() throws FileNotFoundException, IOException, MissingCredentialsException, ApiException, TypeExeption, JsonProcessingException, TimeoutException, InterruptedException, NotFoundException, MissingVMTopologyException {
if (ToscaHelper.isServiceUp(sureToscaBasePath) && ToscaHelper.isServiceUp("http://" + messageBrokerHost + ":15672")) { if (ToscaHelper.isServiceUp(sureToscaBasePath) && ToscaHelper.isServiceUp("http://" + messageBrokerHost + ":15672")) {
Credential document = new Credential();
document.setCloudProviderName("ExoGENI");
Map<String, String> keys = new HashMap<>();
keys.put("keystore", "/qTlqams0Ppq2rnaOgL5am7ExGO2nMsOZYM61kiAnsvkOixUuoPy9r4d4OfhwQXXg3lZmeRITjNz4ps+hIDKuxodIQXgBtfMy9Kx8Syb9bIl/MQQls5hWyp9yHAl6vAampoxYu0170lceT1sds4OCz3tM9eF7/UoBQwXBPo94QhO1/vSbtICyVsm3Z2HeGKcBWobT3opZV2w30GqX/7OBmNeIG7RBMPuxLsUxJ9Alahi1zXOUjLkd2bmmVFREngmeubgCzPFxxCQQrZK6WratTzJKc1sRVNK5GJzTwi9BlcZSQSgprum9yVHUgQc6Ylmvdrkhn2g9SlluY2JAZyCZvHYaRBKE4o5bXBDumTy1YAPMNPTfpeeLz+YmH0GMfVwKkxtIBpjb045QseoIWcqxke60WWfJguaTqymXknmcqcLNz+UzUdfVfyurOy9X8xmTGCW5V4N");
document.setKeys(keys);
document.setToken("secret");
document.setTokenType("password");
String credentialID = credentialService.save(document); addRandomCredential("ExoGENI");
assertNotNull(credentialID); addRandomCredential("EC2");
FileInputStream in = new FileInputStream(testApplicationExamplePlanedToscaFilePath); FileInputStream in = new FileInputStream(testApplicationExamplePlanedToscaFilePath);
...@@ -453,4 +446,17 @@ public class ServiceTests { ...@@ -453,4 +446,17 @@ public class ServiceTests {
} }
} }
private void addRandomCredential(String providerName) {
Credential document = new Credential();
document.setCloudProviderName(providerName);
Map<String, String> keys = new HashMap<>();
keys.put("keystore", "/qTlqams0Ppq2rnaOgL5am7ExGO2nMsOZYM61kiAnsvkOixUuoPy9r4d4OfhwQXXg3lZmeRITjNz4ps+hIDKuxodIQXgBtfMy9Kx8Syb9bIl/MQQls5hWyp9yHAl6vAampoxYu0170lceT1sds4OCz3tM9eF7/UoBQwXBPo94QhO1/vSbtICyVsm3Z2HeGKcBWobT3opZV2w30GqX/7OBmNeIG7RBMPuxLsUxJ9Alahi1zXOUjLkd2bmmVFREngmeubgCzPFxxCQQrZK6WratTzJKc1sRVNK5GJzTwi9BlcZSQSgprum9yVHUgQc6Ylmvdrkhn2g9SlluY2JAZyCZvHYaRBKE4o5bXBDumTy1YAPMNPTfpeeLz+YmH0GMfVwKkxtIBpjb045QseoIWcqxke60WWfJguaTqymXknmcqcLNz+UzUdfVfyurOy9X8xmTGCW5V4N");
document.setKeys(keys);
document.setToken("secret");
document.setTokenType("password");
String credentialID = credentialService.save(document);
assertNotNull(credentialID);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment