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
97dcaa7e
Commit
97dcaa7e
authored
Apr 24, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added creation date
moved message to internal
parent
fd497934
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
53 additions
and
22 deletions
+53
-22
DRIPCaller.java
...api/src/main/java/nl/uva/sne/drip/api/rpc/DRIPCaller.java
+1
-1
DeployService.java
.../main/java/nl/uva/sne/drip/api/service/DeployService.java
+4
-2
PlannerService.java
...main/java/nl/uva/sne/drip/api/service/PlannerService.java
+4
-2
ProvisionService.java
...in/java/nl/uva/sne/drip/api/service/ProvisionService.java
+3
-2
SimplePlannerService.java
...ava/nl/uva/sne/drip/api/service/SimplePlannerService.java
+4
-2
CloudConfigurationController0.java
...a/sne/drip/api/v0/rest/CloudConfigurationController0.java
+5
-0
ProvisionController0.java
...ava/nl/uva/sne/drip/api/v0/rest/ProvisionController0.java
+1
-0
CloudCredentialsController.java
.../uva/sne/drip/api/v1/rest/CloudCredentialsController.java
+8
-6
KeyPairController.java
...n/java/nl/uva/sne/drip/api/v1/rest/KeyPairController.java
+1
-0
Converter.java
...rc/main/java/nl/uva/sne/drip/commons/utils/Converter.java
+3
-2
MessageGenerator.java
.../java/nl/uva/sne/drip/commons/utils/MessageGenerator.java
+1
-1
Message.java
.../src/main/java/nl/uva/sne/drip/data/internal/Message.java
+1
-1
MessageParameter.java
.../java/nl/uva/sne/drip/data/internal/MessageParameter.java
+1
-1
CloudCredentials.java
...va/nl/uva/sne/drip/data/v1/external/CloudCredentials.java
+0
-1
DeployResponse.java
...java/nl/uva/sne/drip/data/v1/external/DeployResponse.java
+0
-1
OwnedObject.java
...in/java/nl/uva/sne/drip/data/v1/external/OwnedObject.java
+16
-0
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/rpc/DRIPCaller.java
View file @
97dcaa7e
...
@@ -15,7 +15,7 @@ import java.util.concurrent.BlockingQueue;
...
@@ -15,7 +15,7 @@ import java.util.concurrent.BlockingQueue;
import
java.util.concurrent.TimeoutException
;
import
java.util.concurrent.TimeoutException
;
import
java.util.logging.Level
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
java.util.logging.Logger
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.Message
;
import
nl.uva.sne.drip.data.
in
ternal.Message
;
import
nl.uva.sne.drip.commons.utils.Converter
;
import
nl.uva.sne.drip.commons.utils.Converter
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/service/DeployService.java
View file @
97dcaa7e
...
@@ -37,8 +37,8 @@ import nl.uva.sne.drip.data.v1.external.DeployRequest;
...
@@ -37,8 +37,8 @@ import nl.uva.sne.drip.data.v1.external.DeployRequest;
import
nl.uva.sne.drip.data.v1.external.DeployParameter
;
import
nl.uva.sne.drip.data.v1.external.DeployParameter
;
import
nl.uva.sne.drip.data.v1.external.DeployResponse
;
import
nl.uva.sne.drip.data.v1.external.DeployResponse
;
import
nl.uva.sne.drip.data.v1.external.Key
;
import
nl.uva.sne.drip.data.v1.external.Key
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.Message
;
import
nl.uva.sne.drip.data.
in
ternal.Message
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.
in
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.v1.external.ProvisionResponse
;
import
nl.uva.sne.drip.data.v1.external.ProvisionResponse
;
import
nl.uva.sne.drip.data.v1.external.User
;
import
nl.uva.sne.drip.data.v1.external.User
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
@@ -232,6 +232,7 @@ public class DeployService {
...
@@ -232,6 +232,7 @@ public class DeployService {
private
DeployResponse
handleResponse
(
List
<
MessageParameter
>
params
,
DeployRequest
deployInfo
)
throws
KeyException
,
IOException
{
private
DeployResponse
handleResponse
(
List
<
MessageParameter
>
params
,
DeployRequest
deployInfo
)
throws
KeyException
,
IOException
{
DeployResponse
deployResponse
=
new
DeployResponse
();
DeployResponse
deployResponse
=
new
DeployResponse
();
deployResponse
.
setCreationDate
(
System
.
currentTimeMillis
());
for
(
MessageParameter
p
:
params
)
{
for
(
MessageParameter
p
:
params
)
{
String
name
=
p
.
getName
();
String
name
=
p
.
getName
();
...
@@ -242,6 +243,7 @@ public class DeployService {
...
@@ -242,6 +243,7 @@ public class DeployService {
k
.
setKey
(
value
);
k
.
setKey
(
value
);
k
.
setType
(
Key
.
KeyType
.
PRIVATE
);
k
.
setType
(
Key
.
KeyType
.
PRIVATE
);
KeyPair
pair
=
new
KeyPair
();
KeyPair
pair
=
new
KeyPair
();
pair
.
setCreationDate
(
System
.
currentTimeMillis
());
pair
.
setPrivateKey
(
k
);
pair
.
setPrivateKey
(
k
);
deployResponse
.
setKey
(
pair
);
deployResponse
.
setKey
(
pair
);
save
(
deployResponse
);
save
(
deployResponse
);
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/service/PlannerService.java
View file @
97dcaa7e
...
@@ -29,8 +29,8 @@ import nl.uva.sne.drip.api.dao.PlanDao;
...
@@ -29,8 +29,8 @@ import nl.uva.sne.drip.api.dao.PlanDao;
import
nl.uva.sne.drip.api.exception.BadRequestException
;
import
nl.uva.sne.drip.api.exception.BadRequestException
;
import
nl.uva.sne.drip.api.exception.NotFoundException
;
import
nl.uva.sne.drip.api.exception.NotFoundException
;
import
nl.uva.sne.drip.api.rpc.PlannerCaller
;
import
nl.uva.sne.drip.api.rpc.PlannerCaller
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.Message
;
import
nl.uva.sne.drip.data.
in
ternal.Message
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.
in
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
nl.uva.sne.drip.data.v1.external.ToscaRepresentation
;
import
nl.uva.sne.drip.data.v1.external.ToscaRepresentation
;
import
nl.uva.sne.drip.commons.utils.Converter
;
import
nl.uva.sne.drip.commons.utils.Converter
;
...
@@ -86,6 +86,7 @@ public class PlannerService {
...
@@ -86,6 +86,7 @@ public class PlannerService {
SimplePlanContainer
simplePlan
=
P2PConverter
.
convert
(
jsonArrayString
.
toString
(),
"vm_user"
,
"Ubuntu 16.04"
,
"swarm"
);
SimplePlanContainer
simplePlan
=
P2PConverter
.
convert
(
jsonArrayString
.
toString
(),
"vm_user"
,
"Ubuntu 16.04"
,
"swarm"
);
PlanResponse
topLevel
=
new
PlanResponse
();
PlanResponse
topLevel
=
new
PlanResponse
();
topLevel
.
setCreationDate
(
System
.
currentTimeMillis
());
topLevel
.
setLevel
(
0
);
topLevel
.
setLevel
(
0
);
topLevel
.
setToscaID
(
toscaId
);
topLevel
.
setToscaID
(
toscaId
);
topLevel
.
setName
(
"planner_output_all.yml"
);
topLevel
.
setName
(
"planner_output_all.yml"
);
...
@@ -94,6 +95,7 @@ public class PlannerService {
...
@@ -94,6 +95,7 @@ public class PlannerService {
Set
<
String
>
loweLevelPlansIDs
=
new
HashSet
<>();
Set
<
String
>
loweLevelPlansIDs
=
new
HashSet
<>();
for
(
String
lowLevelNames
:
map
.
keySet
())
{
for
(
String
lowLevelNames
:
map
.
keySet
())
{
PlanResponse
lowLevelPlan
=
new
PlanResponse
();
PlanResponse
lowLevelPlan
=
new
PlanResponse
();
lowLevelPlan
.
setCreationDate
(
System
.
currentTimeMillis
());
lowLevelPlan
.
setLevel
(
1
);
lowLevelPlan
.
setLevel
(
1
);
lowLevelPlan
.
setToscaID
(
toscaId
);
lowLevelPlan
.
setToscaID
(
toscaId
);
lowLevelPlan
.
setName
(
lowLevelNames
);
lowLevelPlan
.
setName
(
lowLevelNames
);
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/service/ProvisionService.java
View file @
97dcaa7e
...
@@ -40,8 +40,8 @@ import nl.uva.sne.drip.api.v1.rest.ProvisionController;
...
@@ -40,8 +40,8 @@ import nl.uva.sne.drip.api.v1.rest.ProvisionController;
import
nl.uva.sne.drip.commons.utils.Converter
;
import
nl.uva.sne.drip.commons.utils.Converter
;
import
nl.uva.sne.drip.data.v1.external.CloudCredentials
;
import
nl.uva.sne.drip.data.v1.external.CloudCredentials
;
import
nl.uva.sne.drip.data.v1.external.DeployParameter
;
import
nl.uva.sne.drip.data.v1.external.DeployParameter
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.Message
;
import
nl.uva.sne.drip.data.
in
ternal.Message
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.
in
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
nl.uva.sne.drip.data.v1.external.ProvisionRequest
;
import
nl.uva.sne.drip.data.v1.external.ProvisionRequest
;
import
nl.uva.sne.drip.data.v1.external.ProvisionResponse
;
import
nl.uva.sne.drip.data.v1.external.ProvisionResponse
;
...
@@ -128,6 +128,7 @@ public class ProvisionService {
...
@@ -128,6 +128,7 @@ public class ProvisionService {
// + File.separator + "ec2_provisioner_provisoned3.json");
// + File.separator + "ec2_provisioner_provisoned3.json");
List
<
MessageParameter
>
params
=
response
.
getParameters
();
List
<
MessageParameter
>
params
=
response
.
getParameters
();
ProvisionResponse
provisionResponse
=
new
ProvisionResponse
();
ProvisionResponse
provisionResponse
=
new
ProvisionResponse
();
provisionResponse
.
setCreationDate
(
System
.
currentTimeMillis
());
for
(
MessageParameter
p
:
params
)
{
for
(
MessageParameter
p
:
params
)
{
String
name
=
p
.
getName
();
String
name
=
p
.
getName
();
if
(
name
.
toLowerCase
().
contains
(
"exception"
))
{
if
(
name
.
toLowerCase
().
contains
(
"exception"
))
{
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/service/SimplePlannerService.java
View file @
97dcaa7e
...
@@ -29,8 +29,8 @@ import java.util.concurrent.TimeoutException;
...
@@ -29,8 +29,8 @@ import java.util.concurrent.TimeoutException;
import
nl.uva.sne.drip.api.dao.PlanDao
;
import
nl.uva.sne.drip.api.dao.PlanDao
;
import
nl.uva.sne.drip.api.exception.NotFoundException
;
import
nl.uva.sne.drip.api.exception.NotFoundException
;
import
nl.uva.sne.drip.api.rpc.PlannerCaller
;
import
nl.uva.sne.drip.api.rpc.PlannerCaller
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.Message
;
import
nl.uva.sne.drip.data.
in
ternal.Message
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.
in
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
nl.uva.sne.drip.data.v1.external.ToscaRepresentation
;
import
nl.uva.sne.drip.data.v1.external.ToscaRepresentation
;
import
nl.uva.sne.drip.commons.utils.Converter
;
import
nl.uva.sne.drip.commons.utils.Converter
;
...
@@ -64,6 +64,7 @@ public class SimplePlannerService {
...
@@ -64,6 +64,7 @@ public class SimplePlannerService {
Message
plannerReturnedMessage
=
(
planner
.
call
(
plannerInvokationMessage
));
Message
plannerReturnedMessage
=
(
planner
.
call
(
plannerInvokationMessage
));
List
<
MessageParameter
>
planFiles
=
plannerReturnedMessage
.
getParameters
();
List
<
MessageParameter
>
planFiles
=
plannerReturnedMessage
.
getParameters
();
topLevel
=
new
PlanResponse
();
topLevel
=
new
PlanResponse
();
topLevel
.
setCreationDate
(
System
.
currentTimeMillis
());
Set
<
String
>
ids
=
topLevel
.
getLoweLevelPlanIDs
();
Set
<
String
>
ids
=
topLevel
.
getLoweLevelPlanIDs
();
if
(
ids
==
null
)
{
if
(
ids
==
null
)
{
ids
=
new
HashSet
<>();
ids
=
new
HashSet
<>();
...
@@ -83,6 +84,7 @@ public class SimplePlannerService {
...
@@ -83,6 +84,7 @@ public class SimplePlannerService {
topLevel
.
setKvMap
(
Converter
.
ymlString2Map
(
p
.
getValue
()));
topLevel
.
setKvMap
(
Converter
.
ymlString2Map
(
p
.
getValue
()));
}
else
{
}
else
{
lowerLevelPlan
=
new
PlanResponse
();
lowerLevelPlan
=
new
PlanResponse
();
lowerLevelPlan
.
setCreationDate
(
System
.
currentTimeMillis
());
lowerLevelPlan
.
setName
(
name
);
lowerLevelPlan
.
setName
(
name
);
lowerLevelPlan
.
setKvMap
(
Converter
.
ymlString2Map
(
p
.
getValue
()));
lowerLevelPlan
.
setKvMap
(
Converter
.
ymlString2Map
(
p
.
getValue
()));
lowerLevelPlan
.
setLevel
(
1
);
lowerLevelPlan
.
setLevel
(
1
);
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/v0/rest/CloudConfigurationController0.java
View file @
97dcaa7e
...
@@ -70,6 +70,7 @@ public class CloudConfigurationController0 {
...
@@ -70,6 +70,7 @@ public class CloudConfigurationController0 {
throw
new
NullKeyIDException
();
throw
new
NullKeyIDException
();
}
}
CloudCredentials
cloudCredentials
=
new
CloudCredentials
();
CloudCredentials
cloudCredentials
=
new
CloudCredentials
();
cloudCredentials
.
setCreationDate
(
System
.
currentTimeMillis
());
cloudCredentials
.
setAccessKeyId
(
configure
.
keyid
);
cloudCredentials
.
setAccessKeyId
(
configure
.
keyid
);
cloudCredentials
.
setSecretKey
(
configure
.
key
);
cloudCredentials
.
setSecretKey
(
configure
.
key
);
...
@@ -79,6 +80,7 @@ public class CloudConfigurationController0 {
...
@@ -79,6 +80,7 @@ public class CloudConfigurationController0 {
try
{
try
{
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
Key
key1
=
new
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
Key
();
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
Key
key1
=
new
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
Key
();
KeyPair
pair
=
new
KeyPair
();
KeyPair
pair
=
new
KeyPair
();
pair
.
setCreationDate
(
System
.
currentTimeMillis
());
key1
.
setKey
(
key0
.
content
);
key1
.
setKey
(
key0
.
content
);
Map
<
String
,
String
>
attributes
=
new
HashMap
<>();
Map
<
String
,
String
>
attributes
=
new
HashMap
<>();
attributes
.
put
(
"domain_name"
,
key0
.
domain_name
);
attributes
.
put
(
"domain_name"
,
key0
.
domain_name
);
...
@@ -108,6 +110,7 @@ public class CloudConfigurationController0 {
...
@@ -108,6 +110,7 @@ public class CloudConfigurationController0 {
throw
new
NullKeyIDException
();
throw
new
NullKeyIDException
();
}
}
CloudCredentials
cloudCredentials
=
new
CloudCredentials
();
CloudCredentials
cloudCredentials
=
new
CloudCredentials
();
cloudCredentials
.
setCreationDate
(
System
.
currentTimeMillis
());
// cloudCredentials.setKeyIdAlias(configure.geniKeyAlias);
// cloudCredentials.setKeyIdAlias(configure.geniKeyAlias);
cloudCredentials
.
setAccessKeyId
(
configure
.
geniKey
);
cloudCredentials
.
setAccessKeyId
(
configure
.
geniKey
);
cloudCredentials
.
setSecretKey
(
configure
.
geniKeyPass
);
cloudCredentials
.
setSecretKey
(
configure
.
geniKeyPass
);
...
@@ -120,6 +123,7 @@ public class CloudConfigurationController0 {
...
@@ -120,6 +123,7 @@ public class CloudConfigurationController0 {
key1
.
setKey
(
key0
.
content
);
key1
.
setKey
(
key0
.
content
);
key1
.
setType
(
Key
.
KeyType
.
PUBLIC
);
key1
.
setType
(
Key
.
KeyType
.
PUBLIC
);
KeyPair
pair
=
new
KeyPair
();
KeyPair
pair
=
new
KeyPair
();
pair
.
setCreationDate
(
System
.
currentTimeMillis
());
pair
.
setPublicKey
(
key1
);
pair
.
setPublicKey
(
key1
);
pair
=
keyService
.
save
(
pair
);
pair
=
keyService
.
save
(
pair
);
loginKeyIDs
.
add
(
pair
.
getId
());
loginKeyIDs
.
add
(
pair
.
getId
());
...
@@ -134,6 +138,7 @@ public class CloudConfigurationController0 {
...
@@ -134,6 +138,7 @@ public class CloudConfigurationController0 {
key1
.
setKey
(
key0
.
content
);
key1
.
setKey
(
key0
.
content
);
key1
.
setType
(
Key
.
KeyType
.
PRIVATE
);
key1
.
setType
(
Key
.
KeyType
.
PRIVATE
);
KeyPair
pair
=
new
KeyPair
();
KeyPair
pair
=
new
KeyPair
();
pair
.
setCreationDate
(
System
.
currentTimeMillis
());
pair
.
setPrivateKey
(
key1
);
pair
.
setPrivateKey
(
key1
);
pair
=
keyService
.
save
(
pair
);
pair
=
keyService
.
save
(
pair
);
loginKeyIDs
.
add
(
pair
.
getId
());
loginKeyIDs
.
add
(
pair
.
getId
());
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/v0/rest/ProvisionController0.java
View file @
97dcaa7e
...
@@ -84,6 +84,7 @@ public class ProvisionController0 {
...
@@ -84,6 +84,7 @@ public class ProvisionController0 {
String
provision
(
@RequestBody
Upload
upload
)
{
String
provision
(
@RequestBody
Upload
upload
)
{
ProvisionResponse
resp
=
new
ProvisionResponse
();
ProvisionResponse
resp
=
new
ProvisionResponse
();
resp
.
setCreationDate
(
System
.
currentTimeMillis
());
CloudCredentials
cloudCred
=
cloudCredentialsService
.
findAll
().
get
(
0
);
CloudCredentials
cloudCred
=
cloudCredentialsService
.
findAll
().
get
(
0
);
String
cloudCredID
=
cloudCred
.
getId
();
String
cloudCredID
=
cloudCred
.
getId
();
List
<
String
>
idList
=
new
ArrayList
<>();
List
<
String
>
idList
=
new
ArrayList
<>();
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/v1/rest/CloudCredentialsController.java
View file @
97dcaa7e
...
@@ -132,6 +132,7 @@ public class CloudCredentialsController {
...
@@ -132,6 +132,7 @@ public class CloudCredentialsController {
attributes
.
put
(
"domain_name"
,
FilenameUtils
.
removeExtension
(
originalFileName
));
attributes
.
put
(
"domain_name"
,
FilenameUtils
.
removeExtension
(
originalFileName
));
key
.
setAttributes
(
attributes
);
key
.
setAttributes
(
attributes
);
KeyPair
pair
=
new
KeyPair
();
KeyPair
pair
=
new
KeyPair
();
pair
.
setCreationDate
(
System
.
currentTimeMillis
());
pair
.
setPrivateKey
(
key
);
pair
.
setPrivateKey
(
key
);
pair
=
keyService
.
save
(
pair
);
pair
=
keyService
.
save
(
pair
);
loginKeyIDs
.
add
(
pair
.
getId
());
loginKeyIDs
.
add
(
pair
.
getId
());
...
@@ -206,15 +207,16 @@ public class CloudCredentialsController {
...
@@ -206,15 +207,16 @@ public class CloudCredentialsController {
@RolesAllowed
({
UserService
.
USER
,
UserService
.
ADMIN
})
@RolesAllowed
({
UserService
.
USER
,
UserService
.
ADMIN
})
public
@ResponseBody
public
@ResponseBody
CloudCredentials
geta
()
{
CloudCredentials
geta
()
{
CloudCredentials
c
=
new
CloudCredentials
();
CloudCredentials
cloudCredentials
=
new
CloudCredentials
();
c
.
setAccessKeyId
(
"AKIAITY3KHZUQ6M7YBSQ"
);
cloudCredentials
.
setCreationDate
(
System
.
currentTimeMillis
());
c
.
setCloudProviderName
(
"ec2"
);
cloudCredentials
.
setAccessKeyId
(
"AKIAITY3KHZUQ6M7YBSQ"
);
c
.
setSecretKey
(
"6J7uo99ifrff45sa6Gsy5vgb3bmrtwY6hBxtYt9y"
);
cloudCredentials
.
setCloudProviderName
(
"ec2"
);
cloudCredentials
.
setSecretKey
(
"6J7uo99ifrff45sa6Gsy5vgb3bmrtwY6hBxtYt9y"
);
List
<
String
>
keyIDs
=
new
ArrayList
<>();
List
<
String
>
keyIDs
=
new
ArrayList
<>();
keyIDs
.
add
(
"58da4c91f7b43a3282cacdbb"
);
keyIDs
.
add
(
"58da4c91f7b43a3282cacdbb"
);
keyIDs
.
add
(
"58da4d2af7b43a3282cacdbd"
);
keyIDs
.
add
(
"58da4d2af7b43a3282cacdbd"
);
c
.
setKeyIDs
(
keyIDs
);
c
loudCredentials
.
setKeyIDs
(
keyIDs
);
return
c
;
return
c
loudCredentials
;
}
}
}
}
drip-api/src/main/java/nl/uva/sne/drip/api/v1/rest/KeyPairController.java
View file @
97dcaa7e
...
@@ -139,6 +139,7 @@ public class KeyPairController {
...
@@ -139,6 +139,7 @@ public class KeyPairController {
KeyPair
geta
()
{
KeyPair
geta
()
{
try
{
try
{
KeyPair
pair
=
new
KeyPair
();
KeyPair
pair
=
new
KeyPair
();
pair
.
setCreationDate
(
System
.
currentTimeMillis
());
Key
pk
=
new
Key
();
Key
pk
=
new
Key
();
Map
<
String
,
String
>
attributes
=
new
HashMap
<>();
Map
<
String
,
String
>
attributes
=
new
HashMap
<>();
attributes
.
put
(
"domain_name"
,
"Virginia"
);
attributes
.
put
(
"domain_name"
,
"Virginia"
);
...
...
drip-api/src/main/java/nl/uva/sne/drip/commons/utils/Converter.java
View file @
97dcaa7e
...
@@ -28,8 +28,8 @@ import java.util.Map;
...
@@ -28,8 +28,8 @@ import java.util.Map;
import
java.util.Properties
;
import
java.util.Properties
;
import
nl.uva.sne.drip.data.v0.external.Attribute
;
import
nl.uva.sne.drip.data.v0.external.Attribute
;
import
nl.uva.sne.drip.data.v1.external.CloudCredentials
;
import
nl.uva.sne.drip.data.v1.external.CloudCredentials
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.Message
;
import
nl.uva.sne.drip.data.
in
ternal.Message
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.
in
ternal.MessageParameter
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
nl.uva.sne.drip.data.v1.external.PlanResponse
;
import
org.apache.commons.io.FilenameUtils
;
import
org.apache.commons.io.FilenameUtils
;
import
org.json.JSONArray
;
import
org.json.JSONArray
;
...
@@ -200,6 +200,7 @@ public class Converter {
...
@@ -200,6 +200,7 @@ public class Converter {
public
static
PlanResponse
File2Plan1
(
Attribute
p0
)
{
public
static
PlanResponse
File2Plan1
(
Attribute
p0
)
{
PlanResponse
p1
=
new
PlanResponse
();
PlanResponse
p1
=
new
PlanResponse
();
p1
.
setCreationDate
(
System
.
currentTimeMillis
());
p1
.
setLevel
(
Integer
.
valueOf
(
p0
.
level
));
p1
.
setLevel
(
Integer
.
valueOf
(
p0
.
level
));
p1
.
setName
(
p0
.
name
);
p1
.
setName
(
p0
.
name
);
String
yaml
=
p0
.
content
.
replaceAll
(
"\\\\n"
,
"\n"
);
String
yaml
=
p0
.
content
.
replaceAll
(
"\\\\n"
,
"\n"
);
...
...
drip-api/src/main/java/nl/uva/sne/drip/commons/utils/MessageGenerator.java
View file @
97dcaa7e
...
@@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
...
@@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.concurrent.TimeoutException
;
import
java.util.concurrent.TimeoutException
;
import
nl.uva.sne.drip.data.
v1.ex
ternal.Message
;
import
nl.uva.sne.drip.data.
in
ternal.Message
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
...
drip-api/src/main/java/nl/uva/sne/drip/data/
v1/ex
ternal/Message.java
→
drip-api/src/main/java/nl/uva/sne/drip/data/
in
ternal/Message.java
View file @
97dcaa7e
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
ex
ternal
;
package
nl
.
uva
.
sne
.
drip
.
data
.
in
ternal
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
...
...
drip-api/src/main/java/nl/uva/sne/drip/data/
v1/ex
ternal/MessageParameter.java
→
drip-api/src/main/java/nl/uva/sne/drip/data/
in
ternal/MessageParameter.java
View file @
97dcaa7e
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
ex
ternal
;
package
nl
.
uva
.
sne
.
drip
.
data
.
in
ternal
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Map
;
import
java.util.Map
;
...
...
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/CloudCredentials.java
View file @
97dcaa7e
...
@@ -17,7 +17,6 @@ package nl.uva.sne.drip.data.v1.external;
...
@@ -17,7 +17,6 @@ package nl.uva.sne.drip.data.v1.external;
import
com.webcohesion.enunciate.metadata.DocumentationExample
;
import
com.webcohesion.enunciate.metadata.DocumentationExample
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Document
;
/**
/**
...
...
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/DeployResponse.java
View file @
97dcaa7e
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
;
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
;
import
java.util.List
;
import
java.util.List
;
import
nl.uva.sne.drip.data.v1.external.ansible.AnsibleOutput
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Document
;
/**
/**
...
...
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/OwnedObject.java
View file @
97dcaa7e
...
@@ -32,6 +32,8 @@ public class OwnedObject {
...
@@ -32,6 +32,8 @@ public class OwnedObject {
@Id
@Id
private
String
id
;
private
String
id
;
private
Long
creationDate
;
@NotNull
@NotNull
private
String
owner
;
private
String
owner
;
...
@@ -64,4 +66,18 @@ public class OwnedObject {
...
@@ -64,4 +66,18 @@ public class OwnedObject {
return
id
;
return
id
;
}
}
/**
* @return the creationDate
*/
public
Long
getCreationDate
()
{
return
creationDate
;
}
/**
* @param creationDate the creationDate to set
*/
public
void
setCreationDate
(
Long
creationDate
)
{
this
.
creationDate
=
creationDate
;
}
}
}
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