@@ -20,6 +20,16 @@ class KeyPairSchema(schema.ResponseSchema):
20
20
}
21
21
22
22
23
+ class FeatureModesSchema (schema .ResponseSchema ):
24
+ """FeatureModes - 可以支持的模式类别"""
25
+
26
+ fields = {
27
+ "MinimalCpuPlatform" : fields .List (fields .Str ()),
28
+ "Name" : fields .Str (required = False , load_from = "Name" ),
29
+ "RelatedToImageFeature" : fields .List (fields .Str ()),
30
+ }
31
+
32
+
23
33
class DataDiskInfoSchema (schema .ResponseSchema ):
24
34
"""DataDiskInfo - 数据盘信息"""
25
35
@@ -52,13 +62,12 @@ class CollectionSchema(schema.ResponseSchema):
52
62
}
53
63
54
64
55
- class FeatureModesSchema (schema .ResponseSchema ):
56
- """FeatureModes - 可以支持的模式类别 """
65
+ class FeaturesSchema (schema .ResponseSchema ):
66
+ """Features - 虚机可支持的特性 """
57
67
58
68
fields = {
59
- "MinimalCpuPlatform " : fields .List (fields . Str ()),
69
+ "Modes " : fields .List (FeatureModesSchema ()),
60
70
"Name" : fields .Str (required = False , load_from = "Name" ),
61
- "RelatedToImageFeature" : fields .List (fields .Str ()),
62
71
}
63
72
64
73
@@ -72,49 +81,40 @@ class DisksSchema(schema.ResponseSchema):
72
81
}
73
82
74
83
75
- class MachineSizesSchema (schema .ResponseSchema ):
76
- """MachineSizes - GPU、CPU和内存信息 """
84
+ class CpuPlatformsSchema (schema .ResponseSchema ):
85
+ """CpuPlatforms - CPU平台信息 """
77
86
78
87
fields = {
79
- "Collection" : fields .List (CollectionSchema ()),
80
- "Gpu" : fields .Int (required = False , load_from = "Gpu" ),
88
+ "Amd" : fields .List (fields .Str ()),
89
+ "Ampere" : fields .List (fields .Str ()),
90
+ "Intel" : fields .List (fields .Str ()),
81
91
}
82
92
83
93
84
- class GraphicsMemorySchema (schema .ResponseSchema ):
85
- """GraphicsMemory - GPU的显存指标 """
94
+ class PerformanceSchema (schema .ResponseSchema ):
95
+ """Performance - GPU的性能指标 """
86
96
87
97
fields = {
88
98
"Rate" : fields .Int (required = False , load_from = "Rate" ),
89
- "Value" : fields .Int (required = False , load_from = "Value" ),
90
- }
91
-
92
-
93
- class FeaturesSchema (schema .ResponseSchema ):
94
- """Features - 虚机可支持的特性"""
95
-
96
- fields = {
97
- "Modes" : fields .List (FeatureModesSchema ()),
98
- "Name" : fields .Str (required = False , load_from = "Name" ),
99
+ "Value" : fields .Float (required = False , load_from = "Value" ),
99
100
}
100
101
101
102
102
- class CpuPlatformsSchema (schema .ResponseSchema ):
103
- """CpuPlatforms - CPU平台信息 """
103
+ class MachineSizesSchema (schema .ResponseSchema ):
104
+ """MachineSizes - GPU、CPU和内存信息 """
104
105
105
106
fields = {
106
- "Amd" : fields .List (fields .Str ()),
107
- "Ampere" : fields .List (fields .Str ()),
108
- "Intel" : fields .List (fields .Str ()),
107
+ "Collection" : fields .List (CollectionSchema ()),
108
+ "Gpu" : fields .Int (required = False , load_from = "Gpu" ),
109
109
}
110
110
111
111
112
- class PerformanceSchema (schema .ResponseSchema ):
113
- """Performance - GPU的性能指标 """
112
+ class GraphicsMemorySchema (schema .ResponseSchema ):
113
+ """GraphicsMemory - GPU的显存指标 """
114
114
115
115
fields = {
116
116
"Rate" : fields .Int (required = False , load_from = "Rate" ),
117
- "Value" : fields .Float (required = False , load_from = "Value" ),
117
+ "Value" : fields .Int (required = False , load_from = "Value" ),
118
118
}
119
119
120
120
@@ -188,15 +188,6 @@ class IsolationGroupSchema(schema.ResponseSchema):
188
188
}
189
189
190
190
191
- class UHostKeyPairSchema (schema .ResponseSchema ):
192
- """UHostKeyPair - 主机密钥信息"""
193
-
194
- fields = {
195
- "KeyPairId" : fields .Str (required = False , load_from = "KeyPairId" ),
196
- "KeyPairState" : fields .Str (required = False , load_from = "KeyPairState" ),
197
- }
198
-
199
-
200
191
class UDSetUDHostAttributeSchema (schema .ResponseSchema ):
201
192
"""UDSetUDHostAttribute - 私有专区对应的宿主机属性"""
202
193
@@ -207,27 +198,12 @@ class UDSetUDHostAttributeSchema(schema.ResponseSchema):
207
198
}
208
199
209
200
210
- class UHostDiskSetSchema (schema .ResponseSchema ):
211
- """UHostDiskSet - DescribeUHostInstance"""
212
-
213
- fields = {
214
- "BackupType" : fields .Str (required = False , load_from = "BackupType" ),
215
- "DiskId" : fields .Str (required = False , load_from = "DiskId" ),
216
- "DiskType" : fields .Str (required = True , load_from = "DiskType" ),
217
- "Drive" : fields .Str (required = False , load_from = "Drive" ),
218
- "Encrypted" : fields .Str (required = False , load_from = "Encrypted" ),
219
- "IsBoot" : fields .Str (required = True , load_from = "IsBoot" ),
220
- "Name" : fields .Str (required = False , load_from = "Name" ),
221
- "Size" : fields .Int (required = False , load_from = "Size" ),
222
- "Type" : fields .Str (required = False , load_from = "Type" ),
223
- }
224
-
225
-
226
- class SpotAttributeSchema (schema .ResponseSchema ):
227
- """SpotAttribute - 竞价实例属性"""
201
+ class UHostKeyPairSchema (schema .ResponseSchema ):
202
+ """UHostKeyPair - 主机密钥信息"""
228
203
229
204
fields = {
230
- "RecycleTime" : fields .Int (required = False , load_from = "RecycleTime" ),
205
+ "KeyPairId" : fields .Str (required = False , load_from = "KeyPairId" ),
206
+ "KeyPairState" : fields .Str (required = False , load_from = "KeyPairState" ),
231
207
}
232
208
233
209
@@ -251,6 +227,30 @@ class UHostIPSetSchema(schema.ResponseSchema):
251
227
}
252
228
253
229
230
+ class SpotAttributeSchema (schema .ResponseSchema ):
231
+ """SpotAttribute - 竞价实例属性"""
232
+
233
+ fields = {
234
+ "RecycleTime" : fields .Int (required = False , load_from = "RecycleTime" ),
235
+ }
236
+
237
+
238
+ class UHostDiskSetSchema (schema .ResponseSchema ):
239
+ """UHostDiskSet - DescribeUHostInstance"""
240
+
241
+ fields = {
242
+ "BackupType" : fields .Str (required = False , load_from = "BackupType" ),
243
+ "DiskId" : fields .Str (required = False , load_from = "DiskId" ),
244
+ "DiskType" : fields .Str (required = True , load_from = "DiskType" ),
245
+ "Drive" : fields .Str (required = False , load_from = "Drive" ),
246
+ "Encrypted" : fields .Str (required = False , load_from = "Encrypted" ),
247
+ "IsBoot" : fields .Str (required = True , load_from = "IsBoot" ),
248
+ "Name" : fields .Str (required = False , load_from = "Name" ),
249
+ "Size" : fields .Int (required = False , load_from = "Size" ),
250
+ "Type" : fields .Str (required = False , load_from = "Type" ),
251
+ }
252
+
253
+
254
254
class UHostInstanceSetSchema (schema .ResponseSchema ):
255
255
"""UHostInstanceSet - DescribeUHostInstance"""
256
256
0 commit comments