diff --git a/api/docs.go b/api/docs.go index a73928a06..5287aab9e 100644 --- a/api/docs.go +++ b/api/docs.go @@ -8461,7 +8461,7 @@ const docTemplate = `{ "IId", "Name", "OSArchitecture", - "OSDiskSize", + "OSDiskSizeInGB", "OSDiskType", "OSDistribution", "OSPlatform", @@ -8502,7 +8502,7 @@ const docTemplate = `{ ], "example": "x86_64" }, - "OSDiskSize": { + "OSDiskSizeInGB": { "description": "35, etc., GB", "type": "string", "example": "35" diff --git a/api/swagger.json b/api/swagger.json index ac7a2a69a..6803e6f6f 100644 --- a/api/swagger.json +++ b/api/swagger.json @@ -8458,7 +8458,7 @@ "IId", "Name", "OSArchitecture", - "OSDiskSize", + "OSDiskSizeInGB", "OSDiskType", "OSDistribution", "OSPlatform", @@ -8499,7 +8499,7 @@ ], "example": "x86_64" }, - "OSDiskSize": { + "OSDiskSizeInGB": { "description": "35, etc., GB", "type": "string", "example": "35" diff --git a/api/swagger.yaml b/api/swagger.yaml index fd4976e3b..a3a733f13 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -345,7 +345,7 @@ definitions: - $ref: '#/definitions/spider.OSArchitecture' description: arm64, x86_64 etc. example: x86_64 - OSDiskSize: + OSDiskSizeInGB: description: 35, etc., GB example: "35" type: string @@ -372,7 +372,7 @@ definitions: - IId - Name - OSArchitecture - - OSDiskSize + - OSDiskSizeInGB - OSDiskType - OSDistribution - OSPlatform diff --git a/cloud-control-manager/cloud-driver/drivers/aws/resources/ImageHandler.go b/cloud-control-manager/cloud-driver/drivers/aws/resources/ImageHandler.go index 20b82ac61..5ab203d0c 100644 --- a/cloud-control-manager/cloud-driver/drivers/aws/resources/ImageHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/aws/resources/ImageHandler.go @@ -58,7 +58,7 @@ func (imageHandler *AwsImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) OSPlatform: "Linux/UNIX", OSDistribution: "Ubuntu 18.04", OSDiskType: "gp3", - OSDiskSize: "35", + OSDiskSizeInGB: "35", Status: "Available", KeyValueList: nil, }, nil diff --git a/cloud-control-manager/cloud-driver/drivers/docker/resources/ImageHandler.go b/cloud-control-manager/cloud-driver/drivers/docker/resources/ImageHandler.go index d856b8fb3..da40cb0b8 100644 --- a/cloud-control-manager/cloud-driver/drivers/docker/resources/ImageHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/docker/resources/ImageHandler.go @@ -90,7 +90,7 @@ func (imageHandler *DockerImageHandler) CreateImage(imageReqInfo irs.ImageReqInf OSPlatform: "Linux/UNIX", OSDistribution: "Ubuntu 18.04", OSDiskType: "gp3", - OSDiskSize: "35", + OSDiskSizeInGB: "35", Status: "Available", KeyValueList: nil, }, nil @@ -161,7 +161,7 @@ func (imageHandler *DockerImageHandler) ListImage() ([]*irs.ImageInfo, error) { OSPlatform: "Linux/UNIX", OSDistribution: "Ubuntu 18.04", OSDiskType: "gp3", - OSDiskSize: "35", + OSDiskSizeInGB: "35", Status: "Available", KeyValueList: nil, } @@ -188,7 +188,7 @@ func (imageHandler *DockerImageHandler) GetImage(imageIID irs.IID) (irs.ImageInf OSPlatform: "Linux/UNIX", OSDistribution: "Ubuntu 18.04", OSDiskType: "gp3", - OSDiskSize: "35", + OSDiskSizeInGB: "35", Status: "Available", KeyValueList: nil, }, nil diff --git a/cloud-control-manager/cloud-driver/drivers/mock/resources/ImageHandler.go b/cloud-control-manager/cloud-driver/drivers/mock/resources/ImageHandler.go index 25a59ccb0..9a640f777 100644 --- a/cloud-control-manager/cloud-driver/drivers/mock/resources/ImageHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/mock/resources/ImageHandler.go @@ -49,7 +49,7 @@ func PrepareVMImage(mockName string) { OSPlatform: "Linux/UNIX", OSDistribution: "Ubuntu 18.04", OSDiskType: "gp3", - OSDiskSize: "35", + OSDiskSizeInGB: "35", Status: "Available", KeyValueList: nil, }, @@ -61,7 +61,7 @@ func PrepareVMImage(mockName string) { OSPlatform: "Linux/UNIX", OSDistribution: "CentOS 8", OSDiskType: "gp3", - OSDiskSize: "40", + OSDiskSizeInGB: "40", Status: "Available", KeyValueList: nil, }, @@ -73,7 +73,7 @@ func PrepareVMImage(mockName string) { OSPlatform: "Windows", OSDistribution: "Windows Server 2019", OSDiskType: "gp3", - OSDiskSize: "50", + OSDiskSizeInGB: "50", Status: "Available", KeyValueList: nil, }, @@ -85,7 +85,7 @@ func PrepareVMImage(mockName string) { OSPlatform: "Linux/UNIX", OSDistribution: "Ubuntu 22.04", OSDiskType: "gp3", - OSDiskSize: "35", + OSDiskSizeInGB: "35", Status: "Available", KeyValueList: nil, }, @@ -97,7 +97,7 @@ func PrepareVMImage(mockName string) { OSPlatform: "Linux/UNIX", OSDistribution: "Amazon Linux 2", OSDiskType: "gp3", - OSDiskSize: "30", + OSDiskSizeInGB: "30", Status: "Available", KeyValueList: nil, }, @@ -124,7 +124,7 @@ func (imageHandler *MockImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) OSPlatform: "Linux/UNIX", OSDistribution: "Ubuntu 18.04", OSDiskType: "gp3", - OSDiskSize: "35", + OSDiskSizeInGB: "35", Status: "Available", KeyValueList: nil, } diff --git a/cloud-control-manager/cloud-driver/interfaces/resources/ImageHandler.go b/cloud-control-manager/cloud-driver/interfaces/resources/ImageHandler.go index 99be8dd37..aeeb653c0 100644 --- a/cloud-control-manager/cloud-driver/interfaces/resources/ImageHandler.go +++ b/cloud-control-manager/cloud-driver/interfaces/resources/ImageHandler.go @@ -53,7 +53,7 @@ type ImageInfo struct { OSPlatform OSPlatform `json:"OSPlatform" validate:"required" example:"Linux/UNIX" description:"The platform of the operating system of the image."` // Linux/UNIX, Windows, NA OSDistribution string `json:"OSDistribution" validate:"required" example:"Ubuntu 22.04~" description:"The distribution of the operating system of the image."` // Ubuntu 22.04~, CentOS 8 etc. OSDiskType string `json:"OSDiskType" validate:"required" example:"gp3" description:"The type of the disk of the image."` // gp3, etc. - OSDiskSize string `json:"OSDiskSize" validate:"required" example:"35" description:"The size of the disk of the image."` // 35, etc., GB + OSDiskSizeInGB string `json:"OSDiskSizeInGB" validate:"required" example:"35" description:"The size of the disk of the image."` // 35, etc., GB ImageStatus ImageStatus `json:"Status" validate:"required" example:"Available" description:"The status of the image, e.g., Available or Unavailable."` // Available, Unavailable KeyValueList []KeyValue `json:"KeyValueList,omitempty" validate:"omitempty" description:"A list of key-value pairs associated with the image."`