Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
7b58dce3
Commit
7b58dce3
authored
Mar 31, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added ec2 type credential
parent
317bbf97
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
30 deletions
+36
-30
docker-compose.yml
docker-compose.yml
+20
-20
ServiceTests.java
...r/src/test/java/nl/uva/sne/drip/service/ServiceTests.java
+16
-10
No files found.
docker-compose.yml
View file @
7b58dce3
...
...
@@ -86,18 +86,18 @@ services:
-
"
27017:27017"
manager
:
depends_on
:
-
rabbit
-
mongo
-
sure-tosca
image
:
manager:3.0.0
environment
:
RABBITMQ_HOST
:
rabbit
MONGO_HOST
:
mongo
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
ports
:
-
"
30000:8080"
#
manager:
#
depends_on:
#
- rabbit
#
- mongo
#
- sure-tosca
#
image: manager:3.0.0
#
environment:
#
RABBITMQ_HOST: rabbit
#
MONGO_HOST: mongo
#
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
#
ports:
#
- "30000:8080"
sure-tosca
:
image
:
sure-tosca:3.0.0
...
...
@@ -112,14 +112,14 @@ services:
#environment:
#RABBITMQ_HOST: rabbit
provisioner
:
depends_on
:
-
rabbit
-
sure-tosca
image
:
provisioner:3.0.0
environment
:
RABBITMQ_HOST
:
rabbit
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
#
provisioner:
#
depends_on:
#
- rabbit
#
- sure-tosca
#
image: provisioner:3.0.0
#
environment:
#
RABBITMQ_HOST: rabbit
#
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
#deployer:
#depends_on:
...
...
manager/src/test/java/nl/uva/sne/drip/service/ServiceTests.java
View file @
7b58dce3
...
...
@@ -406,16 +406,9 @@ public class ServiceTests {
@Test
public
void
testSetProvisionerOperation
()
throws
FileNotFoundException
,
IOException
,
MissingCredentialsException
,
ApiException
,
TypeExeption
,
JsonProcessingException
,
TimeoutException
,
InterruptedException
,
NotFoundException
,
MissingVMTopologyException
{
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
);
a
ssertNotNull
(
credentialID
);
addRandomCredential
(
"ExoGENI"
);
a
ddRandomCredential
(
"EC2"
);
FileInputStream
in
=
new
FileInputStream
(
testApplicationExamplePlanedToscaFilePath
);
...
...
@@ -436,7 +429,7 @@ public class ServiceTests {
assertNotNull
(
attributes
.
get
(
"credential"
));
toscaTemplate
=
dripService
.
setDesieredSate
(
toscaTemplate
,
vmTopology
,
Constants
.
NODE_STATES
.
RUNNING
);
}
Map
<
String
,
NodeTemplate
>
nodes
=
toscaTemplate
.
getTopologyTemplate
().
getNodeTemplates
();
Set
<
String
>
names
=
nodes
.
keySet
();
for
(
String
name
:
names
)
{
...
...
@@ -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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment