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
39ca2902
Commit
39ca2902
authored
Nov 07, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor planner
parent
2d9a56f4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
42 deletions
+26
-42
workspace.xml
drip-planner/.idea/workspace.xml
+15
-17
__main__.py
drip-planner/__main__.py
+5
-2
test_planner.py
drip-planner/test/test_planner.py
+3
-6
workspace.xml
drip_planner2/.idea/workspace.xml
+3
-17
No files found.
drip-planner/.idea/workspace.xml
View file @
39ca2902
...
...
@@ -2,24 +2,10 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"e478ccae-5352-4e8e-9efb-3f5cda44e877"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/.idea/drip-planner.iml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/__main__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/planner/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/planner/planner.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/service/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/service/simple_spec_alayzer.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/service/spec_service.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/service/specification_analyzer.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/setup.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/test/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/test/test_planner.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/util/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/util/tosca_helper.py"
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$/test/test_planner.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/test/test_planner.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip_planner2/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip_planner2/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip_planner2/src/planner/planner.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip_planner2/src/planner/planner.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip_planner2/src/planner/simple_spec_alayzer.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip_planner2/src/planner/simple_spec_alayzer.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip_planner2/src/tests/test_planner.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip_planner2/src/tests/test_planner.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../jenkins_pipeline"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../jenkins_pipeline"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -122,6 +108,14 @@
<option
name=
"presentableId"
value=
"Default"
/>
<updated>
1573135985084
</updated>
</task>
<task
id=
"LOCAL-00001"
summary=
"refactor planner"
>
<created>
1573136717037
</created>
<option
name=
"number"
value=
"00001"
/>
<option
name=
"presentableId"
value=
"LOCAL-00001"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1573136717037
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"2"
/>
<servers
/>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
...
...
@@ -135,4 +129,8 @@
</map>
</option>
</component>
<component
name=
"VcsManagerConfiguration"
>
<MESSAGE
value=
"refactor planner"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"refactor planner"
/>
</component>
</project>
\ No newline at end of file
drip-planner/__main__.py
View file @
39ca2902
...
...
@@ -11,8 +11,11 @@ import pika
import
yaml
import
sys
from
toscaparser.tosca_template
import
ToscaTemplate
from
planner.planner
import
Planner
from
service.spec_service
import
SpecService
from
util
import
tosca_helper
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -94,7 +97,7 @@ def handle_delivery(message):
test_planner
=
Planner
(
input_tosca_file_path
,
spec_service
)
tosca_template
=
test_planner
.
resolve_requirements
()
tosca_template
=
test_planner
.
set_infrastructure_specifications
()
template_dict
=
tosca_
util
.
get_tosca_template_2_topology_template_dictionary
(
tosca_template
)
template_dict
=
tosca_
helper
.
get_tosca_template_2_topology_template_dictionary
(
tosca_template
)
logger
.
info
(
"template ----:
\n
"
+
yaml
.
dump
(
template_dict
))
response
=
{
'toscaTemplate'
:
template_dict
}
...
...
@@ -118,7 +121,7 @@ if __name__ == "__main__":
test_planner
=
Planner
(
input_tosca_file_path
,
spec_service
)
test_tosca_template
=
test_planner
.
resolve_requirements
()
test_tosca_template
=
test_planner
.
set_infrastructure_specifications
()
template_dict
=
tosca_
util
.
get_tosca_template_2_topology_template_dictionary
(
test_tosca_template
)
template_dict
=
tosca_
helper
.
get_tosca_template_2_topology_template_dictionary
(
test_tosca_template
)
logger
.
info
(
"template ----:
\n
"
+
yaml
.
dump
(
template_dict
))
try
:
...
...
drip-planner/test/test_planner.py
View file @
39ca2902
...
...
@@ -11,13 +11,14 @@ from toscaparser.tosca_template import ToscaTemplate
from
planner.planner
import
Planner
from
service.spec_service
import
SpecService
from
util
import
tosca_helper
class
MyTestCase
(
unittest
.
TestCase
):
def
test_something
(
self
):
logger
=
logging
.
getLogger
(
__name__
)
tosca_path
=
"../
../
TOSCA/"
tosca_path
=
"../TOSCA/"
input_tosca_file_path
=
tosca_path
+
'/application_example_2_topologies.yaml'
dir_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
...
...
@@ -31,7 +32,7 @@ class MyTestCase(unittest.TestCase):
test_planner
=
Planner
(
input_tosca_file_path
,
spec_service
)
test_tosca_template
=
test_planner
.
resolve_requirements
()
test_tosca_template
=
test_planner
.
set_infrastructure_specifications
()
template_dict
=
tosca_
util
.
get_tosca_template_2_topology_template_dictionary
(
test_tosca_template
)
template_dict
=
tosca_
helper
.
get_tosca_template_2_topology_template_dictionary
(
test_tosca_template
)
logger
.
info
(
"template ----:
\n
"
+
yaml
.
dump
(
template_dict
))
try
:
...
...
@@ -57,7 +58,3 @@ class MyTestCase(unittest.TestCase):
response
[
"parameters"
]
=
[]
print
(
"Output message:"
+
json
.
dumps
(
response
))
self
.
assertEqual
(
True
,
True
)
if
__name__
==
'__main__'
:
unittest
.
main
()
drip_planner2/.idea/workspace.xml
View file @
39ca2902
...
...
@@ -2,24 +2,10 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"462ede19-adfe-472b-975e-fefefa973fe0"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/.idea/drip-planner.iml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/__main__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/planner/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/planner/planner.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/service/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/service/simple_spec_alayzer.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/service/spec_service.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/service/specification_analyzer.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/setup.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/test/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/test/test_planner.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/util/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/../drip-planner/util/tosca_helper.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-planner/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-planner/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-planner/__main__.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-planner/__main__.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../drip-planner/test/test_planner.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../drip-planner/test/test_planner.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/planner/planner.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/planner/planner.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/planner/simple_spec_alayzer.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/planner/simple_spec_alayzer.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/tests/test_planner.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/tests/test_planner.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../jenkins_pipeline"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../jenkins_pipeline"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
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