@@ -40,6 +40,16 @@ class CollectionSchema(schema.ResponseSchema):
40
40
}
41
41
42
42
43
+ class FeatureModesSchema (schema .ResponseSchema ):
44
+ """FeatureModes - 可以支持的模式类别"""
45
+
46
+ fields = {
47
+ "MinimalCpuPlatform" : fields .List (fields .Str ()),
48
+ "Name" : fields .Str (required = False , load_from = "Name" ),
49
+ "RelatedToImageFeature" : fields .List (fields .Str ()),
50
+ }
51
+
52
+
43
53
class DataDiskInfoSchema (schema .ResponseSchema ):
44
54
"""DataDiskInfo - 数据盘信息"""
45
55
@@ -62,40 +72,29 @@ class BootDiskInfoSchema(schema.ResponseSchema):
62
72
}
63
73
64
74
65
- class FeatureModesSchema (schema .ResponseSchema ):
66
- """FeatureModes - 可以支持的模式类别 """
75
+ class MachineSizesSchema (schema .ResponseSchema ):
76
+ """MachineSizes - GPU、CPU和内存信息 """
67
77
68
78
fields = {
69
- "MinimalCpuPlatform" : fields .List (fields .Str ()),
70
- "Name" : fields .Str (required = False , load_from = "Name" ),
71
- "RelatedToImageFeature" : fields .List (fields .Str ()),
79
+ "Collection" : fields .List (CollectionSchema ()),
80
+ "Gpu" : fields .Int (required = False , load_from = "Gpu" ),
72
81
}
73
82
74
83
75
- class PerformanceSchema (schema .ResponseSchema ):
76
- """Performance - GPU的性能指标 """
84
+ class GraphicsMemorySchema (schema .ResponseSchema ):
85
+ """GraphicsMemory - GPU的显存指标 """
77
86
78
87
fields = {
79
88
"Rate" : fields .Int (required = False , load_from = "Rate" ),
80
- "Value" : fields .Float (required = False , load_from = "Value" ),
81
- }
82
-
83
-
84
- class MachineSizesSchema (schema .ResponseSchema ):
85
- """MachineSizes - GPU、CPU和内存信息"""
86
-
87
- fields = {
88
- "Collection" : fields .List (CollectionSchema ()),
89
- "Gpu" : fields .Int (required = False , load_from = "Gpu" ),
89
+ "Value" : fields .Int (required = False , load_from = "Value" ),
90
90
}
91
91
92
92
93
- class DisksSchema (schema .ResponseSchema ):
94
- """Disks - 磁盘信息 """
93
+ class FeaturesSchema (schema .ResponseSchema ):
94
+ """Features - 虚机可支持的特性 """
95
95
96
96
fields = {
97
- "BootDisk" : fields .List (BootDiskInfoSchema ()),
98
- "DataDisk" : fields .List (DataDiskInfoSchema ()),
97
+ "Modes" : fields .List (FeatureModesSchema ()),
99
98
"Name" : fields .Str (required = False , load_from = "Name" ),
100
99
}
101
100
@@ -110,20 +109,21 @@ class CpuPlatformsSchema(schema.ResponseSchema):
110
109
}
111
110
112
111
113
- class GraphicsMemorySchema (schema .ResponseSchema ):
114
- """GraphicsMemory - GPU的显存指标 """
112
+ class PerformanceSchema (schema .ResponseSchema ):
113
+ """Performance - GPU的性能指标 """
115
114
116
115
fields = {
117
116
"Rate" : fields .Int (required = False , load_from = "Rate" ),
118
- "Value" : fields .Int (required = False , load_from = "Value" ),
117
+ "Value" : fields .Float (required = False , load_from = "Value" ),
119
118
}
120
119
121
120
122
- class FeaturesSchema (schema .ResponseSchema ):
123
- """Features - 虚机可支持的特性 """
121
+ class DisksSchema (schema .ResponseSchema ):
122
+ """Disks - 磁盘信息 """
124
123
125
124
fields = {
126
- "Modes" : fields .List (FeatureModesSchema ()),
125
+ "BootDisk" : fields .List (BootDiskInfoSchema ()),
126
+ "DataDisk" : fields .List (DataDiskInfoSchema ()),
127
127
"Name" : fields .Str (required = False , load_from = "Name" ),
128
128
}
129
129
@@ -223,23 +223,6 @@ class UDSetUDHostAttributeSchema(schema.ResponseSchema):
223
223
}
224
224
225
225
226
- class SpotAttributeSchema (schema .ResponseSchema ):
227
- """SpotAttribute - 竞价实例属性"""
228
-
229
- fields = {
230
- "RecycleTime" : fields .Int (required = False , load_from = "RecycleTime" ),
231
- }
232
-
233
-
234
- class UHostKeyPairSchema (schema .ResponseSchema ):
235
- """UHostKeyPair - 主机密钥信息"""
236
-
237
- fields = {
238
- "KeyPairId" : fields .Str (required = False , load_from = "KeyPairId" ),
239
- "KeyPairState" : fields .Str (required = False , load_from = "KeyPairState" ),
240
- }
241
-
242
-
243
226
class UHostIPSetSchema (schema .ResponseSchema ):
244
227
"""UHostIPSet - DescribeUHostInstance"""
245
228
@@ -276,6 +259,23 @@ class UHostDiskSetSchema(schema.ResponseSchema):
276
259
}
277
260
278
261
262
+ class UHostKeyPairSchema (schema .ResponseSchema ):
263
+ """UHostKeyPair - 主机密钥信息"""
264
+
265
+ fields = {
266
+ "KeyPairId" : fields .Str (required = False , load_from = "KeyPairId" ),
267
+ "KeyPairState" : fields .Str (required = False , load_from = "KeyPairState" ),
268
+ }
269
+
270
+
271
+ class SpotAttributeSchema (schema .ResponseSchema ):
272
+ """SpotAttribute - 竞价实例属性"""
273
+
274
+ fields = {
275
+ "RecycleTime" : fields .Int (required = False , load_from = "RecycleTime" ),
276
+ }
277
+
278
+
279
279
class UHostInstanceSetSchema (schema .ResponseSchema ):
280
280
"""UHostInstanceSet - DescribeUHostInstance"""
281
281
0 commit comments