Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ucloud/services/sandbox/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ def get_sandbox_site(

**Response Model**

**SiteResource**
- **CPU** (int) - CPU核心
- **MemoryMB** (int) - 内存占用MB


**SiteIPAccess**
- **IPList** (list) - IP 列表
- **Mode** (str) - IP限制模式"":不限制IP“allow”:自定义白名单“deny”:自定义黑名单
Expand All @@ -136,13 +141,14 @@ def get_sandbox_site(
- **CustomDomain** (str) - 自定义域名
- **CustomDomainError** (str) - 自定义域名签发错误信息
- **CustomDomainStatus** (str) - 自定义域名签发状态
- **Envs** (list) - 站点环境变量。格式:key=value
- **Envs** (list) - 站点环境变量。格式:["key=value"]
- **Host** (str) - 站点访问地址
- **ID** (str) - 站点ID
- **IPAccess** (dict) - 见 **SiteIPAccess** 模型定义
- **KeyID** (str) - 站点Key ID
- **Name** (str) - 名称
- **Ready** (bool) - 是否就绪
- **Resource** (dict) - 见 **SiteResource** 模型定义
- **SandboxID** (str) - 沙箱ID
- **UpdateTime** (int) - 更新时间

Expand Down
9 changes: 9 additions & 0 deletions ucloud/services/sandbox/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ class SiteIPAccessSchema(schema.ResponseSchema):
}


class SiteResourceSchema(schema.ResponseSchema):
"""SiteResource - 站点资源"""

fields = {
"CPU": fields.Int(required=True, load_from="CPU"),
"MemoryMB": fields.Int(required=True, load_from="MemoryMB"),
}


class SiteSchema(schema.ResponseSchema):
"""Site - 站点空间"""

Expand Down
48 changes: 24 additions & 24 deletions ucloud/services/vpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1590,17 +1590,17 @@ def describe_natgw(

**Response Model**

**NatGWIPResInfo**
- **EIP** (str) - 外网IP
- **OperatorName** (str) - IP的运营商信息


**NatGatewaySubnetSet**
- **Subnet** (str) - 子网网段
- **SubnetName** (str) - 子网名字
- **SubnetworkId** (str) - 子网id


**NatGWIPResInfo**
- **EIP** (str) - 外网IP
- **OperatorName** (str) - IP的运营商信息


**NatGatewayIPSet**
- **Bandwidth** (int) - 带宽
- **BandwidthType** (str) - EIP带宽类型
Expand Down Expand Up @@ -1912,9 +1912,14 @@ def describe_network_interface(

**Response Model**

**UNIQuotaInfo**
- **PrivateIpCount** (int) - 网卡拥有的内网IP数量
- **PrivateIpQuota** (int) - 网卡内网IP配额
**UNIIpInfo**
- **IpAddr** (list) - ip 地址
- **IpType** (str) - ip类型 SecondaryIp/PrimaryIp


**FwInfo**
- **Id** (str) - 防火墙资源 ID
- **Name** (str) - 防火墙资源名称


**SimpleIPv6AddressInfo**
Expand All @@ -1923,22 +1928,17 @@ def describe_network_interface(
- **IPv6Id** (str) - IPv6 资源 ID


**UNIQuotaInfo**
- **PrivateIpCount** (int) - 网卡拥有的内网IP数量
- **PrivateIpQuota** (int) - 网卡内网IP配额


**SecGroup**
- **Name** (str) - 安全组名称
- **Priority** (int) - 关联优先级
- **SecGroupId** (str) - 安全组ID


**UNIIpInfo**
- **IpAddr** (list) - ip 地址
- **IpType** (str) - ip类型 SecondaryIp/PrimaryIp


**FwInfo**
- **Id** (str) - 防火墙资源 ID
- **Name** (str) - 防火墙资源名称


**NetworkInterface**
- **AttachInstanceId** (str) - 绑定实例资源ID
- **CreateTime** (int) - 创建时间
Expand All @@ -1959,7 +1959,7 @@ def describe_network_interface(
- **Netmask** (str) - 内网IP掩码
- **OperatorName** (str) - 运营商
- **PrivateIp** (list) - 见 **UNIIpInfo** 模型定义
- **PrivateIpLimit** (list) - 见 **UNIQuotaInfo** 模型定义
- **PrivateIpLimit** (dict) - 见 **UNIQuotaInfo** 模型定义
- **PrivateIpSet** (list) - 关联内网IP。当前一个网卡仅支持绑定一个内网IP
- **Remark** (str) - 备注
- **SecGroup** (list) - 见 **SecGroup** 模型定义
Expand Down Expand Up @@ -2506,17 +2506,17 @@ def describe_vpc(self, req: typing.Optional[dict] = None, **kwargs) -> dict:

**Response Model**

**VPCNetworkInfo**
- **Network** (str) - vpc地址空间
- **SubnetCount** (int) - 地址空间中子网数量


**IPv6NetworkInfo**
- **IPv6Network** (str) - IPv6网段
- **IPv6SubnetCount** (int) - IPv6子网数量
- **OperatorName** (str) - 类型


**VPCNetworkInfo**
- **Network** (str) - vpc地址空间
- **SubnetCount** (int) - 地址空间中子网数量


**VPCInfo**
- **CreateTime** (int) - 创建时间
- **IPv6Network** (str) - VPC关联的IPv6网段
Expand Down
56 changes: 28 additions & 28 deletions ucloud/services/vpc/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,24 +235,6 @@ class AclInfoSchema(schema.ResponseSchema):
}


class UNIIpInfoSchema(schema.ResponseSchema):
"""UNIIpInfo - 虚拟网卡内网IP信息"""

fields = {
"IpAddr": fields.List(fields.Str()),
"IpType": fields.Str(required=False, load_from="IpType"),
}


class FwInfoSchema(schema.ResponseSchema):
"""FwInfo - 防火墙信息"""

fields = {
"Id": fields.Str(required=False, load_from="Id"),
"Name": fields.Str(required=False, load_from="Name"),
}


class SimpleIPv6AddressInfoSchema(schema.ResponseSchema):
"""SimpleIPv6AddressInfo -"""

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


class UNIIpInfoSchema(schema.ResponseSchema):
"""UNIIpInfo - 虚拟网卡内网IP信息"""

fields = {
"IpAddr": fields.List(fields.Str()),
"IpType": fields.Str(required=False, load_from="IpType"),
}


class SecGroupSchema(schema.ResponseSchema):
"""SecGroup - UNI关联的安全组信息"""

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


class FwInfoSchema(schema.ResponseSchema):
"""FwInfo - 防火墙信息"""

fields = {
"Id": fields.Str(required=False, load_from="Id"),
"Name": fields.Str(required=False, load_from="Name"),
}


class NetworkInterfaceSchema(schema.ResponseSchema):
"""NetworkInterface - 虚拟网卡信息"""

Expand Down Expand Up @@ -313,7 +313,7 @@ class NetworkInterfaceSchema(schema.ResponseSchema):
"Netmask": fields.Str(required=False, load_from="Netmask"),
"OperatorName": fields.Str(required=True, load_from="OperatorName"),
"PrivateIp": fields.List(UNIIpInfoSchema()),
"PrivateIpLimit": fields.List(UNIQuotaInfoSchema()),
"PrivateIpLimit": UNIQuotaInfoSchema(),
"PrivateIpSet": fields.List(fields.Str()),
"Remark": fields.Str(required=False, load_from="Remark"),
"SecGroup": fields.List(SecGroupSchema()),
Expand Down Expand Up @@ -566,15 +566,6 @@ class VIPDetailSetSchema(schema.ResponseSchema):
}


class VPCNetworkInfoSchema(schema.ResponseSchema):
"""VPCNetworkInfo - vpc地址空间信息"""

fields = {
"Network": fields.Str(required=False, load_from="Network"),
"SubnetCount": fields.Int(required=False, load_from="SubnetCount"),
}


class IPv6NetworkInfoSchema(schema.ResponseSchema):
"""IPv6NetworkInfo -"""

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


class VPCNetworkInfoSchema(schema.ResponseSchema):
"""VPCNetworkInfo - vpc地址空间信息"""

fields = {
"Network": fields.Str(required=False, load_from="Network"),
"SubnetCount": fields.Int(required=False, load_from="SubnetCount"),
}


class VPCInfoSchema(schema.ResponseSchema):
"""VPCInfo - VPC信息"""

Expand Down
2 changes: 1 addition & 1 deletion ucloud/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "0.11.134"
version = "0.11.135"