Add interface for progress tracking.
Implement this interface to track the progress of an activity.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: Ia40b4b0052d4c71742d226ff8be6c1c3029c727e
diff --git a/gen/xyz/openbmc_project/Common/Progress/meson.build b/gen/xyz/openbmc_project/Common/Progress/meson.build
new file mode 100644
index 0000000..97e7a77
--- /dev/null
+++ b/gen/xyz/openbmc_project/Common/Progress/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Common/Progress__cpp'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Common/Progress.interface.yaml', ],
+ output: [ 'server.cpp', 'server.hpp', 'client.hpp', ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'cpp',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Common/Progress',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/Common/meson.build b/gen/xyz/openbmc_project/Common/meson.build
index 607a065..f35e3ad 100644
--- a/gen/xyz/openbmc_project/Common/meson.build
+++ b/gen/xyz/openbmc_project/Common/meson.build
@@ -102,6 +102,21 @@
build_by_default: true,
)
+subdir('Progress')
+generated_others += custom_target(
+ 'xyz/openbmc_project/Common/Progress__markdown'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Common/Progress.interface.yaml', ],
+ output: [ 'Progress.md' ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'markdown',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Common/Progress',
+ ],
+ build_by_default: true,
+)
+
subdir('TFTP')
generated_others += custom_target(
'xyz/openbmc_project/Common/TFTP__markdown'.underscorify(),
diff --git a/xyz/openbmc_project/Common/Progress.interface.yaml b/xyz/openbmc_project/Common/Progress.interface.yaml
new file mode 100644
index 0000000..6c0dc44
--- /dev/null
+++ b/xyz/openbmc_project/Common/Progress.interface.yaml
@@ -0,0 +1,44 @@
+description: >
+ Implement to provide the progress on user requested activity.
+ Objects which implements this interface should implement
+ xyz.openbmc_project.Object.Delete to delete individual entries.
+ The service hosting this interface should clear the entries after
+ some time or reaching some number of entries in stable states like
+ completed, failed or aborted.
+
+properties:
+ - name: Status
+ type: enum[self.OperationStatus]
+ default: InProgress
+ description: >
+ Indicate the state of the operation, whether in progress, completed
+ aborted or failed. The default should be InProgress during the
+ implementation if no input is provided.
+ - name: StartTime
+ type: uint64
+ description: >
+ Indicates when the request is created since the Epoch
+ (1 Jan 1970 00:00:00 UTC), in microseconds.
+ - name: CompletedTime
+ type: uint64
+ description: >
+ Indicates when the state is completed since the Epoch
+ (1 Jan 1970 00:00:00 UTC), in microseconds.
+
+enumerations:
+ - name: OperationStatus
+ description: >
+ Status of the activity
+ values:
+ - name: InProgress
+ description: >
+ Requested operation is in progress.
+ - name: Completed
+ description: >
+ The operation is completed.
+ - name: Failed
+ description: >
+ The operation encountered a failure.
+ - name: Aborted
+ description: >
+ The operation is aborted.