1description: >
2    D-bus interface to manage a logical storage volume. Currently, this
3    interface only supports LUKS encrypted volumes, but it can be extended in
4    the future to support other types of volumes, as well.
5
6methods:
7    - name: FormatLuks
8      description: >
9          Format a LUKS encrypted device and create a filesystem.
10      parameters:
11          - name: Password
12            type: array[byte]
13            description: >
14                Array of bytes to use as the LUKS password.
15          - name: Type
16            type: enum[self.FilesystemType]
17            description: >
18                Type of filesystem, e.g. ext2, ext3, ext4, vfat.
19      errors:
20          - xyz.openbmc_project.Common.Error.InternalFailure
21          - xyz.openbmc_project.Common.Error.ResourceNotFound
22          - xyz.openbmc_project.Common.Error.UnsupportedRequest
23
24    - name: Erase
25      description: >
26          Erase the contents of the volume.
27      parameters:
28          - name: EraseType
29            type: enum[self.EraseMethod]
30            description: >
31                Describes what type of erase is done.
32      errors:
33          - xyz.openbmc_project.Common.Error.InternalFailure
34          - xyz.openbmc_project.Common.Error.ResourceNotFound
35
36    - name: Lock
37      description: >
38          Unmount the filesystem, lock the volume, and remove sensitive data
39          (e.g. volume key) from memory.
40      errors:
41          - xyz.openbmc_project.Common.Error.InternalFailure
42          - xyz.openbmc_project.Common.Error.UnsupportedRequest
43
44    - name: Unlock
45      description: >
46          Activate the volume and mount the filesystem.
47      parameters:
48          - name: Password
49            type: array[byte]
50            description: >
51                Array of bytes to use as the LUKS password.
52      errors:
53          - xyz.openbmc_project.Common.Error.InternalFailure
54          - xyz.openbmc_project.Common.Error.ResourceNotFound
55
56    - name: ChangePassword
57      description: >
58          Change the LUKS password that unlocks the storage volume.
59      parameters:
60          - name: OldPassword
61            type: array[byte]
62            description: >
63                Array of bytes for the old LUKS password.
64          - name: NewPassword
65            type: array[byte]
66            description: >
67                Array of bytes to use as the LUKS password.
68      errors:
69          - xyz.openbmc_project.Common.Error.InternalFailure
70          - xyz.openbmc_project.Common.Error.ResourceNotFound
71
72properties:
73    - name: Locked
74      type: boolean
75      default: false
76      description: >
77          Indicates whether the LUKS volume is locked.
78
79enumerations:
80    - name: EraseMethod
81      description: >
82          Indicates which erase method/step is being requested.
83      values:
84          - name: CryptoErase
85            description: >
86                Destroys the encryption key slots, preventing decyrption.
87          - name: VerifyGeometry
88            description: >
89                Confirms a set percent of the disk is accessible.
90          - name: LogicalOverWrite
91            description: >
92                Overwrites the disk with a reproducible incompressible pattern.
93          - name: LogicalVerify
94            description: >
95                Verifies a reproducible pattern has been written to the disk.
96          - name: VendorSanitize
97            description: >
98                Uses the sanitization provided by the device firmware.
99          - name: ZeroOverWrite
100            description: >
101                Writes zeros over the whole disk.
102          - name: ZeroVerify
103            description: >
104                Verifies the the entire disk has been zeroed.
105          - name: SecuredLocked
106            description: >
107                Locks the disk to prevent data being written to it.
108
109    - name: FilesystemType
110      description: >
111          Type of filesystem used on the storage device.
112      values:
113          - name: ext2
114            description: >
115                Filesystem type ext2
116          - name: ext3
117            description: >
118                Filesystem type ext3
119          - name: ext4
120            description: >
121                Filesystem type ext4
122          - name: vfat
123            description: >
124                Filesystem type vfat
125