Add NVMe interface
This interface is used to record the NVMe drive status.
Whether or not to take appropriate action depends on this.
Change-Id: I4c0792271f9c8a5fd7daa9d975afe21a610b85c7
Signed-off-by: tony lee <tony.lee@quantatw.com>
diff --git a/xyz/openbmc_project/Nvme/Status.errors.yaml b/xyz/openbmc_project/Nvme/Status.errors.yaml
new file mode 100644
index 0000000..b5037ed
--- /dev/null
+++ b/xyz/openbmc_project/Nvme/Status.errors.yaml
@@ -0,0 +1,16 @@
+- name: CapacityFault
+ description: The available spare capacity has fallen below the threshold
+
+- name: TemperatureFault
+ description: A temperature is above an over temperature threshold or below an under temperature threshold
+
+- name: DegradesFault
+ description: The NVM subsystem reliability has been
+ degraded due to significant media related errors or any
+ internal error that degrades NVM subsystem reliability.
+
+- name: MediaFault
+ description: The media has been placed in read only mode.
+
+- name: BackupDeviceFault
+ description: The volatile memory backup device has failed.
\ No newline at end of file
diff --git a/xyz/openbmc_project/Nvme/Status.interface.yaml b/xyz/openbmc_project/Nvme/Status.interface.yaml
new file mode 100644
index 0000000..e424e6b
--- /dev/null
+++ b/xyz/openbmc_project/Nvme/Status.interface.yaml
@@ -0,0 +1,42 @@
+description: >
+ Interface to get Nvme info.
+properties:
+ - name: SmartWarnings
+ type: string
+ description: >
+ Indicates smart warnings for the state.
+ - name: StatusFlags
+ type: string
+ description: >
+ Indicates the status of the drives.
+ - name: DriveLifeUsed
+ type: string
+ description: >
+ A vendor specific estimate of the percentage.
+ - name: CapacityFault
+ type: boolean
+ default: false
+ description: >
+ Represent the available spare capacity has fallen below the threshold.
+ - name: TemperatureFault
+ type: boolean
+ default: false
+ description: >
+ Represent a temperature is above an over temperature threshold or below an under temperature
+ threshold
+ - name: DegradesFault
+ type: boolean
+ default: false
+ description: >
+ Represent the NVM subsystem reliability has been degraded due to
+ significant media related errors or any internal error that degrades NVM subsystem reliability
+ - name: MediaFault
+ type: boolean
+ default: false
+ description: >
+ Represent the media has been placed in read only mode
+ - name: BackupDeviceFault
+ type: boolean
+ default: false
+ description: >
+ Represent the volatile memory backup device has failed.