diff --git a/docs/nodes/openstack.md b/docs/nodes/openstack.md index 0d4c505..176c0f5 100644 --- a/docs/nodes/openstack.md +++ b/docs/nodes/openstack.md @@ -5,9 +5,6 @@ title: OpenStack Node classes list of openstack provider. -## openstack.adjacentenablers - - ## openstack.apiproxies - **diagrams.openstack.apiproxies.EC2API** @@ -51,9 +48,6 @@ Node classes list of openstack provider. - **diagrams.openstack.frontend.Horizon** -## openstack.lifecyclemanagement - - ## openstack.monitoring - **diagrams.openstack.monitoring.Monasca** @@ -73,9 +67,6 @@ Node classes list of openstack provider. - **diagrams.openstack.nfv.Tacker** -## openstack.operations - - ## openstack.optimization - **diagrams.openstack.optimization.Congress** diff --git a/resources/openstack/operations/billing/cloudkitty.png b/resources/openstack/billing/cloudkitty.png similarity index 100% rename from resources/openstack/operations/billing/cloudkitty.png rename to resources/openstack/billing/cloudkitty.png diff --git a/resources/openstack/adjacentenablers/containerservices/kuryr.png b/resources/openstack/containerservices/kuryr.png similarity index 100% rename from resources/openstack/adjacentenablers/containerservices/kuryr.png rename to resources/openstack/containerservices/kuryr.png diff --git a/resources/openstack/lifecyclemanagement/deployment/ansible.png b/resources/openstack/deployment/ansible.png similarity index 100% rename from resources/openstack/lifecyclemanagement/deployment/ansible.png rename to resources/openstack/deployment/ansible.png diff --git a/resources/openstack/lifecyclemanagement/deployment/charms.png b/resources/openstack/deployment/charms.png similarity index 100% rename from resources/openstack/lifecyclemanagement/deployment/charms.png rename to resources/openstack/deployment/charms.png diff --git a/resources/openstack/lifecyclemanagement/deployment/chef.png b/resources/openstack/deployment/chef.png similarity index 100% rename from resources/openstack/lifecyclemanagement/deployment/chef.png rename to resources/openstack/deployment/chef.png diff --git a/resources/openstack/lifecyclemanagement/deployment/helm.png b/resources/openstack/deployment/helm.png similarity index 100% rename from resources/openstack/lifecyclemanagement/deployment/helm.png rename to resources/openstack/deployment/helm.png diff --git a/resources/openstack/lifecyclemanagement/deployment/kolla.png b/resources/openstack/deployment/kolla.png similarity index 100% rename from resources/openstack/lifecyclemanagement/deployment/kolla.png rename to resources/openstack/deployment/kolla.png diff --git a/resources/openstack/lifecyclemanagement/deployment/tripleo.png b/resources/openstack/deployment/tripleo.png similarity index 100% rename from resources/openstack/lifecyclemanagement/deployment/tripleo.png rename to resources/openstack/deployment/tripleo.png diff --git a/resources/openstack/operations/monitoring/monasca.png b/resources/openstack/monitoring/monasca.png similarity index 100% rename from resources/openstack/operations/monitoring/monasca.png rename to resources/openstack/monitoring/monasca.png diff --git a/resources/openstack/operations/monitoring/telemetry.png b/resources/openstack/monitoring/telemetry.png similarity index 100% rename from resources/openstack/operations/monitoring/telemetry.png rename to resources/openstack/monitoring/telemetry.png diff --git a/resources/openstack/operations/multiregion/tricircle.png b/resources/openstack/multiregion/tricircle.png similarity index 100% rename from resources/openstack/operations/multiregion/tricircle.png rename to resources/openstack/multiregion/tricircle.png diff --git a/resources/openstack/adjacentenablers/nfv/tacker.png b/resources/openstack/nfv/tacker.png similarity index 100% rename from resources/openstack/adjacentenablers/nfv/tacker.png rename to resources/openstack/nfv/tacker.png diff --git a/resources/openstack/operations/optimization/congress.png b/resources/openstack/optimization/congress.png similarity index 100% rename from resources/openstack/operations/optimization/congress.png rename to resources/openstack/optimization/congress.png diff --git a/resources/openstack/operations/optimization/rally.png b/resources/openstack/optimization/rally.png similarity index 100% rename from resources/openstack/operations/optimization/rally.png rename to resources/openstack/optimization/rally.png diff --git a/resources/openstack/operations/optimization/vitrage.png b/resources/openstack/optimization/vitrage.png similarity index 100% rename from resources/openstack/operations/optimization/vitrage.png rename to resources/openstack/optimization/vitrage.png diff --git a/resources/openstack/operations/optimization/watcher.png b/resources/openstack/optimization/watcher.png similarity index 100% rename from resources/openstack/operations/optimization/watcher.png rename to resources/openstack/optimization/watcher.png diff --git a/resources/openstack/lifecyclemanagement/packaging/loci.png b/resources/openstack/packaging/loci.png similarity index 100% rename from resources/openstack/lifecyclemanagement/packaging/loci.png rename to resources/openstack/packaging/loci.png diff --git a/resources/openstack/lifecyclemanagement/packaging/puppet.png b/resources/openstack/packaging/puppet.png similarity index 100% rename from resources/openstack/lifecyclemanagement/packaging/puppet.png rename to resources/openstack/packaging/puppet.png diff --git a/resources/openstack/lifecyclemanagement/packaging/rpm.png b/resources/openstack/packaging/rpm.png similarity index 100% rename from resources/openstack/lifecyclemanagement/packaging/rpm.png rename to resources/openstack/packaging/rpm.png diff --git a/tests/test_diagram.py b/tests/test_diagram.py index ad8558c..cc5567b 100644 --- a/tests/test_diagram.py +++ b/tests/test_diagram.py @@ -1,6 +1,7 @@ import os import shutil import unittest +import pathlib from diagrams import Cluster, Diagram, Edge, Node from diagrams import getcluster, getdiagram, setcluster, setdiagram @@ -283,3 +284,16 @@ class EdgeTest(unittest.TestCase): self.assertEqual( nodes << Edge(color="green", label="6.3") << Edge(color="pink", label="6.4") << node1, node1 ) + + +class ResourcesTest(unittest.TestCase): + def test_folder_depth(self): + """ + The code currently only handles resource folders up to a dir depth of 2 + i.e. resources///, so check that this depth isn't + exceeded. + """ + resources_dir = pathlib.Path(__file__).parent.parent / 'resources' + max_depth = max(os.path.relpath(d, resources_dir).count(os.sep) + 1 + for d, _, _ in os.walk(resources_dir)) + self.assertLessEqual(max_depth, 2)