Skip to content

Commit fbaffc9

Browse files
author
刘一辰
committed
1、 KEC 方法支持, shanghai 2 、 beijing 6.
2、query协议的Action、Version同步至URL、或者body内,支持KEC方法。
1 parent ad91955 commit fbaffc9

File tree

2 files changed

+67
-32
lines changed

2 files changed

+67
-32
lines changed

kscore/data/kec/2016-03-04/service-2.yaml

Lines changed: 64 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,79 @@ metadata:
1010
protocol: query-json
1111

1212
operations:
13-
RegionList:
14-
name: RegionList
13+
14+
RunInstances:
1515
http:
1616
method: GET
17-
input:
18-
shape: Empty
1917

20-
DescribeInstances:
21-
name: DescribeInstances
18+
TerminateInstances:
19+
http:
20+
method: GET
21+
22+
StartInstances:
23+
http:
24+
method: GET
25+
26+
StopInstances:
27+
http:
28+
method: GET
29+
30+
RebootInstances:
2231
http:
2332
method: GET
24-
shapes:
25-
Id:
26-
type: string #list/map/structure
2733

28-
Bool:
29-
type: bool
34+
MonitorInstances:
35+
http:
36+
method: GET
3037

31-
Int:
32-
type: int
38+
UnmonitorInstances:
39+
http:
40+
method: GET
3341

34-
DataTime:
35-
type: timestamp
42+
ModifyInstanceType:
43+
http:
44+
method: GET
3645

37-
Empty:
38-
type: structure
39-
members: {}
40-
documentation: ""
46+
ModifyInstanceImage:
47+
http:
48+
method: GET
4149

42-
NonEmptyString:
43-
type: string
44-
min: 1
50+
ModifyInstanceAttribute:
51+
http:
52+
method: GET
4553

46-
Message:
47-
type: string
54+
DescribeInstanceVnc:
55+
http:
56+
method: GET
4857

49-
InstanceId:
50-
type: structure
51-
required:
52-
- id
53-
members:
54-
id:
55-
shape: Id
56-
documentation: ""
58+
AttachNetworkInterface:
59+
http:
60+
method: GET
61+
62+
DescribeInstances:
63+
http:
64+
method: GET
65+
66+
ModifyNetworkInterfaceAttribute:
67+
http:
68+
method: GET
69+
70+
DetachNetworkInterface:
71+
http:
72+
method: GET
73+
74+
CreateImage:
75+
http:
76+
method: GET
77+
78+
DescribeImages:
79+
http:
80+
method: GET
81+
82+
RemoveImages:
83+
http:
84+
method: GET
85+
86+
ModifyImageAttribute:
87+
http:
88+
method: GET

kscore/serialize.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ def serialize_to_request(self, parameters, operation_model):
200200

201201
body_params = self.MAP_TYPE()
202202

203+
body_params['Action'] = operation_model.name
204+
body_params['Version'] = operation_model.metadata['apiVersion']
205+
203206
if shape is not None:
204207
self._serialize(body_params, parameters, shape)
205208
else:

0 commit comments

Comments
 (0)