| Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit allows our python code to be run through the CI format-code
scripts. The exact content is copied from sdbusplus.
Tested, ran pycodeformat on each script, observed it passing.
Ran each script individually. check_base_registry seems broken previous
to this commit, although it provides the same output.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7eacfa355b794f49308b900c2988809d2aa122c3
|
|
Clang-13 rightfully warns that the hasWebuiRoute variable isn't declared
as static. This commit resolves that, and adds the static keyword so it
can be used in multiple compile units. It also adds the static keyword
to the privilege registry, and the inline keyword to many methods that
now need it.
clang-format is also updated to version 12 in parse_registies.py, as
that's what CI uses, and what most people have installed.
Tested:
Followed clang-tidy instructions in README.md
"bitbake bmcweb" step now succeeds.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id43b13606754cb37a404799fce155599ac3a3240
|
|
Because these files are generated, there is no copyright that makes
sense, as these are "derivative works". sdbusplus does not include
these in its generated files, bmcweb should do the same.
Tested:
Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3c729f8c03176770b31b4f54ebdbdab92daae163
|
|
This commit attempts to automate the creation of our privileges
structures from the redfish privilege registry. It accomplishes this by
updating parse_registries.py to also pull down the privilege registry
from DMTF.
The script then generates privilege_registry.hpp, which include const
defines for all the privilege registry entries in the same format that
the Privileges struct accepts. This allows new clients to simply
reference the variable to these privilege structures, instead of having
to manually (ie error pronely) put the privileges in themselves.
This commit updates all the routes.
For the moment, override and OEM schemas are not considered. Today we
don't have any OEM-specific Redfish routes, so the existing ones inherit
their parents schema. Overrides have other issues, and are already
incorrect as Redfish defines them.
Binary size remains unchanged after this patchset.
Tested:
Ran redfish service validator
Ran test case from f9a6708c4c6490257e2eb6a8c04458f500902476 to ensure
that the new privileges constructor didn't cause us to regress the brace
construction initializer.
Checked binary size with:
gzip -c
$BBPATH/tmp/work/s7106-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/rootfs/usr/bin/bmcweb
| wc -c
1244048
(tested on previous patchset)
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ideede3d5b39d50bffe7fe78a0848bdbc22ac387f
|
|
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 <gmills@us.ibm.com>
|
|
We've had some fields get updated in the base registry that didn't seem
to run the script. This commit updates us to the latest base and
TaskEvent Registries. This should have no impact.
Tested:
Code compiles. No functional impact.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iea4ee79fc798b57efa0e915195f72711858c61b9
|
|
We're currently on clang-format-11, the scripts should represent this.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic4d2719d4ae28e51e0579cdcc8e8efbd47b65dbe
|
|
The python registries script used the variable json, which conflicts
with the "import json" module. This commit changes the name of the
variable to json_dict, which is hopefully a more generic name:
Tested:
Ran script, observed same behavior. Registries are out of date, but
will be updated in a later commit.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Icedc1d79ff5c9d8bfc8fe5eac96a1c6ea059272a
|
|
Update the script to point at 2021.1 and run it.
Since we have an exclude list, this only brings in new versions of
schemas bmcweb already uses.
Overview of 2021.1:
https://www.dmtf.org/sites/default/files/Redfish_Release_2021.1_Overview.pdf
Features IBM plans to use:
Resource, Action, Enum, and Property Deprecated Messages
Boot Progress: Setup Entered
System: Stop Boot On Fault
Chassis: Spare Part Number
Enabled for Memory, Processor
Log Entry: AutomatedServiceNotify, Resolution
Power Modes
Enable/Disable USB
Tested: Clean run of the validator passes.
Change-Id: Ib22e5ea314c41ae354930b2c5857fe9512859507
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
8401529 removed OemCrashdump.json but didn't from $metadata/index.xml
and the update_schemas.py.
This is causing the following validator fail and holding up the bump:
ERROR - The following schema URIs referenced from $metadata could not
be retrieved:
/redfish/v1/schema/OemCrashdump_v1.xml
See https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/42245
Tested: None.
Change-Id: I6106bb19c725c088b7343722c1001f4e188e216d
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Created a list of all used schemas, and a few being added for use in reviews
now. Exclude all other schemas.
Developers if they wish to use a new schema will have to add it to this
list and rerun update_schemas.py.
Size of obmc-phosphor-image-witherspoon-<date>.rootfs.squashfs-xz:
Before 2020.4: 19451904
With 2020.4, before this commit: 19492864
With this commit: 19275776
Tested: Validator passes.
Change-Id: I23272049aa38c51ac7af0d3b0f5b4641a349a487
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
2020.4 contains a lot of new schemas.
New feature include: new power and thermal schemas, conditions,
and new account types.
For more information, see:
https://www.dmtf.org/sites/default/files/Redfish_Release_2020.4_Overview.pdf
Tested: Validator passes. Able to see new schemas.
Change-Id: I7fb860c84fa4cff80698dcb26a463b155e6faba7
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Remove some ancient files that are no longer used or required.
1. JenkinsFile: Was used when this was a project that only existed on my
desktop, and I used a private Jenkins instance to test it. Today,
bmcweb uses the openbmc CI, which doesn't require this file.
2. scripts/run_clang_tiidy.py. This script is now part of the clang
builds themselves, so it should be used from there.
3. src/ast*.cpp and src/test_resources. These were left from when
bmcweb handled the ast video driver itself, and had unit tests to prove
it worked. The code to run the unit tests has been long removed, we
just forgot to remove the tests.
4. static/highlight.pack.js. This was previously used for json parsing
in the HTML UI. It is no longer used as of commit
57fce80e24cfe08e530e0697d6c70bba14076d1c and should've been removed as
part of it, but unfortunately was not.
Tested:
None of the above were used previously, so should have no measurable
impact to the build.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I757b0dc8e4dc6cc93ba60d39218016e2f4d47ed0
|
|
In this commit, Oem schemas for Dump LogServices are removed
as per the latest Redfish schemas. Also, the code is changed
w.r.t the latest schema changes.
Redfish Validator Passed.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I12c8d283cd54c32e71a2b11857e7c4cce89b9f0a
|
|
Run the script update_schemas.py by pointing it to 2020.3
An overview of 2020.3 release can be found at:
https://www.dmtf.org/sites/default/files/Redfish_Release_2020.3_Overview.pdf
Tested: Loaded on a Witherspoon and Validator passed with the latest schemas
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I6c7a2e0cbdbe599930ba453a1d8c134c22136306
|
|
The Base message registry has updated to 1.8.1. This updates our
error_messages files to match.
This changes from the deprecated 'Severity' to the new
'MessageSeverity' property.
It also adds a script to compare our error_messages.cpp messages
against the Base message registry and flag any differences.
Tested:
Ran the Redfish Validator and confirmed that this change does
not introduce any new failures.
Change-Id: I2e5101a5b4d0c0963569493451f99521e42b0f4d
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
This commit adds new files for DMTF resource registry
and corresponding json message definitions.
Tested by:
1. GET https://${bmc}/redfish/v1/Registries
2. GET https://${bmc}/redfish/v1/Registries/ResourceEvent
3. GET https://${bmc}/redfish/v1/Registries/ResourceEvent/ResourceEvent
4. Redfish Validator passed ( giving out messages as == Severity:
The given property is deprecated by revision: This property has been deprecated
in favor of MessageSeverity, which ties the values to the enumerations defined
for the Health property within Status.)
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: Iacbedaeca85c0dcfc955bcf9b10973c0d47c98e0
|
|
This implements the MessageSeverity property which tools and users
should use instead of the deprecated Severity property.
Since the registries use common infrastructure, easiest if just
bumped together and now allows grabbing the latest when implementing
a new registry, e.g. ResourceEvent.
Implement this new required property, MessageSeverity, in the openbmc
registry. Follow Redfish registries in having both MessageSeverity
and Severity.
Modified parse_registries.py to look at latest Base and
TaskEvent registries and ran parse_registries.py.
Tested: Built and validator passes. See new registries:
curl -k https://$bmc/redfish/v1/Registries/Base
{
"@odata.id": "/redfish/v1/Registries/Base",
"@odata.type": "#MessageRegistryFile.v1_1_0.MessageRegistryFile",
"Description": "DMTF Base Message Registry File Location",
"Id": "Base",
"Languages": [
"en"
],
"Languages@odata.count": 1,
"Location": [
{
"Language": "en",
"PublicationUri": "https://redfish.dmtf.org/registries/Base.1.8.1.json",
"Uri": "/redfish/v1/Registries/Base/Base"
}
],
...
curl -k https://$bmc/redfish/v1/Registries/Base/Base
{
"@Redfish.Copyright": "Copyright 2014-2020 DMTF. All rights reserved.",
"@odata.type": "#MessageRegistry.v1_4_0.MessageRegistry",
"Description": "This registry defines the base messages for Redfish",
"Id": "Base.1.8.1",
"Language": "en",
"Messages": {
"AccessDenied": {
"Description": "Indicates that while attempting to access, connect to or transfer to/from another resource, the service denied access.",
"Message": "While attempting to establish a connection to %1, the service denied access.",
"MessageSeverity": "Critical",
"NumberOfArgs": 1,
"ParamTypes": [
"string"
],
"Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.",
"
...
Change-Id: I6495af0e02036ea527036d942d6b6b5f55178bb2
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Moving to clang-format-10 causes no changes to the registry files.
Tested: Ran parse_registries.py
Change-Id: Iac80c5ca784a08eecc206ed302b33b2d96caa7f6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Point update_schemas.py at 2020.2 and run the script.
An overview of 2020.2 can be found at:
https://www.dmtf.org/sites/default/files/Redfish_Release_2020.2_Overview.pdf
Tested: Loaded on a Witherspoon and ran the validator.
See the new schemas.
Change-Id: Idb6cbc58efe484dcffa0cc22deff3a4746af67ed
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
This commit defines the OemSession schema for storing
- the clients unique identifier
- the IP Address from where the session is created.
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>
Change-Id: I759cda25dbb2dadd9b3d14cca9076e6412b41287
|
|
Implemented Oem schemas for extending LogService and
LogEntry
Testing:
redfish validator passed.
Change-Id: I89a76cf3bd991b36a6aa48871f25d03fbbe30f66
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
|
|
Make changes to update_schemas.py needed for the move and run
update_schemas.py.
Need 1.3.6 or later version of Redfish-Service-Validator.
CI uses the master branch of Redfish-Service-Validator, which has
this fix.
Redfish-Service-Validators before 1.3.6 will incorrectly throw errors in
message registries like (Task Event Message Registry)
/redfish/v1/Registries/TaskEvent/TaskEvent and (Base Message Registry)
/redfish/v1/Registries/Base/Base.
For more information:
https://redfishforum.com/thread/323/validator-errors-when-moving-release
This does introduce some "warnDeprecated" due to "Severity" becoming
Deprecated in MessageRegistry v1_4_0. Since all bmcweb Registries are
<v1_4_0, not a real problem. Redfish has no Base Message Registry and
Task Event Message Registry available to move to something that
uses MessageRegistry v1_4_0. Will take up with Redfish.
2020.1 includes new features like AutoRebot (Boot -> AutomaticRetry),
factory reset (ResetToDefaults action), and Modified Event Log property
which are in OpenBMC's D-Bus interfaces today.
Tested: Built bmcweb, loaded on a Witherspoon, and ran
the validator. Validator passed.
See new schemas:
curl -k https://${bmc}/redfish/v1/JsonSchemas/SecureBootDatabase
{
"@odata.context": "/redfish/v1/$metadata#JsonSchemaFile.JsonSchemaFile",
"@odata.id": "/redfish/v1/JsonSchemas/SecureBootDatabase",
"@odata.type": "#JsonSchemaFile.v1_0_2.JsonSchemaFile",
"Name": "SecureBootDatabase Schema File",
Change-Id: If30fcc50276aea44d8a77ed547ee0cbd72e4cf1a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
This updates the parse registries script and
adds the task registry to be used by task service.
This templates the original Base Registry so it
can be reused for all registries.
Tested: script works, validator passes
Change-Id: Id1cf3a41fb76ccaadace114725480f410bfba3e8
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
This removes a couple extraneous periods from the header and
updates the std::array notation with the type and size so it
will build correctly.
Tested:
Ran the script and it produced the same output as the current
base message registry header file.
Change-Id: I19908a6a5fbbafbfe84a6f8364b175bfc470d715
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
Make changes to update_schemas.py needed for the move and run
update_schemas.py.
To see an overview of 2019.4 see
https://www.dmtf.org/sites/default/files/Redfish_Release_2019.4_Overview.pdf
Tested: Built bmcweb, loaded on a Witherspoon, and ran
the validator. No errors.
See new schemas:
curl -k https://${bmc}/redfish/v1/JsonSchemas/VCATEntry
{
"@odata.context": "/redfish/v1/$metadata#JsonSchemaFile.JsonSchemaFile",
"@odata.id": "/redfish/v1/JsonSchemas/VCATEntry",
"@odata.type": "#JsonSchemaFile.v1_0_2.JsonSchemaFile",
"Name": "VCATEntry Schema File",
"Schema": "#VCATEntry.VCATEntry",
Change-Id: I5ae6e3c655e44c82c4457515555bdb934dfb7763
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Make changes to update_schemas.py needed for the move and run
update_schemas.py.
old path (2019.2)
DSP8010_2019.2/DSP8010_2019.2/json-schema/MemoryMetrics.v1_1_2.json
DSP8010_2019.2/DSP8010_2019.2/openapi/Memory.v1_0_3.yaml
DSP8010_2019.2/DSP8010_2019.2/csdl/AccelerationFunction_v1.xml
new path (2019.3)
DSP8010_2019.3/csdl/Memory_v1.xml
DSP8010_2019.3/json-schema/UpdateService.v1_1_2.json
DSP8010_2019.3/openapi/Zone.v1_3_1.yaml
To see an overview of 2019.3 see
https://www.dmtf.org/sites/default/files/Redfish_Release_2019.3_Overview.pdf
Tested: Built bmcweb, loaded on a Witherspoon, and ran
the validator. No errors.
Change-Id: I0deaf88b884d65fffa31fcf66183ed61a930a073
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Several Oem schemas have been added but the update_schemas.py
has not been updated. Added them to the update_schemas.py so
the static/redfish/v1/$metadata/index.xml is correctly
built by update_schemas.py.
This is needed to move us to 2019.3 and eventually 2019.4.
Ideally, we would not just have a bunch of
metadata_index.write to write the Oem schemas to
$metadata/index.xml but this will do for now.
https://github.com/openbmc/bmcweb/issues/32
is to improve this.
Tested: Ran update_schemas.py and loaded that image on a
Witherspoon and ran the validator. No errors.
Change-Id: Iade028e690c31e25a72503d9352bc75eb7ee58dc
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
Note, the DMTF changed the format of the schema file pack yet again, so
the script changes now to compensate for that.
Tested:
Ran schema validator. One unrelated failure in LogEntry, and 4 new
warnings in PCIe devices (we're using a deprecated property). All other
endpoints pass.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I81c030a7c5a6a32cc12a5e7e02a9441b7891bc5d
|
|
using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems like a good place to start, and would improve things a bit
type-wise. This patchset attempts to correct all the issues in one
shot.
Tested:
It builds. Will test various subsystems that have been touched
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
|
|
This commit reworks the websocket test script to be more usable without
editing it. Namely it:
1. Moves the script to the websockets library, as it seems to be in more
use
2. Implements an argument parser, so the script doesn't require
modification of host and username/password variables to use.
3. Moves to basic auth, which doesn't require a secondary login
4. implements better parsing of the result rather than simply printing
the json scructure directly.
Tested:
Ran ./websocket_test.py --host <myhostname>
Observed streaming sensor values in the form:
System_Airflow 72.00 CFM
Fan_1 6153.00 RPM
System_Airflow 72.22 CFM
Fan_6 6048.00 RPM
System_Airflow 72.24 CFM
Baseboard_12Volt 12.21 Volts
P105_PCH_AUX 1.05 Volts
PSU1_Input_Power 94.62 Watts
PSU2_Output_Current 6.72 Amps
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I617f73a5b70f61a391e9c61638f0bcf4437bf6ce
|
|
The validator gives warnings like:
URI acquired ends in slash: /redfish/v1/JsonSchemas/Zone
These warnings don't actually result in warnings, because the trailing
slash has always been a question in the spec, but we might as well do it
correctly, even if most of the tools don't take an issue with it.
Tested:
Ran service validator, saw no new failures, and observed no errors
mentioned above.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I184422d7a14838339253c945d7a0c91878093e17
|
|
This extends the Message Registry parsing to include header
details that are part of the redfish resource.
Tested:
Verified that the MessageRegistry info all returns correctly
in the redfish response.
Change-Id: I6179c07f4067cd4520fce3e774d18530fede0a95
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
This change removes the static Base Message Registry file and
replaces it with a compile-time structure.
A script is used to pull the Base Message Registry file from
the DMTF and parse it into the .hpp structure.
Tested:
Verified that after running the script, I can get the same
Redfish data back from the existing endpoints without using
the static files.
Change-Id: Ide3c61ecff62801c06619d5c3edc2229c945d8e7
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
Change-Id: I763534d54b7630aec30883d04e02b4f478c10ab4
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
Change-Id: I993ae392d87a19acd51fe093f8244a9c781dd339
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
Redfish schema 2018.3 was released on January 11th, 2019. While there
aren't any plans to utilize any of the new services, it makes sense to
keep up to date with the latest static data.
This commit was largely done automatically using the update_schemas.py
script.
Change-Id: I74c6fac08d21629ca976ff8694fce011b5247e34
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
Redfish schema 2018.2 was released on September 20th, 2018. While there
aren't any plans to utilize any of the new services, it makes sense to
keep up to date with the latest static data.
This commit was largely done automatically using the update_schemas.py
script.
Change-Id: Ieaa9f1ab2a47244ef201cfe9a064744d7d156745
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
Don't delete Oem json and xml files.
Change-Id: I2e4e2a49c776442c5d5e9d85400d3f6dba1f1d5a
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
JsonSchema was throwing errors in the validator, so implement changes to
the update script to add the appropiate indexes.
Tested by:
Schema validator passes on the JsonSchema Fields
Change-Id: I6cb2737901b55c1089aef744d3ce3c3dfe13f17f
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
This patchset implements JsonSchema support, and automates our update
of the XML metadata, and Json schema files in the future by way of a
python script.
Change-Id: Iec6f580d10736678149db18d87be2f140b535be9
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
This patchset makes the dbus monitor compatible with the upstream dbus
monitor, which should help adoption.
Performance seems greatly improved compared to the python
implementation. The example given in the documentation of watching for
sensors and state changes is checked in as a test script
websocket_test.py, and seems to consume less of the CPU than the actual
sensors that get produced (about 4% CPU on my ast2500) when producing 30
sensor updates per second. This can likely be improved in the future by
batching change events, but it seems to be performant enough for the
moment.
Tested: Used test script checked in, and verified webui can register
state change events properly.
Change-Id: I7d4c61d0259b7773eb46df0f59f8fea1c7796450
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
Latest version of vscode CMake plugin does this automatically, so this
script has no reason to exist anymore.
Change-Id: I917822c4359b85bd7afca610b25145377a07606b
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
|
|
And use external project instead. This should make it easier to keep
our systems up to date with yocto.
Change-Id: Id2c9f3e474eebf2194eaf58b0c572f7a1421def6
|
|
Do not merge yet
Change-Id: I38c56844c1b0e3e8e5493c2705e62e6db7ee2102
|
|
|
|
|
|
|
|
|
|
|