Various fixes to run test jobs
All checks were successful
gl/check check status: success (b20afcb98236be571567e1f269b2e973465dc0ed)
gl/gate gate status: success (b20afcb98236be571567e1f269b2e973465dc0ed)

This commit is contained in:
2023-01-02 19:47:45 +01:00
parent ee6771730e
commit b20afcb982
19 changed files with 238 additions and 300 deletions

View File

@ -1,4 +1,3 @@
import copy
import re
import otc_metadata.services
@ -7,21 +6,17 @@ from ruamel.yaml import YAML
data = otc_metadata.services.Services()
new_data = data._service_data
#services = data.service_dict
# services = data.service_dict
for doc in new_data["documents"]:
hc_location = None
link = doc.get("link")
if link:
print(f"Parsing {link}")
#(p1, p2) = link.split("/")
doc["link"] = re.sub(
r"/(.*)/(.*)/",
r"/\2/\1/",
link
)
# (p1, p2) = link.split("/")
doc["link"] = re.sub(r"/(.*)/(.*)/", r"/\2/\1/", link)
_yaml = YAML()
_yaml.indent(mapping=2, sequence=4, offset=2)
with open('new.yaml', 'w') as fd:
with open("new.yaml", "w") as fd:
_yaml.dump(new_data, fd)