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
af541c99
Commit
af541c99
authored
Jan 13, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added missing properties
parent
8da728d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
14 deletions
+49
-14
CloudsStormVMs.java
...ava/nl/uva/sne/drip/model/cloud/storm/CloudsStormVMs.java
+38
-1
CloudStormService.java
...n/java/nl/uva/sne/drip/provisioner/CloudStormService.java
+5
-6
CloudsStormVM.yml
openAPI/schema/CloudStorm/CloudsStormVM.yml
+0
-7
CloudsStormVMs.yml
openAPI/schema/CloudStorm/CloudsStormVMs.yml
+6
-0
No files found.
drip-commons/src/main/java/nl/uva/sne/drip/model/cloud/storm/CloudsStormVMs.java
View file @
af541c99
...
...
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
...
...
@@ -16,10 +17,46 @@ import javax.validation.Valid;
public
class
CloudsStormVMs
{
/**
* @return the extraInfo
*/
public
Map
<
String
,
Object
>
getExtraInfo
()
{
return
extraInfo
;
}
/**
* @param extraInfo the extraInfo to set
*/
public
void
setExtraInfo
(
Map
<
String
,
Object
>
extraInfo
)
{
this
.
extraInfo
=
extraInfo
;
}
/**
* @return the sEngineClass
*/
public
String
getsEngineClass
()
{
return
sEngineClass
;
}
@JsonProperty
(
"extraInfo"
)
@Valid
private
Map
<
String
,
Object
>
extraInfo
=
null
;
/**
* @param sEngineClass the sEngineClass to set
*/
public
void
setsEngineClass
(
String
sEngineClass
)
{
this
.
sEngineClass
=
sEngineClass
;
}
@JsonProperty
(
"VMs"
)
@Valid
private
List
<
CloudsStormVM
>
vms
=
null
;
@JsonProperty
(
"SEngineClass"
)
@Valid
private
String
sEngineClass
=
null
;
public
CloudsStormVMs
vms
(
List
<
CloudsStormVM
>
vms
)
{
this
.
vms
=
vms
;
return
this
;
...
...
@@ -37,7 +74,7 @@ public class CloudsStormVMs {
* Get vms
*
* @return vms
*
*
*/
@ApiModelProperty
(
value
=
""
)
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java
View file @
af541c99
...
...
@@ -284,8 +284,8 @@ class CloudStormService {
private
ToscaTemplate
runCloudStorm
(
String
tempInputDirPath
)
throws
IOException
,
ApiException
{
String
[]
args
=
new
String
[]{
"run"
,
tempInputDirPath
};
standalone
.
MainAsTool
.
main
(
args
);
// tempInputDirPath = "/tmp/Input-8767200742957
7";
//
standalone.MainAsTool.main(args);
tempInputDirPath
=
"/tmp/Input-16659076235254
7"
;
CloudsStormTopTopology
_top
=
objectMapper
.
readValue
(
new
File
(
tempInputDirPath
+
TOPOLOGY_RELATIVE_PATH
+
TOP_TOPOLOGY_FILE_NAME
),
...
...
@@ -304,7 +304,7 @@ class CloudStormService {
att
.
put
(
"status"
,
subTopology
.
getStatus
().
toString
());
String
rootKeyPairFolder
=
tempInputDirPath
+
TOPOLOGY_RELATIVE_PATH
+
TOP_TOPOLOGY_FILE_NAME
+
File
.
separator
+
subTopology
.
getSshKeyPairId
();
+
File
.
separator
+
subTopology
.
getSshKeyPairId
();
Credential
rootKeyPairCredential
=
new
Credential
();
rootKeyPairCredential
.
setProtocol
(
"ssh"
);
Map
<
String
,
String
>
keys
=
new
HashMap
<>();
...
...
@@ -312,8 +312,7 @@ class CloudStormService {
keys
.
put
(
"public_key"
,
Converter
.
encodeFileToBase64Binary
(
rootKeyPairFolder
+
File
.
separator
+
"id_rsa.pub"
));
rootKeyPairCredential
.
setKeys
(
keys
);
String
userKyePairFolder
=
tempInputDirPath
+
TOPOLOGY_RELATIVE_PATH
+
TOP_TOPOLOGY_FILE_NAME
;
String
userKyePairFolder
=
tempInputDirPath
+
TOPOLOGY_RELATIVE_PATH
;
Credential
userKeyPairCredential
=
new
Credential
();
userKeyPairCredential
.
setProtocol
(
"ssh"
);
keys
=
new
HashMap
<>();
...
...
@@ -321,7 +320,7 @@ class CloudStormService {
keys
.
put
(
"public_key"
,
Converter
.
encodeFileToBase64Binary
(
userKyePairFolder
+
File
.
separator
+
"id_rsa.pub"
));
userKeyPairCredential
.
setKeys
(
keys
);
CloudsStormVMs
cloudsStormVMs
=
objectMapper
.
readValue
(
new
File
(
tempInputDirPath
+
TOPOLOGY_RELATIVE_PATH
+
File
.
separator
+
subTopology
.
getTopology
()),
CloudsStormVMs
cloudsStormVMs
=
objectMapper
.
readValue
(
new
File
(
tempInputDirPath
+
TOPOLOGY_RELATIVE_PATH
+
File
.
separator
+
subTopology
.
getTopology
()
+
".yml"
),
CloudsStormVMs
.
class
);
List
<
CloudsStormVM
>
vms
=
cloudsStormVMs
.
getVms
();
List
<
NodeTemplateMap
>
vmTemplatesMap
=
helper
.
getTemplateVMsForVMTopology
(
nodeTemplateMap
);
...
...
openAPI/schema/CloudStorm/CloudsStormVM.yml
View file @
af541c99
...
...
@@ -11,14 +11,10 @@
type
:
"
string"
publicAddress
:
type
:
"
string"
type
:
type
:
"
string"
extraInfo
:
type
:
object
additionalProperties
:
type
:
object
os
:
type
:
"
string"
CPU
:
type
:
"
string"
MEM
:
...
...
@@ -33,7 +29,4 @@
type
:
"
string"
selfEthAddresses
:
type
:
"
string"
openAPI/schema/CloudStorm/CloudsStormVMs.yml
View file @
af541c99
CloudsStormVMs
:
type
:
"
object"
properties
:
SEngineClass
:
type
:
"
string"
extraInfo
:
type
:
object
additionalProperties
:
type
:
object
VMs
:
type
:
"
array"
items
:
...
...
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