feat: Add tencentcloud provider

also add a basic provider unit test just to check autogen files
pull/349/head
ZhiQiang Fan 5 years ago committed by zhiqiangfan
parent 23d1713f00
commit 9fe37ce412

@ -4,7 +4,7 @@ set -e
app_root_dir="diagrams"
# NOTE: azure icon set is not latest version
providers=("onprem" "aws" "azure" "digitalocean" "gcp" "ibm" "firebase" "k8s" "alibabacloud" "oci" "programming" "saas" "elastic" "generic" "openstack" "outscale" )
providers=("onprem" "aws" "azure" "digitalocean" "gcp" "ibm" "firebase" "k8s" "alibabacloud" "oci" "tencentcloud" "programming" "saas" "elastic" "generic" "openstack" "outscale" )
if ! [ -x "$(command -v round)" ]; then
echo 'round is not installed'

@ -13,7 +13,7 @@ DIR_TEMPLATE = "templates"
PROVIDERS = (
"base", "onprem", "aws", "azure", "digitalocean", "gcp", "ibm", "firebase", "k8s", "alibabacloud", "oci",
"programming", "saas", "elastic", "generic", "openstack", "outscale")
"programming", "saas", "elastic", "tencentcloud", "generic", "openstack", "outscale")
#########################
# Resource Processing #
@ -43,6 +43,7 @@ FILE_PREFIXES = {
"outscale": (),
"generic": (),
"openstack": (),
"tencentcloud": (),
}
#########################
@ -82,6 +83,9 @@ TITLE_WORDS = {
"alibabacloud": {
"alibabacloud": "AlibabaCloud"
},
"tencentcloud": {
"tencentcloud": "TencentCloud",
},
"aws": {
"cloudfront": "CloudFront"
},
@ -98,6 +102,66 @@ TITLE_WORDS = {
# TODO: check if the classname exists
ALIASES = {
"tencentcloud": {
"compute": {
"CloudVirtualMachine": "CVM",
"GpuCloudComputing": "GPU",
"FpgaCloudComputing": "FPGA",
"CloudPhysicalMachine": "CPM",
"CvmDedicatedHost": "CDH",
"AutoScaling": "AS",
"BatchCompute": "Batch",
},
"container": {
"TencentKubernetesEngine": "TKE",
},
"storage": {
"CloudBlockStorage": "CBS",
"CloudObjectStorage": "COS",
"CloudStorageGateway": "CSG",
"CloudDataMigration": "CDM",
"CloudFileStorage": "CFS",
"CloudLogService": "CLS",
"CloudArchiveStorage": "CAS",
},
"network": {
"VirtualPrivateCloud": "VPC",
"CloudLoadBalancer": "CLB",
"ElasticNetworkInterface": "ENI",
"DirectConnect": "DC",
"VpnConnections": "VPNConnections",
"NatGateway": "NATGateway",
"FlowLogs": "FL",
"PeeringConnection": "PC",
"AnycastInternetAcceleration": "AIA",
"CloudConnectNetwork": "CCN",
"BandwidthPackage": "BWP",
},
"database": {
"TencentDbMysql": "CDB",
"TencentDbTdsql": "TDSQL",
"TencentDbCtsdb": "CTSDB",
"TencentDbCynosdb": "CynosDB",
"Tdata": "TData",
"TencentDbTcaplusdb": "TcaplusDB",
"TencentDbMariadb": "MariaDB",
"TencentDbRedis": "Redis",
"DataTransmissionService": "DTS",
"TencentDbSqlserver": "SQLServer",
"TencentDbMongodb": "MongoDB",
"TencentDbPostgresql": "PostgreSQL",
"TencentDbMemcached": "Memcached",
"TencentDbMysql": "CDB",
"TencentDbMysql": "CDB",
"TencentDbMysql": "CDB",
},
"serverless": {
"ServerlessCloudFunction": "SCF",
},
"middleware": {
"CloudMessageQueue": "CMQ",
},
},
"onprem": {
"analytics": {
"Powerbi": "PowerBI"

@ -0,0 +1,12 @@
"""
TencentCloud provides a set of services for Tencent Cloud provider.
"""
from diagrams import Node
class _TencentCloud(Node):
_provider = "tencentcloud"
_icon_dir = "resources/tencentcloud"
fontcolor = "#ffffff"

@ -0,0 +1,51 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _TencentCloud
class _Compute(_TencentCloud):
_type = "compute"
_icon_dir = "resources/tencentcloud/compute"
class AutoScaling(_Compute):
_icon = "auto-scaling.png"
class BatchCompute(_Compute):
_icon = "batch-compute.png"
class CloudPhysicalMachine(_Compute):
_icon = "cloud-physical-machine.png"
class CloudVirtualMachine(_Compute):
_icon = "cloud-virtual-machine.png"
class CvmDedicatedHost(_Compute):
_icon = "cvm-dedicated-host.png"
class FpgaCloudComputing(_Compute):
_icon = "fpga-cloud-computing.png"
class GpuCloudComputing(_Compute):
_icon = "gpu-cloud-computing.png"
class Lighthouse(_Compute):
_icon = "lighthouse.png"
# Aliases
CVM = CloudVirtualMachine
GPU = GpuCloudComputing
FPGA = FpgaCloudComputing
CPM = CloudPhysicalMachine
CDH = CvmDedicatedHost
AS = AutoScaling
Batch = BatchCompute

@ -0,0 +1,17 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _TencentCloud
class _Container(_TencentCloud):
_type = "container"
_icon_dir = "resources/tencentcloud/container"
class TencentKubernetesEngine(_Container):
_icon = "tencent-kubernetes-engine.png"
# Aliases
TKE = TencentKubernetesEngine

@ -0,0 +1,77 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _TencentCloud
class _Database(_TencentCloud):
_type = "database"
_icon_dir = "resources/tencentcloud/database"
class DataTransmissionService(_Database):
_icon = "data-transmission-service.png"
class Tdata(_Database):
_icon = "tdata.png"
class TencentDbCtsdb(_Database):
_icon = "tencent-db-ctsdb.png"
class TencentDbCynosdb(_Database):
_icon = "tencent-db-cynosdb.png"
class TencentDbMariadb(_Database):
_icon = "tencent-db-mariadb.png"
class TencentDbMemcached(_Database):
_icon = "tencent-db-memcached.png"
class TencentDbMongodb(_Database):
_icon = "tencent-db-mongodb.png"
class TencentDbMysql(_Database):
_icon = "tencent-db-mysql.png"
class TencentDbPostgresql(_Database):
_icon = "tencent-db-postgresql.png"
class TencentDbRedis(_Database):
_icon = "tencent-db-redis.png"
class TencentDbSqlserver(_Database):
_icon = "tencent-db-sqlserver.png"
class TencentDbTcaplusdb(_Database):
_icon = "tencent-db-tcaplusdb.png"
class TencentDbTdsql(_Database):
_icon = "tencent-db-tdsql.png"
# Aliases
CDB = TencentDbMysql
TDSQL = TencentDbTdsql
CTSDB = TencentDbCtsdb
CynosDB = TencentDbCynosdb
TData = Tdata
TcaplusDB = TencentDbTcaplusdb
MariaDB = TencentDbMariadb
Redis = TencentDbRedis
DTS = DataTransmissionService
SQLServer = TencentDbSqlserver
MongoDB = TencentDbMongodb
PostgreSQL = TencentDbPostgresql
Memcached = TencentDbMemcached

@ -0,0 +1,17 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _TencentCloud
class _Middleware(_TencentCloud):
_type = "middleware"
_icon_dir = "resources/tencentcloud/middleware"
class CloudMessageQueue(_Middleware):
_icon = "cloud-message-queue.png"
# Aliases
CMQ = CloudMessageQueue

@ -0,0 +1,67 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _TencentCloud
class _Network(_TencentCloud):
_type = "network"
_icon_dir = "resources/tencentcloud/network"
class AnycastInternetAcceleration(_Network):
_icon = "anycast-internet-acceleration.png"
class BandwidthPackage(_Network):
_icon = "bandwidth-package.png"
class CloudConnectNetwork(_Network):
_icon = "cloud-connect-network.png"
class CloudLoadBalancer(_Network):
_icon = "cloud-load-balancer.png"
class DirectConnect(_Network):
_icon = "direct-connect.png"
class ElasticNetworkInterface(_Network):
_icon = "elastic-network-interface.png"
class FlowLogs(_Network):
_icon = "flow-logs.png"
class NatGateway(_Network):
_icon = "nat-gateway.png"
class PeeringConnection(_Network):
_icon = "peering-connection.png"
class VirtualPrivateCloud(_Network):
_icon = "virtual-private-cloud.png"
class VpnConnections(_Network):
_icon = "vpn-connections.png"
# Aliases
VPC = VirtualPrivateCloud
CLB = CloudLoadBalancer
ENI = ElasticNetworkInterface
DC = DirectConnect
VPNConnections = VpnConnections
NATGateway = NatGateway
FL = FlowLogs
PC = PeeringConnection
AIA = AnycastInternetAcceleration
CCN = CloudConnectNetwork
BWP = BandwidthPackage

@ -0,0 +1,17 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _TencentCloud
class _Serverless(_TencentCloud):
_type = "serverless"
_icon_dir = "resources/tencentcloud/serverless"
class ServerlessCloudFunction(_Serverless):
_icon = "serverless-cloud-function.png"
# Aliases
SCF = ServerlessCloudFunction

@ -0,0 +1,47 @@
# This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _TencentCloud
class _Storage(_TencentCloud):
_type = "storage"
_icon_dir = "resources/tencentcloud/storage"
class CloudArchiveStorage(_Storage):
_icon = "cloud-archive-storage.png"
class CloudBlockStorage(_Storage):
_icon = "cloud-block-storage.png"
class CloudDataMigration(_Storage):
_icon = "cloud-data-migration.png"
class CloudFileStorage(_Storage):
_icon = "cloud-file-storage.png"
class CloudLogService(_Storage):
_icon = "cloud-log-service.png"
class CloudObjectStorage(_Storage):
_icon = "cloud-object-storage.png"
class CloudStorageGateway(_Storage):
_icon = "cloud-storage-gateway.png"
# Aliases
CBS = CloudBlockStorage
COS = CloudObjectStorage
CSG = CloudStorageGateway
CDM = CloudDataMigration
CFS = CloudFileStorage
CLS = CloudLogService
CAS = CloudArchiveStorage

@ -55,6 +55,12 @@ from diagrams.k8s.storage import PV, PVC, StorageClass
from diagrams.oci.compute import VirtualMachine, Container
from diagrams.oci.network import Firewall
from diagrams.oci.storage import FileStorage, StorageGateway
...
# tencent cloud resources
from diagrams.tencentcloud.compute import CVM
from diagrams.tencentcloud.network import VPC
...
```
You can find all available nodes list in [Here](https://diagrams.mingrammer.com/docs/nodes/aws).

@ -0,0 +1,69 @@
---
id: tencentcloud
title: TencentCloud
---
Node classes list of tencentcloud provider.
## tencentcloud.compute
- **diagrams.tencentcloud.compute.AutoScaling**, **AS** (alias)
- **diagrams.tencentcloud.compute.BatchCompute**, **Batch** (alias)
- **diagrams.tencentcloud.compute.CloudPhysicalMachine**, **CPM** (alias)
- **diagrams.tencentcloud.compute.CloudVirtualMachine**, **CVM** (alias)
- **diagrams.tencentcloud.compute.CvmDedicatedHost**, **CDH** (alias)
- **diagrams.tencentcloud.compute.FpgaCloudComputing**, **FPGA** (alias)
- **diagrams.tencentcloud.compute.GpuCloudComputing**, **GPU** (alias)
- **diagrams.tencentcloud.compute.Lighthouse**
## tencentcloud.container
- **diagrams.tencentcloud.container.TencentKubernetesEngine**, **TKE** (alias)
## tencentcloud.database
- **diagrams.tencentcloud.database.DataTransmissionService**, **DTS** (alias)
- **diagrams.tencentcloud.database.Tdata**, **TData** (alias)
- **diagrams.tencentcloud.database.TencentDbCtsdb**, **CTSDB** (alias)
- **diagrams.tencentcloud.database.TencentDbCynosdb**, **CynosDB** (alias)
- **diagrams.tencentcloud.database.TencentDbMariadb**, **MariaDB** (alias)
- **diagrams.tencentcloud.database.TencentDbMemcached**, **Memcached** (alias)
- **diagrams.tencentcloud.database.TencentDbMongodb**, **MongoDB** (alias)
- **diagrams.tencentcloud.database.TencentDbMysql**, **CDB** (alias)
- **diagrams.tencentcloud.database.TencentDbPostgresql**, **PostgreSQL** (alias)
- **diagrams.tencentcloud.database.TencentDbRedis**, **Redis** (alias)
- **diagrams.tencentcloud.database.TencentDbSqlserver**, **SQLServer** (alias)
- **diagrams.tencentcloud.database.TencentDbTcaplusdb**, **TcaplusDB** (alias)
- **diagrams.tencentcloud.database.TencentDbTdsql**, **TDSQL** (alias)
## tencentcloud.middleware
- **diagrams.tencentcloud.middleware.CloudMessageQueue**, **CMQ** (alias)
## tencentcloud.network
- **diagrams.tencentcloud.network.AnycastInternetAcceleration**, **AIA** (alias)
- **diagrams.tencentcloud.network.BandwidthPackage**, **BWP** (alias)
- **diagrams.tencentcloud.network.CloudConnectNetwork**, **CCN** (alias)
- **diagrams.tencentcloud.network.CloudLoadBalancer**, **CLB** (alias)
- **diagrams.tencentcloud.network.DirectConnect**, **DC** (alias)
- **diagrams.tencentcloud.network.ElasticNetworkInterface**, **ENI** (alias)
- **diagrams.tencentcloud.network.FlowLogs**, **FL** (alias)
- **diagrams.tencentcloud.network.NatGateway**, **NATGateway** (alias)
- **diagrams.tencentcloud.network.PeeringConnection**, **PC** (alias)
- **diagrams.tencentcloud.network.VirtualPrivateCloud**, **VPC** (alias)
- **diagrams.tencentcloud.network.VpnConnections**, **VPNConnections** (alias)
## tencentcloud.serverless
- **diagrams.tencentcloud.serverless.ServerlessCloudFunction**, **SCF** (alias)
## tencentcloud.storage
- **diagrams.tencentcloud.storage.CloudArchiveStorage**, **CAS** (alias)
- **diagrams.tencentcloud.storage.CloudBlockStorage**, **CBS** (alias)
- **diagrams.tencentcloud.storage.CloudDataMigration**, **CDM** (alias)
- **diagrams.tencentcloud.storage.CloudFileStorage**, **CFS** (alias)
- **diagrams.tencentcloud.storage.CloudLogService**, **CLS** (alias)
- **diagrams.tencentcloud.storage.CloudObjectStorage**, **COS** (alias)
- **diagrams.tencentcloud.storage.CloudStorageGateway**, **CSG** (alias)

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -135,6 +135,14 @@ def cleaner_openstack(f):
return f.lower()
def cleaner_tencentcloud(f):
for p in cfg.FILE_PREFIXES["tencentcloud"]:
if f.startswith(p):
f = f[len(p) :]
break
return f.lower()
cleaners = {
"onprem": cleaner_onprem,
"aws": cleaner_aws,
@ -152,6 +160,7 @@ cleaners = {
"outscale": cleaner_outscale,
"generic": cleaner_generic,
"openstack": cleaner_openstack,
"tencentcloud": cleaner_tencentcloud,
}

@ -0,0 +1,9 @@
# do nothing but just import providers in case syntax error
# it usually caused by wrong settings in config.py
from diagrams.tencentcloud.compute import CVM
from diagrams.tencentcloud.network import CLB
from diagrams.tencentcloud.database import CDB
from diagrams.tencentcloud.storage import CBS
from diagrams.tencentcloud.middleware import CMQ
from diagrams.tencentcloud.container import TKE
from diagrams.tencentcloud.serverless import SCF
Loading…
Cancel
Save