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
fd6f2491
Commit
fd6f2491
authored
Mar 02, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added RequestParam to the deploy controller
parent
93f050a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
13 deletions
+35
-13
DeployController.java
.../main/java/nl/uva/sne/drip/api/rest/DeployController.java
+35
-13
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/rest/DeployController.java
View file @
fd6f2491
...
@@ -27,6 +27,7 @@ import java.util.logging.Level;
...
@@ -27,6 +27,7 @@ import java.util.logging.Level;
import
java.util.logging.Logger
;
import
java.util.logging.Logger
;
import
javax.annotation.security.RolesAllowed
;
import
javax.annotation.security.RolesAllowed
;
import
nl.uva.sne.drip.api.dao.CloudCredentialsDao
;
import
nl.uva.sne.drip.api.dao.CloudCredentialsDao
;
import
nl.uva.sne.drip.api.exception.BadRequestException
;
import
nl.uva.sne.drip.commons.types.Message
;
import
nl.uva.sne.drip.commons.types.Message
;
import
nl.uva.sne.drip.commons.types.MessageParameter
;
import
nl.uva.sne.drip.commons.types.MessageParameter
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
@@ -71,12 +72,13 @@ public class DeployController {
...
@@ -71,12 +72,13 @@ public class DeployController {
@Autowired
@Autowired
private
ClusterCredentialService
clusterCredentialService
;
private
ClusterCredentialService
clusterCredentialService
;
@RequestMapping
(
value
=
"/deploy/{id}
"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/deploy/{id}
/"
,
method
=
RequestMethod
.
GET
,
params
=
{
"cluster"
}
)
@RolesAllowed
({
UserService
.
USER
,
UserService
.
ADMIN
})
@RolesAllowed
({
UserService
.
USER
,
UserService
.
ADMIN
})
public
@ResponseBody
public
@ResponseBody
String
deploy
(
@PathVariable
(
"id"
)
String
provisionID
)
{
String
deploy
(
@PathVariable
(
"id"
)
String
provisionID
,
@RequestParam
(
value
=
"cluster"
)
String
clusterType
)
{
checkClusterType
(
clusterType
);
try
(
DRIPCaller
deployer
=
new
DeployerCaller
(
messageBrokerHost
);)
{
try
(
DRIPCaller
deployer
=
new
DeployerCaller
(
messageBrokerHost
);)
{
Message
deployerInvokationMessage
=
buildDeployerMessage
(
provisionID
);
Message
deployerInvokationMessage
=
buildDeployerMessage
(
provisionID
,
clusterType
.
toLowerCase
()
);
// Message response = deployer.call(deployerInvokationMessage);
// Message response = deployer.call(deployerInvokationMessage);
Message
response
=
generateFakeResponse
();
Message
response
=
generateFakeResponse
();
...
@@ -84,15 +86,14 @@ public class DeployController {
...
@@ -84,15 +86,14 @@ public class DeployController {
ClusterCredentials
clusterCred
=
new
ClusterCredentials
();
ClusterCredentials
clusterCred
=
new
ClusterCredentials
();
for
(
MessageParameter
p
:
params
)
{
for
(
MessageParameter
p
:
params
)
{
String
name
=
p
.
getName
();
String
name
=
p
.
getName
();
// System.err.println("Name: " + name);
if
(
name
.
equals
(
"credential"
))
{
String
value
=
p
.
getValue
();
String
value
=
p
.
getValue
();
// System.err.println("Value: " + value);
clusterCred
.
setContents
(
value
);
// Map<String, Object> map = Converter.ymlString2Map(value);
// clusterCred.setKvMap(map);
clusterCredentialService
.
getDao
().
save
(
clusterCred
);
clusterCredentialService
.
getDao
().
save
(
clusterCred
);
}
return
clusterCred
.
getId
();
return
clusterCred
.
getId
();
}
}
}
catch
(
IOException
|
TimeoutException
|
JSONException
|
InterruptedException
ex
)
{
}
catch
(
IOException
|
TimeoutException
|
JSONException
|
InterruptedException
ex
)
{
Logger
.
getLogger
(
DeployController
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
Logger
.
getLogger
(
DeployController
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
}
...
@@ -106,7 +107,7 @@ public class DeployController {
...
@@ -106,7 +107,7 @@ public class DeployController {
return
clusterCredentialService
.
getDao
().
findOne
(
id
);
return
clusterCredentialService
.
getDao
().
findOne
(
id
);
}
}
private
Message
buildDeployerMessage
(
String
provisionID
)
{
private
Message
buildDeployerMessage
(
String
provisionID
,
String
clusterType
)
{
ProvisionInfo
pro
=
provisionService
.
getDao
().
findOne
(
provisionID
);
ProvisionInfo
pro
=
provisionService
.
getDao
().
findOne
(
provisionID
);
String
cloudConfID
=
pro
.
getCloudConfID
();
String
cloudConfID
=
pro
.
getCloudConfID
();
CloudCredentials
cCred
=
cloudCredentialsDao
.
findOne
(
cloudConfID
);
CloudCredentials
cCred
=
cloudCredentialsDao
.
findOne
(
cloudConfID
);
...
@@ -137,6 +138,11 @@ public class DeployController {
...
@@ -137,6 +138,11 @@ public class DeployController {
messageParameter
.
setAttributes
(
attributes
);
messageParameter
.
setAttributes
(
attributes
);
parameters
.
add
(
messageParameter
);
parameters
.
add
(
messageParameter
);
}
}
MessageParameter
clusterTypeParameter
=
new
MessageParameter
();
clusterTypeParameter
.
setName
(
"cluster"
);
clusterTypeParameter
.
setEncoding
(
"UTF-8"
);
clusterTypeParameter
.
setValue
(
clusterType
);
parameters
.
add
(
clusterTypeParameter
);
Message
deployInvokationMessage
=
new
Message
();
Message
deployInvokationMessage
=
new
Message
();
deployInvokationMessage
.
setParameters
(
parameters
);
deployInvokationMessage
.
setParameters
(
parameters
);
...
@@ -164,7 +170,11 @@ public class DeployController {
...
@@ -164,7 +170,11 @@ public class DeployController {
+
"U1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU"
+
"U1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU"
+
"1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFLYmFzMlRIa010YnVjZkJ"
+
"1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFLYmFzMlRIa010YnVjZkJ"
+
"lS3FUVGVDaGdMOEcKN0JqZmwxSGtqRWFYZUtsS1BTZ3NYYlNLdXNiUjNHTjdM"
+
"lS3FUVGVDaGdMOEcKN0JqZmwxSGtqRWFYZUtsS1BTZ3NYYlNLdXNiUjNHTjdM"
+
"SGtZd0NQa0FXT1hoSmV6andxUVFTdzVyMUdVbXAvRgpFaHBKOTByM2l3NUJ3MnJxOUdRNytOb1lQNENQdXYwd0N3V0wrWXd3ejhFSzhvVi9vdGNxdWxYVWUwUUZlL2txCkN3VGJvS2JBRElXd2xoSDdDd09ZOHo3SnRjREZ2WEtRYnRlTGNyUTY5MFYyTUQxeTZyeUdmUUhsaWtsRjA2Sk8KMElXSVhDam1NYXppaG1hNGVHQTRHOXZ6R2lMMVlyZGIxVDdYbFd3Zm5iOTg1QmVUWEZvV1JjMUo3RjFvQ3BaVwp2OTN3cko5L01uUzZxN3p2NkdNaUE0Rm5VanZiUDB4OHhWVXpsYjVvVG5HenFycSt2MXJLQklGSlFXdz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=\\n server: https://52.201.84.116:6443\\n name: kubernetes\\ncontexts:\\n- context:\\n cluster: kubernetes\\n user: admin\\n name: admin@kubernetes\\n- context:\\n cluster: kubernetes\\n user: kubelet\\n name: kubelet@kubernetes\\ncurrent-context: admin@kubernetes\\nkind: Config\\npreferences: {}\\nusers:\\n- name: admin\\n user:\\n client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM0ekNDQWN1Z0F3SUJBZ0lJWlR0eVhaRWNRUT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UZ"
+
"lL2txCkN3VGJvS2JBRElXd2xoSDdDd09ZOHo3SnRjREZ2WEtRYnRlTGNyUTY5"
+
"MFYyTUQxeTZyeUdmUUhsaWtsRjA2Sk8KMElXSVhDam1NYXppaG1hNGVHQTRHO"
+
"XZ6R2lMMVlyZGIxVDdYbFd3Zm5iOTg1QmVUWEZvV1JjMUo3RjFvQ3BaVwp2OTN3cko5L01uUzZxN3p2NkdNaUE0Rm5VanZiUDB4OHhWVXpsYjVvVG5HenFycSt2MXJLQklGSlFXdz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=\\n server: https://52.201.84.116:6443\\n name: kubernetes\\ncontexts:\\n- context:\\n cluster: kubernetes\\n user: admin\\n name: admin@kubernetes\\n- context:\\n cluster: kubernetes\\n user: kubelet\\n name: kubelet@kubernetes\\ncurrent-context: admin@kubernetes\\nkind: Config\\npreferences: {}\\nusers:\\n- name: admin\\n user:\\n client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM0ekNDQWN1Z0F3SUJBZ0lJWlR0eVhaRWNRUTh3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB4TnpBek1ESXhNVEl6TXpoYUZ3MHhPREF6TURJeE1USXpOREJhTUJzeApHVEFYQmdOVkJBTVRFR3QxWW1WeWJtVjBaWE10WVdSdGFXNHdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElCCkR3QXdnZ0VLQW9JQkFRRFFkOWdJK0liTVhDWlB6d244cGZuK1Vxd0RldXRKZjY5YWFCNFI4ZjZsSHl0dVRyNTkKZWJoZm43Uk5Od0UyTjZmeUdpOXpMdXdrcllpdU1zK3MvcTlDNVBmUXZiWTNaR2xTQk1KWXhTTGx6eFZ0UW1xdApKb1djWTBucUgwa2xjVnlZaFNKaEtKU25MdGx5UHBNZ0lkSWZBM1VDNXY4RVVzTzd0bFU5eGFZc0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HZUUmtjZ0ptSlF5TjA5NFpyL015WlU1SHprVzRRQ1VvcXd3aUJqRHJwS0hPWG5RSApodzBzSXV6UVc0Tk1lUUNjS0luR2dEQ1F4bVZWL2Mvd1h0dXYySWVJeWlnUnRzZ1dtNmFScElFS1lXRXJlV2pkCmlPZ0JjUUtCZ0ZZeTJYMmRubHVnUUI5TDhDWVRYMDZ2Q3ZNM3BsOWIwZXN3MFcxTzljVGJEbmViYXRUdW1lUy8KMEtpUHh5b2tBS1pCM3NDTUl3ZC9ZbTdtbEdjRU9aNEhCLzJCWURHaTdUWFdyTjkwRmVGZFlPVVRXWEpQaHNwQwpQRXVET2hGSHBMZTN6Smxyck9ySG1Ebm5aOFdtWU4rdGZzNnVuVHVsSXZPQWFKd01xVlZ4Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==\\n', "
+
"'encoding': 'UTF-8'}]}"
;
+
"'encoding': 'UTF-8'}]}"
;
strResponse
=
strResponse
.
replaceAll
(
"'null'"
,
"null"
).
replaceAll
(
"\'"
,
"\""
).
replaceAll
(
" "
,
""
);
strResponse
=
strResponse
.
replaceAll
(
"'null'"
,
"null"
).
replaceAll
(
"\'"
,
"\""
).
replaceAll
(
" "
,
""
);
...
@@ -175,4 +185,16 @@ public class DeployController {
...
@@ -175,4 +185,16 @@ public class DeployController {
return
mapper
.
readValue
(
strResponse
,
Message
.
class
);
return
mapper
.
readValue
(
strResponse
,
Message
.
class
);
}
}
private
void
checkClusterType
(
String
clusterType
)
{
switch
(
clusterType
.
toLowerCase
())
{
case
"kubernetes"
:
break
;
case
"swarm"
:
break
;
default
:
throw
new
BadRequestException
(
"Cluster type not supported. May use kubernetes or swarm"
);
}
}
}
}
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