Pass redfishPropertyName earlier argument
It was pointed out that the setDbusProperty method should have an end
that approximately matches dbus-send and busctl set-property in its
arguments, to aid with debug. This seems reasonable.
Tested: Redfish service validator passes.
Change-Id: Ic20295d93c71c957e3e76704e1eda9da187861b1
Signed-off-by: Ginu George <ginugeorge@ami.com>
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/include/utils/dbus_utils.hpp b/redfish-core/include/utils/dbus_utils.hpp
index 8057169..dbb6fd1 100644
--- a/redfish-core/include/utils/dbus_utils.hpp
+++ b/redfish-core/include/utils/dbus_utils.hpp
@@ -49,10 +49,10 @@
template <typename PropertyType>
void setDbusProperty(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ std::string_view redfishPropertyName,
std::string_view processName,
const sdbusplus::message::object_path& path,
std::string_view interface, std::string_view dbusProperty,
- std::string_view redfishPropertyName,
const PropertyType& prop)
{
std::string processNameStr(processName);
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 4bfbdd8..05cfbe7 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -263,9 +263,10 @@
// logged.
return;
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.User.Manager",
- dbusObjectPath, "xyz.openbmc_project.User.Attributes",
- "UserGroups", "AccountTypes", updatedUserGroups);
+ setDbusProperty(asyncResp, "AccountTypes",
+ "xyz.openbmc_project.User.Manager", dbusObjectPath,
+ "xyz.openbmc_project.User.Attributes", "UserGroups",
+ updatedUserGroups);
}
inline void userErrorMessageHandler(
@@ -428,22 +429,22 @@
if (remoteGroup)
{
setDbusProperty(
- asyncResp, ldapDbusService, roleMapObjData[index].first,
- "xyz.openbmc_project.User.PrivilegeMapperEntry",
- "GroupName",
+ asyncResp,
std::format("RemoteRoleMapping/{}/RemoteGroup", index),
- *remoteGroup);
+ ldapDbusService, roleMapObjData[index].first,
+ "xyz.openbmc_project.User.PrivilegeMapperEntry",
+ "GroupName", *remoteGroup);
}
// If "LocalRole" info is provided
if (localRole)
{
setDbusProperty(
- asyncResp, ldapDbusService, roleMapObjData[index].first,
- "xyz.openbmc_project.User.PrivilegeMapperEntry",
- "Privilege",
+ asyncResp,
std::format("RemoteRoleMapping/{}/LocalRole", index),
- *localRole);
+ ldapDbusService, roleMapObjData[index].first,
+ "xyz.openbmc_project.User.PrivilegeMapperEntry",
+ "Privilege", *localRole);
}
}
// Create a new RoleMapping Object.
@@ -688,10 +689,9 @@
const std::string& ldapServerElementName,
const std::string& ldapConfigObject)
{
- setDbusProperty(asyncResp, ldapDbusService, ldapConfigObject,
- ldapConfigInterface, "LDAPServerURI",
- ldapServerElementName + "/ServiceAddress",
- serviceAddressList.front());
+ setDbusProperty(asyncResp, ldapServerElementName + "/ServiceAddress",
+ ldapDbusService, ldapConfigObject, ldapConfigInterface,
+ "LDAPServerURI", serviceAddressList.front());
}
/**
* @brief updates the LDAP Bind DN and updates the
@@ -708,10 +708,10 @@
const std::string& ldapServerElementName,
const std::string& ldapConfigObject)
{
- setDbusProperty(asyncResp, ldapDbusService, ldapConfigObject,
- ldapConfigInterface, "LDAPBindDN",
+ setDbusProperty(asyncResp,
ldapServerElementName + "/Authentication/Username",
- username);
+ ldapDbusService, ldapConfigObject, ldapConfigInterface,
+ "LDAPBindDN", username);
}
/**
@@ -728,10 +728,10 @@
const std::string& ldapServerElementName,
const std::string& ldapConfigObject)
{
- setDbusProperty(asyncResp, ldapDbusService, ldapConfigObject,
- ldapConfigInterface, "LDAPBindDNPassword",
+ setDbusProperty(asyncResp,
ldapServerElementName + "/Authentication/Password",
- password);
+ ldapDbusService, ldapConfigObject, ldapConfigInterface,
+ "LDAPBindDNPassword", password);
}
/**
@@ -749,11 +749,11 @@
const std::string& ldapServerElementName,
const std::string& ldapConfigObject)
{
- setDbusProperty(asyncResp, ldapDbusService, ldapConfigObject,
- ldapConfigInterface, "LDAPBaseDN",
+ setDbusProperty(asyncResp,
ldapServerElementName +
"/LDAPService/SearchSettings/BaseDistinguishedNames",
- baseDNList.front());
+ ldapDbusService, ldapConfigObject, ldapConfigInterface,
+ "LDAPBaseDN", baseDNList.front());
}
/**
* @brief updates the LDAP user name attribute and updates the
@@ -770,11 +770,11 @@
const std::string& ldapServerElementName,
const std::string& ldapConfigObject)
{
- setDbusProperty(asyncResp, ldapDbusService, ldapConfigObject,
- ldapConfigInterface, "UserNameAttribute",
+ setDbusProperty(asyncResp,
ldapServerElementName +
"LDAPService/SearchSettings/UsernameAttribute",
- userNameAttribute);
+ ldapDbusService, ldapConfigObject, ldapConfigInterface,
+ "UserNameAttribute", userNameAttribute);
}
/**
* @brief updates the LDAP group attribute and updates the
@@ -791,11 +791,11 @@
const std::string& ldapServerElementName,
const std::string& ldapConfigObject)
{
- setDbusProperty(asyncResp, ldapDbusService, ldapConfigObject,
- ldapConfigInterface, "GroupNameAttribute",
+ setDbusProperty(asyncResp,
ldapServerElementName +
"/LDAPService/SearchSettings/GroupsAttribute",
- groupsAttribute);
+ ldapDbusService, ldapConfigObject, ldapConfigInterface,
+ "GroupNameAttribute", groupsAttribute);
}
/**
* @brief updates the LDAP service enable and updates the
@@ -811,9 +811,9 @@
const std::string& ldapServerElementName,
const std::string& ldapConfigObject)
{
- setDbusProperty(asyncResp, ldapDbusService, ldapConfigObject,
- ldapEnableInterface, "Enabled",
- ldapServerElementName + "/ServiceEnabled", serviceEnabled);
+ setDbusProperty(asyncResp, ldapServerElementName + "/ServiceEnabled",
+ ldapDbusService, ldapConfigObject, ldapEnableInterface,
+ "Enabled", serviceEnabled);
}
struct AuthMethods
@@ -1124,10 +1124,10 @@
if (enabled)
{
- setDbusProperty(asyncResp, "xyz.openbmc_project.User.Manager",
- dbusObjectPath,
+ setDbusProperty(asyncResp, "Enabled",
+ "xyz.openbmc_project.User.Manager", dbusObjectPath,
"xyz.openbmc_project.User.Attributes",
- "UserEnabled", "Enabled", *enabled);
+ "UserEnabled", *enabled);
}
if (roleId)
@@ -1139,10 +1139,10 @@
"Locked");
return;
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.User.Manager",
- dbusObjectPath,
+ setDbusProperty(asyncResp, "RoleId",
+ "xyz.openbmc_project.User.Manager", dbusObjectPath,
"xyz.openbmc_project.User.Attributes",
- "UserPrivilege", "RoleId", priv);
+ "UserPrivilege", priv);
}
if (locked)
@@ -1156,10 +1156,10 @@
"Locked");
return;
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.User.Manager",
- dbusObjectPath,
+ setDbusProperty(asyncResp, "Locked",
+ "xyz.openbmc_project.User.Manager", dbusObjectPath,
"xyz.openbmc_project.User.Attributes",
- "UserLockedForFailedAttempt", "Locked", *locked);
+ "UserLockedForFailedAttempt", *locked);
}
if (accountTypes)
@@ -1472,10 +1472,10 @@
if (minPasswordLength)
{
setDbusProperty(
- asyncResp, "xyz.openbmc_project.User.Manager",
+ asyncResp, "MinPasswordLength", "xyz.openbmc_project.User.Manager",
sdbusplus::message::object_path("/xyz/openbmc_project/user"),
"xyz.openbmc_project.User.AccountPolicy", "MinPasswordLength",
- "MinPasswordLength", *minPasswordLength);
+ *minPasswordLength);
}
if (maxPasswordLength)
@@ -1492,19 +1492,20 @@
if (unlockTimeout)
{
setDbusProperty(
- asyncResp, "xyz.openbmc_project.User.Manager",
+ asyncResp, "AccountLockoutDuration",
+ "xyz.openbmc_project.User.Manager",
sdbusplus::message::object_path("/xyz/openbmc_project/user"),
"xyz.openbmc_project.User.AccountPolicy", "AccountUnlockTimeout",
- "AccountLockoutDuration", *unlockTimeout);
+ *unlockTimeout);
}
if (lockoutThreshold)
{
setDbusProperty(
- asyncResp, "xyz.openbmc_project.User.Manager",
+ asyncResp, "AccountLockoutThreshold",
+ "xyz.openbmc_project.User.Manager",
sdbusplus::message::object_path("/xyz/openbmc_project/user"),
"xyz.openbmc_project.User.AccountPolicy",
- "MaxLoginAttemptBeforeLockout", "AccountLockoutThreshold",
- *lockoutThreshold);
+ "MaxLoginAttemptBeforeLockout", *lockoutThreshold);
}
}
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index c654760..723cc1e 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -820,8 +820,8 @@
objectPath = "/xyz/openbmc_project/state/chassis0";
}
- setDbusProperty(asyncResp, processName, objectPath, interfaceName,
- destProperty, "ResetType", propertyValue);
+ setDbusProperty(asyncResp, "ResetType", processName, objectPath,
+ interfaceName, destProperty, propertyValue);
});
}
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 5af63b5..a3cda9c 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -721,11 +721,11 @@
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
setDbusProperty(
- asyncResp, "xyz.openbmc_project.Network",
+ asyncResp, "Gateway", "xyz.openbmc_project.Network",
sdbusplus::message::object_path("/xyz/openbmc_project/network") /
ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "DefaultGateway",
- "Gateway", gateway);
+ gateway);
}
/**
@@ -1233,10 +1233,10 @@
return;
}
setDbusProperty(
- asyncResp, "xyz.openbmc_project.Network",
+ asyncResp, "HostName", "xyz.openbmc_project.Network",
sdbusplus::message::object_path("/xyz/openbmc_project/network/config"),
"xyz.openbmc_project.Network.SystemConfiguration", "HostName",
- "HostName", hostname);
+ hostname);
}
inline void
@@ -1245,9 +1245,9 @@
{
sdbusplus::message::object_path objPath("/xyz/openbmc_project/network");
objPath /= ifaceId;
- setDbusProperty(asyncResp, "xyz.openbmc_project.Network", objPath,
- "xyz.openbmc_project.Network.EthernetInterface", "MTU",
- "MTUSize", mtuSize);
+ setDbusProperty(asyncResp, "MTUSize", "xyz.openbmc_project.Network",
+ objPath, "xyz.openbmc_project.Network.EthernetInterface",
+ "MTU", mtuSize);
}
inline void
@@ -1257,10 +1257,10 @@
{
std::vector<std::string> vectorDomainname = {domainname};
setDbusProperty(
- asyncResp, "xyz.openbmc_project.Network",
+ asyncResp, "FQDN", "xyz.openbmc_project.Network",
sdbusplus::message::object_path("/xyz/openbmc_project/network") /
ifaceId,
- "xyz.openbmc_project.Network.EthernetInterface", "DomainName", "FQDN",
+ "xyz.openbmc_project.Network.EthernetInterface", "DomainName",
vectorDomainname);
}
@@ -1329,11 +1329,10 @@
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
setDbusProperty(
- asyncResp, "xyz.openbmc_project.Network",
+ asyncResp, "MACAddress", "xyz.openbmc_project.Network",
sdbusplus::message::object_path("/xyz/openbmc_project/network") /
ifaceId,
- "xyz.openbmc_project.Network.MACAddress", "MACAddress", "MACAddress",
- macAddress);
+ "xyz.openbmc_project.Network.MACAddress", "MACAddress", macAddress);
}
inline void setDHCPEnabled(const std::string& ifaceId,
@@ -1343,11 +1342,10 @@
{
const std::string dhcp = getDhcpEnabledEnumeration(v4Value, v6Value);
setDbusProperty(
- asyncResp, "xyz.openbmc_project.Network",
+ asyncResp, "DHCPv4", "xyz.openbmc_project.Network",
sdbusplus::message::object_path("/xyz/openbmc_project/network") /
ifaceId,
- "xyz.openbmc_project.Network.EthernetInterface", propertyName, "DHCPv4",
- dhcp);
+ "xyz.openbmc_project.Network.EthernetInterface", propertyName, dhcp);
}
enum class NetworkType
@@ -1376,9 +1374,9 @@
redfishPropertyName = "DHCPv6";
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.Network", path,
- "xyz.openbmc_project.Network.DHCPConfiguration",
- propertyName, redfishPropertyName, value);
+ setDbusProperty(
+ asyncResp, redfishPropertyName, "xyz.openbmc_project.Network", path,
+ "xyz.openbmc_project.Network.DHCPConfiguration", propertyName, value);
}
inline void handleSLAACAutoConfigPatch(
@@ -1387,11 +1385,11 @@
{
sdbusplus::message::object_path path("/xyz/openbmc_project/network");
path /= ifaceId;
- setDbusProperty(asyncResp, "xyz.openbmc_project.Network", path,
- "xyz.openbmc_project.Network.EthernetInterface",
- "IPv6AcceptRA",
+ setDbusProperty(asyncResp,
"StatelessAddressAutoConfig/IPv6AutoConfigEnabled",
- ipv6AutoConfigEnabled);
+ "xyz.openbmc_project.Network", path,
+ "xyz.openbmc_project.Network.EthernetInterface",
+ "IPv6AcceptRA", ipv6AutoConfigEnabled);
}
inline void handleDHCPPatch(const std::string& ifaceId,
@@ -1720,11 +1718,11 @@
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
setDbusProperty(
- asyncResp, "xyz.openbmc_project.Network",
+ asyncResp, "StaticNameServers", "xyz.openbmc_project.Network",
sdbusplus::message::object_path("/xyz/openbmc_project/network") /
ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "StaticNameServers",
- "StaticNameServers", updatedStaticNameServers);
+ updatedStaticNameServers);
}
inline void handleIPv6StaticAddressesPatch(
@@ -2403,13 +2401,13 @@
if (interfaceEnabled)
{
- setDbusProperty(asyncResp, "xyz.openbmc_project.Network",
+ setDbusProperty(asyncResp, "InterfaceEnabled",
+ "xyz.openbmc_project.Network",
sdbusplus::message::object_path(
"/xyz/openbmc_project/network") /
ifaceId,
"xyz.openbmc_project.Network.EthernetInterface",
- "NICEnabled", "InterfaceEnabled",
- *interfaceEnabled);
+ "NICEnabled", *interfaceEnabled);
}
if (mtuSize)
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index 5eb9f61..963fbfb 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -352,11 +352,11 @@
BMCWEB_LOG_DEBUG("Setting the Hypervisor IPaddress : {} on Iface: {}",
ipv4Address, ethIfaceId);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "IPv4StaticAddresses/1/Address",
+ "xyz.openbmc_project.Settings",
"/xyz/openbmc_project/network/hypervisor/" + ethIfaceId +
"/ipv4/addr0",
- "xyz.openbmc_project.Network.IP", "Address",
- "IPv4StaticAddresses/1/Address", ipv4Address);
+ "xyz.openbmc_project.Network.IP", "Address", ipv4Address);
}
/**
@@ -375,11 +375,11 @@
BMCWEB_LOG_DEBUG("Setting the Hypervisor subnet : {} on Iface: {}", subnet,
ethIfaceId);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "IPv4StaticAddresses/1/SubnetMask",
+ "xyz.openbmc_project.Settings",
"/xyz/openbmc_project/network/hypervisor/" + ethIfaceId +
"/ipv4/addr0",
- "xyz.openbmc_project.Network.IP", "PrefixLength",
- "IPv4StaticAddresses/1/SubnetMask", subnet);
+ "xyz.openbmc_project.Network.IP", "PrefixLength", subnet);
}
/**
@@ -398,11 +398,12 @@
BMCWEB_LOG_DEBUG(
"Setting the DefaultGateway to the last configured gateway");
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "IPv4StaticAddresses/1/Gateway",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/network/hypervisor"),
"xyz.openbmc_project.Network.SystemConfiguration",
- "DefaultGateway", "IPv4StaticAddresses/1/Gateway", gateway);
+ "DefaultGateway", gateway);
}
/**
@@ -489,12 +490,12 @@
{
const std::string dhcp = getDhcpEnabledEnumeration(ipv4DHCPEnabled, false);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/network/hypervisor") /
- ifaceId,
- "xyz.openbmc_project.Network.EthernetInterface",
- "DHCPEnabled", "DHCPv4/DHCPEnabled", dhcp);
+ setDbusProperty(
+ asyncResp, "DHCPv4/DHCPEnabled", "xyz.openbmc_project.Settings",
+ sdbusplus::message::object_path(
+ "/xyz/openbmc_project/network/hypervisor") /
+ ifaceId,
+ "xyz.openbmc_project.Network.EthernetInterface", "DHCPEnabled", dhcp);
// Set the IPv4 address origin to the DHCP / Static as per the new value
// of the DHCPEnabled property
@@ -511,11 +512,11 @@
origin = "xyz.openbmc_project.Network.IP.AddressOrigin.DHCP";
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "IPv4StaticAddresses/1/AddressOrigin",
+ "xyz.openbmc_project.Settings",
"/xyz/openbmc_project/network/hypervisor/" + ifaceId +
"/ipv4/addr0",
- "xyz.openbmc_project.Network.IP", "Origin",
- "IPv4StaticAddresses/1/AddressOrigin", origin);
+ "xyz.openbmc_project.Network.IP", "Origin", origin);
}
inline void handleHypervisorIPv4StaticPatch(
@@ -591,22 +592,21 @@
}
asyncResp->res.jsonValue["HostName"] = hostName;
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "HostName", "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/network/hypervisor"),
"xyz.openbmc_project.Network.SystemConfiguration",
- "HostName", "HostName", hostName);
+ "HostName", hostName);
}
inline void
setIPv4InterfaceEnabled(const std::string& ifaceId, bool isActive,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
- "/xyz/openbmc_project/network/hypervisor/" + ifaceId +
- "/ipv4/addr0",
- "xyz.openbmc_project.Object.Enable", "Enabled",
- "InterfaceEnabled", isActive);
+ setDbusProperty(
+ asyncResp, "InterfaceEnabled", "xyz.openbmc_project.Settings",
+ "/xyz/openbmc_project/network/hypervisor/" + ifaceId + "/ipv4/addr0",
+ "xyz.openbmc_project.Object.Enable", "Enabled", isActive);
}
inline void handleHypervisorEthernetInterfaceCollectionGet(
diff --git a/redfish-core/lib/led.hpp b/redfish-core/lib/led.hpp
index c310e3f..8cbe86a 100644
--- a/redfish-core/lib/led.hpp
+++ b/redfish-core/lib/led.hpp
@@ -139,11 +139,10 @@
}
}
setDbusProperty(
- asyncResp, "xyz.openbmc_project.LED.GroupManager",
+ asyncResp, "IndicatorLED", "xyz.openbmc_project.LED.GroupManager",
sdbusplus::message::object_path(
"/xyz/openbmc_project/led/groups/enclosure_identify"),
- "xyz.openbmc_project.Led.Group", "Asserted", "IndicatorLED",
- ledBlinkng);
+ "xyz.openbmc_project.Led.Group", "Asserted", ledBlinkng);
});
}
@@ -229,11 +228,11 @@
// lets set enclosure_identify state also if
// enclosure_identify_blink failed
setDbusProperty(
- asyncResp, "xyz.openbmc_project.LED.GroupManager",
+ asyncResp, "LocationIndicatorActive",
+ "xyz.openbmc_project.LED.GroupManager",
sdbusplus::message::object_path(
"/xyz/openbmc_project/led/groups/enclosure_identify"),
- "xyz.openbmc_project.Led.Group", "Asserted",
- "LocationIndicatorActive", ledState);
+ "xyz.openbmc_project.Led.Group", "Asserted", ledState);
}
});
}
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 34a3aff..da2d1b5 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -2102,10 +2102,10 @@
}
BMCWEB_LOG_DEBUG("Set Resolved");
- setDbusProperty(asyncResp, "xyz.openbmc_project.Logging",
+ setDbusProperty(asyncResp, "Resolved", "xyz.openbmc_project.Logging",
"/xyz/openbmc_project/logging/entry/" + entryId,
"xyz.openbmc_project.Logging.Entry", "Resolved",
- "Resolved", *resolved);
+ *resolved);
});
BMCWEB_ROUTE(
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 039dcc1..410c32c 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -369,8 +369,8 @@
continue;
}
- setDbusProperty(asyncResp, service, objectPath, interface,
- "StaticNTPServers", "NTP/NTPServers/",
+ setDbusProperty(asyncResp, "NTP/NTPServers/", service,
+ objectPath, interface, "StaticNTPServers",
currentNtpServers);
}
}
@@ -401,13 +401,15 @@
if (entry.first.starts_with(netBasePath))
{
setDbusProperty(
- asyncResp, entry.second.begin()->first, entry.first,
+ asyncResp, "IPMI/ProtocolEnabled",
+ entry.second.begin()->first, entry.first,
"xyz.openbmc_project.Control.Service.Attributes", "Running",
- "IPMI/ProtocolEnabled", protocolEnabled);
+ protocolEnabled);
setDbusProperty(
- asyncResp, entry.second.begin()->first, entry.first,
+ asyncResp, "IPMI/ProtocolEnabled",
+ entry.second.begin()->first, entry.first,
"xyz.openbmc_project.Control.Service.Attributes", "Enabled",
- "IPMI/ProtocolEnabled", protocolEnabled);
+ protocolEnabled);
}
}
});
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 18d1380..cd7fa0f 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -54,11 +54,12 @@
return;
}
- setDbusProperty(sensorsAsyncResp->asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(sensorsAsyncResp->asyncResp, "PowerControl",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/power_cap"),
"xyz.openbmc_project.Control.Power.Cap", "PowerCap",
- "PowerControl", valueToSet);
+ valueToSet);
}
inline void afterGetChassisPath(
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 36acbf4..8015369 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -1059,9 +1059,9 @@
// Set the property, with handler to check error responses
setDbusProperty(
- resp, *controlService, cpuObjectPath,
+ resp, "AppliedOperatingConfig", *controlService, cpuObjectPath,
"xyz.openbmc_project.Control.Processor.CurrentOperatingConfig",
- "AppliedConfig", "AppliedOperatingConfig", configPath);
+ "AppliedConfig", configPath);
}
inline void
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 9068888..8be861b 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -2742,9 +2742,9 @@
messages::internalError(sensorAsyncResp->asyncResp->res);
return;
}
- setDbusProperty(sensorAsyncResp->asyncResp, item.second,
- item.first, "xyz.openbmc_project.Sensor.Value",
- "Value", propertyValueNameStr,
+ setDbusProperty(sensorAsyncResp->asyncResp,
+ propertyValueNameStr, item.second, item.first,
+ "xyz.openbmc_project.Sensor.Value", "Value",
iterator->second.first);
}
};
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 59621cf..5d7dba1 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -1278,10 +1278,11 @@
{
BMCWEB_LOG_DEBUG("Set Automatic Retry Attempts.");
setDbusProperty(
- asyncResp, "xyz.openbmc_project.State.Host",
+ asyncResp, "Boot/AutomaticRetryAttempts",
+ "xyz.openbmc_project.State.Host",
sdbusplus::message::object_path("/xyz/openbmc_project/state/host0"),
"xyz.openbmc_project.Control.Boot.RebootAttempts", "RetryAttempts",
- "Boot/AutomaticRetryAttempts", retryAttempts);
+ retryAttempts);
}
inline computer_system::PowerRestorePolicyTypes
@@ -1532,9 +1533,9 @@
}
// Valid TPM Enable object found, now setting the value
- setDbusProperty(asyncResp, serv, path,
- "xyz.openbmc_project.Control.TPM.Policy", "TPMEnable",
- "Boot/TrustedModuleRequiredToBoot", tpmRequired);
+ setDbusProperty(asyncResp, "Boot/TrustedModuleRequiredToBoot", serv,
+ path, "xyz.openbmc_project.Control.TPM.Policy",
+ "TPMEnable", tpmRequired);
});
}
@@ -1579,11 +1580,12 @@
// Act on validated parameters
BMCWEB_LOG_DEBUG("DBUS boot type: {}", bootTypeStr);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "Boot/BootSourceOverrideMode",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/boot"),
"xyz.openbmc_project.Control.Boot.Type", "BootType",
- "Boot/BootSourceOverrideMode", bootTypeStr);
+ bootTypeStr);
}
/**
@@ -1634,11 +1636,12 @@
// Act on validated parameters
BMCWEB_LOG_DEBUG("DBUS boot override enable: {}", bootOverrideEnable);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "Boot/BootSourceOverrideEnabled",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/boot"),
"xyz.openbmc_project.Object.Enable", "Enabled",
- "Boot/BootSourceOverrideEnabled", bootOverrideEnable);
+ bootOverrideEnable);
if (!bootOverrideEnable)
{
@@ -1650,11 +1653,12 @@
BMCWEB_LOG_DEBUG("DBUS boot override persistent: {}",
bootOverridePersistent);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "Boot/BootSourceOverrideEnabled",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/boot/one_time"),
"xyz.openbmc_project.Object.Enable", "Enabled",
- "Boot/BootSourceOverrideEnabled", !bootOverridePersistent);
+ !bootOverridePersistent);
}
/**
@@ -1695,16 +1699,18 @@
BMCWEB_LOG_DEBUG("DBUS boot source: {}", bootSourceStr);
BMCWEB_LOG_DEBUG("DBUS boot mode: {}", bootModeStr);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "Boot/BootSourceOverrideTarget",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/boot"),
"xyz.openbmc_project.Control.Boot.Source", "BootSource",
- "Boot/BootSourceOverrideTarget", bootSourceStr);
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ bootSourceStr);
+ setDbusProperty(asyncResp, "Boot/BootSourceOverrideTarget",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/boot"),
"xyz.openbmc_project.Control.Boot.Mode", "BootMode",
- "Boot/BootSourceOverrideTarget", bootModeStr);
+ bootModeStr);
}
/**
@@ -1786,9 +1792,9 @@
return;
}
- setDbusProperty(asyncResp, service, path,
+ setDbusProperty(asyncResp, "AssetTag", service, path,
"xyz.openbmc_project.Inventory.Decorator.AssetTag",
- "AssetTag", "AssetTag", assetTag);
+ "AssetTag", assetTag);
});
}
@@ -1841,11 +1847,12 @@
return;
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "Boot/StopBootOnFault",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/logging/settings"),
"xyz.openbmc_project.Logging.Settings", "QuiesceOnHwError",
- "Boot/StopBootOnFault", *stopBootEnabled);
+ *stopBootEnabled);
}
/**
@@ -1882,12 +1889,12 @@
return;
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "Boot/AutomaticRetryConfig",
+ "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/auto_reboot"),
"xyz.openbmc_project.Control.Boot.RebootPolicy",
- "AutoReboot", "Boot/AutomaticRetryConfig",
- autoRebootEnabled);
+ "AutoReboot", autoRebootEnabled);
}
inline std::string dbusPowerRestorePolicyFromRedfish(std::string_view policy)
@@ -1931,11 +1938,11 @@
}
setDbusProperty(
- asyncResp, "xyz.openbmc_project.Settings",
+ asyncResp, "PowerRestorePolicy", "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/control/host0/power_restore_policy"),
"xyz.openbmc_project.Control.Power.RestorePolicy", "PowerRestorePolicy",
- "PowerRestorePolicy", powerRestorePolicy);
+ powerRestorePolicy);
}
/**
@@ -2304,9 +2311,9 @@
BMCWEB_LOG_DEBUG("Setting power mode({}) -> {}", powerMode, path);
// Set the Power Mode property
- setDbusProperty(asyncResp, service, path,
+ setDbusProperty(asyncResp, "PowerMode", service, path,
"xyz.openbmc_project.Control.Power.Mode", "PowerMode",
- "PowerMode", powerMode);
+ powerMode);
});
}
@@ -2464,20 +2471,22 @@
return;
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.Watchdog",
+ setDbusProperty(asyncResp, "HostWatchdogTimer/TimeoutAction",
+ "xyz.openbmc_project.Watchdog",
sdbusplus::message::object_path(
"/xyz/openbmc_project/watchdog/host0"),
"xyz.openbmc_project.State.Watchdog", "ExpireAction",
- "HostWatchdogTimer/TimeoutAction", wdtTimeOutActStr);
+ wdtTimeOutActStr);
}
if (wdtEnable)
{
- setDbusProperty(asyncResp, "xyz.openbmc_project.Watchdog",
+ setDbusProperty(asyncResp, "HostWatchdogTimer/FunctionEnabled",
+ "xyz.openbmc_project.Watchdog",
sdbusplus::message::object_path(
"/xyz/openbmc_project/watchdog/host0"),
"xyz.openbmc_project.State.Watchdog", "Enabled",
- "HostWatchdogTimer/FunctionEnabled", *wdtEnable);
+ *wdtEnable);
}
}
@@ -2708,45 +2717,41 @@
if (ipsEnable)
{
- setDbusProperty(asyncResp, service, path,
+ setDbusProperty(asyncResp, "IdlePowerSaver/Enabled", service, path,
"xyz.openbmc_project.Control.Power.IdlePowerSaver",
- "Enabled", "IdlePowerSaver/Enabled", *ipsEnable);
+ "Enabled", *ipsEnable);
}
if (ipsEnterUtil)
{
- setDbusProperty(asyncResp, service, path,
+ setDbusProperty(asyncResp, "IdlePowerSaver/EnterUtilizationPercent",
+ service, path,
"xyz.openbmc_project.Control.Power.IdlePowerSaver",
- "EnterUtilizationPercent",
- "IdlePowerSaver/EnterUtilizationPercent",
- *ipsEnterUtil);
+ "EnterUtilizationPercent", *ipsEnterUtil);
}
if (ipsEnterTime)
{
// Convert from seconds into milliseconds for DBus
const uint64_t timeMilliseconds = *ipsEnterTime * 1000;
- setDbusProperty(asyncResp, service, path,
+ setDbusProperty(asyncResp, "IdlePowerSaver/EnterDwellTimeSeconds",
+ service, path,
"xyz.openbmc_project.Control.Power.IdlePowerSaver",
- "EnterDwellTime",
- "IdlePowerSaver/EnterDwellTimeSeconds",
- timeMilliseconds);
+ "EnterDwellTime", timeMilliseconds);
}
if (ipsExitUtil)
{
- setDbusProperty(asyncResp, service, path,
+ setDbusProperty(asyncResp, "IdlePowerSaver/ExitUtilizationPercent",
+ service, path,
"xyz.openbmc_project.Control.Power.IdlePowerSaver",
- "ExitUtilizationPercent",
- "IdlePowerSaver/ExitUtilizationPercent",
- *ipsExitUtil);
+ "ExitUtilizationPercent", *ipsExitUtil);
}
if (ipsExitTime)
{
// Convert from seconds into milliseconds for DBus
const uint64_t timeMilliseconds = *ipsExitTime * 1000;
- setDbusProperty(asyncResp, service, path,
+ setDbusProperty(asyncResp, "IdlePowerSaver/ExitDwellTimeSeconds",
+ service, path,
"xyz.openbmc_project.Control.Power.IdlePowerSaver",
- "ExitDwellTime",
- "IdlePowerSaver/ExitDwellTimeSeconds",
- timeMilliseconds);
+ "ExitDwellTime", timeMilliseconds);
}
});
@@ -2927,16 +2932,16 @@
if (hostCommand)
{
- setDbusProperty(asyncResp, "xyz.openbmc_project.State.Host",
+ setDbusProperty(asyncResp, "Reset", "xyz.openbmc_project.State.Host",
statePath / "host0", "xyz.openbmc_project.State.Host",
- "RequestedHostTransition", "Reset", command);
+ "RequestedHostTransition", command);
}
else
{
- setDbusProperty(asyncResp, "xyz.openbmc_project.State.Chassis",
+ setDbusProperty(asyncResp, "Reset", "xyz.openbmc_project.State.Chassis",
statePath / "chassis0",
"xyz.openbmc_project.State.Chassis",
- "RequestedPowerTransition", "Reset", command);
+ "RequestedPowerTransition", command);
}
}
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 36ee8a0..2888cbf 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -734,11 +734,11 @@
return;
}
- setDbusProperty(asyncResp, "xyz.openbmc_project.Settings",
+ setDbusProperty(asyncResp, "ApplyTime", "xyz.openbmc_project.Settings",
sdbusplus::message::object_path(
"/xyz/openbmc_project/software/apply_time"),
"xyz.openbmc_project.Software.ApplyTime",
- "RequestedApplyTime", "ApplyTime", applyTimeNewVal);
+ "RequestedApplyTime", applyTimeNewVal);
}
struct MultiPartUpdateParameters