History log of /openbmc/sdbusplus/tools/ (Results 1 – 25 of 270)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
3ab4e58d26-Feb-2025 Igor Kanyuka <ifelmail@gmail.com>

Add generation description for Registries

The script generates Registries, and it does not add descriptions. In
spite it's not required, it's a good idea to have a description of what
the registry i

Add generation description for Registries

The script generates Registries, and it does not add descriptions. In
spite it's not required, it's a good idea to have a description of what
the registry is. Generate the field from the registry name.

Testing:
Put the modified script in phosphor-dbus-interfaces, built the project
and then generated registries in bmcweb from generated Jsons. They got
description fields populated:
```
$ git diff
diff --git a/redfish-core/include/registries/openbmc_logging_message_registry.hpp b/redfish-core/include/registries/openbmc_logging_message_registry.hpp
index 0333b4fd..b8f6f772 100644

Change-Id: I81c919fe1947949cbf69c5cb4481131fc8e0ee6f

--- a/redfish-core/include/registries/openbmc_logging_message_registry.hpp
+++ b/redfish-core/include/registries/openbmc_logging_message_registry.hpp
@@ -27,7 +27,7 @@ const Header header = {
1,
"OpenBMC Message Registry for xyz.openbmc_project.Logging",
"en",
- "",
+ "OpenBMC Message Registry for xyz.openbmc_project.Logging",
"OpenBMC_Logging",
"OpenBMC",
};
diff --git a/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp b/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp
index 30f96254..2dee3e63 100644
--- a/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp
+++ b/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp
@@ -27,7 +27,7 @@ const Header header = {
0,
"OpenBMC Message Registry for xyz.openbmc_project.State.Cable",
"en",
- "",
+ "OpenBMC Message Registry for xyz.openbmc_project.State.Cable",
"OpenBMC_StateCable",
"OpenBMC",
};
diff --git a/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp b/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp
index 4bf1e251..32d3498b 100644
--- a/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp
+++ b/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp
@@ -27,7 +27,7 @@ const Header header = {
0,
"OpenBMC Message Registry for xyz.openbmc_project.State.Leak.DetectorGroup",
"en",
- "",
+ "OpenBMC Message Registry for xyz.openbmc_project.State.Leak.DetectorGroup",
"OpenBMC_StateLeakDetectorGroup",
"OpenBMC",
};
```

Change-Id: I8ed7b1117ba32bc545758175ccababf55527d363
Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>

show more ...

9e5ffe1919-Feb-2025 Igor Kanyuka <ifelmail@gmail.com>

Add default value for message Resolution

According to the spec [1] the Resolution is required,
but in the generator code it's added only if it's defined
in the source. Use default value "None." if i

Add default value for message Resolution

According to the spec [1] the Resolution is required,
but in the generator code it's added only if it's defined
in the source. Use default value "None." if it's not defined.

[1] https://redfish.dmtf.org/schemas/v1/MessageRegistry.v1_6_3.json

Change-Id: I91ac6504c69bc2c0f0018a6e39a67563079fc983
Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>

show more ...

4415a72d19-Feb-2025 Igor Kanyuka <ifelmail@gmail.com>

Fix key name for MessageRegistry

Message registry stores messages in the Messages property.
The generator uses the Message property instead. Fix this.

See the spec [1]

And other registries [2] and

Fix key name for MessageRegistry

Message registry stores messages in the Messages property.
The generator uses the Message property instead. Fix this.

See the spec [1]

And other registries [2] and [3].

[1] https://redfish.dmtf.org/schemas/v1/MessageRegistry.v1_6_3.json
[2] https://raw.githubusercontent.com/openbmc/bmcweb/refs/heads/master/redfish-core/include/registries/openbmc.json
[2] https://redfish.dmtf.org/registries/Environmental.1.1.0.json

Change-Id: I3f8073f1b5c8085059d0335cc7ff3625cd26f756
Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>

show more ...

dd6efd1701-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

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


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/example/gen/meson.build
/openbmc/sdbusplus/example/gen/net/poettering/Calculator/meson.build
/openbmc/sdbusplus/example/gen/net/poettering/meson.build
/openbmc/sdbusplus/example/gen/regenerate-meson
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/property.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__let.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__schedulers.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__sender_adaptor_closure.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__transform_sender.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__utility.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/coroutine.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/vtable.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/test/gen/meson.build
/openbmc/sdbusplus/test/gen/regenerate-meson
/openbmc/sdbusplus/test/gen/server/Test/meson.build
/openbmc/sdbusplus/test/gen/server/meson.build
/openbmc/sdbusplus/test/meson.build
meson.build
6bb7a8c923-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

sdbus++: remove `PropertiesVariant` for empty properties

A previous commit changed behavior to always add `PropertiesVariant`
even when there were no properties (and to use `variant<monostate>`).
Th

sdbus++: remove `PropertiesVariant` for empty properties

A previous commit changed behavior to always add `PropertiesVariant`
even when there were no properties (and to use `variant<monostate>`).
The missing `PropertiesVariant` was used by some other repositories to
detect if an interface had properties or not. Adding an empty
`PropertiesVariant` breaks this expectation.

Switch back to having no type defined when there are no properties.
Also, move the new `properties_t` over to the common template for
consistency with the `PropertiesVariant` definition and for potential
use elsewhere.

Fixes: 8aea1d814330 ("sdbus++: generate `properties` method for client harness")
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I75b36412fe42eb44d5a638c6a8ad7a3ee9b835e3

show more ...

8aea1d8117-Jan-2025 Adin Scannell <adin@scannell.ca>

sdbus++: generate `properties` method for client harness

This uses the existing proxy `get_all_properties` method and allows for
more efficient fetching of all properties in one shot. A struct is
ge

sdbus++: generate `properties` method for client harness

This uses the existing proxy `get_all_properties` method and allows for
more efficient fetching of all properties in one shot. A struct is
generated for each type, and each field is initialized with its default
value (but is not guaranteed to be deserialized).

As errors are less detectable (e.g. perhaps an expected property
did not come through?), I considered whether the values in the struct
should all be `std::optional`. However, given how other methods are
used, it feels like this would result in a crash and assertion
failure rather than saving anyone time and effort. The wrong type
is detected a suitable exception is thrown in those cases.

Change-Id: Iff7712bd17db39f1ee5699f867e9f17a54eea21b
Signed-off-by: Adin Scannell <adin@scannell.ca>

show more ...

5265a86b15-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: fix OEM format in Redfish registry

Fix the following:
- OEM fields should be identified with "Oem" in Redfish.
- The top-level "Oem" section should be an object and not array

sdbus++: events: fix OEM format in Redfish registry

Fix the following:
- OEM fields should be identified with "Oem" in Redfish.
- The top-level "Oem" section should be an object and not array of
objects.

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

show more ...

74eea51903-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gen-meson: leverage `install_dir` for custom targets

Meson has had a `install_dir` directive on `custom_target` which
allows specifying per-output where the file should be installed.
Leverag

sdbus++-gen-meson: leverage `install_dir` for custom targets

Meson has had a `install_dir` directive on `custom_target` which
allows specifying per-output where the file should be installed.
Leveraging this greatly simplifies the meson in consumers (such as
phosphor-dbus-interfaces) and makes the install less error-prone.

The previous method for installing was to use a `install_subdir`
call with large exclude lists (so that markdown did not end up in
the include tree). The result of this was that many empty directories
were created in the include, markdown, and registry install paths.

Using this method reduces by 25% the meson content in
phosphor-dbus-interfaces.

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

show more ...

3160739902-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: add meson support for registry generation

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

e598c59502-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: generate Redfish registry

Create an initial Redfish Message Registry from an events.yaml
file. This includes a few OEM properties under "OpenBMC_Mapping"
in order to give hints to

sdbus++: events: generate Redfish registry

Create an initial Redfish Message Registry from an events.yaml
file. This includes a few OEM properties under "OpenBMC_Mapping"
in order to give hints to bmcweb on how to do:
- Map OpenBMC Events to Redfish Events.
- Map AdditionalData fields to MessageArgs.

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

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/example/calculator-aserver.cpp
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/async.hpp
/openbmc/sdbusplus/include/sdbusplus/async/callback.hpp
/openbmc/sdbusplus/include/sdbusplus/async/context.hpp
/openbmc/sdbusplus/include/sdbusplus/async/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/fdio.hpp
/openbmc/sdbusplus/include/sdbusplus/async/match.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__awaitable.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__basic_sender.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__bulk.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__config.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__connect_awaitable.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__continue_on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__continues_on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__domain.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__execution_fwd.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_mpsc_queue.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_queue.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_slist.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__let.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__manual_lifetime.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__operation_states.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__read_env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__receivers.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__schedule_from.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__schedulers.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__sender_adaptor_closure.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__shared.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__spin_loop_pause.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__split.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__start_on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__starts_on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__sync_wait.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__transfer_just.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__transform_sender.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__tuple.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__variant.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__when_all.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__with_awaitable_senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/async_scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/commit.info
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/coroutine.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/sequence_senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/async/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/src/async/context.cpp
/openbmc/sdbusplus/src/async/fdio.cpp
/openbmc/sdbusplus/test/async/context.cpp
/openbmc/sdbusplus/test/async/fdio.cpp
/openbmc/sdbusplus/test/meson.build
sdbusplus/event.py
sdbusplus/main.py
sdbusplus/namedelement.py
sdbusplus/property.py
sdbusplus/templates/event.hpp.mako
ae0a838417-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: improve bad enum diagnostics

When unpacking an event from JSON, if a bad enum value was given
a generic STL exception resulted:

```
terminate called after throwing an instance of '

sdbus++: events: improve bad enum diagnostics

When unpacking an event from JSON, if a bad enum value was given
a generic STL exception resulted:

```
terminate called after throwing an instance of 'std::bad_optional_access'
```

Improve this by using the sdbusplus `InvalidEnumString` exception:
```
terminate called after throwing an instance of 'sdbusplus::exception::InvalidEnumString'
```

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

show more ...

fe1ebd4309-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: add object_path include

Event metadata often includes object_path. Add the header file
into the generated events.hpp files.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Cha

sdbus++: events: add object_path include

Event metadata often includes object_path. Add the header file
into the generated events.hpp files.

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

show more ...

17e54abc06-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: adjust schema for metadata

Switch the preferred format of metadata from SNAKE_CASE to CamelCase.
This has no affect on the metadata names in the phosphor-logging
object as those wil

sdbus++: events: adjust schema for metadata

Switch the preferred format of metadata from SNAKE_CASE to CamelCase.
This has no affect on the metadata names in the phosphor-logging
object as those will still be generated as SNAKE_CASE.

SNAKE_CASE is a lossy format. Consider `BMC_ADDRESS`; it cannot be
identified if BMC is an acronym or a word. Our conversion functions
will convert this to `bmcaddress` when becoming a camelCase format
since there is special handling for acronyms and this will appear
equivalent to an acronym.

All of the generators for events are explicit to use `foo.camelCase` or
`foo.SNAKE_CASE` as appropriate, so switching to CamelCase has little
effect. The primary thing it does is make the event class member
variables named sanely: `numberOfLogs` rather than `numberoflogs`.

This will require a minor edit to the few events that are defined
in phosphor-dbus-interfaces already, which will be done at the same
time.

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

show more ...

b08d14dd05-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: unpack an event from JSON

Generate code necessary to unpack a generated event from its
JSON representation.

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

sdbus++: events: unpack an event from JSON

Generate code necessary to unpack a generated event from its
JSON representation.

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

show more ...

1800045e01-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: schema: explicitly prohibit unspecified properties

Modify the schema so that properties that do not belong are called
out as a schema violation. It was easy for someone to accident

sdbus++: events: schema: explicitly prohibit unspecified properties

Modify the schema so that properties that do not belong are called
out as a schema violation. It was easy for someone to accidentally
add 'severity' on events, which should only be specified on errors.
Adding it to the schema to prohibit makes it clearer what the
expectations are.

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

show more ...

7ffcdaac30-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: add source location and pid

Add the source code location and process ID to the generated
events, which are useful for debug.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Cha

sdbus++: events: add source location and pid

Add the source code location and process ID to the generated
events, which are useful for debug.

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

show more ...

3b54a8e525-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: simplify handling of empty parameter lists

Add a template specialization of the type-tuple generation for
empty parameter lists in order to simplify the Mako templates.
This eliminates a sp

sdbus++: simplify handling of empty parameter lists

Add a template specialization of the type-tuple generation for
empty parameter lists in order to simplify the Mako templates.
This eliminates a special case for empty parameter lists in
multiple places.

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

show more ...

7377a0bf25-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: async: handle zero parameter signals

Adding a zero parameter signal results in the following compile
failure:

```
../include/sdbusplus/message/types.hpp: In instantiation of ‘constexpr aut

sdbus++: async: handle zero parameter signals

Adding a zero parameter signal results in the following compile
failure:

```
../include/sdbusplus/message/types.hpp: In instantiation of ‘constexpr auto sdbusplus::message::types::type_id() [with Args = {}]’:
example/gen/net/poettering/Calculator/aserver.hpp:372:58: required from here
../include/sdbusplus/message/types.hpp:302:72: error: no matching function for call to ‘type_id_multiple<>()’
```

Fix this by reusing logic from the non-async code to special case
zero parameter length signals.

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

show more ...

c012fde407-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

events: add severity to class generation

Use the severity field to add to the class generation for use
by phosphor-logging to commit entries.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Cha

events: add severity to class generation

Use the severity field to add to the class generation for use
by phosphor-logging to commit entries.

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

show more ...

760adffd05-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

events: add non-template base class

In order to allow non-template implementations that interact with
the `sdbusplus::excception::generated_event<T>` class, it is useful
to have a non-template base

events: add non-template base class

In order to allow non-template implementations that interact with
the `sdbusplus::excception::generated_event<T>` class, it is useful
to have a non-template base class. Add the `to_json` there for use
by phosphor-logging.

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

show more ...

f5b3921503-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: add description for metadata

It is useful to document the purpose of a metadata field. Add it
to the schema and make it required.

Signed-off-by: Patrick Williams <patrick@stwcx.xy

sdbus++: events: add description for metadata

It is useful to document the purpose of a metadata field. Add it
to the schema and make it required.

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

show more ...

9213e15803-Oct-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: fix for event-only YAML

If an event YAML file only had events and not errors, nothing would
get generated. This was due to the wrong variable being checked for
empty (error vs even

sdbus++: events: fix for event-only YAML

If an event YAML file only had events and not errors, nothing would
get generated. This was due to the wrong variable being checked for
empty (error vs event).

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

show more ...

00fd0a8b24-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: use sd_bus_error_add_map to register

Register errors with `sd_bus_error_add_map` so that `errno`
translation is handled appropriately.

Signed-off-by: Patrick Williams <patrick@stwc

sdbus++: events: use sd_bus_error_add_map to register

Register errors with `sd_bus_error_add_map` so that `errno`
translation is handled appropriately.

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

show more ...

14c4797c24-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: events: create json for events

Create JSON for the events containing their metadata and leverage that
as the "message" portion of the `sd_bus_error`. This will allow
unpacking the message

sdbus++: events: create json for events

Create JSON for the events containing their metadata and leverage that
as the "message" portion of the `sd_bus_error`. This will allow
unpacking the message on a client side back to the original exception.

Tested:
```
$ busctl --user call net.poettering.Calculator /net/poettering/calculator net.poettering.Calculator Divide xx 5 0
Call failed: {"net.poettering.Calculator.DivisionByZero":{"FOO":"unused"}}
```

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

show more ...

a4bfefde24-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

exception: move sd_bus_error_set calls to exception

In the future, generated exceptions will need to fill the sd_error
with something other than the "description" in order to pass more
metadata. Mo

exception: move sd_bus_error_set calls to exception

In the future, generated exceptions will need to fill the sd_error
with something other than the "description" in order to pass more
metadata. Move the sd_bus_error_set calls to exception as a virtual
function so this can be accomplished.

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

show more ...

1234567891011