From ff85ed3d82f16f3e23de5ddf9115b429a15bf364 Mon Sep 17 00:00:00 2001 From: Gunnar Mills Date: Thu, 24 Jun 2021 13:30:46 -0500 Subject: Add Privileges schema to allow list The allow list should contain all schemas implemented by bmcweb. The allow list was missing the Privileges schema. The Privileges schema is referenced in the Role schema here: "AssignedPrivileges": { "description": "The Redfish privileges for this role.", "items": { "$ref": "http://redfish.dmtf.org/schemas/v1/Privileges.json#/definitions/PrivilegeType" https://redfish.dmtf.org/schemas/v1/Role.v1_3_1.json In OpenBMC CI Redfish Validator testing the following error was hit 3 times: ERROR - ConnectionError on http://redfish.dmtf.org/schemas/v1/Privileges_v1.xml: ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) Network glitch somewhere but inspired this change. Long term not sure if the allow list makes sense. While still used today (and for the immediate future) it should attempt to accurately reflect the implemented schemas in bmcweb. The allow list was added in 349a2ac3 to save space. Information on the CI Redfish Validator testing can be found at https://github.com/openbmc/openbmc-test-automation/search?q=Redfish-Service-Validator The test redownloads the schemas each time. Tested: Validator passed. See the new schema: { "@odata.id": "/redfish/v1/JsonSchemas/Privileges" }, Change-Id: Iaf3de36b211efab4115a17fd43f0263b8bd3107f Signed-off-by: Gunnar Mills --- static/redfish/v1/$metadata/index.xml | 8 ++ .../v1/JsonSchemas/Privileges/Privileges.json | 9 ++ .../redfish/v1/JsonSchemas/Privileges/index.json | 21 ++++ static/redfish/v1/JsonSchemas/index.json | 5 +- static/redfish/v1/schema/Privileges_v1.xml | 108 +++++++++++++++++++++ 5 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 static/redfish/v1/JsonSchemas/Privileges/Privileges.json create mode 100644 static/redfish/v1/JsonSchemas/Privileges/index.json create mode 100644 static/redfish/v1/schema/Privileges_v1.xml (limited to 'static') diff --git a/static/redfish/v1/$metadata/index.xml b/static/redfish/v1/$metadata/index.xml index 3fc3b03e25..eba38bf3ac 100644 --- a/static/redfish/v1/$metadata/index.xml +++ b/static/redfish/v1/$metadata/index.xml @@ -1541,6 +1541,14 @@ + + + + + + + + diff --git a/static/redfish/v1/JsonSchemas/Privileges/Privileges.json b/static/redfish/v1/JsonSchemas/Privileges/Privileges.json new file mode 100644 index 0000000000..56e88ecd7d --- /dev/null +++ b/static/redfish/v1/JsonSchemas/Privileges/Privileges.json @@ -0,0 +1,9 @@ +{ + "$id": "http://redfish.dmtf.org/schemas/v1/Privileges.v1_0_5.json", + "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", + "copyright": "Copyright 2014-2019 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright", + "definitions": {}, + "owningEntity": "DMTF", + "release": "1.0", + "title": "#Privileges.v1_0_5" +} \ No newline at end of file diff --git a/static/redfish/v1/JsonSchemas/Privileges/index.json b/static/redfish/v1/JsonSchemas/Privileges/index.json new file mode 100644 index 0000000000..b2e2e7a7e8 --- /dev/null +++ b/static/redfish/v1/JsonSchemas/Privileges/index.json @@ -0,0 +1,21 @@ +{ + "@odata.context": "/redfish/v1/$metadata#JsonSchemaFile.JsonSchemaFile", + "@odata.id": "/redfish/v1/JsonSchemas/Privileges", + "@odata.type": "#JsonSchemaFile.v1_0_2.JsonSchemaFile", + "Name": "Privileges Schema File", + "Schema": "#Privileges.Privileges", + "Description": "Privileges Schema File Location", + "Id": "Privileges", + "Languages": [ + "en" + ], + "Languages@odata.count": 1, + "Location": [ + { + "Language": "en", + "PublicationUri": "http://redfish.dmtf.org/schemas/v1/Privileges.json", + "Uri": "/redfish/v1/JsonSchemas/Privileges/Privileges.json" + } + ], + "Location@odata.count": 1 +} \ No newline at end of file diff --git a/static/redfish/v1/JsonSchemas/index.json b/static/redfish/v1/JsonSchemas/index.json index 48ea31830a..86c53423f3 100644 --- a/static/redfish/v1/JsonSchemas/index.json +++ b/static/redfish/v1/JsonSchemas/index.json @@ -4,7 +4,7 @@ "@odata.type": "#JsonSchemaFileCollection.JsonSchemaFileCollection", "Name": "JsonSchemaFile Collection", "Description": "Collection of JsonSchemaFiles", - "Members@odata.count": 56, + "Members@odata.count": 57, "Members": [ { "@odata.id": "/redfish/v1/JsonSchemas/AccountService" @@ -105,6 +105,9 @@ { "@odata.id": "/redfish/v1/JsonSchemas/Power" }, + { + "@odata.id": "/redfish/v1/JsonSchemas/Privileges" + }, { "@odata.id": "/redfish/v1/JsonSchemas/Processor" }, diff --git a/static/redfish/v1/schema/Privileges_v1.xml b/static/redfish/v1/schema/Privileges_v1.xml new file mode 100644 index 0000000000..e2dfade653 --- /dev/null +++ b/static/redfish/v1/schema/Privileges_v1.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3