2d72883a | 11-Sep-2024 |
George Liu <liuxiwei@ieisystem.com> |
Fix get all property values under the client interface
If there is no Client interface in the current path when calling the GetManagedObjects method, it should continue to traverse all interfaces un
Fix get all property values under the client interface
If there is no Client interface in the current path when calling the GetManagedObjects method, it should continue to traverse all interfaces under the next path instead of entering the catch to record the `map::at` error. This is not an expected behavior.
Change-Id: Ifd51ec772a7fc5c870dc78323f19f8071c8cab24 Signed-off-by: George Liu <liuxiwei@ieisystem.com>
show more ...
|
8de81777 | 22-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Fix local meson build
Currently local meson build fails because some sources require cereal and it is not even listed in the meson dependencies. To fix the issue add cereal to the dependencie
meson: Fix local meson build
Currently local meson build fails because some sources require cereal and it is not even listed in the meson dependencies. To fix the issue add cereal to the dependencies list and provide a wrap file for the local build.
Tested: "meson setup build && cd build && meson compile" finishes successfully.
Change-Id: I90ce760bb2ecdb3e46bf69383e864800ba025c65 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
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 ...
|
673d9ce8 | 29-Mar-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
build: Fix pkg-config generation on local build
When building with internal dependencies (subprojects) meson fails to configure the build with the following message: """ meson.build:84:20: ERROR: re
build: Fix pkg-config generation on local build
When building with internal dependencies (subprojects) meson fails to configure the build with the following message: """ meson.build:84:20: ERROR: requires argument not a string, library with pkgconfig-generated file or pkgconfig-dependency object, got <InternalDependency dep140431893321616: True> """ Use libraries instead of requires when calling pkgconfig.generate() to make the configuration succeed.
Change-Id: I48e0c6bd625af8d10fecf6235b9d034453abf9d6 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
6c79a72b | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: Id670871780c89a5291d478aa66ec942c3378afe7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
717fdc44 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 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-17 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: Ib67d7cd6dfc9ca4356b21de66957ddd95ed96e97 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ef6bad1b | 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using t
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using the .txt extension for a build file has a few advantages, chief among them many tools and text editors expect a file with the .txt extension to be plain text files, not build scripts.
[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions
Change-Id: I2fb67c671fe64a600edbed1ebc40fc6ae6d7ab96 Signed-off-by: George Liu <liuxiwei@inspur.com>
show more ...
|
46d7ea4c | 12-Jul-2023 |
Ed Tanous <edtanous@google.com> |
Use a real struct
There's no usage of these structures as a tuple, and get<0> isn't very descriptive. Replace them with a struct.
Change-Id: I7705a14fe1486c9398fd4bbc426f3c8208060c8e Signed-off-by
Use a real struct
There's no usage of these structures as a tuple, and get<0> isn't very descriptive. Replace them with a struct.
Change-Id: I7705a14fe1486c9398fd4bbc426f3c8208060c8e Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
47652f2f | 12-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: I1e3bfd0c637f8fc5cf47c
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: I1e3bfd0c637f8fc5cf47ce421f1a01e5f80544c4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
69cea063 | 12-Jul-2023 |
Ed Tanous <edtanous@google.com> |
Use scopes for construction
Change-Id: I92ed65c2b47ad427a36cce7de7db82162f53f28c Signed-off-by: Ed Tanous <edtanous@google.com> |
6d421739 | 12-Jul-2023 |
Ed Tanous <edtanous@google.com> |
Zero initialize member variables
The default constructor on this class does not zero initialize the variables, so add explicit zero initialization.
Change-Id: Id0c1348ef6e17f974c900924fd7453aad51b5
Zero initialize member variables
The default constructor on this class does not zero initialize the variables, so add explicit zero initialization.
Change-Id: Id0c1348ef6e17f974c900924fd7453aad51b5c15 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
40f769bb | 20-Jun-2023 |
Ivan Mikhaylov <fr0st61te@gmail.com> |
Add UDP protocol by default in SNMP client
Set UDP protocol as transport protocol by default on Client instantiation.
Tested: protocol set as UDP by default when creating subscribers.
``` busctl c
Add UDP protocol by default in SNMP client
Set UDP protocol as transport protocol by default on Client instantiation.
Tested: protocol set as UDP by default when creating subscribers.
``` busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq 192.168.1.25 999 s "/xyz/openbmc_project/network/snmp/manager/1"
busctl get-property xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager/1 xyz.openbmc_project.Network.Client Address s "192.168.1.25"
busctl get-property xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager/1 xyz.openbmc_project.Network.Client TransportProtocol s "xyz.openbmc_project.Network.Client.TransportProtocol.UDP" ```
Change-Id: I21aa601519cbfa51db3b21d260e77c46e6383ae7 Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
e338b323 | 23-Jun-2023 |
Patrick Williams <patrick@stwcx.xyz> |
snmp-configuration: fix markdownlint issues
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6efa7c47090f6ec9bbb639c7b15d4bb45e33004d |
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 ...
|
cab8c536 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I98fc77e75fa4bcfc331074e90c206f2bc8187e37 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
c0d7cd47 | 28-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
Fix deleteSNMPClient method in Unit Test file
The previous method can only delete one piece of data, and if the last piece of data is deleted, an error will be reported and the UT will fail.
Tested
Fix deleteSNMPClient method in Unit Test file
The previous method can only delete one piece of data, and if the last piece of data is deleted, an error will be reported and the UT will fail.
Tested: UT passed.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: If1e0b4170a0a58fb30d4e28c55fed68b0d0f5e28
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 ...
|
8116532f | 04-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
MAINTAINERS: remove file
The MAINTAINERS file is deprecated in favor of OWNERS.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie8084d4847f65c1ca1a36c7cd208241e8224bfb7
|
0b4cba06 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
OWNERS: switch 'matches' to 'matchers'
The original OWNERS template had a mistake which used 'matches' instead of the field supported by the Gerrit plugin 'matchers'. Update the OWNERS file to have
OWNERS: switch 'matches' to 'matchers'
The original OWNERS template had a mistake which used 'matches' instead of the field supported by the Gerrit plugin 'matchers'. Update the OWNERS file to have the correct field.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3032add868824f4ac29538ea399915799378dd78
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 ...
|
06c65c0c | 16-Jun-2022 |
Patrick Williams <patrick@stwcx.xyz> |
remove unused experimental::any
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If7ce8f2fcf23f199119b253e7932509d2a8f2be7 |
65113c2b | 27-May-2022 |
Ed Tanous <edtanous@google.com> |
Simplify construction of tuples
The latest version of GCC flags an error on this code, where string length isn't initialized in some cases, and prints several pages of template and compiler errors.
Simplify construction of tuples
The latest version of GCC flags an error on this code, where string length isn't initialized in some cases, and prints several pages of template and compiler errors.
This commit simplifies the code such that rather than constructing a tuple, moving it to a stack variable, then moving it into the vector, simply constructs the tuple in the vector in the first place. This avoids an undefined behavior warning of use after free on the tuple variable.
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I4d8424f452a98e558607527abd3ec9cf7f4460d1
show more ...
|
2fddc40c | 23-May-2022 |
Ed Tanous <edtanous@google.com> |
Make test code use the correct signed types
There were a number of comparisons in the tests that were comparing signed ints to unsigned ints. This lead to compiler errors in some cases.
../../../.
Make test code use the correct signed types
There were a number of comparisons in the tests that were comparing signed ints to unsigned ints. This lead to compiler errors in some cases.
../../../../../../workspace/sources/phosphor-snmp/test/test_error_notification.cpp:35:5: required from here | /usr/src/gtest/include/gtest/gtest.h:1545:11: error: comparison of integer expressions of different signedness: 'const int' and 'const unsigned int' [-Werror=sign-compare] | if (lhs == rhs) {
This commit fixes it.
Tested: Code compiles, unit test changes only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib6dd2afced3672ec1f7096ade07b36d53049cf1a
show more ...
|
dec30269 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
Remove compilation using autotools
The intent behind this commit is build phosphor-snmp with meson, so need to remove files related to autotools.
Signed-off-by: George Liu <liuxiwei@inspur.com> Cha
Remove compilation using autotools
The intent behind this commit is build phosphor-snmp with meson, so need to remove files related to autotools.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ibf9fc3c12d184553c4aed84256a6e2c11d93d9f4
show more ...
|
e65b0a70 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
Handle D-Bus exceptions
Remove the usage of is_method_error()[1] Also, add try-catch to handle D-Bus exceptions around mapper call.
[1]https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/14010
Handle D-Bus exceptions
Remove the usage of is_method_error()[1] Also, add try-catch to handle D-Bus exceptions around mapper call.
[1]https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/14010
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I042e86676950aa25d646ff597ac55500abe44ddf
show more ...
|