Skip to content

Commit e2c1e6e

Browse files
authored
sdk: rolling update for 0.11.135 (#368)
1 parent 14b9748 commit e2c1e6e

5 files changed

Lines changed: 69 additions & 54 deletions

File tree

‎ucloud/services/sandbox/client.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ def get_sandbox_site(
125125
126126
**Response Model**
127127
128+
**SiteResource**
129+
- **CPU** (int) - CPU核心
130+
- **MemoryMB** (int) - 内存占用MB
131+
132+
128133
**SiteIPAccess**
129134
- **IPList** (list) - IP 列表
130135
- **Mode** (str) - IP限制模式"":不限制IP“allow”:自定义白名单“deny”:自定义黑名单
@@ -136,13 +141,14 @@ def get_sandbox_site(
136141
- **CustomDomain** (str) - 自定义域名
137142
- **CustomDomainError** (str) - 自定义域名签发错误信息
138143
- **CustomDomainStatus** (str) - 自定义域名签发状态
139-
- **Envs** (list) - 站点环境变量。格式:key=value
144+
- **Envs** (list) - 站点环境变量。格式:["key=value"]
140145
- **Host** (str) - 站点访问地址
141146
- **ID** (str) - 站点ID
142147
- **IPAccess** (dict) - 见 **SiteIPAccess** 模型定义
143148
- **KeyID** (str) - 站点Key ID
144149
- **Name** (str) - 名称
145150
- **Ready** (bool) - 是否就绪
151+
- **Resource** (dict) - 见 **SiteResource** 模型定义
146152
- **SandboxID** (str) - 沙箱ID
147153
- **UpdateTime** (int) - 更新时间
148154

‎ucloud/services/sandbox/schemas/models.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ class SiteIPAccessSchema(schema.ResponseSchema):
1212
}
1313

1414

15+
class SiteResourceSchema(schema.ResponseSchema):
16+
"""SiteResource - 站点资源"""
17+
18+
fields = {
19+
"CPU": fields.Int(required=True, load_from="CPU"),
20+
"MemoryMB": fields.Int(required=True, load_from="MemoryMB"),
21+
}
22+
23+
1524
class SiteSchema(schema.ResponseSchema):
1625
"""Site - 站点空间"""
1726

‎ucloud/services/vpc/client.py‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,17 +1590,17 @@ def describe_natgw(
15901590
15911591
**Response Model**
15921592
1593-
**NatGWIPResInfo**
1594-
- **EIP** (str) - 外网IP
1595-
- **OperatorName** (str) - IP的运营商信息
1596-
1597-
15981593
**NatGatewaySubnetSet**
15991594
- **Subnet** (str) - 子网网段
16001595
- **SubnetName** (str) - 子网名字
16011596
- **SubnetworkId** (str) - 子网id
16021597
16031598
1599+
**NatGWIPResInfo**
1600+
- **EIP** (str) - 外网IP
1601+
- **OperatorName** (str) - IP的运营商信息
1602+
1603+
16041604
**NatGatewayIPSet**
16051605
- **Bandwidth** (int) - 带宽
16061606
- **BandwidthType** (str) - EIP带宽类型
@@ -1912,9 +1912,14 @@ def describe_network_interface(
19121912
19131913
**Response Model**
19141914
1915-
**UNIQuotaInfo**
1916-
- **PrivateIpCount** (int) - 网卡拥有的内网IP数量
1917-
- **PrivateIpQuota** (int) - 网卡内网IP配额
1915+
**UNIIpInfo**
1916+
- **IpAddr** (list) - ip 地址
1917+
- **IpType** (str) - ip类型 SecondaryIp/PrimaryIp
1918+
1919+
1920+
**FwInfo**
1921+
- **Id** (str) - 防火墙资源 ID
1922+
- **Name** (str) - 防火墙资源名称
19181923
19191924
19201925
**SimpleIPv6AddressInfo**
@@ -1923,22 +1928,17 @@ def describe_network_interface(
19231928
- **IPv6Id** (str) - IPv6 资源 ID
19241929
19251930
1931+
**UNIQuotaInfo**
1932+
- **PrivateIpCount** (int) - 网卡拥有的内网IP数量
1933+
- **PrivateIpQuota** (int) - 网卡内网IP配额
1934+
1935+
19261936
**SecGroup**
19271937
- **Name** (str) - 安全组名称
19281938
- **Priority** (int) - 关联优先级
19291939
- **SecGroupId** (str) - 安全组ID
19301940
19311941
1932-
**UNIIpInfo**
1933-
- **IpAddr** (list) - ip 地址
1934-
- **IpType** (str) - ip类型 SecondaryIp/PrimaryIp
1935-
1936-
1937-
**FwInfo**
1938-
- **Id** (str) - 防火墙资源 ID
1939-
- **Name** (str) - 防火墙资源名称
1940-
1941-
19421942
**NetworkInterface**
19431943
- **AttachInstanceId** (str) - 绑定实例资源ID
19441944
- **CreateTime** (int) - 创建时间
@@ -1959,7 +1959,7 @@ def describe_network_interface(
19591959
- **Netmask** (str) - 内网IP掩码
19601960
- **OperatorName** (str) - 运营商
19611961
- **PrivateIp** (list) - 见 **UNIIpInfo** 模型定义
1962-
- **PrivateIpLimit** (list) - 见 **UNIQuotaInfo** 模型定义
1962+
- **PrivateIpLimit** (dict) - 见 **UNIQuotaInfo** 模型定义
19631963
- **PrivateIpSet** (list) - 关联内网IP。当前一个网卡仅支持绑定一个内网IP
19641964
- **Remark** (str) - 备注
19651965
- **SecGroup** (list) - 见 **SecGroup** 模型定义
@@ -2506,17 +2506,17 @@ def describe_vpc(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
25062506
25072507
**Response Model**
25082508
2509+
**VPCNetworkInfo**
2510+
- **Network** (str) - vpc地址空间
2511+
- **SubnetCount** (int) - 地址空间中子网数量
2512+
2513+
25092514
**IPv6NetworkInfo**
25102515
- **IPv6Network** (str) - IPv6网段
25112516
- **IPv6SubnetCount** (int) - IPv6子网数量
25122517
- **OperatorName** (str) - 类型
25132518
25142519
2515-
**VPCNetworkInfo**
2516-
- **Network** (str) - vpc地址空间
2517-
- **SubnetCount** (int) - 地址空间中子网数量
2518-
2519-
25202520
**VPCInfo**
25212521
- **CreateTime** (int) - 创建时间
25222522
- **IPv6Network** (str) - VPC关联的IPv6网段

‎ucloud/services/vpc/schemas/models.py‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -235,24 +235,6 @@ class AclInfoSchema(schema.ResponseSchema):
235235
}
236236

237237

238-
class UNIIpInfoSchema(schema.ResponseSchema):
239-
"""UNIIpInfo - 虚拟网卡内网IP信息"""
240-
241-
fields = {
242-
"IpAddr": fields.List(fields.Str()),
243-
"IpType": fields.Str(required=False, load_from="IpType"),
244-
}
245-
246-
247-
class FwInfoSchema(schema.ResponseSchema):
248-
"""FwInfo - 防火墙信息"""
249-
250-
fields = {
251-
"Id": fields.Str(required=False, load_from="Id"),
252-
"Name": fields.Str(required=False, load_from="Name"),
253-
}
254-
255-
256238
class SimpleIPv6AddressInfoSchema(schema.ResponseSchema):
257239
"""SimpleIPv6AddressInfo -"""
258240

@@ -276,6 +258,15 @@ class UNIQuotaInfoSchema(schema.ResponseSchema):
276258
}
277259

278260

261+
class UNIIpInfoSchema(schema.ResponseSchema):
262+
"""UNIIpInfo - 虚拟网卡内网IP信息"""
263+
264+
fields = {
265+
"IpAddr": fields.List(fields.Str()),
266+
"IpType": fields.Str(required=False, load_from="IpType"),
267+
}
268+
269+
279270
class SecGroupSchema(schema.ResponseSchema):
280271
"""SecGroup - UNI关联的安全组信息"""
281272

@@ -286,6 +277,15 @@ class SecGroupSchema(schema.ResponseSchema):
286277
}
287278

288279

280+
class FwInfoSchema(schema.ResponseSchema):
281+
"""FwInfo - 防火墙信息"""
282+
283+
fields = {
284+
"Id": fields.Str(required=False, load_from="Id"),
285+
"Name": fields.Str(required=False, load_from="Name"),
286+
}
287+
288+
289289
class NetworkInterfaceSchema(schema.ResponseSchema):
290290
"""NetworkInterface - 虚拟网卡信息"""
291291

@@ -313,7 +313,7 @@ class NetworkInterfaceSchema(schema.ResponseSchema):
313313
"Netmask": fields.Str(required=False, load_from="Netmask"),
314314
"OperatorName": fields.Str(required=True, load_from="OperatorName"),
315315
"PrivateIp": fields.List(UNIIpInfoSchema()),
316-
"PrivateIpLimit": fields.List(UNIQuotaInfoSchema()),
316+
"PrivateIpLimit": UNIQuotaInfoSchema(),
317317
"PrivateIpSet": fields.List(fields.Str()),
318318
"Remark": fields.Str(required=False, load_from="Remark"),
319319
"SecGroup": fields.List(SecGroupSchema()),
@@ -566,15 +566,6 @@ class VIPDetailSetSchema(schema.ResponseSchema):
566566
}
567567

568568

569-
class VPCNetworkInfoSchema(schema.ResponseSchema):
570-
"""VPCNetworkInfo - vpc地址空间信息"""
571-
572-
fields = {
573-
"Network": fields.Str(required=False, load_from="Network"),
574-
"SubnetCount": fields.Int(required=False, load_from="SubnetCount"),
575-
}
576-
577-
578569
class IPv6NetworkInfoSchema(schema.ResponseSchema):
579570
"""IPv6NetworkInfo -"""
580571

@@ -587,6 +578,15 @@ class IPv6NetworkInfoSchema(schema.ResponseSchema):
587578
}
588579

589580

581+
class VPCNetworkInfoSchema(schema.ResponseSchema):
582+
"""VPCNetworkInfo - vpc地址空间信息"""
583+
584+
fields = {
585+
"Network": fields.Str(required=False, load_from="Network"),
586+
"SubnetCount": fields.Int(required=False, load_from="SubnetCount"),
587+
}
588+
589+
590590
class VPCInfoSchema(schema.ResponseSchema):
591591
"""VPCInfo - VPC信息"""
592592

‎ucloud/version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.11.134"
1+
version = "0.11.135"

0 commit comments

Comments
 (0)