Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compose_plantuml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def boundaries(self, compose, group=False, ports=True, volumes=True, notes=False
port_uml = ''
port_links = ''
for service, host, container in sorted(self.ports(compose)):
port = host
port = host.replace('/', '')
if container is not None:
port = '{0} : {1}'.format(host, container)
port_links += '[{0}] --> {1}\n'.format(service, port)
Expand Down
34 changes: 13 additions & 21 deletions features/boundaries.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Feature: Boundaries
I want to see the boundaries of a system
so that I know how to interact with it.

Scenario: Exposed ports
Scenario Outline: Exposed ports
Given a file named "compose.yml" with:
"""
version: "2"
services:
service:
ports:
- 8080
- <port>
"""
When I run `bin/compose_plantuml --boundaries compose.yml`
Then it should pass with exactly:
Expand All @@ -19,29 +19,21 @@ Feature: Boundaries
cloud system {
[service]
}
[service] --> 8080
[service] --> <resulting port>

"""

Scenario: Alias Ports
Given a file named "compose.yml" with:
"""
version: "2"
services:
service:
ports:
- 8080:80
"""
When I run `bin/compose_plantuml --boundaries compose.yml`
Then it should pass with exactly:
"""
skinparam componentStyle uml2
cloud system {
[service]
}
[service] --> 8080 : 80
Examples: TCP Port
| port | resulting port |
| 8080 | 8080 |

"""
Examples: UDP Port
| port | resulting port |
| 8080/udp | 8080udp |

Examples: Alias Port
| port | resulting port |
| 8080:80 | 8080 : 80 |

Scenario: Volumes
Given a file named "compose.yml" with:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def readme():

setup(
name='compose_plantuml',
version='0.0.13',
version='0.1.0',
description='converts docker-compose into plantuml',
long_description=readme(),
url='http://github.com/funkwerk/compose_plantuml',
Expand Down