History log of /openbmc/bmcweb/features/redfish/lib/network_protocol.hpp (Results 76 – 100 of 123)
Revision Date Author Comments
# 7e860f15 08-Apr-2021 John Edward Broadbent <jebr@google.com>

Remove Redfish Node class

Reduces the total number of lines and will allow for easier testing of
the redfish responses.

A main purpose of the node class was to set app.routeDynamic(). However
now a

Remove Redfish Node class

Reduces the total number of lines and will allow for easier testing of
the redfish responses.

A main purpose of the node class was to set app.routeDynamic(). However
now app.routeDynamic can handle the complexity that was once in critical
to node. The macro app.routeDynamic() provides a shorter cleaner
interface to the unerlying app.routeDyanic call. The old pattern set
permissions for 6 interfaces (get, head, patch, put, delete_, and post)
even if only one interface is created. That pattern creates unneeded
code that can be safely removed with no effect.
Unit test for the responses would have to mock the node the class in
order to fully test responses.

see https://github.com/openbmc/bmcweb/issues/181

The following files still need node to be extracted.

virtual_media.hpp
account_service.hpp
redfish_sessions.hpp
ethernet.hpp

The files above use a pattern that is not trivial to address. Often their
responses call an async lambda capturing the inherited class. ie
(https://github.com/openbmc/bmcweb/blob/ffed87b5ad1797ca966d030e7f979770
28d258fa/redfish-core/lib/account_service.hpp#L1393)
At a later point I plan to remove node from the files above.

Tested:
I ran the docker unit test with the following command.
WORKSPACE=$(pwd) UNIT_TEST_PKG=bmcweb
./openbmc-build-scripts/run-unit-test-docker.sh

I ran the validator and this change did not create any issues.
python3 RedfishServiceValidator.py -c config.ini

Signed-off-by: John Edward Broadbent <jebr@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I147a0289c52cb4198345b1ad9bfe6fdddf57f3df

show more ...


# 8d1b46d7 31-Mar-2021 zhanghch05 <zhanghch05@inspur.com>

Using AsyncResp everywhere

Get the core using AsyncResp everywhere, and not have each individual handler
creating its own object.We can call app.handle() without fear of the response
getting ended a

Using AsyncResp everywhere

Get the core using AsyncResp everywhere, and not have each individual handler
creating its own object.We can call app.handle() without fear of the response
getting ended after the first tree is done populating.
Don't use res.end() anymore.

Tested:
1. Validator passed.

Signed-off-by: zhanghaicheng <zhanghch05@inspur.com>
Change-Id: I867367ce4a0caf8c4b3f4e07e06c11feed0782e8

show more ...


# 2db77d34 20-Nov-2020 Johnathan Mantey <johnathanx.mantey@intel.com>

Force HostName property to be read-only per the schema

The ManagerNetworkProtocol schema defines the HostName entry to be
read-only. Change the doPatch code to prevent updating the hostname
attribut

Force HostName property to be read-only per the schema

The ManagerNetworkProtocol schema defines the HostName entry to be
read-only. Change the doPatch code to prevent updating the hostname
attribute.

The DMTF redfish/v1/Managers/bmc/NetworkProtocol is a read-only
location.

The DMTF approved location for changing the HostName is:
redfish/v1/Managers/bmc/EthernetInterfaces/<str>

This change does not impact phosphor-webui, as it uses D-Bus to
perform all of its work.
This change does not impact webui-vue, as it is using the DMTF
approved API.

This commit deprecates allowing Read/Write access to the Hostname in
the ManagersNetworkProtocol URI. To reduce the impact to Redfish
clients that rely upon Read/Write access a Meson compile time flag has
been added to allow Read/Write access to be restored. The Meson build
flag, redfish-allow-deprecated-hostname-patch, can be enabled to
restore Read/Write access. The Meson build flag is slated to be
removed in Q4 2021 enforcing the read-only state.

Tested:
Explicitly PATCH'd HostName to confirm it cannot be modified.
Enabled the HostName feature, and confirmed the HostName accepted a
PATCH command.
Ran Redfish_Service_Validator (deprecated, and re-enabled).

Change-Id: If7f2148d8bbb8a7b420c4abde086272c4320977a
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...


# b0972a63 18-Jul-2020 Ed Tanous <ed@tanous.net>

Move network protocol to a constexpr struct

Another clang-tidy warning about global construction of things that
could throw. Considering we don't actually use this as a map anywhere,
move to a cons

Move network protocol to a constexpr struct

Another clang-tidy warning about global construction of things that
could throw. Considering we don't actually use this as a map anywhere,
move to a constexpr array of values.

Tested: Clang-tidy now passes cert-* check.

curl --insecure --user root:0penBmc https://192.168.7.2/redfish/v1/Managers/bmc/NetworkProtocol
{
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol",
"@odata.type": "#ManagerNetworkProtocol.v1_5_0.ManagerNetworkProtocol",
"Description": "Manager Network Service",
"FQDN": "qemux86",
"HTTP": {
"Port": 0,
"ProtocolEnabled": false
},
"HTTPS": {
"Certificates": {
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates"
},
"Port": 443,
"ProtocolEnabled": true
},
"HostName": "qemux86",
"IPMI": {
"Port": null,
"ProtocolEnabled": false
},
"Id": "NetworkProtocol",
"NTP": {
"NTPServers": [],
"ProtocolEnabled": true
},
"Name": "Manager Network Protocol",
"SSH": {
"Port": 22,
"ProtocolEnabled": true
},
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
}%

Change-Id: I2bdae321fc1cbb418ed302453ec6109ee2ed32c1
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 81ce609e 17-Dec-2020 Ed Tanous <ed@tanous.net>

Fix .clang-tidy

camelLower is not a type, camelBack is.

Changes were made automatically with clang-tidy --fix-errors

To be able to apply changes automatically, the only way I've found that
works w

Fix .clang-tidy

camelLower is not a type, camelBack is.

Changes were made automatically with clang-tidy --fix-errors

To be able to apply changes automatically, the only way I've found that
works was to build the version of clang/clang-tidy that yocto has, and
run the fix script within bitbake -c devshell bmcweb. Unfortunately,
yocto has clang-tidy 11, which can apparently find a couple extra errors
in tests we already had enabled. As such, a couple of those are also
included.

Tested:
Ran clang-tidy-11 and got a clean result.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9d1080b67f0342229c2f267160849445c065ca51

show more ...


# f23b7296 15-Oct-2020 Ed Tanous <ed@tanous.net>

Turn on ALL perf checks

1st, alphabetize the tidy-list for good housekeeping.

Next, enable all the clang-tidy performance checks, and resolve all the
issues. most of the issues boil down to:
1. Us

Turn on ALL perf checks

1st, alphabetize the tidy-list for good housekeeping.

Next, enable all the clang-tidy performance checks, and resolve all the
issues. most of the issues boil down to:
1. Using std::move on const variables. This does nothing.
2. Passing big variables (like std::string) by value.
3. Using double quotes on a find call, which constructs an intermediate
string, rather than using the character overload.

Tested
Loaded on system, logged in successfully and pulled down webui-vue. No
new errors.

Walked the Redfish tree a bit, and observed no new problems.

Ran redfish service validator. Got no new failures (although there are
a lot of log service deprecation warnings that we should look at).

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I2238958c4b22c1e554e09a0a1787c744bdbca43e

show more ...


# 3174e4df 07-Oct-2020 Ed Tanous <ed@tanous.net>

Write the clang-tidy file OpenBMC needs

Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.

This incl

Write the clang-tidy file OpenBMC needs

Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.

This includes bringing a bunch of the code up to par with the checks
that require. Most of them fall into the category of extraneous else
statements, const correctness problems, or extra copies.

Tested:
CI only. Unit tests pass.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912

show more ...


# 2c70f800 28-Sep-2020 Ed Tanous <ed@tanous.net>

Fix naming conventions

Lots of code has been checked in that doesn't match the naming
conventions. Lets fix that.

Tested:
Code compiles. Variable/function renames only.

Signed-off-by: Ed Tanous

Fix naming conventions

Lots of code has been checked in that doesn't match the naming
conventions. Lets fix that.

Tested:
Code compiles. Variable/function renames only.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I6bd107811d0b724f1fad990016113cdf035b604b

show more ...


# 7c486a18 27-Jun-2020 Xiaochao Ma <maxiaochao@inspur.com>

Fix the snmp parameter in NetworkProtocol

This should be the configuration information of snmpagent. Now
we have "snmp trap" functionality in openbmc,we don't have SNMP
agent functionality. So the p

Fix the snmp parameter in NetworkProtocol

This should be the configuration information of snmpagent. Now
we have "snmp trap" functionality in openbmc,we don't have SNMP
agent functionality. So the parameters belonging to the agent
such as port are removed here.

Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com>
Change-Id: I2d684b63d79ac1dc00bce0d2e0bd48e5a315f258

show more ...


# cb13a392 25-Jul-2020 Ed Tanous <ed@tanous.net>

Enable unused variable warnings and resolve

This commit enables the "unused variables" warning in clang. Throughout
this, it did point out several issues that would've been functional
bugs, so I th

Enable unused variable warnings and resolve

This commit enables the "unused variables" warning in clang. Throughout
this, it did point out several issues that would've been functional
bugs, so I think it was worthwhile. It also cleaned up several unused
variable from old constructs that no longer exist.

Tested:
Built with clang. Code no longer emits warnings.

Downloaded bmcweb to system and pulled up the webui, observed webui
loads and logs in properly.

Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 23a21a1c 24-Jul-2020 Ed Tanous <ed@tanous.net>

Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found. Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variabl

Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found. Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variables

unused parameter warnings were resolved by either checking error codes
that had been ignored, or removing the name of the variable from the
scope.

Other various warnings were fixed in the best way I was able to come up
with.

Note, the redfish Node class is especially insidious, as it causes all
imlementers to have variables for parameters, regardless of whether or
not they are used. Deprecating the Node class is on my list of things
to do, as it adds extra overhead, and in general isn't a useful
abstraction. For now, I have simply fixed all the handlers.

Tested:
Added the current meta-clang meta layer into bblayers.conf, and added
TOOLCHAIN_pn-bmcweb = "clang" to my local.conf

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ia75b94010359170159c703e535d1c1af182fe700

show more ...


# 52cc112d 18-Jul-2020 Ed Tanous <ed@tanous.net>

Remove middlewares

Middlewares, while kinda cool from an academic standpoint, make our
build times even worse than they already are. Given that we only really
use 1 real middleware today (token aut

Remove middlewares

Middlewares, while kinda cool from an academic standpoint, make our
build times even worse than they already are. Given that we only really
use 1 real middleware today (token auth) and it needs to move into the
parser mode anyway (for security limiting buffer sizes), we might as well
use this as an opportunity to delete some code.

Some other things that happen:
1. Persistent data now moves out of the crow namespace
2. App is no longer a template
3. All request_routes implementations no longer become templates. This
should be a decent (unmeasured) win on compile times.

This commit was part of a commit previously called "various cleanups".
This separates ONLY the middleware deletion part of that.

Note, this also deletes about 400 lines of hard to understand code.

Change-Id: I4c19e25491a153a2aa2e4ef46fc797bcb5b3581a
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 0870f8c7 23-Jun-2020 Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>

network_protocol: Fix for SSH port

Issue: As per the OCP Redfish Profile v1.0 specification, SSH read only
parameter. By default SSH is disable, but ProtocolEnabled and Port
attributes are mandatory

network_protocol: Fix for SSH port

Issue: As per the OCP Redfish Profile v1.0 specification, SSH read only
parameter. By default SSH is disable, but ProtocolEnabled and Port
attributes are mandatory to display in Redfish. But Port property is not
displayed in Redfish URI.

Fix: As Port attribute is mandatory for SSH property, initialized with
null.

Tested:
1. Verified redfish validator passed
2. Verified details from Redfish
GET: https://<BMC-IP>/redfish/v1/Managers/bmc/NetworkProtocol
Before:
Response:
"SSH": {
"ProtocolEnabled": false
},

After:
"SSH": {
"Port": null,
"ProtocolEnabled": false
},

Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I203b321c3b41bab2017e7c6b5e55aa3463ea6e83

show more ...


# 67a78d87 19-May-2020 Tom Joseph <tomjoseph@in.ibm.com>

ipmi: Enable/Disable IPMI-over-LAN

This patch adds support for enabling and disabling IPMI-over-LAN using
Redfish API. If there are multiple instances of phosphor-ipmi-net
service, then the PATCH ac

ipmi: Enable/Disable IPMI-over-LAN

This patch adds support for enabling and disabling IPMI-over-LAN using
Redfish API. If there are multiple instances of phosphor-ipmi-net
service, then the PATCH action applies to all the instances. This patch
does not add support for configuring the port of IPMI-over-LAN.

Tested:

1) Ran the Redfish Validator.
2) Disabled IPMI-over-LAN from Redfish and verified network IPMI
stopped and verified ProtocolEnabled is false for IPMI.
3) Enabled IPMI-over-LAN from Redfish and verified network IPMI is
running and verified ProtocolEnabled is true for IPMI.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: Ie9b00c8195bbfea14a69cbe9a73492187e6b4e1c

show more ...


# 1214b7e7 04-Jun-2020 Gunnar Mills <gmills@us.ibm.com>

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Other OpenBMC repos are doing the same.

Tested: Built and validator passed.
Change-Id: Ief26c755c9ce

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Other OpenBMC repos are doing the same.

Tested: Built and validator passed.
Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# dc3fbbd0 22-May-2020 Tony Lee <tony.lee@quantatw.com>

Fix duplicate NTP servers patch

Duplicate NTP servers value should not be patch.

Tested:
1. Patch duplicate NTP servers
curl -k -H "X-Auth-Token: $bmc_token" -XPATCH https://${bmc}/redfish/v1/Manag

Fix duplicate NTP servers patch

Duplicate NTP servers value should not be patch.

Tested:
1. Patch duplicate NTP servers
curl -k -H "X-Auth-Token: $bmc_token" -XPATCH https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol -d '{"NTP":{"NTPServers":["9.9.9.9","9.9.9.9","1.1.1.1","9.9.9.9"]}}'

2. GET NTP servers information
curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol
{
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol",
"@odata.type": "#ManagerNetworkProtocol.v1_5_0.ManagerNetworkProtocol",
"Description": "Manager Network Service",
"FQDN": "",
"HTTP": {
"Port": 0,
"ProtocolEnabled": false
},
"HTTPS": {
"Certificates": {
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates"
},
"Port": 443,
"ProtocolEnabled": true
},
"HostName": "",
"IPMI": {
"Port": 623,
"ProtocolEnabled": true
},
"Id": "NetworkProtocol",
"NTP": {
"NTPServers": [
"1.1.1.1",
"9.9.9.9"
],
"ProtocolEnabled": false
},

Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Change-Id: Idb63cf5e28d36a5df1aae9b0a7d53a1b7a9c8d91

show more ...


# 8d78b7a9 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I86e11299512704fa1df1e5f6517ea25cc6eced8f


# 61932318 22-Mar-2020 Xiaochao Ma <maxiaochao@inspur.com>

BMCWeb: Add SNMPinfo in redfish-NetworkProtocol

Add SNMP infomation in NetworkProtocol, contains version information, etc.

Teseted:
Tested on fp5280g2 (meta-inspur/meta-fp5280g2).
Currently only th

BMCWeb: Add SNMPinfo in redfish-NetworkProtocol

Add SNMP infomation in NetworkProtocol, contains version information, etc.

Teseted:
Tested on fp5280g2 (meta-inspur/meta-fp5280g2).
Currently only the SNMPv2 version is supported in the community,
so only v2 is set to true.
Ran Redfish validator successfully.

Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com>
Change-Id: I983add2e24f16ea362d413a4fd3577ccfc2911d2

show more ...


# 7af91514 14-Apr-2020 Gunnar Mills <gmills@us.ibm.com>

Redfish: Allow slash at the end of Resource

This is defined in the Redfish protocol.
Easiest way to allow this is to end the Node URL with "/", which most
Nodes in bmcweb already had.

Before:
curl

Redfish: Allow slash at the end of Resource

This is defined in the Redfish protocol.
Easiest way to allow this is to end the Node URL with "/", which most
Nodes in bmcweb already had.

Before:
curl -k https://${bmc}/redfish/v1/TaskService/
Not Found

After both /redfish/v1/TaskService/ and /redfish/v1/TaskService
return the Task Service.

Tested:
Validator passed.

Change-Id: Ic806dc5c91f631b87642e49b486a6b6da7fdf955
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 818ea7b8 11-Mar-2020 Joshi-Mansi <mansi.joshi@linux.intel.com>

[Redfish-Net Protocol] Making HTTP OCP Compliant

Making HTTP protocolEnabled as false in Manager Network Protocol Schema
to make it OCP compliant and security-wise compliant as it is not
recommended

[Redfish-Net Protocol] Making HTTP OCP Compliant

Making HTTP protocolEnabled as false in Manager Network Protocol Schema
to make it OCP compliant and security-wise compliant as it is not
recommended to use from security perspective.

Tested:
1. Tested using GET:
- https://bmc-ip/redfish/v1/Managers/bmc/NetworkProtocol
"HTTP": {
"Port": 0,
"ProtocolEnabled": false
}

2. Ran the Redfish validator and no new issues found.

Signed-off-by: Joshi-Mansi <mansi.joshi@linux.intel.com>
Change-Id: I5af368f4c87665ab827d99336aebf64bc351c4d1

show more ...


# a33a7e0e 19-Feb-2020 Gunnar Mills <gmills@us.ibm.com>

Network protocol: Remove odata.context

Redfish made odata.context optional (1.6.0 of DSP0266) and
has removed odata.context from example payloads in the
specification (1.7.0 of DSP0266), removed it

Network protocol: Remove odata.context

Redfish made odata.context optional (1.6.0 of DSP0266) and
has removed odata.context from example payloads in the
specification (1.7.0 of DSP0266), removed it from the mockups,
and Redfish recommended not using.

Change-Id: I1c4db167ba90f46e2b0ab1c1973d3323e233322a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# ec4974dd 05-Nov-2019 AppaRao Puli <apparao.puli@linux.intel.com>

Update NetworkProtocol services

Updated the NetworkProtocol GET method code
to lookup the service names and socket paths
directly fetched from System control ListenSockets.

Tested:
- Performed GET

Update NetworkProtocol services

Updated the NetworkProtocol GET method code
to lookup the service names and socket paths
directly fetched from System control ListenSockets.

Tested:
- Performed GET on NetworkProtocol URI and validated
all responses.
- Stopped services(ssh) and validated Enabled status.
- Successfully ran Redfish validator without any issues.
URI: /redfish/v1/Managers/bmc/NetworkProtocol
Response:
............
"IPMI": {
"Port": 623,
"ProtocolEnabled": true
},
"HTTPS": {
.....
"Port": 443,
"ProtocolEnabled": true
},
"SSH": {
"Port": 22,
"ProtocolEnabled": true
},
..........

Change-Id: I047910d3e6430a2779b3803a0f1e836104e2bda3
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# 659dd62e 14-Oct-2019 Jason M. Bills <jason.m.bills@linux.intel.com>

Fix Redfish validator warning

Trailing slash warnings now show up in the validator report, so
fix this one.

Tested:
Passed the Redfish Service Validator.

Change-Id: I8db7eb488b44eba9510ae4e1071b2d

Fix Redfish validator warning

Trailing slash warnings now show up in the validator report, so
fix this one.

Tested:
Passed the Redfish Service Validator.

Change-Id: I8db7eb488b44eba9510ae4e1071b2da15eaa22c1
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...


# 271584ab 09-Jul-2019 Ed Tanous <ed.tanous@intel.com>

Fix a bunch of warnings

using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100

Seems lik

Fix a bunch of warnings

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

show more ...


# 749dad7d 03-Oct-2019 Ratan Gupta <ratagupt@linux.vnet.ibm.com>

Fix crash during GET of manager network protocol

If the ethernet interface is having the domain
name entry then Redfish GET request on network
manager protocol was crashing the bmcweb.

This commit

Fix crash during GET of manager network protocol

If the ethernet interface is having the domain
name entry then Redfish GET request on network
manager protocol was crashing the bmcweb.

This commit fixes this behaviour.

Tested By:
Configure the Domain Name and run the GET request
on the network protocol: PASS

GET request on the network protocol even the
domain name was not configured : PASS

Redfish Validator: PASS

Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Change-Id: I1e6cd6e3fe507ff375463ece1f6f10bae4d4fb6a

show more ...


12345