Skip to content

Commit 73695b8

Browse files
author
fengyikai
committed
星流平台(aicp):资源组节点;
1 parent 351cbc9 commit 73695b8

3 files changed

Lines changed: 60 additions & 6 deletions

File tree

ksyun/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515

1616

17-
__version__ = '1.5.8.26'
17+
__version__ = '1.5.8.27'

ksyun/client/kec/v20160304/client.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,6 +1940,29 @@ def ModifyInstanceAutoDeleteTime(self, request):
19401940
raise KsyunSDKException(e.message, e.message)
19411941

19421942

1943+
def DescribeKecInventory(self, request):
1944+
"""查询云主机库存
1945+
:param request: Request instance for DescribeKecInventory.
1946+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeKecInventoryRequest`
1947+
"""
1948+
try:
1949+
params = request._serialize()
1950+
body = self.call_judge("DescribeKecInventory", params, "application/x-www-form-urlencoded")
1951+
response = json.loads(body)
1952+
if "Error" not in response:
1953+
return body
1954+
else:
1955+
code = response["Error"]["Code"]
1956+
message = response["Error"]["Message"]
1957+
req_id = response["RequestId"]
1958+
raise KsyunSDKException(code, message, req_id)
1959+
except Exception as e:
1960+
if isinstance(e, KsyunSDKException):
1961+
raise
1962+
else:
1963+
raise KsyunSDKException(e.message, e.message)
1964+
1965+
19431966
def ModifyScalingConfiguration(self, request):
19441967
"""修改启动配置
19451968
:param request: Request instance for ModifyScalingConfiguration.

ksyun/client/kec/v20160304/models.py

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,6 @@ def __init__(self):
751751
:type PathPrefix: Filter
752752
:param PrivateIpAddress:
753753
:type PathPrefix: String
754-
:param VpcIpv6: 指定子网下的ipv6地址
755-
:type PathPrefix: String
756754
:param MacAddress:
757755
:type PathPrefix: String
758756
"""
@@ -761,7 +759,6 @@ def __init__(self):
761759
self.SubnetId = None
762760
self.SecurityGroupId = None
763761
self.PrivateIpAddress = None
764-
self.VpcIpv6 = None
765762
self.MacAddress = None
766763

767764
def _deserialize(self, params):
@@ -775,8 +772,6 @@ def _deserialize(self, params):
775772
self.SecurityGroupId = params.get("SecurityGroupId")
776773
if params.get("PrivateIpAddress"):
777774
self.PrivateIpAddress = params.get("PrivateIpAddress")
778-
if params.get("VpcIpv6"):
779-
self.VpcIpv6 = params.get("VpcIpv6")
780775
if params.get("MacAddress"):
781776
self.MacAddress = params.get("MacAddress")
782777

@@ -3054,6 +3049,42 @@ def _deserialize(self, params):
30543049
self.AutoDeleteEip = params.get("AutoDeleteEip")
30553050

30563051

3052+
class DescribeKecInventoryRequest(AbstractModel):
3053+
"""DescribeKecInventory请求参数结构体
3054+
"""
3055+
3056+
def __init__(self):
3057+
r"""查询云主机库存
3058+
:param InstanceType: 实例类型
3059+
:type PathPrefix: String
3060+
:param DataDiskGb: 数据卷容量,单位GB
3061+
:type PathPrefix: Int
3062+
:param SystemDisk.DiskSize: 系统盘大小
3063+
:type PathPrefix: Int
3064+
:param SystemDisk.DiskType: 系统盘类型
3065+
:type PathPrefix: String
3066+
:param AvailabilityZone: 可用区信息
3067+
:type PathPrefix: String
3068+
"""
3069+
self.InstanceType = None
3070+
self.DataDiskGb = None
3071+
self.SystemDisk.DiskSize = None
3072+
self.SystemDisk.DiskType = None
3073+
self.AvailabilityZone = None
3074+
3075+
def _deserialize(self, params):
3076+
if params.get("InstanceType"):
3077+
self.InstanceType = params.get("InstanceType")
3078+
if params.get("DataDiskGb"):
3079+
self.DataDiskGb = params.get("DataDiskGb")
3080+
if params.get("SystemDisk.DiskSize"):
3081+
self.SystemDisk.DiskSize = params.get("SystemDisk.DiskSize")
3082+
if params.get("SystemDisk.DiskType"):
3083+
self.SystemDisk.DiskType = params.get("SystemDisk.DiskType")
3084+
if params.get("AvailabilityZone"):
3085+
self.AvailabilityZone = params.get("AvailabilityZone")
3086+
3087+
30573088
class ModifyScalingConfigurationRequest(AbstractModel):
30583089
"""ModifyScalingConfiguration请求参数结构体
30593090
"""

0 commit comments

Comments
 (0)