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
036f5ec2
Commit
036f5ec2
authored
Oct 26, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct indentation for BEIA.yml
parent
30e1928d
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
837 additions
and
6 deletions
+837
-6
BEIA.yml
docs/input_tosca_files/BEIA.yml
+2
-2
BEIA_cardif2.yml
docs/input_tosca_files/BEIA_cardif2.yml
+830
-0
drip-api-1.0-SNAPSHOT.tar.gz
drip-api-1.0-SNAPSHOT.tar.gz
+0
-0
rpc_server.py
drip_parser/src/rpc_server.py
+2
-2
docker_compose_transformer.py
drip_parser/src/transformer/docker_compose_transformer.py
+3
-2
docker_compose_transformer.pyc
drip_parser/src/transformer/docker_compose_transformer.pyc
+0
-0
No files found.
docs/input_tosca_files/BEIA.yml
View file @
036f5ec2
...
...
@@ -71,8 +71,8 @@ topology_template:
name
:
volume_ID
link
:
"
/var/pool/bla"
mount_type
:
r/rw
-
monitoring_proxy
:
"
Monitoring
Proxy"
-
sip_notifier
:
"
SIPNotifyer"
-
monitoring_proxy
:
"
Monitoring
Proxy"
-
sip_notifier
:
"
SIPNotifyer"
# So this(below) should just map to
# volumes:
# graphite_data:
...
...
docs/input_tosca_files/BEIA_cardif2.yml
0 → 100644
View file @
036f5ec2
This diff is collapsed.
Click to expand it.
drip-api-1.0-SNAPSHOT.tar.gz
View file @
036f5ec2
No preview for this file type
drip_parser/src/rpc_server.py
View file @
036f5ec2
...
...
@@ -82,9 +82,9 @@ def handle_delivery(message):
def
test_local
():
home
=
expanduser
(
"~"
)
transformer
=
DockerComposeTransformer
(
home
+
"/workspace/DRIP/docs/input_tosca_files/BEIA
_cardif
.yml"
)
transformer
=
DockerComposeTransformer
(
home
+
"/workspace/DRIP/docs/input_tosca_files/BEIA.yml"
)
compose
=
transformer
.
getnerate_compose
()
print
yaml
.
dump
(
compose
)
#
print yaml.dump(compose)
response
=
{}
current_milli_time
=
lambda
:
int
(
round
(
time
.
time
()
*
1000
))
response
[
"creationDate"
]
=
current_milli_time
()
...
...
drip_parser/src/transformer/docker_compose_transformer.py
View file @
036f5ec2
...
...
@@ -34,7 +34,8 @@ class DockerComposeTransformer:
if
node_types
[
node_type_key
]
and
isinstance
(
node_types
[
node_type_key
],
dict
)
and
'derived_from'
in
node_types
[
node_type_key
]
.
keys
():
if
node_types
[
node_type_key
][
'derived_from'
]
==
self
.
DOCKER_TYPE
:
docker_types
.
add
(
node_type_key
)
return
docker_types
print
node_type_key
return
docker_types
def
get_node_templates
(
self
):
return
self
.
yaml_dict_tpl
[
'topology_template'
][
'node_templates'
]
...
...
@@ -80,7 +81,7 @@ class DockerComposeTransformer:
services
[
'services'
]
=
{}
for
node_template_key
in
node_templates
:
for
docker_type
in
docker_types
:
if
docker_type
in
node_templates
[
node_template_key
][
'type'
]:
if
isinstance
(
node_templates
[
node_template_key
],
dict
)
and
'type'
in
node_templates
[
node_template_key
]
and
docker_type
in
node_templates
[
node_template_key
][
'type'
]:
service
=
{}
artifacts
=
self
.
get_artifacts
(
node_templates
[
node_template_key
])
if
artifacts
:
...
...
drip_parser/src/transformer/docker_compose_transformer.pyc
View file @
036f5ec2
No preview for this file type
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