From 25fc29122be37e1f4d8e55d7b2927585f68355e4 Mon Sep 17 00:00:00 2001 From: Jason Zhang Date: Wed, 7 Apr 2021 19:29:45 +0800 Subject: [PATCH] support enterprise_project_id in ims --- openstack/ims/v2/cloudimages/requests.go | 6 ++++++ openstack/ims/v2/cloudimages/results.go | 2 ++ 2 files changed, 8 insertions(+) diff --git a/openstack/ims/v2/cloudimages/requests.go b/openstack/ims/v2/cloudimages/requests.go index 725e870bc..3babc6ede 100644 --- a/openstack/ims/v2/cloudimages/requests.go +++ b/openstack/ims/v2/cloudimages/requests.go @@ -141,6 +141,8 @@ type CreateByServerOpts struct { MaxRam int `json:"max_ram,omitempty"` // the minimum memory of the image in the unit of MB MinRam int `json:"min_ram,omitempty"` + // Enterprise project ID + EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` } // CreateOpts represents options used to create an image. @@ -169,6 +171,8 @@ type CreateByOBSOpts struct { MaxRam int `json:"max_ram,omitempty"` // the minimum memory of the image in the unit of MB MinRam int `json:"min_ram,omitempty"` + // Enterprise project ID + EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` } // CreateOpts represents options used to create an image. @@ -191,6 +195,8 @@ type CreateDataImageByOBSOpts struct { MinDisk int `json:"min_disk" required:"true"` // the master key used for encrypting an image CmkId string `json:"cmk_id,omitempty"` + // Enterprise project ID + EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` } type DataImage struct { diff --git a/openstack/ims/v2/cloudimages/results.go b/openstack/ims/v2/cloudimages/results.go index 6c4bd9671..beb21b680 100644 --- a/openstack/ims/v2/cloudimages/results.go +++ b/openstack/ims/v2/cloudimages/results.go @@ -44,6 +44,8 @@ type Image struct { MinDisk int `json:"min_disk"` // the environment where the image is used VirtualEnvType string `json:"virtual_env_type"` + // Enterprise project ID + EnterpriseProjectID string `json:"enterprise_project_id"` // *size, virtual_size and checksum parameter are unavailable currently* Size int64 `json:"size"` VirtualSize int `json:"virtual_size"`