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
70b0ad9e
Commit
70b0ad9e
authored
Dec 11, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cloud storm types
parent
ae45ad97
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
107 additions
and
33 deletions
+107
-33
ToscaHelper.java
.../main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java
+21
-0
workspace.xml
drip-planner/.idea/workspace.xml
+9
-17
CloudStormService.java
...n/java/nl/uva/sne/drip/provisioner/CloudStormService.java
+13
-12
CloudDB.yml
openAPI/schema/CloudStorm/CloudDB.yml
+7
-0
CloudsStormSubMembers.yml
openAPI/schema/CloudStorm/CloudsStormSubMembers.yml
+0
-0
CloudsStormSubTopology.yml
openAPI/schema/CloudStorm/CloudsStormSubTopology.yml
+1
-1
CloudsStormSubnets.yml
openAPI/schema/CloudStorm/CloudsStormSubnets.yml
+1
-1
CloudsStormTopTopology.yml
openAPI/schema/CloudStorm/CloudsStormTopTopology.yml
+2
-2
CloudsStormVM.yml
openAPI/schema/CloudStorm/CloudsStormVM.yml
+0
-0
DB.yml
openAPI/schema/CloudStorm/DB.yml
+6
-0
DBInfo.yml
openAPI/schema/CloudStorm/DBInfo.yml
+7
-0
DCMetaInfo.yml
openAPI/schema/CloudStorm/DCMetaInfo.yml
+21
-0
VMMetaInfo.yml
openAPI/schema/CloudStorm/VMMetaInfo.yml
+19
-0
No files found.
drip-commons/src/main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java
View file @
70b0ad9e
...
@@ -41,6 +41,7 @@ public class ToscaHelper {
...
@@ -41,6 +41,7 @@ public class ToscaHelper {
private
final
DefaultApi
api
;
private
final
DefaultApi
api
;
private
final
ObjectMapper
objectMapper
;
private
final
ObjectMapper
objectMapper
;
public
static
final
String
VM_CAPABILITY
=
"tosca.capabilities.ARTICONF.VM"
;
/**
/**
* @return the id
* @return the id
...
@@ -84,4 +85,24 @@ public class ToscaHelper {
...
@@ -84,4 +85,24 @@ public class ToscaHelper {
return
vmTopologyTemplates
;
return
vmTopologyTemplates
;
}
}
public
List
<
NodeTemplate
>
getTopologyTemplateVMs
(
NodeTemplate
nodeTemplate
)
throws
ApiException
{
List
<
Map
<
String
,
Object
>>
requirements
=
nodeTemplate
.
getRequirements
();
List
<
NodeTemplate
>
vms
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
req
:
requirements
)
{
String
nodeName
=
req
.
keySet
().
iterator
().
next
();
Map
<
String
,
Object
>
node
=
(
Map
<
String
,
Object
>)
req
.
get
(
nodeName
);
if
(
node
.
get
(
"capability"
).
equals
(
VM_CAPABILITY
))
{
String
vmName
=
(
String
)
node
.
get
(
"node"
);
List
<
NodeTemplate
>
vmNodeTemplates
=
api
.
getNodeTemplates
(
String
.
valueOf
(
id
),
null
,
vmName
,
null
,
null
,
null
,
null
,
null
,
null
);
vms
.
addAll
(
vmNodeTemplates
);
}
}
return
vms
;
}
public
String
getVMType
(
NodeTemplate
vm
,
String
provider
)
{
}
}
}
drip-planner/.idea/workspace.xml
View file @
70b0ad9e
...
@@ -2,15 +2,7 @@
...
@@ -2,15 +2,7 @@
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"e478ccae-5352-4e8e-9efb-3f5cda44e877"
name=
"Default Changelist"
comment=
""
>
<list
default=
"true"
id=
"e478ccae-5352-4e8e-9efb-3f5cda44e877"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/../drip-commons/src/main/resources/application.properties"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-commons/pom.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-commons/pom.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormSubTopology.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormSubTopology.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormTopTopology.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormTopTopology.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormVM.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormVM.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
@@ -36,7 +28,7 @@
...
@@ -36,7 +28,7 @@
</component>
</component>
<component
name=
"PropertiesComponent"
>
<component
name=
"PropertiesComponent"
>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$
/../sure_tosca-flask-server
"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
/>
</component>
</component>
<component
name=
"RecentsManager"
>
<component
name=
"RecentsManager"
>
...
@@ -253,22 +245,22 @@
...
@@ -253,22 +245,22 @@
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
</state>
</state>
<state
x=
"1043"
y=
"437"
width=
"530"
height=
"598"
key=
"FileChooserDialogImpl/67.34.2493.1406@67.34.2493.1406"
timestamp=
"1575907769017"
/>
<state
x=
"1043"
y=
"437"
width=
"530"
height=
"598"
key=
"FileChooserDialogImpl/67.34.2493.1406@67.34.2493.1406"
timestamp=
"1575907769017"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.bottom"
timestamp=
"157
5891807013
"
>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.bottom"
timestamp=
"157
6064606672
"
>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
</state>
</state>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.bottom/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
5891807013
"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.bottom/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
6064606672
"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.center"
timestamp=
"157
5891807013
"
>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.center"
timestamp=
"157
6064606669
"
>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
</state>
</state>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.center/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
5891807013
"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.center/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
6064606669
"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.left"
timestamp=
"157
5891807013
"
>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.left"
timestamp=
"157
6064606668
"
>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
</state>
</state>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.left/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
5891807013
"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.left/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
6064606668
"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.right"
timestamp=
"157
5891807013
"
>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.right"
timestamp=
"157
6064606671
"
>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
</state>
</state>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.right/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
5891807013
"
/>
<state
width=
"2465"
height=
"410"
key=
"GridCell.Tab.0.right/67.34.2493.1406@67.34.2493.1406"
timestamp=
"157
6064606671
"
/>
<state
width=
"2465"
height=
"471"
key=
"GridCell.Tab.1.bottom"
timestamp=
"1575891470098"
>
<state
width=
"2465"
height=
"471"
key=
"GridCell.Tab.1.bottom"
timestamp=
"1575891470098"
>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
<screen
x=
"67"
y=
"34"
width=
"2493"
height=
"1406"
/>
</state>
</state>
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java
View file @
70b0ad9e
...
@@ -18,6 +18,7 @@ import java.util.Map;
...
@@ -18,6 +18,7 @@ import java.util.Map;
import
nl.uva.sne.drip.commons.utils.ToscaHelper
;
import
nl.uva.sne.drip.commons.utils.ToscaHelper
;
import
nl.uva.sne.drip.model.CloudsStormSubTopology
;
import
nl.uva.sne.drip.model.CloudsStormSubTopology
;
import
nl.uva.sne.drip.model.CloudsStormTopTopology
;
import
nl.uva.sne.drip.model.CloudsStormTopTopology
;
import
nl.uva.sne.drip.model.CloudsStormVM
;
import
nl.uva.sne.drip.model.NodeTemplate
;
import
nl.uva.sne.drip.model.NodeTemplate
;
import
nl.uva.sne.drip.model.ToscaTemplate
;
import
nl.uva.sne.drip.model.ToscaTemplate
;
import
nl.uva.sne.drip.sure_tosca.client.ApiException
;
import
nl.uva.sne.drip.sure_tosca.client.ApiException
;
...
@@ -87,24 +88,24 @@ class CloudStormService {
...
@@ -87,24 +88,24 @@ class CloudStormService {
CloudsStormSubTopology
cloudsStormSubTopology
=
new
CloudsStormSubTopology
();
CloudsStormSubTopology
cloudsStormSubTopology
=
new
CloudsStormSubTopology
();
Map
<
String
,
Object
>
properties
=
nodeTemplate
.
getProperties
();
Map
<
String
,
Object
>
properties
=
nodeTemplate
.
getProperties
();
String
domain
=
(
String
)
properties
.
get
(
"domain"
);
String
domain
=
(
String
)
properties
.
get
(
"domain"
);
String
provider
=
(
String
)
properties
.
get
(
"provider"
);
String
provider
=
(
String
)
properties
.
get
(
"provider"
);
cloudsStormSubTopology
.
set
CloudProvider
(
domain
);
cloudsStormSubTopology
.
set
Domain
(
domain
);
cloudsStormSubTopology
.
setCloudProvider
(
provider
);
cloudsStormSubTopology
.
setCloudProvider
(
provider
);
cloudsStormSubTopology
.
setTopology
(
"vm_topology"
+
i
);
cloudsStormSubTopology
.
setTopology
(
"vm_topology"
+
i
);
cloudsStormSubTopology
.
setStatus
(
"fresh"
);
// List<NodeTemplate> vmTopologyTemplates = helper.getVMTemplatesForTopology();
// CloudsStormVM cloudsStormVM = new CloudsStormVM();
List
<
NodeTemplate
>
vmTemplates
=
helper
.
getTopologyTemplateVMs
(
nodeTemplate
);
// cloudsStormVM.setName("node"+i);
List
<
CloudsStormVM
>
vms
=
new
ArrayList
<>();
// cloudsStormVM.setNodeType(domain);
for
(
NodeTemplate
vm
:
vmTemplates
)
{
CloudsStormVM
cloudsStormVM
=
new
CloudsStormVM
();
String
vmType
=
helper
.
getVMType
(
vm
,
provider
);
cloudsStormVM
.
setNodeType
(
vmType
);
}
i
++;
i
++;
}
}
// List<CloudsStormVM> vms = new ArrayList<>();
// CloudsStormVM cloudsStormVM = new CloudsStormVM();
// cloudsStormVM.setName("Node1");
//
// vms.add(cloudsStormVM);
return
cloudsStormSubTopologies
;
return
cloudsStormSubTopologies
;
}
}
...
...
openAPI/schema/CloudStorm/CloudDB.yml
0 → 100644
View file @
70b0ad9e
CloudDB
:
type
:
"
object"
properties
:
cloudProvider
:
type
:
"
string"
dbInfoFile
:
type
:
"
string"
openAPI/schema/CloudsStormSubMembers.yml
→
openAPI/schema/Cloud
Storm/Cloud
sStormSubMembers.yml
View file @
70b0ad9e
File moved
openAPI/schema/CloudsStormSubTopology.yml
→
openAPI/schema/Cloud
Storm/Cloud
sStormSubTopology.yml
View file @
70b0ad9e
...
@@ -13,6 +13,6 @@
...
@@ -13,6 +13,6 @@
#VMs:
#VMs:
#type: array
#type: array
#items:
#items:
#$ref: 'https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStormVM.yml#/CloudsStormVM'
#$ref: 'https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStorm
/CloudsStorm
VM.yml#/CloudsStormVM'
openAPI/schema/CloudsStormSubnets.yml
→
openAPI/schema/Cloud
Storm/Cloud
sStormSubnets.yml
View file @
70b0ad9e
...
@@ -10,5 +10,5 @@
...
@@ -10,5 +10,5 @@
members
:
members
:
type
:
array
type
:
array
items
:
items
:
$ref
:
'
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStormSubMembers.yml#/CloudsStormSubMembers'
$ref
:
'
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStorm
/CloudsStorm
SubMembers.yml#/CloudsStormSubMembers'
openAPI/schema/CloudsStormTopTopology.yml
→
openAPI/schema/Cloud
Storm/Cloud
sStormTopTopology.yml
View file @
70b0ad9e
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
topologies
:
topologies
:
type
:
array
type
:
array
items
:
items
:
$ref
:
'
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStormSubTopology.yml#/CloudsStormSubTopology'
$ref
:
'
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStorm
/CloudsStorm
SubTopology.yml#/CloudsStormSubTopology'
subnets
:
subnets
:
type
:
array
type
:
array
items
:
items
:
$ref
:
'
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStormSubnets.yml#/CloudsStormSubnets'
$ref
:
'
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStorm
/CloudsStorm
Subnets.yml#/CloudsStormSubnets'
openAPI/schema/CloudsStormVM.yml
→
openAPI/schema/Cloud
Storm/Cloud
sStormVM.yml
View file @
70b0ad9e
File moved
openAPI/schema/CloudStorm/DB.yml
0 → 100644
View file @
70b0ad9e
DB
:
type
:
"
object"
properties
:
cloudDBs
:
type
:
"
array"
items
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudStorm/CloudDB.yml#/CloudDB"
openAPI/schema/CloudStorm/DBInfo.yml
0 → 100644
View file @
70b0ad9e
DBInfo
:
type
:
"
object"
properties
:
GlobalEntry
:
type
:
"
string"
DCMetaInfo
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudStorm/DCMetaInfo.yml#/DCMetaInfo"
openAPI/schema/CloudStorm/DCMetaInfo.yml
0 → 100644
View file @
70b0ad9e
DCMetaInfo
:
type
:
"
object"
properties
:
domain
:
type
:
"
string"
endpoint
:
type
:
"
string"
country
:
type
:
"
string"
longitude
:
type
:
"
string"
latitude
:
type
:
"
string"
availability
:
type
:
"
string"
VMMetaInfo
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStorm/VMMetaInfo.yml#/VMMetaInfo"
extraInfo
:
type
:
object
additionalProperties
:
type
:
object
openAPI/schema/CloudStorm/VMMetaInfo.yml
0 → 100644
View file @
70b0ad9e
VMMetaInfo
:
type
:
"
object"
properties
:
OS
:
type
:
"
string"
CPU
:
type
:
"
string"
MEM
:
type
:
"
string"
Price
:
type
:
"
string"
DefaultSSHAccount
:
type
:
"
string"
availability
:
type
:
"
string"
extraInfo
:
type
:
object
additionalProperties
:
type
:
object
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