@@ -20,6 +20,16 @@ class KeyPairSchema(schema.ResponseSchema):
2020 }
2121
2222
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+
2333class DataDiskInfoSchema (schema .ResponseSchema ):
2434 """DataDiskInfo - 数据盘信息"""
2535
@@ -52,13 +62,12 @@ class CollectionSchema(schema.ResponseSchema):
5262 }
5363
5464
55- class FeatureModesSchema (schema .ResponseSchema ):
56- """FeatureModes - 可以支持的模式类别 """
65+ class FeaturesSchema (schema .ResponseSchema ):
66+ """Features - 虚机可支持的特性 """
5767
5868 fields = {
59- "MinimalCpuPlatform " : fields .List (fields . Str ()),
69+ "Modes " : fields .List (FeatureModesSchema ()),
6070 "Name" : fields .Str (required = False , load_from = "Name" ),
61- "RelatedToImageFeature" : fields .List (fields .Str ()),
6271 }
6372
6473
@@ -72,49 +81,40 @@ class DisksSchema(schema.ResponseSchema):
7281 }
7382
7483
75- class MachineSizesSchema (schema .ResponseSchema ):
76- """MachineSizes - GPU、CPU和内存信息 """
84+ class CpuPlatformsSchema (schema .ResponseSchema ):
85+ """CpuPlatforms - CPU平台信息 """
7786
7887 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 ()),
8191 }
8292
8393
84- class GraphicsMemorySchema (schema .ResponseSchema ):
85- """GraphicsMemory - GPU的显存指标 """
94+ class PerformanceSchema (schema .ResponseSchema ):
95+ """Performance - GPU的性能指标 """
8696
8797 fields = {
8898 "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" ),
99100 }
100101
101102
102- class CpuPlatformsSchema (schema .ResponseSchema ):
103- """CpuPlatforms - CPU平台信息 """
103+ class MachineSizesSchema (schema .ResponseSchema ):
104+ """MachineSizes - GPU、CPU和内存信息 """
104105
105106 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" ),
109109 }
110110
111111
112- class PerformanceSchema (schema .ResponseSchema ):
113- """Performance - GPU的性能指标 """
112+ class GraphicsMemorySchema (schema .ResponseSchema ):
113+ """GraphicsMemory - GPU的显存指标 """
114114
115115 fields = {
116116 "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" ),
118118 }
119119
120120
@@ -188,15 +188,6 @@ class IsolationGroupSchema(schema.ResponseSchema):
188188 }
189189
190190
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-
200191class UDSetUDHostAttributeSchema (schema .ResponseSchema ):
201192 """UDSetUDHostAttribute - 私有专区对应的宿主机属性"""
202193
@@ -207,27 +198,12 @@ class UDSetUDHostAttributeSchema(schema.ResponseSchema):
207198 }
208199
209200
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 - 主机密钥信息"""
228203
229204 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" ),
231207 }
232208
233209
@@ -251,6 +227,30 @@ class UHostIPSetSchema(schema.ResponseSchema):
251227 }
252228
253229
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+
254254class UHostInstanceSetSchema (schema .ResponseSchema ):
255255 """UHostInstanceSet - DescribeUHostInstance"""
256256
0 commit comments