Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added generic itens and blank cluster #171

Merged
merged 10 commits into from
Jun 2, 2020
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
app_root_dir="diagrams"

# NOTE: azure icon set is not latest version
providers=("onprem" "aws" "azure" "gcp" "firebase" "k8s" "alibabacloud" "oci" "programming" "saas" "elastic")
providers=("onprem" "aws" "azure" "gcp" "firebase" "k8s" "alibabacloud" "oci" "programming" "saas" "elastic" "generic")

if ! [ -x "$(command -v round)" ]; then
echo 'round is not installed'
Expand Down
5 changes: 4 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DIR_RESOURCE = "resources"
DIR_TEMPLATE = "templates"

PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "firebase", "k8s", "alibabacloud", "oci", "programming", "saas", "elastic")
PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "firebase", "k8s", "alibabacloud", "oci", "programming", "saas", "elastic", "generic")

#########################
# Resource Processing #
Expand All @@ -36,6 +36,7 @@
"programming": (),
"saas": (),
"elastic": (),
"generic": (),
}

#########################
Expand All @@ -61,6 +62,7 @@
),
"oci": ("oci",),
"elastic": ("apm", "siem", "ece", "eck"),
"generic": ("vpn",),
}

TITLE_WORDS = {
Expand Down Expand Up @@ -369,4 +371,5 @@
"Logstash": "LogStash",
}
},
"generic": {},
}
12 changes: 12 additions & 0 deletions diagrams/generic/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
Generic provides the possibility of load an image to be presented as a node.
"""

from diagrams import Node


class _Generic(Node):
provider = "generic"
_icon_dir = "resources/generic"

fontcolor = "#ffffff"
15 changes: 15 additions & 0 deletions diagrams/generic/blank.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 _Generic


class _Blank(_Generic):
_type = "blank"
_icon_dir = "resources/generic/blank"


class Blank(_Blank):
_icon = "blank.png"


# Aliases
15 changes: 15 additions & 0 deletions diagrams/generic/compute.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 _Generic


class _Compute(_Generic):
_type = "compute"
_icon_dir = "resources/generic/compute"


class Rack(_Compute):
_icon = "rack.png"


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

from . import _Generic


class _Network(_Generic):
_type = "network"
_icon_dir = "resources/generic/network"


class Firewall(_Network):
_icon = "firewall.png"


class Router(_Network):
_icon = "router.png"


class Switch(_Network):
_icon = "switch.png"


class VPN(_Network):
_icon = "vpn.png"


# Aliases
15 changes: 15 additions & 0 deletions diagrams/generic/place.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 _Generic


class _Place(_Generic):
_type = "place"
_icon_dir = "resources/generic/place"


class Datacenter(_Place):
_icon = "datacenter.png"


# Aliases
15 changes: 15 additions & 0 deletions diagrams/generic/storage.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 _Generic


class _Storage(_Generic):
_type = "storage"
_icon_dir = "resources/generic/storage"


class Storage(_Storage):
_icon = "storage.png"


# Aliases
29 changes: 29 additions & 0 deletions docs/nodes/generic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
id: generic
title: Generic
---

Node classes list of generic provider.

## generic.blank

- **diagrams.generic.blank.Blank**

## generic.compute

- **diagrams.generic.compute.Rack**

## generic.network

- **diagrams.generic.network.Firewall**
- **diagrams.generic.network.Router**
- **diagrams.generic.network.Switch**
- **diagrams.generic.network.VPN**

## generic.place

- **diagrams.generic.place.Datacenter**

## generic.storage

- **diagrams.generic.storage.Storage**
Binary file added resources/generic/blank/blank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/generic/compute/rack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/generic/network/firewall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/generic/network/router.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/generic/network/switch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/generic/network/vpn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/generic/place/datacenter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/generic/storage/storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions scripts/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def cleaner_oci(f):
def cleaner_programming(f):
return f.lower()

def cleaner_generic(f):
return f.lower()

def cleaner_saas(f):
return f.lower()
Expand All @@ -115,6 +117,7 @@ def cleaner_elastic(f):
"programming": cleaner_programming,
"saas": cleaner_saas,
"elastic": cleaner_elastic,
"generic": cleaner_generic,
}


Expand Down