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 DigitalOcean provider #621

Merged
merged 3 commits into from
Jan 22, 2022
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 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" "ibm" "firebase" "k8s" "alibabacloud" "oci" "programming" "saas" "elastic" "generic" "openstack" "outscale" )
providers=("onprem" "aws" "azure" "digitalocean" "gcp" "ibm" "firebase" "k8s" "alibabacloud" "oci" "programming" "saas" "elastic" "generic" "openstack" "outscale" )

if ! [ -x "$(command -v round)" ]; then
echo 'round is not installed'
Expand Down
11 changes: 8 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
DIR_TEMPLATE = "templates"

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

#########################
# Resource Processing #
Expand All @@ -30,6 +30,7 @@
"onprem": (),
"aws": ("Amazon-", "AWS-"),
"azure": ("Azure-",),
"digitalocean": (),
"gcp": ("Cloud-",),
"firebase": ("Cloud-",),
"ibm": (),
Expand Down Expand Up @@ -58,7 +59,7 @@

UPPER_WORDS = {
"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"),
"azure": ("ad", "b2c", "ai", "api", "cdn", "ddos", "dns", "fxt", "hana", "hd", "id", "sap", "sql", "vm", "vpn", "vpc"),
"gcp": ("gcp", "ai", "api", "cdn", "dns", "gke", "gpu", "iap", "ml", "nat", "os", "sdk", "sql", "tpu", "vpn"),
"firebase": ("ab", "fcm", "ml"),
"k8s": (
Expand All @@ -84,6 +85,9 @@
"aws": {
"cloudfront": "CloudFront"
},
"digitalocean": {
"digitalocean": "DigitalOcean"
},
"openstack": {
"openstack": "OpenStack"
},
Expand Down Expand Up @@ -386,6 +390,7 @@
"ObjectTableStore": "OTS",
}
},
"digitalocean": {},
"oci": {
"compute": {
"VM": "VirtualMachine",
Expand Down
8 changes: 4 additions & 4 deletions diagrams/aws/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class _General(_AWS):
_icon_dir = "resources/aws/general"


class InternetGateway(_General):
_icon = "Internet-gateway.png"


class Client(_General):
_icon = "client.png"

Expand Down Expand Up @@ -56,6 +52,10 @@ class InternetAlt2(_General):
_icon = "internet-alt2.png"


class InternetGateway(_General):
_icon = "internet-gateway.png"


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

Expand Down
43 changes: 43 additions & 0 deletions diagrams/digitalocean/compute.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 _DigitalOcean


class _Compute(_DigitalOcean):
_type = "compute"
_icon_dir = "resources/digitalocean/compute"


class Containers(_Compute):
_icon = "containers.png"


class Docker(_Compute):
_icon = "docker.png"


class DropletConnect(_Compute):
_icon = "droplet-connect.png"


class DropletSnapshot(_Compute):
_icon = "droplet-snapshot.png"


class Droplet(_Compute):
_icon = "droplet.png"


class K8SCluster(_Compute):
_icon = "k8s-cluster.png"


class K8SNodePool(_Compute):
_icon = "k8s-node-pool.png"


class K8SNode(_Compute):
_icon = "k8s-node.png"


# Aliases
27 changes: 27 additions & 0 deletions diagrams/digitalocean/database.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 _DigitalOcean


class _Database(_DigitalOcean):
_type = "database"
_icon_dir = "resources/digitalocean/database"


class DbaasPrimaryStandbyMore(_Database):
_icon = "dbaas-primary-standby-more.png"


class DbaasPrimary(_Database):
_icon = "dbaas-primary.png"


class DbaasReadOnly(_Database):
_icon = "dbaas-read-only.png"


class DbaasStandby(_Database):
_icon = "dbaas-standby.png"


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

from . import _DigitalOcean


class _Network(_DigitalOcean):
_type = "network"
_icon_dir = "resources/digitalocean/network"


class Certificate(_Network):
_icon = "certificate.png"


class DomainRegistration(_Network):
_icon = "domain-registration.png"


class Domain(_Network):
_icon = "domain.png"


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


class FloatingIp(_Network):
_icon = "floating-ip.png"


class InternetGateway(_Network):
_icon = "internet-gateway.png"


class LoadBalancer(_Network):
_icon = "load-balancer.png"


class ManagedVpn(_Network):
_icon = "managed-vpn.png"


class Vpc(_Network):
_icon = "vpc.png"


# Aliases
27 changes: 27 additions & 0 deletions diagrams/digitalocean/storage.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 _DigitalOcean


class _Storage(_DigitalOcean):
_type = "storage"
_icon_dir = "resources/digitalocean/storage"


class Folder(_Storage):
_icon = "folder.png"


class Space(_Storage):
_icon = "space.png"


class VolumeSnapshot(_Storage):
_icon = "volume-snapshot.png"


class Volume(_Storage):
_icon = "volume.png"


# Aliases
2 changes: 1 addition & 1 deletion docs/nodes/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ Node classes list of aws provider.

## aws.general

- **diagrams.aws.general.InternetGateway**
- **diagrams.aws.general.Client**
- **diagrams.aws.general.Disk**
- **diagrams.aws.general.Forums**
Expand All @@ -200,6 +199,7 @@ Node classes list of aws provider.
- **diagrams.aws.general.GenericSDK**
- **diagrams.aws.general.InternetAlt1**
- **diagrams.aws.general.InternetAlt2**
- **diagrams.aws.general.InternetGateway**
- **diagrams.aws.general.Marketplace**
- **diagrams.aws.general.MobileClient**
- **diagrams.aws.general.Multimedia**
Expand Down
43 changes: 43 additions & 0 deletions docs/nodes/digitalocean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
id: digitalocean
title: DigitalOcean
---

Node classes list of digitalocean provider.

## digitalocean.compute

- **diagrams.digitalocean.compute.Containers**
- **diagrams.digitalocean.compute.Docker**
- **diagrams.digitalocean.compute.DropletConnect**
- **diagrams.digitalocean.compute.DropletSnapshot**
- **diagrams.digitalocean.compute.Droplet**
- **diagrams.digitalocean.compute.K8SCluster**
- **diagrams.digitalocean.compute.K8SNodePool**
- **diagrams.digitalocean.compute.K8SNode**

## digitalocean.database

- **diagrams.digitalocean.database.DbaasPrimaryStandbyMore**
- **diagrams.digitalocean.database.DbaasPrimary**
- **diagrams.digitalocean.database.DbaasReadOnly**
- **diagrams.digitalocean.database.DbaasStandby**

## digitalocean.network

- **diagrams.digitalocean.network.Certificate**
- **diagrams.digitalocean.network.DomainRegistration**
- **diagrams.digitalocean.network.Domain**
- **diagrams.digitalocean.network.Firewall**
- **diagrams.digitalocean.network.FloatingIp**
- **diagrams.digitalocean.network.InternetGateway**
- **diagrams.digitalocean.network.LoadBalancer**
- **diagrams.digitalocean.network.ManagedVpn**
- **diagrams.digitalocean.network.Vpc**

## digitalocean.storage

- **diagrams.digitalocean.storage.Folder**
- **diagrams.digitalocean.storage.Space**
- **diagrams.digitalocean.storage.VolumeSnapshot**
- **diagrams.digitalocean.storage.Volume**
Binary file added resources/digitalocean/compute/containers.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/digitalocean/compute/docker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/digitalocean/compute/droplet.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/digitalocean/compute/k8s-cluster.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/digitalocean/compute/k8s-node-pool.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/digitalocean/compute/k8s-node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/digitalocean/database/dbaas-primary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/digitalocean/network/certificate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/digitalocean/network/domain.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/digitalocean/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/digitalocean/network/floating-ip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/digitalocean/network/load-balancer.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/digitalocean/network/managed-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/digitalocean/network/vpc.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/digitalocean/storage/folder.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/digitalocean/storage/space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/digitalocean/storage/volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions scripts/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ def cleaner_k8s(f):
break
return f.lower()

def cleaner_digitalocean(f):
f = f.replace("-32", "")
for p in cfg.FILE_PREFIXES["digitalocean"]:
if f.startswith(p):
f = f[len(p) :]
break
return f.lower()


def cleaner_alibabacloud(f):
for p in cfg.FILE_PREFIXES["alibabacloud"]:
Expand Down Expand Up @@ -131,6 +139,7 @@ def cleaner_openstack(f):
"onprem": cleaner_onprem,
"aws": cleaner_aws,
"azure": cleaner_azure,
"digitalocean": cleaner_digitalocean,
"gcp": cleaner_gcp,
"ibm": cleaner_ibm,
"firebase": cleaner_firebase,
Expand Down