Skip to content

Commit 052631e

Browse files
Merge pull request #290 from jdcloud-apigateway/master
publish jdcloud-sdk-python 1.6.312
2 parents e38b59b + 6391ed2 commit 052631e

71 files changed

Lines changed: 3034 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 更新历史 #
2+
API版本:0.0.1
3+
4+
| 发布时间 | 版本号 | 更新 | 说明 |
5+
|------------|-------|------|---------------------------------------------------------------------------------------------------------------|
6+
| 2025-02-21 | 0.0.1 | 初始化 | -

jdcloud_sdk/services/hpc/__init__.py

Whitespace-only changes.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class AssociateElasticIpRequest(JDCloudRequest):
23+
"""
24+
为实例绑定公网IP。
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(AssociateElasticIpRequest, self).__init__(
30+
'/regions/{regionId}/baremetals/{instanceId}:associateElasticIp', 'POST', header, version)
31+
self.parameters = parameters
32+
33+
34+
class AssociateElasticIpParameters(object):
35+
36+
def __init__(self,regionId, instanceId, elasticIpId):
37+
"""
38+
:param regionId: 地域ID。
39+
:param instanceId: 实例ID。
40+
:param elasticIpId: 公网IP的ID。
41+
42+
"""
43+
44+
self.regionId = regionId
45+
self.instanceId = instanceId
46+
self.elasticIpId = elasticIpId
47+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateClusterRequest(JDCloudRequest):
23+
"""
24+
创建用户可调度的网络集群
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(CreateClusterRequest, self).__init__(
30+
'/regions/{regionId}/operation:createCluster', 'POST', header, version)
31+
self.parameters = parameters
32+
33+
34+
class CreateClusterParameters(object):
35+
36+
def __init__(self,regionId, az, clusterId, ):
37+
"""
38+
:param regionId: 地域ID。
39+
:param az: az
40+
:param clusterId: 逻辑集群id
41+
"""
42+
43+
self.regionId = regionId
44+
self.az = az
45+
self.clusterId = clusterId
46+
self.podIds = None
47+
self.suIds = None
48+
49+
def setPodIds(self, podIds):
50+
"""
51+
:param podIds: (Optional) podId列表
52+
"""
53+
self.podIds = podIds
54+
55+
def setSuIds(self, suIds):
56+
"""
57+
:param suIds: (Optional) suId列表
58+
"""
59+
self.suIds = suIds
60+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateDiagnosticTaskRequest(JDCloudRequest):
23+
"""
24+
创建诊断任务。
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(CreateDiagnosticTaskRequest, self).__init__(
30+
'/regions/{regionId}/diagnosis', 'POST', header, version)
31+
self.parameters = parameters
32+
33+
34+
class CreateDiagnosticTaskParameters(object):
35+
36+
def __init__(self,regionId, diagnosticTaskSpec):
37+
"""
38+
:param regionId: 地域ID。
39+
:param diagnosticTaskSpec: 诊断任务配置。
40+
"""
41+
42+
self.regionId = regionId
43+
self.diagnosticTaskSpec = diagnosticTaskSpec
44+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateInstancesRequest(JDCloudRequest):
23+
"""
24+
创建一台或多台指定配置的实例。批量创建多台实例时系统将尽可能完成目标创建数量,但受底层资源、配额等因素影响,可能存在部分成功部分失败的情况,还请关注最终完成数量,如有失败情况请尝试重新申请或联系客服。
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(CreateInstancesRequest, self).__init__(
30+
'/regions/{regionId}/baremetals', 'POST', header, version)
31+
self.parameters = parameters
32+
33+
34+
class CreateInstancesParameters(object):
35+
36+
def __init__(self,regionId, instanceSpec, ):
37+
"""
38+
:param regionId: 地域ID。
39+
:param instanceSpec: 实例配置
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceSpec = instanceSpec
44+
self.maxCount = None
45+
self.dryRun = None
46+
self.clientToken = None
47+
48+
def setMaxCount(self, maxCount):
49+
"""
50+
:param maxCount: (Optional) 创建节点的数量,调用商业平台配额查询接口结合已购买数量,判断最大可购买数量,不可超出配额。默认值:1。
51+
52+
"""
53+
self.maxCount = maxCount
54+
55+
def setDryRun(self, dryRun):
56+
"""
57+
:param dryRun: (Optional) 预先验证创建请求
58+
"""
59+
self.dryRun = dryRun
60+
61+
def setClientToken(self, clientToken):
62+
"""
63+
:param clientToken: (Optional) 用于保证请求的幂等性。由客户端生成,并确保不同请求中该参数唯一,长度不能超过64个字符。
64+
"""
65+
self.clientToken = clientToken
66+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeleteClusterRequest(JDCloudRequest):
23+
"""
24+
删除用户可调度的网络集群Id
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(DeleteClusterRequest, self).__init__(
30+
'/regions/{regionId}/operation:deleteCluster', 'DELETE', header, version)
31+
self.parameters = parameters
32+
33+
34+
class DeleteClusterParameters(object):
35+
36+
def __init__(self,regionId, id):
37+
"""
38+
:param regionId: 地域ID。
39+
:param id: Id
40+
"""
41+
42+
self.regionId = regionId
43+
self.id = id
44+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DescribeAvailableClustersRequest(JDCloudRequest):
23+
"""
24+
查询用户可调度集群
25+
26+
"""
27+
28+
def __init__(self, parameters, header=None, version="v1"):
29+
super(DescribeAvailableClustersRequest, self).__init__(
30+
'/regions/{regionId}/clusters', 'POST', header, version)
31+
self.parameters = parameters
32+
33+
34+
class DescribeAvailableClustersParameters(object):
35+
36+
def __init__(self,regionId, ):
37+
"""
38+
:param regionId: 地域ID。
39+
"""
40+
41+
self.regionId = regionId
42+
self.filters = None
43+
44+
def setFilters(self, filters):
45+
"""
46+
:param filters: (Optional) <b>filters 中支持使用以下关键字进行过滤</b>
47+
`azs`: 可用区。精确匹配,支持多个
48+
`azType`: 可用区类型:边缘(edge)或中心(standard)。精确匹配,支持单个
49+
50+
"""
51+
self.filters = filters
52+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DescribeChargeDurationRequest(JDCloudRequest):
23+
"""
24+
查询用户可购买hpc的周期,根据用户pin来获取相应用户的可购买周期
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeChargeDurationRequest, self).__init__(
29+
'/regions/{regionId}/baremetals:describeChargeDuration', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeChargeDurationParameters(object):
34+
35+
def __init__(self,regionId):
36+
"""
37+
:param regionId: 地域ID。
38+
"""
39+
40+
self.regionId = regionId
41+

0 commit comments

Comments
 (0)