Skip to content

Commit

Permalink
Merge branch 'master' into gitops
Browse files Browse the repository at this point in the history
  • Loading branch information
maruina authored May 24, 2020
2 parents ebf06f5 + 0497901 commit dc4b825
Show file tree
Hide file tree
Showing 106 changed files with 1,091 additions and 529 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ffmpeg -i my_big_image.jpg -vf scale=w=256:h=256:force_original_aspect_ratio=dec
Then just run the `./autogen.sh` to generate the added or updated node classes.

> IMPORTANT NOTE: To run `autogen.sh`, you need [round][round] and
> [inkscape][inkscape] command lines that are used for clearning the image
> [inkscape][inkscape] command lines that are used for cleaning the image
> resource filenames.
>
> macOS users can download the inkscape via Homebrew.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
![kubernetes provider](https://img.shields.io/badge/provider-Kubernetes-orange?logo=kubernetes&color=326ce5)
![alibaba cloud provider](https://img.shields.io/badge/provider-AlibabaCloud-orange)
![oracle cloud provider](https://img.shields.io/badge/provider-OracleCloud-orange?logo=oracle&color=f80000)
![programming provider](https://img.shields.io/badge/provider-Programming-orange?color=5f87bf)

**Diagram as Code**.

Expand Down
8 changes: 7 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
TMPL_MODULE = "module.tmpl"

UPPER_WORDS = {
"aws": ("aws", "api", "ebs", "ec2", "efs", "emr", "rds", "ml", "mq", "nat", "vpc", "waf"),
"aws": ("aws", "api", "ebs", "ec2", "efs", "emr", "rds", "ml", "mq", "nat", "vpc", "waf", "sdk"),
"azure": ("ad", "b2c", "ai", "api", "cdn", "ddos", "dns", "fxt", "hana", "hd", "id", "sap", "sql", "vm"),
"gcp": ("gcp", "ai", "api", "cdn", "dns", "gke", "gpu", "iap", "ml", "nat", "os", "sdk", "sql", "tpu", "vpn"),
"k8s": (
Expand All @@ -75,6 +75,7 @@
"onprem": {
"ci": {
"Circleci": "CircleCI",
"Gitlabci": "GitlabCI",
"Travisci": "TravisCI",
"Teamcity": "TC",
},
Expand All @@ -98,6 +99,7 @@
"Argocd": "ArgoCD",
},
"logging": {
"Fluentbit": "FluentBit",
"Logstash": "LogStash",
},
"network": {
Expand Down Expand Up @@ -143,13 +145,17 @@
"engagement": {
"SimpleEmailServiceSes": "SES",
},
"general": {
"GenericOfficeBuilding": "OfficeBuilding",
},
"integration": {
"SimpleNotificationServiceSns": "SNS",
"SimpleQueueServiceSqs": "SQS",
"StepFunctions": "SF",
},
"iot": {
"Freertos": "FreeRTOS",
"IotHardwareBoard": "IotBoard",
},
"management": {
"SystemsManager": "SSM",
Expand Down
10 changes: 6 additions & 4 deletions diagrams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class Node:

_height = 1.9

def __init__(self, label: str = ""):
def __init__(self, label: str = "", **attrs: Dict):
"""Node represents a system component.
:param label: Node label.
Expand All @@ -281,12 +281,14 @@ def __init__(self, label: str = ""):
# that label being spanned between icon image and white space.
# Increase the height by the number of new lines included in the label.
padding = 0.4 * (label.count('\n'))
self.attrs = {
self._attrs = {
"shape": "none",
"height": str(self._height + padding),
"image": self._load_icon(),
} if self._icon else {}

# fmt: on
self._attrs.update(attrs)

# Node must be belong to a diagrams.
self._diagram = getdiagram()
Expand All @@ -296,9 +298,9 @@ def __init__(self, label: str = ""):

# If a node is in the cluster context, add it to cluster.
if self._cluster:
self._cluster.node(self._id, self.label, **self.attrs)
self._cluster.node(self._id, self.label, **self._attrs)
else:
self._diagram.node(self._id, self.label, **self.attrs)
self._diagram.node(self._id, self.label, **self._attrs)

def __repr__(self):
_name = self.__class__.__name__
Expand Down
15 changes: 15 additions & 0 deletions diagrams/aws/game.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _AWS


class _Game(_AWS):
_type = "game"
_icon_dir = "resources/aws/game"


class Gamelift(_Game):
_icon = "gamelift.png"


# Aliases
57 changes: 57 additions & 0 deletions diagrams/aws/general.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _AWS


class _General(_AWS):
_type = "general"
_icon_dir = "resources/aws/general"


class Disk(_General):
_icon = "disk.png"


class General(_General):
_icon = "general.png"


class GenericDatabase(_General):
_icon = "generic-database.png"


class GenericFirewall(_General):
_icon = "generic-firewall.png"


class GenericOfficeBuilding(_General):
_icon = "generic-office-building.png"


class GenericSamlToken(_General):
_icon = "generic-saml-token.png"


class GenericSDK(_General):
_icon = "generic-sdk.png"


class Marketplace(_General):
_icon = "marketplace.png"


class TradicionalServer(_General):
_icon = "tradicional-server.png"


class User(_General):
_icon = "user.png"


class Users(_General):
_icon = "users.png"


# Aliases

OfficeBuilding = GenericOfficeBuilding
41 changes: 41 additions & 0 deletions diagrams/aws/iot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ class Iot1Click(_Iot):
_icon = "iot-1-click.png"


class IotAlexaEcho(_Iot):
_icon = "iot-alexa-echo.png"


class IotAlexaSkill(_Iot):
_icon = "iot-alexa-skill.png"


class IotAnalytics(_Iot):
_icon = "iot-analytics.png"

Expand All @@ -28,6 +36,14 @@ class IotButton(_Iot):
_icon = "iot-button.png"


class IotCamera(_Iot):
_icon = "iot-camera.png"


class IotCertificate(_Iot):
_icon = "iot-certificate.png"


class IotCore(_Iot):
_icon = "iot-core.png"

Expand All @@ -48,6 +64,26 @@ class IotGreengrass(_Iot):
_icon = "iot-greengrass.png"


class IotHardwareBoard(_Iot):
_icon = "iot-hardware-board.png"


class IotJobs(_Iot):
_icon = "iot-jobs.png"


class IotMqtt(_Iot):
_icon = "iot-mqtt.png"


class IotRule(_Iot):
_icon = "iot-rule.png"


class IotShadow(_Iot):
_icon = "iot-shadow.png"


class IotSitewise(_Iot):
_icon = "iot-sitewise.png"

Expand All @@ -56,6 +92,11 @@ class IotThingsGraph(_Iot):
_icon = "iot-things-graph.png"


class IotTopic(_Iot):
_icon = "iot-topic.png"


# Aliases

FreeRTOS = Freertos
IotBoard = IotHardwareBoard
55 changes: 55 additions & 0 deletions diagrams/aws/media.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _AWS


class _Media(_AWS):
_type = "media"
_icon_dir = "resources/aws/media"


class ElasticTranscoder(_Media):
_icon = "elastic-transcoder.png"


class ElementalConductor(_Media):
_icon = "elemental-conductor.png"


class ElementalDelta(_Media):
_icon = "elemental-delta.png"


class ElementalLive(_Media):
_icon = "elemental-live.png"


class ElementalMediaconnect(_Media):
_icon = "elemental-mediaconnect.png"


class ElementalMediaconvert(_Media):
_icon = "elemental-mediaconvert.png"


class ElementalMedialive(_Media):
_icon = "elemental-medialive.png"


class ElementalMediapackage(_Media):
_icon = "elemental-mediapackage.png"


class ElementalMediastore(_Media):
_icon = "elemental-mediastore.png"


class ElementalMediatailor(_Media):
_icon = "elemental-mediatailor.png"


class ElementalServer(_Media):
_icon = "elemental-server.png"


# Aliases
23 changes: 23 additions & 0 deletions diagrams/aws/robotics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _AWS


class _Robotics(_AWS):
_type = "robotics"
_icon_dir = "resources/aws/robotics"


class RobomakerSimulator(_Robotics):
_icon = "robomaker-simulator.png"


class Robomaker(_Robotics):
_icon = "robomaker.png"


class Robotics(_Robotics):
_icon = "robotics.png"


# Aliases
Loading

0 comments on commit dc4b825

Please sign in to comment.