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

feat: Add new provider snowflake #991 #1040

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ providers=(
"generic"
"openstack"
"outscale"
"snowflake"
)

if ! [ -x "$(command -v round)" ]; then
Expand Down
11 changes: 9 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"generic",
"openstack",
"outscale",
"snowflake",
)

#########################
Expand Down Expand Up @@ -59,6 +60,7 @@
"outscale": (),
"generic": (),
"openstack": (),
"snowflake": (),
}

#########################
Expand Down Expand Up @@ -87,8 +89,9 @@
"generic": ("vpn", "ios", "xen", "sql", "lxc"),
"outscale": ("osc",),
"openstack": ("rpm", "loci", "nfv", "ec2api"),
"pve": ("pve"),
"ibm": ("ibm"),
"pve": ("pve",),
"ibm": ("ibm",),
"snowflake": ("sn",),
}

TITLE_WORDS = {
Expand All @@ -110,6 +113,9 @@
"ibm": {
"ibm": "IBMCloud"
},
"snowflake": {
"snowflake": "Snowflake"
}
}

# TODO: check if the classname exists
Expand Down Expand Up @@ -468,4 +474,5 @@
"Tripleo": "TripleO",
}
},
"snowflake": {},
}
12 changes: 12 additions & 0 deletions diagrams/snowflake/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
Saas provides a set of general saas services.
"""

from diagrams import Node


class _Snowflake(Node):
_provider = "snowflake"
_icon_dir = "resources/snowflake"

fontcolor = "#ffffff"
43 changes: 43 additions & 0 deletions diagrams/snowflake/bugworkload.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 _Snowflake


class _Bugworkload(_Snowflake):
_type = "bugworkload"
_icon_dir = "resources/snowflake/bugworkload"


class AiMl(_Bugworkload):
_icon = "ai-ml.png"


class Applications(_Bugworkload):
_icon = "applications.png"


class Collaboration(_Bugworkload):
_icon = "collaboration.png"


class Cybersecurity(_Bugworkload):
_icon = "cybersecurity.png"


class DataEngineering(_Bugworkload):
_icon = "data-engineering.png"


class DataLake(_Bugworkload):
_icon = "data-lake.png"


class DataWarehouse(_Bugworkload):
_icon = "data-warehouse.png"


class Unistore(_Bugworkload):
_icon = "unistore.png"


# Aliases
43 changes: 43 additions & 0 deletions diagrams/snowflake/workload.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 _Snowflake


class _Workload(_Snowflake):
_type = "workload"
_icon_dir = "resources/snowflake/workload"


class AiMl(_Workload):
_icon = "ai-ml.png"


class Applications(_Workload):
_icon = "applications.png"


class Collaboration(_Workload):
_icon = "collaboration.png"


class Cybersecurity(_Workload):
_icon = "cybersecurity.png"


class DataEngineering(_Workload):
_icon = "data-engineering.png"


class DataLake(_Workload):
_icon = "data-lake.png"


class DataWarehouse(_Workload):
_icon = "data-warehouse.png"


class Unistore(_Workload):
_icon = "unistore.png"


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

Node classes list of the snowflake provider.

## snowflake.bugworkload


<img width="30" src="/img/resources/snowflake/bugworkload/ai-ml.png" alt="AiMl" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.AiMl**

<img width="30" src="/img/resources/snowflake/bugworkload/applications.png" alt="Applications" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.Applications**

<img width="30" src="/img/resources/snowflake/bugworkload/collaboration.png" alt="Collaboration" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.Collaboration**

<img width="30" src="/img/resources/snowflake/bugworkload/cybersecurity.png" alt="Cybersecurity" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.Cybersecurity**

<img width="30" src="/img/resources/snowflake/bugworkload/data-engineering.png" alt="DataEngineering" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.DataEngineering**

<img width="30" src="/img/resources/snowflake/bugworkload/data-lake.png" alt="DataLake" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.DataLake**

<img width="30" src="/img/resources/snowflake/bugworkload/data-warehouse.png" alt="DataWarehouse" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.DataWarehouse**

<img width="30" src="/img/resources/snowflake/bugworkload/unistore.png" alt="Unistore" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.bugworkload.Unistore**

## snowflake.workload


<img width="30" src="/img/resources/snowflake/workload/ai-ml.png" alt="AiMl" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.AiMl**

<img width="30" src="/img/resources/snowflake/workload/applications.png" alt="Applications" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.Applications**

<img width="30" src="/img/resources/snowflake/workload/collaboration.png" alt="Collaboration" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.Collaboration**

<img width="30" src="/img/resources/snowflake/workload/cybersecurity.png" alt="Cybersecurity" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.Cybersecurity**

<img width="30" src="/img/resources/snowflake/workload/data-engineering.png" alt="DataEngineering" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.DataEngineering**

<img width="30" src="/img/resources/snowflake/workload/data-lake.png" alt="DataLake" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.DataLake**

<img width="30" src="/img/resources/snowflake/workload/data-warehouse.png" alt="DataWarehouse" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.DataWarehouse**

<img width="30" src="/img/resources/snowflake/workload/unistore.png" alt="Unistore" style="float: left; padding-right: 5px;" >
**diagrams.snowflake.workload.Unistore**
Binary file added resources/snowflake/bugworkload/ai-ml.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/snowflake/bugworkload/applications.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/snowflake/bugworkload/collaboration.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/snowflake/bugworkload/data-lake.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/snowflake/bugworkload/unistore.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/snowflake/workload/ai-ml.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/snowflake/workload/applications.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/snowflake/workload/collaboration.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/snowflake/workload/cybersecurity.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/snowflake/workload/data-engineering.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/snowflake/workload/data-lake.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/snowflake/workload/data-warehouse.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/snowflake/workload/unistore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def _gen_class_meta(path: str) -> dict:

def gen_apidoc(pvd: str, typ_paths: dict) -> str:
try:
default_tmp = cfg.TMPL_APIDOC.split('.')
tmpl_file = f"{default_tmp[0]}_{pvd}.{default_tmp[1]}"
tmpl = load_tmpl(tmpl_file)
default_tmp = cfg.TMPL_APIDOC.split(".")
tmpl_file = f"{default_tmp[0]}_{pvd}.{default_tmp[1]}"
tmpl = load_tmpl(tmpl_file)
except exceptions.TemplateNotFound:
tmpl = load_tmpl(cfg.TMPL_APIDOC)
tmpl = load_tmpl(cfg.TMPL_APIDOC)

# TODO: remove
def _gen_class_name(path: str) -> str:
Expand All @@ -68,6 +68,8 @@ def _gen_class_name(path: str) -> str:
def make_module(pvd: str, typ: str, classes: str) -> None:
"""Create a module file"""
mod_path = os.path.join(app_root_dir(pvd), f"{typ}.py")
os.makedirs(os.path.dirname(mod_path), exist_ok=True)

with open(mod_path, "w+") as f:
f.write(classes)

Expand Down
6 changes: 6 additions & 0 deletions scripts/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def cleaner_k8s(f):
break
return f.lower()


def cleaner_digitalocean(f):
f = f.replace("-32", "")
for p in cfg.FILE_PREFIXES["digitalocean"]:
Expand Down Expand Up @@ -135,6 +136,10 @@ def cleaner_openstack(f):
return f.lower()


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


cleaners = {
"onprem": cleaner_onprem,
"aws": cleaner_aws,
Expand All @@ -152,6 +157,7 @@ def cleaner_openstack(f):
"outscale": cleaner_outscale,
"generic": cleaner_generic,
"openstack": cleaner_openstack,
"snowflake": cleaner_snowflake,
}


Expand Down
3 changes: 3 additions & 0 deletions website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
},
"nodes/saas": {
"title": "Saas"
},
"nodes/snowflake": {
"title": "Snowflake"
}
},
"links": {
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"nodes/digitalocean",
"nodes/elastic",
"nodes/outscale",
"nodes/snowflake",
"nodes/generic",
"nodes/programming",
"nodes/saas",
Expand Down
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.
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.
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.