History log of /openbmc/bmcweb/features/redfish/lib/ethernet.hpp (Results 51 – 75 of 207)
Revision Date Author Comments
# 9cfcad2d 22-Feb-2023 Jiaqing Zhao <jiaqing.zhao@intel.com>

Remove usage of deprecated VLanNetworkInterface

In Redfish Schema (DSP2046) 2022.3 introduces EthernetInterface 1.9.0
that allows creating VLAN interface by POST EthernetInterface [1]
instead of usi

Remove usage of deprecated VLanNetworkInterface

In Redfish Schema (DSP2046) 2022.3 introduces EthernetInterface 1.9.0
that allows creating VLAN interface by POST EthernetInterface [1]
instead of using the deprecated VLanNetworkInterface. This patch
removes all current usage of VLanNetworkInterface.

This patchest (topic:redfish-ethernet-1.9) introduces breaking API
changes to current VLAN management features. All deprecated VLAN APIs
are removed, VLAN interfaces will be managed in the same way as the
EthernetInterface Resource, except they can be created or deleted.
Since webui-vue has not implemented anything related to VLAN yet, it
is not impacted.

Solves the issue mentioned in 188cb6294105 ("ethernet: Bump
EthernetInterface schema 1.4.1 -> 1.6.0")

[1] https://redfishforum.com/thread/619

Tested:
Redfish validator passed on a board with VLAN interface. No VLAN
interface is exposed in Redfish.

Change-Id: I9b243a5bb0f07642aa60bc13a622e862f62ee871
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# 13451e39 24-May-2023 Willy Tu <wltu@google.com>

health: Add option to disable health-populate

The Health populate calls GetManagedObjects at `/` which can take a lot
of time. Add the option to disable to improve performance if it is not
needed.

health: Add option to disable health-populate

The Health populate calls GetManagedObjects at `/` which can take a lot
of time. Add the option to disable to improve performance if it is not
needed.

Tested:
```
$ meson build -Dhealth-populate=disabled
...
User defined options
backend : ninja
health-populate : disabled
```

Build passed.

Health Status removed. Some resource still create HealthPopulate, but
does not populate. It will require further refactoring to clean it out.

Testing on `/redfish/v1/Chassis?$expand=.($levels=1)`

On 14 chassis, from about 2.5 seconds to 400 ms. :)

Before:
```
Getting times for chassis
Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1)
Line count: 980
17:05:56: real 0m2.908s user 0m0.000s sys 0m0.030s
17:05:59: real 0m2.414s user 0m0.010s sys 0m0.010s
17:05:03: real 0m3.410s user 0m0.000s sys 0m0.020s
17:05:09: real 0m2.372s user 0m0.000s sys 0m0.010s
17:05:13: real 0m3.407s user 0m0.010s sys 0m0.000s
17:05:19: real 0m2.420s user 0m0.010s sys 0m0.000s
17:05:23: real 0m3.463s user 0m0.010s sys 0m0.000s
17:05:29: real 0m2.414s user 0m0.000s sys 0m0.010s
17:05:33: real 0m2.843s user 0m0.010s sys 0m0.010s
17:05:38: real 0m2.512s user 0m0.000s sys 0m0.020s
17:05:42: real 0m2.474s user 0m0.000s sys 0m0.010s
17:05:47: real 0m2.557s user 0m0.010s sys 0m0.010s
17:05:52: real 0m2.439s user 0m0.020s sys 0m0.000s
17:05:56: real 0m3.127s user 0m0.010s sys 0m0.000s
17:05:01: real 0m2.563s user 0m0.020s sys 0m0.000s
17:05:06: real 0m2.392s user 0m0.020s sys 0m0.020s
17:05:10: real 0m2.405s user 0m0.020s sys 0m0.000s
17:05:15: real 0m2.514s user 0m0.010s sys 0m0.010s
17:05:19: real 0m2.809s user 0m0.020s sys 0m0.010s
17:05:24: real 0m2.944s user 0m0.010s sys 0m0.010s
17:05:29: real 0m2.537s user 0m0.010s sys 0m0.000s
17:05:34: real 0m3.290s user 0m0.000s sys 0m0.000s
17:05:39: real 0m2.601s user 0m0.040s sys 0m0.000s
17:05:43: real 0m2.398s user 0m0.010s sys 0m0.040s
17:05:48: real 0m2.664s user 0m0.000s sys 0m0.020s
17:05:53: real 0m2.323s user 0m0.010s sys 0m0.000s
17:05:57: real 0m3.033s user 0m0.000s sys 0m0.010s
17:05:02: real 0m3.243s user 0m0.000s sys 0m0.010s
17:05:07: real 0m2.604s user 0m0.010s sys 0m0.010s
17:05:12: real 0m2.813s user 0m0.010s sys 0m0.010s
17:05:17: real 0m2.325s user 0m0.020s sys 0m0.000s
17:05:21: real 0m2.577s user 0m0.010s sys 0m0.000s
17:05:26: real 0m2.882s user 0m0.030s sys 0m0.000s
17:05:31: real 0m2.572s user 0m0.000s sys 0m0.020s
17:05:35: real 0m2.678s user 0m0.010s sys 0m0.010s
17:05:40: real 0m2.656s user 0m0.010s sys 0m0.010s
17:05:45: real 0m2.921s user 0m0.020s sys 0m0.000s
17:05:49: real 0m2.723s user 0m0.000s sys 0m0.020s
17:05:54: real 0m2.910s user 0m0.010s sys 0m0.010s
17:05:59: real 0m2.601s user 0m0.020s sys 0m0.000s
17:05:04: real 0m2.615s user 0m0.000s sys 0m0.000s
```

After:
```
Getting times for chassis
Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1)
Line count: 980
16:04:43: real 0m0.188s user 0m0.020s sys 0m0.000s
16:04:43: real 0m0.195s user 0m0.010s sys 0m0.000s
16:04:45: real 0m0.219s user 0m0.010s sys 0m0.000s
16:04:48: real 0m0.226s user 0m0.020s sys 0m0.000s
16:04:50: real 0m0.208s user 0m0.020s sys 0m0.010s
16:04:52: real 0m0.226s user 0m0.010s sys 0m0.010s
16:04:54: real 0m0.419s user 0m0.000s sys 0m0.010s
16:04:57: real 0m0.222s user 0m0.010s sys 0m0.020s
16:04:59: real 0m0.194s user 0m0.000s sys 0m0.010s
16:04:01: real 0m0.191s user 0m0.010s sys 0m0.010s
16:04:04: real 0m0.276s user 0m0.010s sys 0m0.020s
16:04:06: real 0m0.183s user 0m0.020s sys 0m0.000s
16:04:08: real 0m0.193s user 0m0.040s sys 0m0.000s
16:04:10: real 0m0.406s user 0m0.020s sys 0m0.010s
16:04:13: real 0m0.317s user 0m0.000s sys 0m0.000s
16:04:15: real 0m0.442s user 0m0.005s sys 0m0.005s
16:04:18: real 0m0.226s user 0m0.010s sys 0m0.000s
16:04:20: real 0m0.217s user 0m0.020s sys 0m0.000s
16:04:22: real 0m0.200s user 0m0.010s sys 0m0.030s
16:04:24: real 0m0.423s user 0m0.010s sys 0m0.010s
16:04:27: real 0m0.203s user 0m0.020s sys 0m0.010s
16:04:29: real 0m0.433s user 0m0.000s sys 0m0.000s
16:04:31: real 0m0.318s user 0m0.020s sys 0m0.000s
16:04:34: real 0m1.206s user 0m0.000s sys 0m0.010s
16:04:37: real 0m0.403s user 0m0.000s sys 0m0.020s
16:04:39: real 0m0.353s user 0m0.010s sys 0m0.000s
16:04:42: real 0m0.291s user 0m0.000s sys 0m0.030s
16:04:44: real 0m0.742s user 0m0.020s sys 0m0.010s
16:04:47: real 0m0.369s user 0m0.010s sys 0m0.000s
16:04:49: real 0m0.215s user 0m0.020s sys 0m0.000s
16:04:52: real 0m0.204s user 0m0.000s sys 0m0.010s
16:04:54: real 0m0.418s user 0m0.000s sys 0m0.000s
16:04:56: real 0m0.215s user 0m0.000s sys 0m0.010s
16:04:58: real 0m0.202s user 0m0.010s sys 0m0.010s
16:04:01: real 0m0.202s user 0m0.010s sys 0m0.010s
16:04:03: real 0m0.212s user 0m0.010s sys 0m0.000s
16:04:05: real 0m0.694s user 0m0.010s sys 0m0.010s
16:04:08: real 0m0.201s user 0m0.010s sys 0m0.010s
16:04:10: real 0m0.230s user 0m0.000s sys 0m0.020s
16:04:12: real 0m0.206s user 0m0.010s sys 0m0.010s
16:04:15: real 0m0.446s user 0m0.010s sys 0m0.010s
```

Change-Id: I90b242e2cd24973420de871fedf9793dd1e310f3
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 4b242749 11-May-2023 Ed Tanous <edtanous@google.com>

Make all std::regex instances static

Per [1] we really shouldn't be using regex. In the cases we do, it's a
HUUUUUGE performance benefit to be compiling the regex ONCE.

The only downside is a slig

Make all std::regex instances static

Per [1] we really shouldn't be using regex. In the cases we do, it's a
HUUUUUGE performance benefit to be compiling the regex ONCE.

The only downside is a slight increase in memory usage.

[1]: https://github.com/openbmc/bmcweb/issues/176

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I8644b8a07810349fb60bfa0258a13e815912a38e

show more ...


# 2c5875a2 15-May-2023 Ed Tanous <edtanous@google.com>

Use human sort for EthernetInterfaces

Much like we've done for the other collections, we should be sorting
these such that humans can use them.

This commit reorders the EthernetInterfacesCollection

Use human sort for EthernetInterfaces

Much like we've done for the other collections, we should be sorting
these such that humans can use them.

This commit reorders the EthernetInterfacesCollection to report in
numerical order. In redfish, these collections are considered sets, so
therefore order is irrelevant to software, but keeping these things
useful for humans is important, therefore it's a pretty trivial change
to order them in a way that humans expect (1, 2, 3, etc).

Tested:
GET /redfish/v1/Managers/bmc/EthernetInterfaces

Returns interfaces in eth0 then eth1.

Redfish service validator passes.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic48f9be5366afee49fc9fec77a3bb194ab25577d

show more ...


# ddd70dca 01-Mar-2023 Ed Tanous <edtanous@google.com>

Use array

When passing arrays of json objects around, we should be using the
native nlohmann::json::array_t, rather than using an nlohmann::json, and
interpreting it as an array. This improves our

Use array

When passing arrays of json objects around, we should be using the
native nlohmann::json::array_t, rather than using an nlohmann::json, and
interpreting it as an array. This improves our type safety.

Tested:
EthernetInterfaces returns the same value as before. Redfish service
validator shows no new failures on those interfaces.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I609205832a6e99a23b4764be30045a456021fe44

show more ...


# 77179532 28-Feb-2023 Ed Tanous <edtanous@google.com>

Remove flat_set from EthernetInterfaces

None of these are actually used as a set, we should avoid taking the
overhead of using these as a set.

Tested in next commit.

Signed-off-by: Ed Tanous <edta

Remove flat_set from EthernetInterfaces

None of these are actually used as a set, we should avoid taking the
overhead of using these as a set.

Tested in next commit.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7a7f2c9761a2adc70f6c6ab127facc9d801a2209

show more ...


# ef4c65b7 24-Apr-2023 Ed Tanous <edtanous@google.com>

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows d

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows doing things like fragments in a single
line instead of multiple. We should prefer it in some cases.

Tested:
Redfish service validator passes.
Spot checks of URLs work as expected.
Unit tests pass.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia7b38f0a95771c862507e7d5b4aa68aa1c98403c

show more ...


# b2ba3072 12-May-2023 Patrick Williams <patrick@stwcx.xyz>

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

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

show more ...


# 89492a15 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

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

show more ...


# f8361275 16-Mar-2023 Sunitha Harish <sunithaharish04@gmail.com>

IPv6: Remove AddressState from redfish response.

Network backend does not return the AddressState and its currently displayed as null. This is misleading the user.

This commit removes this property

IPv6: Remove AddressState from redfish response.

Network backend does not return the AddressState and its currently displayed as null. This is misleading the user.

This commit removes this property until backend supports.

Tested by:
Verify ethernet interface does not return AddressState for IPv6

Change-Id: I5489f57ce3d50d1480033f27adf1bc95153fdd18
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com>

show more ...


# f5892d0d 28-Feb-2023 George Liu <liuxiwei@inspur.com>

Add the GetManagedObjects method to dbus_utility

There are currently many files that use the GetManagedObjects method.
Since they are a general method, they are defined in the
dbus_utility.hpp file

Add the GetManagedObjects method to dbus_utility

There are currently many files that use the GetManagedObjects method.
Since they are a general method, they are defined in the
dbus_utility.hpp file and refactors them.

Tested:
1. Built bmcweb successfully and Validator passes.
2. We got the same result as previously in the ethernet schema.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I0c25b7b6b9421bea46ff0afadbaa4783b704e664

show more ...


# 9c5e585c 26-Feb-2023 Ravi Teja <raviteja28031990@gmail.com>

Fix async_method_call object paths while updating/deleting IP address

This commit fixes IP address object paths in IP address patch/delete
functions as per new networkd d-bus object paths

Tested By

Fix async_method_call object paths while updating/deleting IP address

This commit fixes IP address object paths in IP address patch/delete
functions as per new networkd d-bus object paths

Tested By:
Delete IPv4/IPv6 IP addresses
PATCH IPv4/IPv6 IP addresses

Change-Id: Ia5a9db763a9ce7a2964f4e07cf8ecb85f04d374f
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 5e7e2dc5 16-Feb-2023 Ed Tanous <edtanous@google.com>

Take boost error_code by reference

By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a co

Take boost error_code by reference

By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a copy in some cases.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id42ea4a90b6685a84818b87d1506c11256b3b9ae

show more ...


# eddfc437 26-Sep-2022 Willy Tu <wltu@google.com>

Update most resources to use urlFromPieces

Only id in event_service and account_service have not been updated due
to the risk of it breaking the username/id. It will require further
testing to verif

Update most resources to use urlFromPieces

Only id in event_service and account_service have not been updated due
to the risk of it breaking the username/id. It will require further
testing to verify.

Use urlFromPieces wherever that is needed to insert a variable in the
URI. Don't use urlFromPieces when it is hardcoded values. This allow us
to control all resource URIs that is dynamically added and to sync with
the current recommanded method for `@odata.id`. The goal is to have a
common place to manage the url created from dbus-paths in order to
manage/update it easily when needed.

Tested:
RedfishValidtor Passed for all resource including the sensors with the
fragments.

Change-Id: I95cdfaaee58fc7f21c95f5944e1e5c813b3215f2
Signed-off-by: Willy Tu <wltu@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 353163e9 22-Nov-2022 Tony Lee <tony.lee@quantatw.com>

ethernet: Fix getting empty IP address

Dbus for "xyz.openbmc_project.Network" changed to no protocol in
object path[0]. And this is in line with expectations[1]. Since that,
it will get empty IP add

ethernet: Fix getting empty IP address

Dbus for "xyz.openbmc_project.Network" changed to no protocol in
object path[0]. And this is in line with expectations[1]. Since that,
it will get empty IP address when calling
"/redfish/v1/Managers/bmc/EthernetInterfaces/eth1".

Dbus before:
/xyz/openbmc_project/network/eth0/ipv4/52348b91
Now:
/xyz/openbmc_project/network/eth0/_66e80_3a_3aa00_3a27ff_3afee1_3a5408

Test:
Before:
GET /redfish/v1/Managers/bmc/EthernetInterfaces/eth1
```
{

"IPv4Addresses": [],
"IPv4StaticAddresses": [],
"IPv6AddressPolicyTable": [],
"IPv6Addresses": [],
}
```

After:
GET /redfish/v1/Managers/bmc/EthernetInterfaces/eth1
```
{
"IPv4Addresses": [
{
"Address": "192.168.1.108",
"AddressOrigin": "DHCP",
"Gateway": "192.168.1.2",
"SubnetMask": "255.255.255.0"
}
],
"IPv6Addresses": [
{
"Address": "fe80::e24f:43ff:fefe:ca5d",
"AddressOrigin": "LinkLocal",
"AddressState": null,
"PrefixLength": 64
}
],
}
```

[0]: https://github.com/openbmc/phosphor-networkd/commit/59e5b91d9784274d1d99b4c10e939c38606efacc
[1]: https://discord.com/channels/775381525260664832/775381525260664836/1044873098010316840

Change-Id: I40a5357e6ad31afa7156ac3bce908ae48d26a0cf
Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>

show more ...


# 3ccb3adb 13-Jan-2023 Ed Tanous <edtanous@google.com>

Fix a boatload of #includes

Most of these missing includes were found by running clang-tidy on all
files, including headers. The existing scripts just run clang-tidy on
source files, which doesn't

Fix a boatload of #includes

Most of these missing includes were found by running clang-tidy on all
files, including headers. The existing scripts just run clang-tidy on
source files, which doesn't catch most of these.

Tested: Code compiles

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic741fbb2cc9e5e92955fd5a1b778a482830e80e8

show more ...


# 7a1dbc48 07-Dec-2022 George Liu <liuxiwei@inspur.com>

Refactor GetSubTreePaths method

Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and u

Refactor GetSubTreePaths method

Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and use the method in dbus_utility
uniformly.

Requires https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/60020 to
build.

Tested: Redfish Validator Passed

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie4140d4484a7e4f4b943013f4371ffd2d44a22e9

show more ...


# 1e3f85e6 12-Dec-2022 Jian Zhang <zhangjian.3032@bytedance.com>

Correct the dhcp object path

Due to the path of the dhcp has been changed from
`/xyz/openbmc_project/network/config/dhcp` to
`/xyz/openbmc_project/network/dhcp`.

Cause cannot get/set the dhcp confi

Correct the dhcp object path

Due to the path of the dhcp has been changed from
`/xyz/openbmc_project/network/config/dhcp` to
`/xyz/openbmc_project/network/dhcp`.

Cause cannot get/set the dhcp configuration.

See:
https: //gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/58725

Tested:
```
Without internal error.
~# curl -k -X PATCH -H "X-Auth-Token: $token" https://$bmc/redfish/v1/Managers/bmc/EthernetInterfaces/eth1 \
--data-raw '{"DHCPv4":{"DHCPEnabled":false}}'

{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request completed successfully.",
"MessageArgs": [],
"MessageId": "Base.1.13.0.Success",
"MessageSeverity": "OK",
"Resolution": "None"
}
]
}
```

Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
Change-Id: Ib455cbe69c47b3075321a8225a5a69bff136dbe8

show more ...


# 0ef0e289 15-Nov-2022 Johnathan Mantey <johnathanx.mantey@intel.com>

Prevent unconditionally writing over the LinkStatus

The NIC LinkStatus was being assigned a LinkUp or NoLink value
depending on whether the NIC is enabled.

Subsequent code unconditionally overwrite

Prevent unconditionally writing over the LinkStatus

The NIC LinkStatus was being assigned a LinkUp or NoLink value
depending on whether the NIC is enabled.

Subsequent code unconditionally overwrites the LinkStatus.

The LinkStatus needs to take into account the NIC enabled state as
well as the link up/down state.

Tested:
Confirmed NIC enabled/link active resulted in LinkUp.
Confrimed NIC enabled/no-carrier resulted in LinkDown.
Connfimred NIC disable resulted in NoLink.

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

show more ...


# 5b378546 26-Nov-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

show more ...


# 23a06317 12-Sep-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

ethernet: Change the behavior of setting VLANEnable

In current implementation, setting VLANEnable to true does nothing
while setting to false will essentially delete the VLAN from system,
which is n

ethernet: Change the behavior of setting VLANEnable

In current implementation, setting VLANEnable to true does nothing
while setting to false will essentially delete the VLAN from system,
which is not a reasonable behavior for Redfish. PATCH requests should
never delete a resource. This patch changes the behavior to changing
the NICEnabled property of VLAN interface, which essentially enables/
disables the VLAN interface.

Tested:
Verified PATCH {"VLANEnable": false} no longer deletes the interface
and the NICEnabled property on DBus is successfully changed.

Change-Id: I8c47f6f2987fed576ba36c215f29bc03c6e9182b
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# 22872ff3 12-Sep-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

ethernet: Remove parseInterfaceData() for VLAN

The parseInterfaceData() for VLAN simply writes some properties to the
response. Move the code to the GET handler for better readability and
remove an

ethernet: Remove parseInterfaceData() for VLAN

The parseInterfaceData() for VLAN simply writes some properties to the
response. Move the code to the GET handler for better readability and
remove an extra check for vlanID.

Tested:
Verified VLAN properties are shown normally at /redfish/v1/Managers/bmc
/EthernetInterfaces/eth0/VLANs/eth0_1

Change-Id: I93ed6e230b5b74eead18775725fd8ae8295b17d5
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# 613dabea 09-Jul-2022 Ed Tanous <edtanous@google.com>

Remove nlohmann brace initialization

There's a few last places (outside of tests) where we still use
nlohmann brace initialization. Per the transforms we've been doing,
move these to constructing t

Remove nlohmann brace initialization

There's a few last places (outside of tests) where we still use
nlohmann brace initialization. Per the transforms we've been doing,
move these to constructing the objects explicitly, using operator[],
nlohmann::object_t and nlohmann::array_t. Theses were found by manual
inspection grepping for all uses of nlohmann::json.

This is done to reduce binary size and reduce the number of intermediate
objects being constructed. This commit saves a trivial amount of size
(~4KB, Half a percent of total) and in addition but makes our
construction consistent.

Tested:
Redfish service validator passes.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7478479a9fdc41b254eef325002d413c1fb411a0

show more ...


# 188cb629 25-May-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

ethernet: Bump EthernetInterface schema 1.4.1 -> 1.6.0

EthernetInterface v1.6.0 adds EthernetInterfaceType property indicating
the type (either Physical or Virtual) of an interface. This property
wi

ethernet: Bump EthernetInterface schema 1.4.1 -> 1.6.0

EthernetInterface v1.6.0 adds EthernetInterfaceType property indicating
the type (either Physical or Virtual) of an interface. This property
will be used by the incoming change #53186 which exposes VLAN interface
as EthernetInterface.

Since the "VLANs" property deprecated from v1.7.0 is still needed for
creating/deleting VLAN interfaces, bmcweb won't bump to a newer schema
version until Redfish spec defines a better way for it.

Tested:
Redfish validator passed.

Change-Id: I9e005e10b0b38046a2a222264b01c6e6223ebf31
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# d8a5d5d8 05-Aug-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Update content of ResourceNotFound/ResourceAlreadyExists message

According to Redfish Base Message Registry definition [1], the first
argument of ResourceNotFound and ResourceAlreadyExists is the sc

Update content of ResourceNotFound/ResourceAlreadyExists message

According to Redfish Base Message Registry definition [1], the first
argument of ResourceNotFound and ResourceAlreadyExists is the schema
name of the resource. This patch changes the first argument to non-
versioned schema name treewide.

Tested:
Verified the error message matches the definition, and Redfish Service
Validator passed.

[1] https://redfish.dmtf.org/registries/Base.1.13.0.json

Change-Id: Ib5cd853578ef0bffda1184d10827241e94faaf68
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


123456789