@@ -20,28 +20,6 @@ class KeyPairSchema(schema.ResponseSchema):
20
20
}
21
21
22
22
23
- class DataDiskInfoSchema (schema .ResponseSchema ):
24
- """DataDiskInfo - 数据盘信息"""
25
-
26
- fields = {
27
- "Features" : fields .List (fields .Str ()),
28
- "MaximalSize" : fields .Int (required = False , load_from = "MaximalSize" ),
29
- "MinimalSize" : fields .Int (required = False , load_from = "MinimalSize" ),
30
- "Name" : fields .Str (required = False , load_from = "Name" ),
31
- }
32
-
33
-
34
- class BootDiskInfoSchema (schema .ResponseSchema ):
35
- """BootDiskInfo - 系统盘信息"""
36
-
37
- fields = {
38
- "Features" : fields .List (fields .Str ()),
39
- "InstantResize" : fields .Bool (required = False , load_from = "InstantResize" ),
40
- "MaximalSize" : fields .Int (required = False , load_from = "MaximalSize" ),
41
- "Name" : fields .Str (required = False , load_from = "Name" ),
42
- }
43
-
44
-
45
23
class CollectionSchema (schema .ResponseSchema ):
46
24
"""Collection - CPU和内存可支持的规格"""
47
25
@@ -62,21 +40,24 @@ class FeatureModesSchema(schema.ResponseSchema):
62
40
}
63
41
64
42
65
- class PerformanceSchema (schema .ResponseSchema ):
66
- """Performance - GPU的性能指标 """
43
+ class DataDiskInfoSchema (schema .ResponseSchema ):
44
+ """DataDiskInfo - 数据盘信息 """
67
45
68
46
fields = {
69
- "Rate" : fields .Int (required = False , load_from = "Rate" ),
70
- "Value" : fields .Float (required = False , load_from = "Value" ),
47
+ "Features" : fields .List (fields .Str ()),
48
+ "MaximalSize" : fields .Int (required = False , load_from = "MaximalSize" ),
49
+ "MinimalSize" : fields .Int (required = False , load_from = "MinimalSize" ),
50
+ "Name" : fields .Str (required = False , load_from = "Name" ),
71
51
}
72
52
73
53
74
- class DisksSchema (schema .ResponseSchema ):
75
- """Disks - 磁盘信息 """
54
+ class BootDiskInfoSchema (schema .ResponseSchema ):
55
+ """BootDiskInfo - 系统盘信息 """
76
56
77
57
fields = {
78
- "BootDisk" : fields .List (BootDiskInfoSchema ()),
79
- "DataDisk" : fields .List (DataDiskInfoSchema ()),
58
+ "Features" : fields .List (fields .Str ()),
59
+ "InstantResize" : fields .Bool (required = False , load_from = "InstantResize" ),
60
+ "MaximalSize" : fields .Int (required = False , load_from = "MaximalSize" ),
80
61
"Name" : fields .Str (required = False , load_from = "Name" ),
81
62
}
82
63
@@ -108,6 +89,16 @@ class FeaturesSchema(schema.ResponseSchema):
108
89
}
109
90
110
91
92
+ class DisksSchema (schema .ResponseSchema ):
93
+ """Disks - 磁盘信息"""
94
+
95
+ fields = {
96
+ "BootDisk" : fields .List (BootDiskInfoSchema ()),
97
+ "DataDisk" : fields .List (DataDiskInfoSchema ()),
98
+ "Name" : fields .Str (required = False , load_from = "Name" ),
99
+ }
100
+
101
+
111
102
class CpuPlatformsSchema (schema .ResponseSchema ):
112
103
"""CpuPlatforms - CPU平台信息"""
113
104
@@ -118,6 +109,15 @@ class CpuPlatformsSchema(schema.ResponseSchema):
118
109
}
119
110
120
111
112
+ class PerformanceSchema (schema .ResponseSchema ):
113
+ """Performance - GPU的性能指标"""
114
+
115
+ fields = {
116
+ "Rate" : fields .Int (required = False , load_from = "Rate" ),
117
+ "Value" : fields .Float (required = False , load_from = "Value" ),
118
+ }
119
+
120
+
121
121
class AvailableInstanceTypesSchema (schema .ResponseSchema ):
122
122
"""AvailableInstanceTypes - https://ushare.ucloudadmin.com/pages/viewpage.action?pageId=104662646"""
123
123
@@ -205,14 +205,6 @@ class UHostDiskSetSchema(schema.ResponseSchema):
205
205
}
206
206
207
207
208
- class SpotAttributeSchema (schema .ResponseSchema ):
209
- """SpotAttribute - 竞价实例属性"""
210
-
211
- fields = {
212
- "RecycleTime" : fields .Int (required = False , load_from = "RecycleTime" ),
213
- }
214
-
215
-
216
208
class UHostKeyPairSchema (schema .ResponseSchema ):
217
209
"""UHostKeyPair - 主机密钥信息"""
218
210
@@ -232,6 +224,14 @@ class UDSetUDHostAttributeSchema(schema.ResponseSchema):
232
224
}
233
225
234
226
227
+ class SpotAttributeSchema (schema .ResponseSchema ):
228
+ """SpotAttribute - 竞价实例属性"""
229
+
230
+ fields = {
231
+ "RecycleTime" : fields .Int (required = False , load_from = "RecycleTime" ),
232
+ }
233
+
234
+
235
235
class UHostIPSetSchema (schema .ResponseSchema ):
236
236
"""UHostIPSet - DescribeUHostInstance"""
237
237
0 commit comments