Fix OemAccountService schema
This schema as-written broke a bunch of Redfish specification rules for
schemas, naming and other things. This commit starts to fix them.
It can be used as a starting point for fixing the existing schemas.
This working through testing.
Tested: OpenBMCAccountService_v1.xml now passes the redfish odata schema
validator.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id991794344b8b7d36af3c44bba7214bf025deec8
diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
index edc583a..7d6e768 100755
--- a/scripts/update_schemas.py
+++ b/scripts/update_schemas.py
@@ -194,12 +194,12 @@
# Remove the old files
-skip_prefixes = "Oem"
+skip_prefixes = ["Oem", "OpenBMC"]
if os.path.exists(schema_path):
files = [
os.path.join(schema_path, f)
for f in os.listdir(schema_path)
- if not f.startswith(skip_prefixes)
+ if not any([f.startswith(prefix) for prefix in skip_prefixes])
]
for f in files:
os.remove(f)
@@ -207,7 +207,7 @@
files = [
os.path.join(json_schema_path, f)
for f in os.listdir(json_schema_path)
- if not f.startswith(skip_prefixes)
+ if not any([f.startswith(prefix) for prefix in skip_prefixes])
]
for f in files:
if os.path.isfile(f):
@@ -392,7 +392,7 @@
files = [
os.path.join(schema_path, f)
for f in os.listdir(schema_path)
- if not f.startswith(skip_prefixes)
+ if not any([f.startswith(prefix) for prefix in skip_prefixes])
]
for filename in files:
# filename will include the absolute path