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
90353a03
Commit
90353a03
authored
5 years ago
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added enum to schema
parent
c1bc5074
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
589 additions
and
1 deletion
+589
-1
CloudsStormInfrasCode.java
...uva/sne/drip/model/cloud/storm/CloudsStormInfrasCode.java
+117
-0
InfrasCode.java
...in/java/nl/uva/sne/drip/model/cloud/storm/InfrasCode.java
+172
-0
OpCode.java
...c/main/java/nl/uva/sne/drip/model/cloud/storm/OpCode.java
+185
-0
Options.java
.../main/java/nl/uva/sne/drip/model/cloud/storm/Options.java
+103
-0
CloudStormService.java
...n/java/nl/uva/sne/drip/provisioner/CloudStormService.java
+3
-1
CloudDB.yml
openAPI/schema/CloudStorm/CloudDB.yml
+1
-0
CloudsStormInfrasCode.yml
openAPI/schema/CloudStorm/CloudsStormInfrasCode.yml
+1
-0
CloudsStormSubTopology.yml
openAPI/schema/CloudStorm/CloudsStormSubTopology.yml
+2
-0
InfrasCode.yml
openAPI/schema/CloudStorm/InfrasCode.yml
+1
-0
OpCode.yml
openAPI/schema/CloudStorm/OpCode.yml
+4
-0
No files found.
drip-commons/src/main/java/nl/uva/sne/drip/model/cloud/storm/CloudsStormInfrasCode.java
0 → 100644
View file @
90353a03
package
nl
.
uva
.
sne
.
drip
.
model
.
cloud
.
storm
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
/**
* CloudsStormInfrasCode
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.languages.SpringCodegen"
,
date
=
"2019-12-31T12:42:56.808Z"
)
public
class
CloudsStormInfrasCode
{
@JsonProperty
(
"Mode"
)
private
String
mode
=
null
;
@JsonProperty
(
"InfrasCodes"
)
@Valid
private
List
<
InfrasCode
>
infrasCodes
=
null
;
public
CloudsStormInfrasCode
mode
(
String
mode
)
{
this
.
mode
=
mode
;
return
this
;
}
/**
* Get mode
*
* @return mode
*
*/
@ApiModelProperty
(
value
=
""
)
public
String
getMode
()
{
return
mode
;
}
public
void
setMode
(
String
mode
)
{
this
.
mode
=
mode
;
}
public
CloudsStormInfrasCode
infrasCodes
(
List
<
InfrasCode
>
infrasCodes
)
{
this
.
infrasCodes
=
infrasCodes
;
return
this
;
}
public
CloudsStormInfrasCode
addInfrasCodesItem
(
InfrasCode
infrasCodesItem
)
{
if
(
this
.
infrasCodes
==
null
)
{
this
.
infrasCodes
=
new
ArrayList
<
InfrasCode
>();
}
this
.
infrasCodes
.
add
(
infrasCodesItem
);
return
this
;
}
/**
* Get infrasCodes
*
* @return infrasCodes
*
*/
@ApiModelProperty
(
value
=
""
)
@Valid
public
List
<
InfrasCode
>
getInfrasCodes
()
{
return
infrasCodes
;
}
public
void
setInfrasCodes
(
List
<
InfrasCode
>
infrasCodes
)
{
this
.
infrasCodes
=
infrasCodes
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
CloudsStormInfrasCode
cloudsStormInfrasCode
=
(
CloudsStormInfrasCode
)
o
;
return
Objects
.
equals
(
this
.
mode
,
cloudsStormInfrasCode
.
mode
)
&&
Objects
.
equals
(
this
.
infrasCodes
,
cloudsStormInfrasCode
.
infrasCodes
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
mode
,
infrasCodes
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class CloudsStormInfrasCode {\n"
);
sb
.
append
(
" mode: "
).
append
(
toIndentedString
(
mode
)).
append
(
"\n"
);
sb
.
append
(
" infrasCodes: "
).
append
(
toIndentedString
(
infrasCodes
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
This diff is collapsed.
Click to expand it.
drip-commons/src/main/java/nl/uva/sne/drip/model/cloud/storm/InfrasCode.java
0 → 100644
View file @
90353a03
package
nl
.
uva
.
sne
.
drip
.
model
.
cloud
.
storm
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.model.OpCode
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
/**
* InfrasCode
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.languages.SpringCodegen"
,
date
=
"2019-12-31T12:42:56.808Z"
)
public
class
InfrasCode
{
@JsonProperty
(
"CodeType"
)
private
String
codeType
=
null
;
@JsonProperty
(
"OpCode"
)
private
OpCode
opCode
=
null
;
@JsonProperty
(
"Count"
)
private
Integer
count
=
null
;
@JsonProperty
(
"OpCodes"
)
@Valid
private
List
<
OpCode
>
opCodes
=
null
;
public
InfrasCode
codeType
(
String
codeType
)
{
this
.
codeType
=
codeType
;
return
this
;
}
/**
* Get codeType
*
* @return codeType
*
*/
@ApiModelProperty
(
value
=
""
)
public
String
getCodeType
()
{
return
codeType
;
}
public
void
setCodeType
(
String
codeType
)
{
this
.
codeType
=
codeType
;
}
public
InfrasCode
opCode
(
OpCode
opCode
)
{
this
.
opCode
=
opCode
;
return
this
;
}
/**
* Get opCode
*
* @return opCode
*
*/
@ApiModelProperty
(
value
=
""
)
@Valid
public
OpCode
getOpCode
()
{
return
opCode
;
}
public
void
setOpCode
(
OpCode
opCode
)
{
this
.
opCode
=
opCode
;
}
public
InfrasCode
count
(
Integer
count
)
{
this
.
count
=
count
;
return
this
;
}
/**
* Get count
*
* @return count
*
*/
@ApiModelProperty
(
value
=
""
)
public
Integer
getCount
()
{
return
count
;
}
public
void
setCount
(
Integer
count
)
{
this
.
count
=
count
;
}
public
InfrasCode
opCodes
(
List
<
OpCode
>
opCodes
)
{
this
.
opCodes
=
opCodes
;
return
this
;
}
public
InfrasCode
addOpCodesItem
(
OpCode
opCodesItem
)
{
if
(
this
.
opCodes
==
null
)
{
this
.
opCodes
=
new
ArrayList
<
OpCode
>();
}
this
.
opCodes
.
add
(
opCodesItem
);
return
this
;
}
/**
* Get opCodes
*
* @return opCodes
*
*/
@ApiModelProperty
(
value
=
""
)
@Valid
public
List
<
OpCode
>
getOpCodes
()
{
return
opCodes
;
}
public
void
setOpCodes
(
List
<
OpCode
>
opCodes
)
{
this
.
opCodes
=
opCodes
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
InfrasCode
infrasCode
=
(
InfrasCode
)
o
;
return
Objects
.
equals
(
this
.
codeType
,
infrasCode
.
codeType
)
&&
Objects
.
equals
(
this
.
opCode
,
infrasCode
.
opCode
)
&&
Objects
.
equals
(
this
.
count
,
infrasCode
.
count
)
&&
Objects
.
equals
(
this
.
opCodes
,
infrasCode
.
opCodes
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
codeType
,
opCode
,
count
,
opCodes
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class InfrasCode {\n"
);
sb
.
append
(
" codeType: "
).
append
(
toIndentedString
(
codeType
)).
append
(
"\n"
);
sb
.
append
(
" opCode: "
).
append
(
toIndentedString
(
opCode
)).
append
(
"\n"
);
sb
.
append
(
" count: "
).
append
(
toIndentedString
(
count
)).
append
(
"\n"
);
sb
.
append
(
" opCodes: "
).
append
(
toIndentedString
(
opCodes
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
This diff is collapsed.
Click to expand it.
drip-commons/src/main/java/nl/uva/sne/drip/model/cloud/storm/OpCode.java
0 → 100644
View file @
90353a03
package
nl
.
uva
.
sne
.
drip
.
model
.
cloud
.
storm
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.model.Options
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
/**
* OpCode
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.languages.SpringCodegen"
,
date
=
"2019-12-31T12:42:56.808Z"
)
public
class
OpCode
{
@JsonProperty
(
"Operation"
)
private
String
operation
=
null
;
@JsonProperty
(
"Objects"
)
private
String
objects
=
null
;
@JsonProperty
(
"Command"
)
private
String
command
=
null
;
@JsonProperty
(
"Log"
)
private
Boolean
log
=
null
;
@JsonProperty
(
"Options"
)
private
Options
options
=
null
;
public
OpCode
operation
(
String
operation
)
{
this
.
operation
=
operation
;
return
this
;
}
/**
* Get operation
*
* @return operation
*
*/
@ApiModelProperty
(
value
=
""
)
public
String
getOperation
()
{
return
operation
;
}
public
void
setOperation
(
String
operation
)
{
this
.
operation
=
operation
;
}
public
OpCode
objects
(
String
objects
)
{
this
.
objects
=
objects
;
return
this
;
}
/**
* Get objects
*
* @return objects
*
*/
@ApiModelProperty
(
value
=
""
)
public
String
getObjects
()
{
return
objects
;
}
public
void
setObjects
(
String
objects
)
{
this
.
objects
=
objects
;
}
public
OpCode
command
(
String
command
)
{
this
.
command
=
command
;
return
this
;
}
/**
* Get command
*
* @return command
*
*/
@ApiModelProperty
(
value
=
""
)
public
String
getCommand
()
{
return
command
;
}
public
void
setCommand
(
String
command
)
{
this
.
command
=
command
;
}
public
OpCode
log
(
Boolean
log
)
{
this
.
log
=
log
;
return
this
;
}
/**
* Get log
*
* @return log
*
*/
@ApiModelProperty
(
value
=
""
)
public
Boolean
isLog
()
{
return
log
;
}
public
void
setLog
(
Boolean
log
)
{
this
.
log
=
log
;
}
public
OpCode
options
(
Options
options
)
{
this
.
options
=
options
;
return
this
;
}
/**
* Get options
*
* @return options
*
*/
@ApiModelProperty
(
value
=
""
)
@Valid
public
Options
getOptions
()
{
return
options
;
}
public
void
setOptions
(
Options
options
)
{
this
.
options
=
options
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
OpCode
opCode
=
(
OpCode
)
o
;
return
Objects
.
equals
(
this
.
operation
,
opCode
.
operation
)
&&
Objects
.
equals
(
this
.
objects
,
opCode
.
objects
)
&&
Objects
.
equals
(
this
.
command
,
opCode
.
command
)
&&
Objects
.
equals
(
this
.
log
,
opCode
.
log
)
&&
Objects
.
equals
(
this
.
options
,
opCode
.
options
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
operation
,
objects
,
command
,
log
,
options
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class OpCode {\n"
);
sb
.
append
(
" operation: "
).
append
(
toIndentedString
(
operation
)).
append
(
"\n"
);
sb
.
append
(
" objects: "
).
append
(
toIndentedString
(
objects
)).
append
(
"\n"
);
sb
.
append
(
" command: "
).
append
(
toIndentedString
(
command
)).
append
(
"\n"
);
sb
.
append
(
" log: "
).
append
(
toIndentedString
(
log
)).
append
(
"\n"
);
sb
.
append
(
" options: "
).
append
(
toIndentedString
(
options
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
This diff is collapsed.
Click to expand it.
drip-commons/src/main/java/nl/uva/sne/drip/model/cloud/storm/Options.java
0 → 100644
View file @
90353a03
package
nl
.
uva
.
sne
.
drip
.
model
.
cloud
.
storm
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.validation.annotation.Validated
;
/**
* Options
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.languages.SpringCodegen"
,
date
=
"2019-12-31T12:42:56.808Z"
)
public
class
Options
{
@JsonProperty
(
"Src"
)
private
String
src
=
null
;
@JsonProperty
(
"Dst"
)
private
String
dst
=
null
;
public
Options
src
(
String
src
)
{
this
.
src
=
src
;
return
this
;
}
/**
* Get src
*
* @return src
*
*/
@ApiModelProperty
(
value
=
""
)
public
String
getSrc
()
{
return
src
;
}
public
void
setSrc
(
String
src
)
{
this
.
src
=
src
;
}
public
Options
dst
(
String
dst
)
{
this
.
dst
=
dst
;
return
this
;
}
/**
* Get dst
*
* @return dst
*
*/
@ApiModelProperty
(
value
=
""
)
public
String
getDst
()
{
return
dst
;
}
public
void
setDst
(
String
dst
)
{
this
.
dst
=
dst
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
Options
options
=
(
Options
)
o
;
return
Objects
.
equals
(
this
.
src
,
options
.
src
)
&&
Objects
.
equals
(
this
.
dst
,
options
.
dst
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
src
,
dst
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class Options {\n"
);
sb
.
append
(
" src: "
).
append
(
toIndentedString
(
src
)).
append
(
"\n"
);
sb
.
append
(
" dst: "
).
append
(
toIndentedString
(
dst
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
This diff is collapsed.
Click to expand it.
drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java
View file @
90353a03
...
@@ -31,6 +31,7 @@ import nl.uva.sne.drip.model.cloud.storm.CloudsStormVM;
...
@@ -31,6 +31,7 @@ import nl.uva.sne.drip.model.cloud.storm.CloudsStormVM;
import
nl.uva.sne.drip.model.NodeTemplateMap
;
import
nl.uva.sne.drip.model.NodeTemplateMap
;
import
nl.uva.sne.drip.model.cloud.storm.CloudCred
;
import
nl.uva.sne.drip.model.cloud.storm.CloudCred
;
import
nl.uva.sne.drip.model.cloud.storm.CloudCredentialDB
;
import
nl.uva.sne.drip.model.cloud.storm.CloudCredentialDB
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormInfrasCode
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormSubTopology
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormSubTopology
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormTopTopology
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormTopTopology
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormVMs
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormVMs
;
...
@@ -228,7 +229,8 @@ class CloudStormService {
...
@@ -228,7 +229,8 @@ class CloudStormService {
private
void
writeCloudStormInfrasCodeFiles
(
String
infrasCodeTempInputDirPath
,
List
<
CloudsStormSubTopology
>
cloudStormSubtopologies
)
throws
ApiException
{
private
void
writeCloudStormInfrasCodeFiles
(
String
infrasCodeTempInputDirPath
,
List
<
CloudsStormSubTopology
>
cloudStormSubtopologies
)
throws
ApiException
{
List
<
NodeTemplateMap
>
vmTopologiesMaps
=
helper
.
getVMTopologyTemplates
();
List
<
NodeTemplateMap
>
vmTopologiesMaps
=
helper
.
getVMTopologyTemplates
();
int
i
=
0
;
int
i
=
0
;
InfrasCodes
ce
=
new
CloudsStormInfrasCode
cloudsStormInfrasCode
=
new
CloudsStormInfrasCode
();
cloudsStormInfrasCode
.
setMode
(
""
);
for
(
NodeTemplateMap
vmTopologyMap
:
vmTopologiesMaps
)
{
for
(
NodeTemplateMap
vmTopologyMap
:
vmTopologiesMaps
)
{
Map
<
String
,
Object
>
provisionInterface
=
helper
.
getProvisionerInterfaceFromVMTopology
(
vmTopologyMap
);
Map
<
String
,
Object
>
provisionInterface
=
helper
.
getProvisionerInterfaceFromVMTopology
(
vmTopologyMap
);
String
operation
=
provisionInterface
.
keySet
().
iterator
().
next
();
String
operation
=
provisionInterface
.
keySet
().
iterator
().
next
();
...
...
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/CloudDB.yml
View file @
90353a03
...
@@ -3,5 +3,6 @@
...
@@ -3,5 +3,6 @@
properties
:
properties
:
cloudProvider
:
cloudProvider
:
type
:
"
string"
type
:
"
string"
enum
:
[
EC2
,
ExoGENI
,
EGI
]
dbInfoFile
:
dbInfoFile
:
type
:
"
string"
type
:
"
string"
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/CloudsStormInfrasCode.yml
View file @
90353a03
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
properties
:
properties
:
Mode
:
Mode
:
type
:
"
string"
type
:
"
string"
enum
:
[
LOCAL
,
CTRL
]
InfrasCodes
:
InfrasCodes
:
type
:
"
array"
type
:
"
array"
items
:
items
:
...
...
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/CloudsStormSubTopology.yml
View file @
90353a03
...
@@ -9,3 +9,5 @@
...
@@ -9,3 +9,5 @@
type
:
"
string"
type
:
"
string"
status
:
status
:
type
:
"
string"
type
:
"
string"
enum
:
[
fresh
,
running
,
deleted
,
failed
,
stopped
]
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/InfrasCode.yml
View file @
90353a03
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
properties
:
properties
:
CodeType
:
CodeType
:
type
:
"
string"
type
:
"
string"
enum
:
[
SEQ
,
LOOP
]
OpCode
:
OpCode
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudStorm/OpCode.yml#/OpCode"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudStorm/OpCode.yml#/OpCode"
Count
:
Count
:
...
...
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/OpCode.yml
View file @
90353a03
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
properties
:
properties
:
Operation
:
Operation
:
type
:
"
string"
type
:
"
string"
enum
:
[
provision
,
delete
,
execute
,
put
,
get
,
vscale
,
hscale
,
recover
,
start
]
ObjectType
:
type
:
"
string"
enum
:
[
SubTopology
,
VM
,
REQ
]
Objects
:
Objects
:
type
:
"
string"
type
:
"
string"
Command
:
Command
:
...
...
This diff is collapsed.
Click to expand it.
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