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

Add Icon set for Oracle Cloud Services. #20

Merged
merged 11 commits into from
Feb 18, 2020
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

**Diagram as Code**.

Diagrams lets you draw the cloud system architecture **in Python code**. It was born for **prototyping** a new system architecture design without any design tools. You can also describe or visualize the existing system architecture as well. Diagrams currently supports five major providers: `AWS`, `Azure`, `GCP`, `Kubernetes` and `Alibaba Cloud`.
Diagrams lets you draw the cloud system architecture **in Python code**. It was born for **prototyping** a new system architecture design without any design tools. You can also describe or visualize the existing system architecture as well. Diagrams currently supports six major providers: `AWS`, `Azure`, `GCP`, `Kubernetes`, `Alibaba Cloud` and `Oracle Cloud`.

**Diagram as Code** also allows you to **tracking** the architecture diagram changes on any **version control** system.

Expand Down
15 changes: 13 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,34 @@
app_root_dir="diagrams"

# NOTE: azure icon set is not latest version
providers=("aws" "azure" "gcp" "k8s" "alibabacloud")
providers=("aws" "azure" "gcp" "k8s" "alibabacloud" "oci")

if ! [ -x "$(command -v round)" ]; then
echo 'round is not installed'
exit 1
fi

if ! [ -x "$(command -v inkscape)" ]; then
echo 'inkscape is not installed'
exit 1
fi

if ! [ -x "$(command -v convert)" ]; then
echo 'image magick is not installed'
exit 1
fi

# preprocess the resources
for pvd in "${providers[@]}"; do
# convert the svg to png for azure provider
if [ "$pvd" = "azure" ]; then
echo "converting the svg to png for provider '$pvd'"
echo "converting the svg to png using inkscape for provider '$pvd'"
python -m scripts.resource svg2png "$pvd"
fi
if [ "$pvd" == "oci" ]; then
echo "converting the svg to png using image magick for provider '$pvd'"
python -m scripts.resource svg2png2 "$pvd"
fi
echo "cleaning the resource names for provider '$pvd'"
python -m scripts.resource clean "$pvd"
# round the all png images for aws provider
Expand Down
15 changes: 13 additions & 2 deletions 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", "aws", "azure", "gcp", "k8s", "alibabacloud")
PROVIDERS = ("base", "aws", "azure", "gcp", "k8s", "alibabacloud", "oci")

#########################
# Resource Processing #
Expand All @@ -21,13 +21,17 @@
CMD_ROUND_OPTS = ("-w",)
CMD_SVG2PNG = "inkscape"
CMD_SVG2PNG_OPTS = ("-z", "-w", "256", "-h", "256", "--export-type", "png")
CMD_SVG2PNG_IM = "convert"
CMD_SVG2PNG_IM_OPTS = ("-shave", "25%x25%", "-resize", "256x256!")


FILE_PREFIXES = {
"aws": ("amazon-", "aws-"),
"azure": ("azure-",),
"gcp": ("cloud-",),
"k8s": (),
"alibabacloud": (),
"oci": ("OCI-",),
}

#########################
Expand All @@ -49,7 +53,8 @@
"k8s": (
"api", "cm", "ccm", "crb", "crd", "ds", "etcd", "hpa", "k8s", "ns", "psp", "pv", "pvc", "rb", "rs",
"sa", "sc", "sts", "svc",
)
),
"oci": ("oci",),
}

TITLE_WORDS = {
Expand Down Expand Up @@ -256,5 +261,11 @@
"ObjectStorageService": "OSS",
"ObjectTableStore": "OTS",
}
},
"oci": {
"compute": {
"Vm": "VirtualMachine",
"Bm": "BareMetal"
},
}
}
12 changes: 12 additions & 0 deletions diagrams/oci/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
OCI provides a set of services for Oracle Cloud provider.
"""

from diagrams import Node


class _OCI(Node):
_provider = "oci"
_icon_dir = "resources/oci"

fontcolor = "#2d3436"
26 changes: 26 additions & 0 deletions diagrams/oci/compute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _OCI


class _Compute(_OCI):
_type = "compute"
_icon_dir = "resources/oci/compute"


class Bm(_Compute):
_icon = "bm.png"


class Container(_Compute):
_icon = "container.png"


class Vm(_Compute):
_icon = "vm.png"


# Aliases

VirtualMachine = Vm
BareMetal = Bm
31 changes: 31 additions & 0 deletions diagrams/oci/connectivity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.

from . import _OCI


class _Connectivity(_OCI):
_type = "connectivity"
_icon_dir = "resources/oci/connectivity"


class Backbone(_Connectivity):
_icon = "backbone.png"


class Customerdatacenter(_Connectivity):
_icon = "customerdatacenter.png"


class Customerpremisesequip(_Connectivity):
_icon = "customerpremisesequip.png"


class Fastconnect(_Connectivity):
_icon = "fastconnect.png"


class Vpn(_Connectivity):
_icon = "vpn.png"


# Aliases
15 changes: 15 additions & 0 deletions diagrams/oci/database.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 _OCI


class _Database(_OCI):
_type = "database"
_icon_dir = "resources/oci/database"


class Databaseservice(_Database):
_icon = "databaseservice.png"


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

from . import _OCI


class _Devops(_OCI):
_type = "devops"
_icon_dir = "resources/oci/devops"


class Apiservice(_Devops):
_icon = "apiservice.png"


class Resourcemgmt(_Devops):
_icon = "resourcemgmt.png"


# Aliases
27 changes: 27 additions & 0 deletions diagrams/oci/edge.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 _OCI


class _Edge(_OCI):
_type = "edge"
_icon_dir = "resources/oci/edge"


class Cdn(_Edge):
_icon = "cdn.png"


class Dns(_Edge):
_icon = "dns.png"


class Emaildelivery(_Edge):
_icon = "emaildelivery.png"


class Waf(_Edge):
_icon = "waf.png"


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

from . import _OCI


class _Monitoring(_OCI):
_type = "monitoring"
_icon_dir = "resources/oci/monitoring"


class Alarm(_Monitoring):
_icon = "alarm.png"


class Event(_Monitoring):
_icon = "event.png"


class Healthcheck(_Monitoring):
_icon = "healthcheck.png"


class Logging(_Monitoring):
_icon = "logging.png"


class Notifications(_Monitoring):
_icon = "notifications.png"


class Queuing(_Monitoring):
_icon = "queuing.png"


class Search(_Monitoring):
_icon = "search.png"


class Streaming(_Monitoring):
_icon = "streaming.png"


class Telemetry(_Monitoring):
_icon = "telemetry.png"


class Workflow(_Monitoring):
_icon = "workflow.png"


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

from . import _OCI


class _Network(_OCI):
_type = "network"
_icon_dir = "resources/oci/network"


class Drg(_Network):
_icon = "drg.png"


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


class Internetgateway(_Network):
_icon = "internetgateway.png"


class Loadbalance(_Network):
_icon = "loadbalance.png"


class Routetable(_Network):
_icon = "routetable.png"


class Securitylists(_Network):
_icon = "securitylists.png"


class ServiceGateway(_Network):
_icon = "service-gateway.png"


class Vcloudnetwork(_Network):
_icon = "vcloudnetwork.png"


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

from . import _OCI


class _Security(_OCI):
_type = "security"
_icon_dir = "resources/oci/security"


class Audit(_Security):
_icon = "audit.png"


class Compartments(_Security):
_icon = "compartments.png"


class Ddos(_Security):
_icon = "ddos.png"


class Encryption(_Security):
_icon = "encryption.png"


class Groups(_Security):
_icon = "groups.png"


class IdAccess(_Security):
_icon = "id-access.png"


class Keymgmt(_Security):
_icon = "keymgmt.png"


class Ocid(_Security):
_icon = "ocid.png"


class Policies(_Security):
_icon = "policies.png"


class Tagging(_Security):
_icon = "tagging.png"


# Aliases
Loading