This repository was archived by the owner on Aug 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
openstack/compute/v2/images Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ func TestListImages(t *testing.T) {
50
50
"minDisk": 0,
51
51
"progress": 100,
52
52
"minRam": 0,
53
- "metadata": {}
53
+ "metadata": {
54
+ "string": "string",
55
+ "true": true,
56
+ "nil": null
57
+ }
54
58
}
55
59
]
56
60
}
@@ -82,6 +86,7 @@ func TestListImages(t *testing.T) {
82
86
MinRAM : 0 ,
83
87
Progress : 100 ,
84
88
Status : "ACTIVE" ,
89
+ Metadata : map [string ]interface {}{},
85
90
},
86
91
Image {
87
92
ID : "f90f6034-2570-4974-8351-6b49732ef2eb" ,
@@ -92,6 +97,11 @@ func TestListImages(t *testing.T) {
92
97
MinRAM : 0 ,
93
98
Progress : 100 ,
94
99
Status : "ACTIVE" ,
100
+ Metadata : map [string ]interface {}{
101
+ "string" : "string" ,
102
+ "true" : true ,
103
+ "nil" : nil ,
104
+ },
95
105
},
96
106
}
97
107
@@ -131,7 +141,12 @@ func TestGetImage(t *testing.T) {
131
141
"minDisk": 0,
132
142
"progress": 100,
133
143
"minRam": 0,
134
- "metadata": {}
144
+ "metadata": {
145
+ "string": "string",
146
+ "true": true,
147
+ "nil": null
148
+ }
149
+
135
150
}
136
151
}
137
152
` )
@@ -151,6 +166,11 @@ func TestGetImage(t *testing.T) {
151
166
MinDisk : 0 ,
152
167
Progress : 100 ,
153
168
MinRAM : 0 ,
169
+ Metadata : map [string ]interface {}{
170
+ "string" : "string" ,
171
+ "true" : true ,
172
+ "nil" : nil ,
173
+ },
154
174
}
155
175
156
176
if ! reflect .DeepEqual (expected , actual ) {
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ type Image struct {
38
38
39
39
Created string
40
40
41
+ Metadata map [string ]interface {}
42
+
41
43
// MinDisk and MinRAM specify the minimum resources a server must provide to be able to install the image.
42
44
MinDisk int
43
45
MinRAM int
You can’t perform that action at this time.
0 commit comments