Skip to content

Commit e12be47

Browse files
authored
Merge pull request #40 from sykim-etri/update-image-list-property
Add nhncloud_product property in images.ListOpts
2 parents 38f4f47 + d9423e6 commit e12be47

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

openstack/imageservice/v2/images/requests.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"net/url"
66
"time"
77

8-
"github.com/cloud-barista/nhncloud-sdk-go"
8+
gophercloud "github.com/cloud-barista/nhncloud-sdk-go"
99
"github.com/cloud-barista/nhncloud-sdk-go/pagination"
1010
)
1111

@@ -61,6 +61,10 @@ type ListOpts struct {
6161
// SizeMax filters on the size_max image property.
6262
SizeMax int64 `q:"size_max"`
6363

64+
// NhncloudProduct filters on the nhncloud_product image property.
65+
// It can be 'compute', 'gpu', and 'conatiner'
66+
NhncloudProduct ImageNhncloudProduct `q:"nhncloud_product"`
67+
6468
// Sort sorts the results using the new style of sorting. See the OpenStack
6569
// Image API reference for the exact syntax.
6670
//

openstack/imageservice/v2/images/types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,18 @@ type ImageDateQuery struct {
106106
Date time.Time
107107
Filter ImageDateFilter
108108
}
109+
110+
// ImageNhncloudProduct: 이미지의 인프라 서비스 종류
111+
// https://docs.nhncloud.com/ko/Compute/Image/ko/public-api/#_2
112+
type ImageNhncloudProduct string
113+
114+
const (
115+
// Instance 서비스 이미지
116+
ImageNhncloudProductCompute ImageNhncloudProduct = "compute"
117+
118+
// GPU Instance 서비스 이미지
119+
ImageNhncloudProductGpu ImageNhncloudProduct = "gpu"
120+
121+
// NHN Kubernetes 서비스 이미지
122+
ImageNhncloudProductContainer ImageNhncloudProduct = "container"
123+
)

0 commit comments

Comments
 (0)