#
9fa30b98 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ib551fc6639fa2e7a4146272c43003c80e8fbd3b5 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
edd70829 |
| 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: If2c2888544013ba1ef292b173c97dac6cc04d1c2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
54d83f5a |
| 28-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
Fix generating last client Id
When the user sets an invalid Address or sets an existing Address and Port, the correct logic is to return an error but cannot update the lastClientId.
Tested: Before:
Fix generating last client Id
When the user sets an invalid Address or sets an existing Address and Port, the correct logic is to return an error but cannot update the lastClientId.
Tested: Before: busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq 192.168.0.1 100 s "/xyz/openbmc_project/network/snmp/manager/1" busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq 192.168.0.1 100 Call failed: Invalid argument was given. busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq 192.168.0.2 100 s "/xyz/openbmc_project/network/snmp/manager/3"
With this patch: busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq 192.168.0.1 100 s "/xyz/openbmc_project/network/snmp/manager/1" busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq 192.168.0.1 100 Call failed: Invalid argument was given. busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq 192.168.0.2 100 s "/xyz/openbmc_project/network/snmp/manager/2"
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Icf595e3f0d44a0b807526f084819015dc42cf57c
show more ...
|
#
87d3edd6 |
| 22-Jul-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
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib15ce49ac136da396084ab09972dd132f02beeea
show more ...
|
#
4caedfbb |
| 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Signed-off-b
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I151fc489a93ec7f513411aea2f0b61829bc808f6
show more ...
|
#
b9b4c7db |
| 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I12bac733597177ec85336a204b081779fe6ce19e
show more ...
|
#
34d129a9 |
| 04-Dec-2021 |
Ratan Gupta <ratankgupta31@gmail.com> |
Resolve Meson issues
This commit includes fixes in the repo:
1. Moving experimental filesystem to filesystem 2. Errors that meson identified
Signed-off-by: Ratan Gupta <ratankgupta31@gmail.com> Ch
Resolve Meson issues
This commit includes fixes in the repo:
1. Moving experimental filesystem to filesystem 2. Errors that meson identified
Signed-off-by: Ratan Gupta <ratankgupta31@gmail.com> Change-Id: I93c77c2a434275c4da3ca4549919eaa55b57f481
show more ...
|
#
7350c77a |
| 03-Dec-2021 |
Chicago Duan <duanzhijia01@inspur.com> |
SNMPTrap: SNMPTrap address support hostname
The address of snmptrap only supports IP(such as 192.168.1.1), not support hostname(such as www.snmptrap.com). This commit enables the snmptrap address to
SNMPTrap: SNMPTrap address support hostname
The address of snmptrap only supports IP(such as 192.168.1.1), not support hostname(such as www.snmptrap.com). This commit enables the snmptrap address to support hostname.
Tested: 1.Creat snmp trap client with hostname "snmp.prashanth.com" : busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq "snmp.prashanth.com" 162
busctl introspect xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager/1 xyz.openbmc_project.Network.Client NAME TYPE SIGNATURE RESULT/VALUE .Address property s "snmp.prashanth.com" .Port property q 162
2.Create an error log, and then I received snmptrap on the computer with address "snmp.prashanth.com".
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I38e0963735036bf2bbaa102822f735345a3087d1
show more ...
|
#
c3600d86 |
| 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iee4354d96981eac216425c71668f8eb72e146977
|
#
9e60ef5f |
| 31-May-2021 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Add validation of IP address
With the current implementation, when configuring a wrong ip, there no error thrown, instead that ip address is being configured.
POST -d '{"data":["10.10.10",162]}' ht
Add validation of IP address
With the current implementation, when configuring a wrong ip, there no error thrown, instead that ip address is being configured.
POST -d '{"data":["10.10.10",162]}' https://${bmc}/xyz/openbmc_project/network/snmp/manager/action/Client { "data": "/xyz/openbmc_project/network/snmp/manager/27", "message": "200 OK", "status": "ok" }
This commit adds the validation of the ip address during the configuration.
Tested-By:
Failure case: POST -d '{"data":["10.10.10",162]}' https://${bmc}/xyz/openbmc_project/network/snmp/manager/action/Client { "data": { "description": "xyz.openbmc_project.Common.Error.InvalidArgument" }, "message": "Invalid argument was given.", "status": "error" }
Few more cases that are tested: "10.10.10.10.10" "10.10.10.100000" "10.10.10.bb" "10.10.10.10.bb" "10.10.bb.aa"
Success case: POST -d '{"data":["10.10.10.101",162]}' https://${bmc}/xyz/openbmc_project/network/snmp/manager/action/Client { "data": "/xyz/openbmc_project/network/snmp/manager/1", "message": "200 OK", "status": "ok" }
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: Ia08e6eeaa70e3ce45eb055cf927901b36bc4f845
show more ...
|
#
1334b7b3 |
| 22-Feb-2021 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format-11: reformat
The .clang-format file here is an old version of the common one. Upgrade to the latest and reformat.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic87853
clang-format-11: reformat
The .clang-format file here is an old version of the common one. Upgrade to the latest and reformat.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic87853e6004d2d5ad6645a3ece8c0c87ccc96efd
show more ...
|
#
9c4fed6d |
| 16-Nov-2018 |
Ratan Gupta <ratagupt@linux.vnet.ibm.com> |
Add the check for the existense of the client
Don't add the client if it is already configured.
Change-Id: Ib0c64e2eb73b272a290599e1b83630a8ab5709ec Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.
Add the check for the existense of the client
Don't add the client if it is already configured.
Change-Id: Ib0c64e2eb73b272a290599e1b83630a8ab5709ec Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
show more ...
|
#
a7ff3850 |
| 16-Nov-2018 |
Ratan Gupta <ratagupt@linux.vnet.ibm.com> |
Change the logic of generating the D-Bus object identifier
Presently D-Bus object identifier is generated with the hash of D-Bus properties, as a result of this if the value of D-Bus property gets c
Change the logic of generating the D-Bus object identifier
Presently D-Bus object identifier is generated with the hash of D-Bus properties, as a result of this if the value of D-Bus property gets change the D-Bus object identifier will get change.
This commit fixes this problem by keeping the last identifier value in the manager object so whenever user creates new snmp manager object it is incremented by 1, hence the object path becomes unique.
This commit also takes care of that if at any point of time if snmp manager app restart it gets the same D-Bus identifier as it was before the restart.
Change-Id: I456c11f7824ff678ae470bc6641f0e0cc7c1f6bc Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
show more ...
|
#
d84e327d |
| 06-Sep-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Create Interface returns the D-Bus object path
In current code when the client creates the SNNP manager D-Bus object, snmp-conf-manager(D-Bus service) implementing the create interface was not retur
Create Interface returns the D-Bus object path
In current code when the client creates the SNNP manager D-Bus object, snmp-conf-manager(D-Bus service) implementing the create interface was not returning the newly created D-Bus object path, hence client needs to make the enumerate call on the network namespace to find the newly create D-Bus object path.
This commit fixes this problem where Create interface starts returning the newly created D-Bus object path.
Resolves openbmc/phosphor-snmp#1
Change-Id: I26e1ee4a2b869553e511576457148bd1dd9dc224 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
#
f3fac222 |
| 14-Aug-2018 |
Gunnar Mills <gmills@us.ibm.com> |
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I8da47
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I8da47d0cc4531fe83cf09ed311bea35014f05659 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
212f53e8 |
| 30-Apr-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Persist the snmp manager configuration
This commit persist the manager configuration D-Bus objects and restores it once service starts.
This commit also deletes the associated persistent file whene
Persist the snmp manager configuration
This commit persist the manager configuration D-Bus objects and restores it once service starts.
This commit also deletes the associated persistent file whenever snmp client D-Bus object gets deleted.
Change-Id: I1526b52870ee5dfea30e6527bad3fd12d1191a13 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
#
213517ba |
| 28-Apr-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Validate the client address
Address could be hostname or IPaddress,Address validation is being done by calling the gethostbyname system function.
Change-Id: I7d7eecd164c471c80af0b440a4b541badd2f966
Validate the client address
Address could be hostname or IPaddress,Address validation is being done by calling the gethostbyname system function.
Change-Id: I7d7eecd164c471c80af0b440a4b541badd2f966f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
#
1dc9178d |
| 19-Apr-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement the Client create interface
This commit also implement the D-Bus service which would be used for snmp client configuration and would add the snmp manager/trap receiver D-Bus objects under
Implement the Client create interface
This commit also implement the D-Bus service which would be used for snmp client configuration and would add the snmp manager/trap receiver D-Bus objects under namespace /xyz/openbmc_project/network/snmp/manager/
It implements the delete interface for SNMP client D-Bus Object.
Resolves openbmc/openbmc#3057
Change-Id: I0df7b1475f81325b9ac497c1fb350c3f62329686 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|