add cloud_environments #27

Open
tischrei wants to merge 7 commits from add_cloud_environments into main
4 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,2 @@
---
name: eu_de

View File

@ -0,0 +1,2 @@
---
name: swiss

View File

@ -17,6 +17,7 @@
# documents/services/service_categories is being merged with
# the content here.
---
cloud_environments: []
documents: []
service_categories: []
services: []

View File

@ -62,10 +62,20 @@ class Services(object):
if other in self._service_data["service_categories"]:
self._service_data["service_categories"].remove(other)
self._service_data["service_categories"].append(other)
# sort cloud environments by <name>
self._service_data["cloud_environments"] = sorted(
self._service_data["cloud_environments"],
key=lambda x: f"{x.get('name')}",
)
def _rewrite_data(self):
otc_metadata.data.rewrite_data("services.yaml", self._service_data)
@property
def all_cloud_environments(self):
"Cloud Environments data listing."
return copy.deepcopy(self._service_data["cloud_environments"])
@property
def all_services(self):
"Service Categories data listing."