Move to 2021.2
Update the script to point at 2021.2, change the path of the files since
they moved yet again, and run the script.
The directory structure moved back to the way they had it pre-2020.1:
https://github.com/openbmc/bmcweb/commit/a778c0261282b95e14ea3f4406959638b5edb040
Since we have an exclude list, this only brings in new versions of
schemas bmcweb already uses.
Overview of 2021.2:
https://www.dmtf.org/sites/default/files/Redfish_Release_2021.2_Overview.pdf
IBM plans to use Control (for PowerCapping) and IdlePowerSaver
immediately.
Tested: Validator passed after DMTF/Redfish-Service-Validator/pull/423
merged.
CI uses the latest Redfish-Service-Validator so not a problem for CI.
For manual users only a small window where an older validator would
fail. After the schemapack changes but before PR423.
See the new schemas.
Change-Id: I2fe539087167cf6d962c14bf31fa23861302646f
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
index dd39278..9b4c88f 100755
--- a/scripts/update_schemas.py
+++ b/scripts/update_schemas.py
@@ -9,7 +9,7 @@
import xml.etree.ElementTree as ET
-VERSION = "DSP8010_2021.1"
+VERSION = "DSP8010_2021.2"
# To use a new schema, add to list and rerun tool
include_list = [
@@ -161,9 +161,9 @@
" Version=\"4.0\">\n")
for zip_filepath in zip_ref.namelist():
- if zip_filepath.startswith(VERSION + '/csdl/') and \
+ if zip_filepath.startswith(VERSION + '/' + VERSION + '/csdl/') and \
(zip_filepath != VERSION + "/csdl/") and \
- (zip_filepath != VERSION + "/csdl/"):
+ (zip_filepath != VERSION + '/' + VERSION + "/csdl/"):
filename = os.path.basename(zip_filepath)
# filename looks like Zone_v1.xml
@@ -260,7 +260,7 @@
schema_files = {}
for zip_filepath in zip_ref.namelist():
- if zip_filepath.startswith(os.path.join(VERSION, 'json-schema/')):
+ if zip_filepath.startswith(os.path.join(VERSION, VERSION, 'json-schema/')):
filename = os.path.basename(zip_filepath)
filenamesplit = filename.split(".")
@@ -281,7 +281,7 @@
for schema, version in schema_files.items():
basename = schema + "." + version + ".json"
- zip_filepath = os.path.join(VERSION, "json-schema", basename)
+ zip_filepath = os.path.join(VERSION, VERSION, "json-schema", basename)
schemadir = os.path.join(json_schema_path, schema)
os.makedirs(schemadir)
location_json = OrderedDict()