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 ...
|
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 ...
|
69cea063 | 12-Jul-2023 |
Ed Tanous <edtanous@google.com> |
Use scopes for construction
Change-Id: I92ed65c2b47ad427a36cce7de7db82162f53f28c Signed-off-by: Ed Tanous <edtanous@google.com> |
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 ...
|
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 ...
|
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 ...
|
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 ...
|
208acee7 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
meson: Add meson build for test
This commit is to add meson build for test. and later, we will remove autotools and replace it with meson.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id:
meson: Add meson build for test
This commit is to add meson build for test. and later, we will remove autotools and replace it with meson.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I79c72ca9c508bb5a807d078537bc135af836acdb
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 ...
|
5374d6e9 | 22-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
use Create interface from phosphor-dbus-interfaces
The 'Network.Client.Create' interface has been moved to PDI. Delete the one here and use that instead.
Signed-off-by: Patrick Williams <patrick@s
use Create interface from phosphor-dbus-interfaces
The 'Network.Client.Create' interface has been moved to PDI. Delete the one here and use that instead.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic28af8a6681622c004b9608f19d018fb6a84b673
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 ...
|
2cbf7231 | 24-Feb-2021 |
Patrick Williams <patrick@stwcx.xyz> |
test: unit test fixes for vtable exception
Seeing the following unit test failures due to duplicate objects being put onto the dbus. This is likely due to a change in an underlying library to be mo
test: unit test fixes for vtable exception
Seeing the following unit test failures due to duplicate objects being put onto the dbus. This is likely due to a change in an underlying library to be more stringent. Changed the object path for the second objects to avoid the exception.
[ RUN ] TestSNMPClient.CheckPersistency unknown file: Failure C++ exception with description "sd_bus_add_object_vtable: org.freedesktop.DBus.Error.FileExists: File exists" thrown in the test body. [ FAILED ] TestSNMPClient.CheckPersistency (0 ms)
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I16f06cc1249ebc2c6957b8429141ba0d02b05fb9
show more ...
|
9d18e562 | 16-Nov-2018 |
Ratan Gupta <ratagupt@linux.vnet.ibm.com> |
Add support for individual property update
SNMP Manager D-Bus object doesn't have support for individual D-Bus property update. This commit adds the support for the same.
Resolves openbmc/phosphor-
Add support for individual property update
SNMP Manager D-Bus object doesn't have support for individual D-Bus property update. This commit adds the support for the same.
Resolves openbmc/phosphor-snmp#2
Change-Id: Ic72366b6b18190e66e23d400a5f2c95037947809 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
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 ...
|
aea53d07 | 06-Sep-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Fix spelling errors
Change-Id: I60d7f1974dc665647115bbeb9d8172b8790e9c92 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
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 ...
|
ec26fa6b | 16-Apr-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement sendTrap function
This function gets all the objects from the specific notification class and send the snmp trap using the netsnmp lib functions.
This commt adds the configure, makefile,
Implement sendTrap function
This function gets all the objects from the specific notification class and send the snmp trap using the netsnmp lib functions.
This commt adds the configure, makefile, bootstrap.sh, clangformat file.
Add the unit test cases for ErrorNotification unit.
Change-Id: I2e982f18eb2745f2c0c8de0702cc85d12e80f6e3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|