@@ -62,6 +62,15 @@ class BootDiskInfoSchema(schema.ResponseSchema):
6262 }
6363
6464
65+ class PerformanceSchema (schema .ResponseSchema ):
66+ """Performance - GPU的性能指标"""
67+
68+ fields = {
69+ "Rate" : fields .Int (required = False , load_from = "Rate" ),
70+ "Value" : fields .Float (required = False , load_from = "Value" ),
71+ }
72+
73+
6574class MachineSizesSchema (schema .ResponseSchema ):
6675 """MachineSizes - GPU、CPU和内存信息"""
6776
@@ -109,15 +118,6 @@ class CpuPlatformsSchema(schema.ResponseSchema):
109118 }
110119
111120
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-
121121class AvailableInstanceTypesSchema (schema .ResponseSchema ):
122122 """AvailableInstanceTypes - https://ushare.ucloudadmin.com/pages/viewpage.action?pageId=104662646"""
123123
@@ -189,19 +189,23 @@ class IsolationGroupSchema(schema.ResponseSchema):
189189 }
190190
191191
192- class UHostDiskSetSchema (schema .ResponseSchema ):
193- """UHostDiskSet - DescribeUHostInstance"""
192+ class UHostIPSetSchema (schema .ResponseSchema ):
193+ """UHostIPSet - DescribeUHostInstance"""
194194
195195 fields = {
196- "BackupType" : fields .Str (required = False , load_from = "BackupType" ),
197- "DiskId" : fields .Str (required = False , load_from = "DiskId" ),
198- "DiskType" : fields .Str (required = True , load_from = "DiskType" ),
199- "Drive" : fields .Str (required = False , load_from = "Drive" ),
200- "Encrypted" : fields .Str (required = False , load_from = "Encrypted" ),
201- "IsBoot" : fields .Str (required = True , load_from = "IsBoot" ),
202- "Name" : fields .Str (required = False , load_from = "Name" ),
203- "Size" : fields .Int (required = False , load_from = "Size" ),
196+ "Bandwidth" : fields .Int (required = False , load_from = "Bandwidth" ),
197+ "Default" : fields .Str (required = False , load_from = "Default" ),
198+ "IP" : fields .Str (required = False , load_from = "IP" ),
199+ "IPId" : fields .Str (required = False , load_from = "IPId" ),
200+ "IPMode" : fields .Str (required = True , load_from = "IPMode" ),
201+ "Mac" : fields .Str (required = False , load_from = "Mac" ),
202+ "NetworkInterfaceId" : fields .Str (
203+ required = False , load_from = "NetworkInterfaceId"
204+ ),
205+ "SubnetId" : fields .Str (required = False , load_from = "SubnetId" ),
204206 "Type" : fields .Str (required = False , load_from = "Type" ),
207+ "VPCId" : fields .Str (required = False , load_from = "VPCId" ),
208+ "Weight" : fields .Int (required = False , load_from = "Weight" ),
205209 }
206210
207211
@@ -214,13 +218,19 @@ class UHostKeyPairSchema(schema.ResponseSchema):
214218 }
215219
216220
217- class UDSetUDHostAttributeSchema (schema .ResponseSchema ):
218- """UDSetUDHostAttribute - 私有专区对应的宿主机属性 """
221+ class UHostDiskSetSchema (schema .ResponseSchema ):
222+ """UHostDiskSet - DescribeUHostInstance """
219223
220224 fields = {
221- "HostBinding" : fields .Bool (required = False , load_from = "HostBinding" ),
222- "UDHostId" : fields .Str (required = False , load_from = "UDHostId" ),
223- "UDSetId" : fields .Str (required = False , load_from = "UDSetId" ),
225+ "BackupType" : fields .Str (required = False , load_from = "BackupType" ),
226+ "DiskId" : fields .Str (required = False , load_from = "DiskId" ),
227+ "DiskType" : fields .Str (required = True , load_from = "DiskType" ),
228+ "Drive" : fields .Str (required = False , load_from = "Drive" ),
229+ "Encrypted" : fields .Str (required = False , load_from = "Encrypted" ),
230+ "IsBoot" : fields .Str (required = True , load_from = "IsBoot" ),
231+ "Name" : fields .Str (required = False , load_from = "Name" ),
232+ "Size" : fields .Int (required = False , load_from = "Size" ),
233+ "Type" : fields .Str (required = False , load_from = "Type" ),
224234 }
225235
226236
@@ -232,23 +242,13 @@ class SpotAttributeSchema(schema.ResponseSchema):
232242 }
233243
234244
235- class UHostIPSetSchema (schema .ResponseSchema ):
236- """UHostIPSet - DescribeUHostInstance """
245+ class UDSetUDHostAttributeSchema (schema .ResponseSchema ):
246+ """UDSetUDHostAttribute - 私有专区对应的宿主机属性 """
237247
238248 fields = {
239- "Bandwidth" : fields .Int (required = False , load_from = "Bandwidth" ),
240- "Default" : fields .Str (required = False , load_from = "Default" ),
241- "IP" : fields .Str (required = False , load_from = "IP" ),
242- "IPId" : fields .Str (required = False , load_from = "IPId" ),
243- "IPMode" : fields .Str (required = True , load_from = "IPMode" ),
244- "Mac" : fields .Str (required = False , load_from = "Mac" ),
245- "NetworkInterfaceId" : fields .Str (
246- required = False , load_from = "NetworkInterfaceId"
247- ),
248- "SubnetId" : fields .Str (required = False , load_from = "SubnetId" ),
249- "Type" : fields .Str (required = False , load_from = "Type" ),
250- "VPCId" : fields .Str (required = False , load_from = "VPCId" ),
251- "Weight" : fields .Int (required = False , load_from = "Weight" ),
249+ "HostBinding" : fields .Bool (required = False , load_from = "HostBinding" ),
250+ "UDHostId" : fields .Str (required = False , load_from = "UDHostId" ),
251+ "UDSetId" : fields .Str (required = False , load_from = "UDSetId" ),
252252 }
253253
254254
0 commit comments