Open joshuachp opened 11 months ago
Create the structure to receive the CreateVolumeRequest and publish the AvailableVolumes property.
CreateVolumeRequest
AvailableVolumes
### Create Volume Request ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateVolumeRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/volume/id", "type": "string" }, { "endpoint": "/volume/driver", "type": "string" }, { "endpoint": "/volume/options", "type": "stringarray", "doc": "An array of key=value options to set for the drive" } ] } ``` ### Available Volumes ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableVolumes", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "allow_unset": true, "endpoint": "/%{volume_id}/created", "type": "boolean" }, { "allow_unset": true, "endpoint": "/%{volume_id}/driver", "type": "string" }, { "allow_unset": true, "endpoint": "/%{volume_id}/options", "type": "stringarray", "doc": "An array of key=value options to set for the drive" } ] } ```
Create the structure to receive the
CreateVolumeRequest
and publish theAvailableVolumes
property.Interfaces
### Create Volume Request ```json { "interface_name": "io.edgehog.devicemanager.apps.CreateVolumeRequest", "version_major": 0, "version_minor": 1, "type": "datastream", "ownership": "server", "aggregation": "object", "mappings": [ { "endpoint": "/volume/id", "type": "string" }, { "endpoint": "/volume/driver", "type": "string" }, { "endpoint": "/volume/options", "type": "stringarray", "doc": "An array of key=value options to set for the drive" } ] } ``` ### Available Volumes ```json { "interface_name": "io.edgehog.devicemanager.apps.AvailableVolumes", "version_major": 0, "version_minor": 1, "type": "properties", "ownership": "device", "mappings": [ { "allow_unset": true, "endpoint": "/%{volume_id}/created", "type": "boolean" }, { "allow_unset": true, "endpoint": "/%{volume_id}/driver", "type": "string" }, { "allow_unset": true, "endpoint": "/%{volume_id}/options", "type": "stringarray", "doc": "An array of key=value options to set for the drive" } ] } ```