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
4a537284
Commit
4a537284
authored
Dec 02, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added plan check
parent
973a393b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
33 deletions
+40
-33
application_example_updated.yaml
TOSCA/application_example_updated.yaml
+0
-8
workspace.xml
drip-planner/.idea/workspace.xml
+15
-5
__main__.py
drip-planner/__main__.py
+3
-1
planner.py
drip-planner/planner/planner.py
+8
-3
skoulouzis-CONF-3.0.0-swagger.yaml
openAPI/skoulouzis-CONF-3.0.0-swagger.yaml
+14
-16
No files found.
TOSCA/application_example_updated.yaml
View file @
4a537284
...
...
@@ -12,14 +12,6 @@ repositories:
description
:
>
TOSCA example
interface_types
:
tosca.interfaces.TEST.test
:
description
:
test
derived_from
:
tosca.interfaces.node.lifecycle.Standard
create
:
description
:
creates
configure
:
description
:
configures
topology_template
:
...
...
drip-planner/.idea/workspace.xml
View file @
4a537284
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<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
beforePath=
"$PROJECT_DIR$/../TOSCA/application_example_updated.yaml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../TOSCA/application_example_updated.yaml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/__main__.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/__main__.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/planner/planner.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/planner/planner.py"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -21,7 +26,7 @@
<component
name=
"ProjectId"
id=
"1TI7vNZs1Z3y1uB6wXCH5F47r0F"
/>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"PropertiesComponent"
>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$
/../../DevOpsTutorial/python-flask-server-generated
"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
/>
</component>
<component
name=
"RecentsManager"
>
...
...
@@ -59,7 +64,7 @@
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/__main__.py"
/>
<option
name=
"PARAMETERS"
value=
"
test_local
"
/>
<option
name=
"PARAMETERS"
value=
"
localhost planner
"
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
<option
name=
"MODULE_MODE"
value=
"false"
/>
...
...
@@ -230,12 +235,12 @@
<breakpoints>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/planner/planner.py
</url>
<line>
66
</line>
<line>
71
</line>
<option
name=
"timeStamp"
value=
"8"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/planner/planner.py
</url>
<line>
6
1
</line>
<line>
6
6
</line>
<option
name=
"timeStamp"
value=
"9"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"python-line"
>
...
...
@@ -243,6 +248,11 @@
<line>
22
</line>
<option
name=
"timeStamp"
value=
"21"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
suspend=
"THREAD"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/__main__.py
</url>
<line>
102
</line>
<option
name=
"timeStamp"
value=
"22"
/>
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
...
...
drip-planner/__main__.py
View file @
4a537284
...
...
@@ -95,10 +95,12 @@ def handle_delivery(message):
conf
=
{
'url'
:
"http://host"
}
spec_service
=
SpecService
(
conf
)
test_planner
=
Planner
(
input_tosca_file_path
,
spec_service
)
test_planner
=
Planner
(
tosca_path
=
input_tosca_file_path
,
spec_service
=
spec_service
)
tosca_template
=
test_planner
.
resolve_requirements
()
tosca_template
=
test_planner
.
set_infrastructure_specifications
()
template_dict
=
tosca_helper
.
get_tosca_template_2_topology_template_dictionary
(
tosca_template
)
Planner
(
yaml_dict_tpl
=
template_dict
,
spec_service
=
spec_service
)
logger
.
info
(
"template ----:
\n
"
+
yaml
.
dump
(
template_dict
))
response
=
{
'toscaTemplate'
:
template_dict
}
...
...
drip-planner/planner/planner.py
View file @
4a537284
...
...
@@ -12,9 +12,14 @@ from util import tosca_helper
class
Planner
:
def
__init__
(
self
,
path
,
spec_service
):
self
.
path
=
path
self
.
tosca_template
=
ToscaTemplate
(
path
)
def
__init__
(
self
,
tosca_path
=
None
,
yaml_dict_tpl
=
None
,
spec_service
=
spec_service
):
if
tosca_path
:
self
.
path
=
tosca_path
self
.
tosca_template
=
ToscaTemplate
(
tosca_path
)
elif
yaml_dict_tpl
:
self
.
yaml_dict_tpl
=
yaml_dict_tpl
self
.
tosca_template
=
ToscaTemplate
(
yaml_dict_tpl
=
yaml_dict_tpl
)
self
.
tosca_node_types
=
self
.
tosca_template
.
nodetemplates
[
0
]
.
type_definition
.
TOSCA_DEF
self
.
all_custom_def
=
self
.
tosca_template
.
nodetemplates
[
0
]
.
custom_def
self
.
all_node_types
=
{}
...
...
openAPI/s
wagger_drip.y
ml
→
openAPI/s
koulouzis-CONF-3.0.0-swagger.ya
ml
View file @
4a537284
swagger
:
"
2.0"
info
:
description
:
"
The
Dynamic
Real-time
infrastructure
planner
(DRIP)
allows
application
developers
to
seamlessly
plan
a
customized
virtual
infrastructure
based
on
application
level
constraints
on
QoS
and
resource
budgets,
provisioning
the
virtual
infrastructure,
deploy
application
components
onto
the
virtual
infrastructure,
and
start
execution
on
demand
using
TOSCA."
description
:
"
CONF
allows
application
developers
to
seamlessly
plan
a
customized
virtual
infrastructure
based
on
application
level
constraints
on
QoS
and
resource
budgets,
provisioning
the
virtual
infrastructure,
deploy
application
components
onto
the
virtual
infrastructure,
and
start
execution
on
demand
using
TOSCA."
version
:
"
3.0.0"
title
:
"
DRIP
"
title
:
"
CONF
"
contact
:
email
:
"
z.zhao@uva.nl"
license
:
...
...
@@ -40,7 +40,7 @@ paths:
/tosca_template/ids
:
get
:
summary
:
"
Get
all
topolog
template
IDs"
description
:
"
Returns
all
IDs
s
"
description
:
"
Returns
all
IDs"
operationId
:
"
getToscaTemplateIDs"
produces
:
-
"
application/json"
...
...
@@ -172,7 +172,8 @@ paths:
security
:
-
auth
:
-
"
write:ToscaTemplate"
-
"
read:ToscaTemplate"
-
"
read:ToscaTemplate"
/provisioner/provision/{id}
:
get
:
summary
:
"
provision
tosca
template"
...
...
@@ -218,7 +219,7 @@ paths:
200
:
description
:
"
successful
operation"
schema
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/Provisioner.yml#/Provisioner"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/Provisioner.yml#/Provisioner"
400
:
description
:
"
Invalid
ID
supplied"
404
:
...
...
@@ -272,7 +273,7 @@ paths:
description
:
"
Created
user
object"
required
:
true
schema
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/TOSCA/Credentials.yml#/Credentials"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/TOSCA/Credentials.yml#/Credentials"
responses
:
200
:
description
:
"
successful
operation"
...
...
@@ -325,7 +326,7 @@ paths:
description
:
"
Created
user
object"
required
:
true
schema
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/User.yml#/User"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/User.yml#/User"
responses
:
200
:
description
:
"
successful
operation"
...
...
@@ -423,7 +424,7 @@ paths:
description
:
"
Updated
user
object"
required
:
true
schema
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/User.yml#/User"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/User.yml#/User"
responses
:
400
:
description
:
"
Invalid
user
supplied"
...
...
@@ -462,17 +463,14 @@ securityDefinitions:
admin:User
:
"
Grants
access
to
admin
operations"
write:Credentials
:
"
modify
cloud
credentials
in
your
account"
read:Credentials
:
"
read
your
cloud
credentials"
externalDocs
:
description
:
"
Find
out
more
about
DRIP"
url
:
"
https://github.com/QCAPI-DRIP/DRIP-integration/wiki"
definitions
:
User
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/User.yml#/User"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/User.yml#/User"
Credentials
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/TOSCA/Credentials.yml#/Credentials"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/TOSCA/Credentials.yml#/Credentials"
NodeTemplate
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/TOSCA/NodeTemplate.yml#/NodeTemplate"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/TOSCA/NodeTemplate.yml#/NodeTemplate"
TopologyTemplate
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
DRIP
/DRIP_3.0/openAPI/TOSCA/TopologyTemplate.yml#/TopologyTemplate"
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/
CONF
/DRIP_3.0/openAPI/TOSCA/TopologyTemplate.yml#/TopologyTemplate"
ToscaTemplate
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/openAPI/TOSCA/ToscaTemplate.yml#/ToscaTemplate"
\ No newline at end of file
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/TOSCA/ToscaTemplate.yml#/ToscaTemplate"
\ No newline at end of file
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