aboutsummaryrefslogtreecommitdiffstats
path: root/test/s3p/mock/set_expectation.sh
blob: e8c2c24b42c9b33faec6e4f339ba07a5ab5fa7c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "GET",
        "path": "/api/huaweivnfmdriver/v1/swagger.json"
    },
    "httpResponse": {
        "statusCode": 200,
        "headers": {
            "content-type": ["application/json"]
        },
    "body": {
         "not": false,
             "type": "JSON",
             "json": "{\"errcode\":\"0\",\"errmsg\":\"get token successfully.\",\"data\":{\"expiredDate\":\"2018-11-10 10:03:33\"}}"
    }
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'

curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "POST",
        "path": "/controller/v2/tokens"
    },
    "httpResponse": {
        "statusCode": 200,
        "headers": {
            "content-type": ["application/json"]
        },
        "body": {
         "not": false,
             "type": "JSON",
             "json": "{\"errcode\":\"0\",\"errmsg\":\"get token successfully.\",\"data\":{\"expiredDate\":\"2018-11-10 10:03:33\",\"token_id\":\"7F06BFDDAC33A989:77DAD6058B1BB81EF1A557745E4D9C78399B31C4DB509704ED8A7DF05A362A59\"}}"
        }
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "POST",
        "path": "/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services"
    },
    "httpResponse": {
        "statusCode": 201
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "PUT",
        "path": "/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/huawei-ac-net-l3vpn-svc-vfi:vrf-attributes"
    },
    "httpResponse": {
        "statusCode": 204
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "POST",
        "path": "/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/sites"
    },
    "httpResponse": {
        "statusCode": 201
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
# ZTE DCI
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "POST",
        "path": "/v2.0/l3-dci-connects"
    },
    "httpResponse": {
        "statusCode": 201
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
# huaweivnfmdriver
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "POST",
        "path": "/api/huaweivnfmdriver/v1/a0400010-11d7-4875-b4ae-5f42ed5d3a85/vnfs"
    },
    "httpResponse": {
        "statusCode": 200,
        "headers": {
            "content-type": ["application/json"]
        },
        "body": {
             "not": false,
             "type": "JSON",
             "json": "{\"vnfInstanceId\":\"fa3dca847b054f4eb9d3bc8bb9e5eec9\",\"jobId\":\"fa3dca847b054f4eb9d3bc8bb9e5eec9_post\"}"
        }
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
# huaweivnfmdriver
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "GET",
        "path": "/api/huaweivnfmdriver/v1/a0400010-11d7-4875-b4ae-5f42ed5d3a85/jobs/fa3dca847b054f4eb9d3bc8bb9e5eec9_post",
    "queryStringParameters": {
        "responseId": ["0"]
    }
    },
    "httpResponse": {
        "statusCode": 200,
        "headers": {
            "content-type": ["application/json"]
        },
        "body": {
             "not": false,
             "type": "JSON",
             "json": "{\"jobId\":\"fa3dca847b054f4eb9d3bc8bb9e5eec9\",\"responsedescriptor\":{\"progress\":\"50\",\"status\":\"processing\",\"errorCode\":null,\"responseId\":\"0\"}}"
        }
    },
    "times" : {
        "unlimited" : false
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
# huaweivnfmdriver
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "GET",
        "path": "/api/huaweivnfmdriver/v1/a0400010-11d7-4875-b4ae-5f42ed5d3a85/jobs/fa3dca847b054f4eb9d3bc8bb9e5eec9_post",
    "queryStringParameters": {
        "responseId": ["0"]
    }
    },
    "httpResponse": {
        "statusCode": 200,
        "headers": {
            "content-type": ["application/json"]
        },
        "body": {
             "not": false,
             "type": "JSON",
             "json": "{\"jobId\":\"fa3dca847b054f4eb9d3bc8bb9e5eec9\",\"responsedescriptor\":{\"progress\":\"100\",\"status\":\"processing\",\"errorCode\":null,\"responseId\":\"0\"}}"
        }
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "GET",
        "path": "/api/huaweivnfmdriver/v1/a0400010-11d7-4875-b4ae-5f42ed5d3a85/jobs/fa3dca847b054f4eb9d3bc8bb9e5eec9_post",
    "queryStringParameters": {
        "responseId": ["50"]
    }
    },
    "httpResponse": {
        "statusCode": 200,
        "headers": {
            "content-type": ["application/json"]
        },
        "body": {
             "not": false,
             "type": "JSON",
             "json": "{\"jobId\":\"fa3dca847b054f4eb9d3bc8bb9e5eec9\",\"responsedescriptor\":{\"progress\":\"100\",\"status\":\"processing\",\"errorCode\":null,\"responseId\":\"50\"}}"
        }
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'
 
 
curl -v -X PUT "http://localhost:1080/expectation" -d '{
    "httpRequest": {
        "method": "GET",
        "path": "/api/huaweivnfmdriver/v1/a0400010-11d7-4875-b4ae-5f42ed5d3a85/jobs/fa3dca847b054f4eb9d3bc8bb9e5eec9_post",
    "queryStringParameters": {
        "responseId": ["2"]
    }
    },
    "httpResponse": {
        "statusCode": 200,
        "headers": {
            "content-type": ["application/json"]
        },
        "body": {
             "not": false,
             "type": "JSON",
             "json": "{\"jobId\":\"fa3dca847b054f4eb9d3bc8bb9e5eec9\",\"responsedescriptor\":{\"progress\":\"100\",\"status\":\"processing\",\"errorCode\":null,\"responseId\":\"2\"}}"
        }
    },
    "times" : {
        "unlimited" : true
    },
    "timeToLive" : {
        "unlimited" : true
    }
}'