• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atlanticwave-sdx / sdx-lc-client / 3715106805

pending completion
3715106805

Pull #2

github

GitHub
Merge 381d6db30 into a442eb3ef
Pull Request #2: Add a GitHub Actions workflow

106 of 562 new or added lines in 18 files covered. (18.86%)

1173 of 2405 relevant lines covered (48.77%)

1.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

41.51
/swagger_client/api/connection_api.py
1
# coding: utf-8
2

3
"""
3✔
4
    SDX LC
5

6
    You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).   # noqa: E501
7

8
    OpenAPI spec version: 1.0.0
9
    Contact: yxin@renci.org
10
    Generated by: https://github.com/swagger-api/swagger-codegen.git
11
"""
12

13
from __future__ import absolute_import
3✔
14

15
import re  # noqa: F401
3✔
16

17
# python 2 and python 3 compatibility library
18
import six
3✔
19

20
from swagger_client.api_client import ApiClient
3✔
21

22

23
class ConnectionApi(object):
3✔
24
    """NOTE: This class is auto generated by the swagger code generator program.
25

26
    Do not edit the class manually.
27
    Ref: https://github.com/swagger-api/swagger-codegen
28
    """
29

30
    def __init__(self, api_client=None):
3✔
31
        if api_client is None:
3✔
32
            api_client = ApiClient()
3✔
33
        self.api_client = api_client
3✔
34

35
    def delete_connection(self, connection_id, **kwargs):  # noqa: E501
3✔
36
        """Delete connection order by ID  # noqa: E501
37

38
        delete a connection  # noqa: E501
39
        This method makes a synchronous HTTP request by default. To make an
40
        asynchronous HTTP request, please pass async_req=True
41
        >>> thread = api.delete_connection(connection_id, async_req=True)
42
        >>> result = thread.get()
43

44
        :param async_req bool
45
        :param int connection_id: ID of the connection that needs to be deleted (required)
46
        :return: None
47
                 If the method is called asynchronously,
48
                 returns the request thread.
49
        """
NEW
50
        kwargs["_return_http_data_only"] = True
×
NEW
51
        if kwargs.get("async_req"):
×
NEW
52
            return self.delete_connection_with_http_info(
×
53
                connection_id, **kwargs
54
            )  # noqa: E501
55
        else:
NEW
56
            (data) = self.delete_connection_with_http_info(
×
57
                connection_id, **kwargs
58
            )  # noqa: E501
59
            return data
×
60

61
    def delete_connection_with_http_info(self, connection_id, **kwargs):  # noqa: E501
3✔
62
        """Delete connection order by ID  # noqa: E501
63

64
        delete a connection  # noqa: E501
65
        This method makes a synchronous HTTP request by default. To make an
66
        asynchronous HTTP request, please pass async_req=True
67
        >>> thread = api.delete_connection_with_http_info(connection_id, async_req=True)
68
        >>> result = thread.get()
69

70
        :param async_req bool
71
        :param int connection_id: ID of the connection that needs to be deleted (required)
72
        :return: None
73
                 If the method is called asynchronously,
74
                 returns the request thread.
75
        """
76

NEW
77
        all_params = ["connection_id"]  # noqa: E501
×
NEW
78
        all_params.append("async_req")
×
NEW
79
        all_params.append("_return_http_data_only")
×
NEW
80
        all_params.append("_preload_content")
×
NEW
81
        all_params.append("_request_timeout")
×
82

83
        params = locals()
×
NEW
84
        for key, val in six.iteritems(params["kwargs"]):
×
85
            if key not in all_params:
×
86
                raise TypeError(
×
87
                    "Got an unexpected keyword argument '%s'"
88
                    " to method delete_connection" % key
89
                )
90
            params[key] = val
×
NEW
91
        del params["kwargs"]
×
92
        # verify the required parameter 'connection_id' is set
NEW
93
        if "connection_id" not in params or params["connection_id"] is None:
×
NEW
94
            raise ValueError(
×
95
                "Missing the required parameter `connection_id` when calling `delete_connection`"
96
            )  # noqa: E501
97

98
        collection_formats = {}
×
99

100
        path_params = {}
×
NEW
101
        if "connection_id" in params:
×
NEW
102
            path_params["connectionId"] = params["connection_id"]  # noqa: E501
×
103

104
        query_params = []
×
105

106
        header_params = {}
×
107

108
        form_params = []
×
109
        local_var_files = {}
×
110

111
        body_params = None
×
112
        # Authentication setting
113
        auth_settings = []  # noqa: E501
×
114

115
        return self.api_client.call_api(
×
116
            "/connection/{connectionId}",
117
            "DELETE",
118
            path_params,
119
            query_params,
120
            header_params,
121
            body=body_params,
122
            post_params=form_params,
123
            files=local_var_files,
124
            response_type=None,  # noqa: E501
125
            auth_settings=auth_settings,
126
            async_req=params.get("async_req"),
127
            _return_http_data_only=params.get("_return_http_data_only"),
128
            _preload_content=params.get("_preload_content", True),
129
            _request_timeout=params.get("_request_timeout"),
130
            collection_formats=collection_formats,
131
        )
132

133
    def getconnection_by_id(self, connection_id, **kwargs):  # noqa: E501
3✔
134
        """Find connection by ID  # noqa: E501
135

136
        connection details  # noqa: E501
137
        This method makes a synchronous HTTP request by default. To make an
138
        asynchronous HTTP request, please pass async_req=True
139
        >>> thread = api.getconnection_by_id(connection_id, async_req=True)
140
        >>> result = thread.get()
141

142
        :param async_req bool
143
        :param int connection_id: ID of connection that needs to be fetched (required)
144
        :return: Connection
145
                 If the method is called asynchronously,
146
                 returns the request thread.
147
        """
NEW
148
        kwargs["_return_http_data_only"] = True
×
NEW
149
        if kwargs.get("async_req"):
×
NEW
150
            return self.getconnection_by_id_with_http_info(
×
151
                connection_id, **kwargs
152
            )  # noqa: E501
153
        else:
NEW
154
            (data) = self.getconnection_by_id_with_http_info(
×
155
                connection_id, **kwargs
156
            )  # noqa: E501
157
            return data
×
158

159
    def getconnection_by_id_with_http_info(self, connection_id, **kwargs):  # noqa: E501
3✔
160
        """Find connection by ID  # noqa: E501
161

162
        connection details  # noqa: E501
163
        This method makes a synchronous HTTP request by default. To make an
164
        asynchronous HTTP request, please pass async_req=True
165
        >>> thread = api.getconnection_by_id_with_http_info(connection_id, async_req=True)
166
        >>> result = thread.get()
167

168
        :param async_req bool
169
        :param int connection_id: ID of connection that needs to be fetched (required)
170
        :return: Connection
171
                 If the method is called asynchronously,
172
                 returns the request thread.
173
        """
174

NEW
175
        all_params = ["connection_id"]  # noqa: E501
×
NEW
176
        all_params.append("async_req")
×
NEW
177
        all_params.append("_return_http_data_only")
×
NEW
178
        all_params.append("_preload_content")
×
NEW
179
        all_params.append("_request_timeout")
×
180

181
        params = locals()
×
NEW
182
        for key, val in six.iteritems(params["kwargs"]):
×
183
            if key not in all_params:
×
184
                raise TypeError(
×
185
                    "Got an unexpected keyword argument '%s'"
186
                    " to method getconnection_by_id" % key
187
                )
188
            params[key] = val
×
NEW
189
        del params["kwargs"]
×
190
        # verify the required parameter 'connection_id' is set
NEW
191
        if "connection_id" not in params or params["connection_id"] is None:
×
NEW
192
            raise ValueError(
×
193
                "Missing the required parameter `connection_id` when calling `getconnection_by_id`"
194
            )  # noqa: E501
195

196
        collection_formats = {}
×
197

198
        path_params = {}
×
NEW
199
        if "connection_id" in params:
×
NEW
200
            path_params["connectionId"] = params["connection_id"]  # noqa: E501
×
201

202
        query_params = []
×
203

204
        header_params = {}
×
205

206
        form_params = []
×
207
        local_var_files = {}
×
208

209
        body_params = None
×
210
        # HTTP header `Accept`
NEW
211
        header_params["Accept"] = self.api_client.select_header_accept(
×
212
            ["application/json", "application/xml"]
213
        )  # noqa: E501
214

215
        # Authentication setting
216
        auth_settings = []  # noqa: E501
×
217

218
        return self.api_client.call_api(
×
219
            "/connection/{connectionId}",
220
            "GET",
221
            path_params,
222
            query_params,
223
            header_params,
224
            body=body_params,
225
            post_params=form_params,
226
            files=local_var_files,
227
            response_type="Connection",  # noqa: E501
228
            auth_settings=auth_settings,
229
            async_req=params.get("async_req"),
230
            _return_http_data_only=params.get("_return_http_data_only"),
231
            _preload_content=params.get("_preload_content", True),
232
            _request_timeout=params.get("_request_timeout"),
233
            collection_formats=collection_formats,
234
        )
235

236
    def place_connection(self, body, **kwargs):  # noqa: E501
3✔
237
        """Place an connection request from the SDX-Controller  # noqa: E501
238

239
        This method makes a synchronous HTTP request by default. To make an
240
        asynchronous HTTP request, please pass async_req=True
241
        >>> thread = api.place_connection(body, async_req=True)
242
        >>> result = thread.get()
243

244
        :param async_req bool
245
        :param Connection body: order placed for creating a connection (required)
246
        :return: Connection
247
                 If the method is called asynchronously,
248
                 returns the request thread.
249
        """
250
        kwargs["_return_http_data_only"] = True
3✔
251
        if kwargs.get("async_req"):
3✔
252
            return self.place_connection_with_http_info(body, **kwargs)  # noqa: E501
×
253
        else:
254
            (data) = self.place_connection_with_http_info(body, **kwargs)  # noqa: E501
3✔
255
            return data
3✔
256

257
    def place_connection_with_http_info(self, body, **kwargs):  # noqa: E501
3✔
258
        """Place an connection request from the SDX-Controller  # noqa: E501
259

260
        This method makes a synchronous HTTP request by default. To make an
261
        asynchronous HTTP request, please pass async_req=True
262
        >>> thread = api.place_connection_with_http_info(body, async_req=True)
263
        >>> result = thread.get()
264

265
        :param async_req bool
266
        :param Connection body: order placed for creating a connection (required)
267
        :return: Connection
268
                 If the method is called asynchronously,
269
                 returns the request thread.
270
        """
271

272
        all_params = ["body"]  # noqa: E501
3✔
273
        all_params.append("async_req")
3✔
274
        all_params.append("_return_http_data_only")
3✔
275
        all_params.append("_preload_content")
3✔
276
        all_params.append("_request_timeout")
3✔
277

278
        params = locals()
3✔
279
        for key, val in six.iteritems(params["kwargs"]):
3✔
280
            if key not in all_params:
3✔
281
                raise TypeError(
×
282
                    "Got an unexpected keyword argument '%s'"
283
                    " to method place_connection" % key
284
                )
285
            params[key] = val
3✔
286
        del params["kwargs"]
3✔
287
        # verify the required parameter 'body' is set
288
        if "body" not in params or params["body"] is None:
3✔
NEW
289
            raise ValueError(
×
290
                "Missing the required parameter `body` when calling `place_connection`"
291
            )  # noqa: E501
292

293
        collection_formats = {}
3✔
294

295
        path_params = {}
3✔
296

297
        query_params = []
3✔
298

299
        header_params = {}
3✔
300

301
        form_params = []
3✔
302
        local_var_files = {}
3✔
303

304
        body_params = None
3✔
305
        if "body" in params:
3✔
306
            body_params = params["body"]
3✔
307
        # HTTP header `Accept`
308
        header_params["Accept"] = self.api_client.select_header_accept(
3✔
309
            ["application/json"]
310
        )  # noqa: E501
311

312
        # HTTP header `Content-Type`
313
        header_params[
3✔
314
            "Content-Type"
315
        ] = self.api_client.select_header_content_type(  # noqa: E501
316
            ["application/json"]
317
        )  # noqa: E501
318

319
        # Authentication setting
320
        auth_settings = []  # noqa: E501
3✔
321

322
        return self.api_client.call_api(
3✔
323
            "/conection",
324
            "POST",
325
            path_params,
326
            query_params,
327
            header_params,
328
            body=body_params,
329
            post_params=form_params,
330
            files=local_var_files,
331
            response_type="Connection",  # noqa: E501
332
            auth_settings=auth_settings,
333
            async_req=params.get("async_req"),
334
            _return_http_data_only=params.get("_return_http_data_only"),
335
            _preload_content=params.get("_preload_content", True),
336
            _request_timeout=params.get("_request_timeout"),
337
            collection_formats=collection_formats,
338
        )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc