From 13f026c0a4be362369b900565bf28f8fae78c5c6 Mon Sep 17 00:00:00 2001 From: Maria Shaldybin Date: Thu, 25 Sep 2025 21:40:48 +0000 Subject: [PATCH] Add dedicated device --- domain/service_broker.go | 20 ++++++++++++-------- service_broker.go | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/domain/service_broker.go b/domain/service_broker.go index e492b401..15ab9946 100644 --- a/domain/service_broker.go +++ b/domain/service_broker.go @@ -68,18 +68,22 @@ const ( ) type VolumeMount struct { - Driver string `json:"driver"` - ContainerDir string `json:"container_dir"` - Mode string `json:"mode"` - DeviceType string `json:"device_type"` - Device SharedDevice `json:"device"` + Driver string `json:"driver"` + ContainerDir string `json:"container_dir"` + Mode string `json:"mode"` + DeviceType string `json:"device_type"` + Device Device `json:"device,omitempty"` } -type SharedDevice struct { - VolumeId string `json:"volume_id"` - MountConfig map[string]any `json:"mount_config"` +type Device struct { + VolumeId string `json:"volume_id"` + MountConfig map[string]any `json:"mount_config"` + DeviceConfig map[string]any `json:"device_config,omitempty"` } +// Deprecated: Use Device +type SharedDevice = Device + type ProvisionDetails struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` diff --git a/service_broker.go b/service_broker.go index 09a88490..a93fc84b 100644 --- a/service_broker.go +++ b/service_broker.go @@ -105,7 +105,7 @@ type GetBindingSpec = domain.GetBindingSpec type VolumeMount = domain.VolumeMount // Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain -type SharedDevice = domain.SharedDevice +type SharedDevice = domain.Device // Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain/apiresponses var (