Skip to content

Commit b58b303

Browse files
Iustin-Mituangela-cncf
authored andcommitted
Pull request #25: removed ui specific api calls
Merge in ISGAPPSEC/cyperf-api-wrapper from bugfix/ISGAPPSEC2-34540-remove-ui-specific-api-calls-from-api-client-library to main Squashed commit of the following: commit 220266f0afcb93e57cf29feeb47f9faf03103f16 Author: iustmitu <iustin.mitu@keysight.com> Date: Thu May 15 11:45:27 2025 +0300 accidentally ommited file from the commit commit ee3871930fb1657b9039701e5b32f835d6141db9 Author: iustmitu <iustin.mitu@keysight.com> Date: Thu May 15 11:34:48 2025 +0300 regenerated werapper
1 parent db7b505 commit b58b303

4 files changed

Lines changed: 0 additions & 321 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ Class | Method | HTTP request | Description
343343
*SessionsApi* | [**create_sessions**](docs/SessionsApi.md#create_sessions) | **POST** /api/v2/sessions |
344344
*SessionsApi* | [**delete_session**](docs/SessionsApi.md#delete_session) | **DELETE** /api/v2/sessions/{sessionId} |
345345
*SessionsApi* | [**delete_session_meta**](docs/SessionsApi.md#delete_session_meta) | **DELETE** /api/v2/sessions/{sessionId}/meta/{metaId} |
346-
*SessionsApi* | [**get_appsec_ui_metadata**](docs/SessionsApi.md#get_appsec_ui_metadata) | **GET** /api/v2/appsec-ui-metadata |
347346
*SessionsApi* | [**get_config_docs**](docs/SessionsApi.md#get_config_docs) | **GET** /api/v2/sessions/{sessionId}/config/$docs |
348347
*SessionsApi* | [**get_config_granular_stats**](docs/SessionsApi.md#get_config_granular_stats) | **GET** /api/v2/sessions/{sessionId}/config/granular-stats |
349348
*SessionsApi* | [**get_config_granular_stats_filters**](docs/SessionsApi.md#get_config_granular_stats_filters) | **GET** /api/v2/sessions/{sessionId}/config/granular-stats-filters |

cyperf/api/sessions_api.py

Lines changed: 0 additions & 240 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,246 +1150,6 @@ def _delete_session_meta_serialize(
11501150

11511151

11521152

1153-
@validate_call
1154-
def get_appsec_ui_metadata(
1155-
self,
1156-
_request_timeout: Union[
1157-
None,
1158-
Annotated[StrictFloat, Field(gt=0)],
1159-
Tuple[
1160-
Annotated[StrictFloat, Field(gt=0)],
1161-
Annotated[StrictFloat, Field(gt=0)]
1162-
]
1163-
] = None,
1164-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1165-
_content_type: Optional[StrictStr] = None,
1166-
_headers: Optional[Dict[StrictStr, Any]] = None,
1167-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1168-
) -> object:
1169-
"""get_appsec_ui_metadata
1170-
1171-
Get the UI metadata
1172-
1173-
:param _request_timeout: timeout setting for this request. If one
1174-
number provided, it will be total request
1175-
timeout. It can also be a pair (tuple) of
1176-
(connection, read) timeouts.
1177-
:type _request_timeout: int, tuple(int, int), optional
1178-
:param _request_auth: set to override the auth_settings for an a single
1179-
request; this effectively ignores the
1180-
authentication in the spec for a single request.
1181-
:type _request_auth: dict, optional
1182-
:param _content_type: force content-type for the request.
1183-
:type _content_type: str, Optional
1184-
:param _headers: set to override the headers for a single
1185-
request; this effectively ignores the headers
1186-
in the spec for a single request.
1187-
:type _headers: dict, optional
1188-
:param _host_index: set to override the host_index for a single
1189-
request; this effectively ignores the host_index
1190-
in the spec for a single request.
1191-
:type _host_index: int, optional
1192-
:return: Returns the result object.
1193-
""" # noqa: E501
1194-
1195-
_param = self._get_appsec_ui_metadata_serialize(
1196-
_request_auth=_request_auth,
1197-
_content_type=_content_type,
1198-
_headers=_headers,
1199-
_host_index=_host_index
1200-
)
1201-
1202-
_response_types_map: Dict[str, Optional[str]] = {
1203-
'200': "object",
1204-
'500': "ErrorResponse",
1205-
}
1206-
return self.api_client.call_api(
1207-
*_param,
1208-
_response_types_map=_response_types_map,
1209-
_request_timeout=_request_timeout
1210-
)
1211-
1212-
1213-
@validate_call
1214-
def get_appsec_ui_metadata_with_http_info(
1215-
self,
1216-
_request_timeout: Union[
1217-
None,
1218-
Annotated[StrictFloat, Field(gt=0)],
1219-
Tuple[
1220-
Annotated[StrictFloat, Field(gt=0)],
1221-
Annotated[StrictFloat, Field(gt=0)]
1222-
]
1223-
] = None,
1224-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1225-
_content_type: Optional[StrictStr] = None,
1226-
_headers: Optional[Dict[StrictStr, Any]] = None,
1227-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1228-
) -> ApiResponse[object]:
1229-
"""get_appsec_ui_metadata
1230-
1231-
Get the UI metadata
1232-
1233-
:param _request_timeout: timeout setting for this request. If one
1234-
number provided, it will be total request
1235-
timeout. It can also be a pair (tuple) of
1236-
(connection, read) timeouts.
1237-
:type _request_timeout: int, tuple(int, int), optional
1238-
:param _request_auth: set to override the auth_settings for an a single
1239-
request; this effectively ignores the
1240-
authentication in the spec for a single request.
1241-
:type _request_auth: dict, optional
1242-
:param _content_type: force content-type for the request.
1243-
:type _content_type: str, Optional
1244-
:param _headers: set to override the headers for a single
1245-
request; this effectively ignores the headers
1246-
in the spec for a single request.
1247-
:type _headers: dict, optional
1248-
:param _host_index: set to override the host_index for a single
1249-
request; this effectively ignores the host_index
1250-
in the spec for a single request.
1251-
:type _host_index: int, optional
1252-
:return: Returns the result object.
1253-
""" # noqa: E501
1254-
1255-
_param = self._get_appsec_ui_metadata_serialize(
1256-
_request_auth=_request_auth,
1257-
_content_type=_content_type,
1258-
_headers=_headers,
1259-
_host_index=_host_index
1260-
)
1261-
1262-
_response_types_map: Dict[str, Optional[str]] = {
1263-
'200': "object",
1264-
'500': "ErrorResponse",
1265-
}
1266-
return self.api_client.call_api(
1267-
*_param,
1268-
_response_types_map=_response_types_map,
1269-
_request_timeout=_request_timeout
1270-
)
1271-
1272-
1273-
@validate_call
1274-
def get_appsec_ui_metadata_without_preload_content(
1275-
self,
1276-
_request_timeout: Union[
1277-
None,
1278-
Annotated[StrictFloat, Field(gt=0)],
1279-
Tuple[
1280-
Annotated[StrictFloat, Field(gt=0)],
1281-
Annotated[StrictFloat, Field(gt=0)]
1282-
]
1283-
] = None,
1284-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1285-
_content_type: Optional[StrictStr] = None,
1286-
_headers: Optional[Dict[StrictStr, Any]] = None,
1287-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1288-
) -> RESTResponseType:
1289-
"""get_appsec_ui_metadata
1290-
1291-
Get the UI metadata
1292-
1293-
:param _request_timeout: timeout setting for this request. If one
1294-
number provided, it will be total request
1295-
timeout. It can also be a pair (tuple) of
1296-
(connection, read) timeouts.
1297-
:type _request_timeout: int, tuple(int, int), optional
1298-
:param _request_auth: set to override the auth_settings for an a single
1299-
request; this effectively ignores the
1300-
authentication in the spec for a single request.
1301-
:type _request_auth: dict, optional
1302-
:param _content_type: force content-type for the request.
1303-
:type _content_type: str, Optional
1304-
:param _headers: set to override the headers for a single
1305-
request; this effectively ignores the headers
1306-
in the spec for a single request.
1307-
:type _headers: dict, optional
1308-
:param _host_index: set to override the host_index for a single
1309-
request; this effectively ignores the host_index
1310-
in the spec for a single request.
1311-
:type _host_index: int, optional
1312-
:return: Returns the result object.
1313-
""" # noqa: E501
1314-
1315-
_param = self._get_appsec_ui_metadata_serialize(
1316-
_request_auth=_request_auth,
1317-
_content_type=_content_type,
1318-
_headers=_headers,
1319-
_host_index=_host_index
1320-
)
1321-
1322-
_response_types_map: Dict[str, Optional[str]] = {
1323-
'200': "object",
1324-
'500': "ErrorResponse",
1325-
}
1326-
return self.api_client.call_api(
1327-
*_param,
1328-
_response_types_map=None,
1329-
_request_timeout=_request_timeout
1330-
)
1331-
1332-
1333-
def _get_appsec_ui_metadata_serialize(
1334-
self,
1335-
_request_auth,
1336-
_content_type,
1337-
_headers,
1338-
_host_index,
1339-
) -> RequestSerialized:
1340-
1341-
_host = None
1342-
1343-
_collection_formats: Dict[str, str] = {
1344-
}
1345-
1346-
_path_params: Dict[str, str] = {}
1347-
_query_params: List[Tuple[str, str]] = []
1348-
_header_params: Dict[str, Optional[str]] = _headers or {}
1349-
_form_params: List[Tuple[str, str]] = []
1350-
_files: Dict[str, Union[str, bytes]] = {}
1351-
_body_params: Optional[bytes] = None
1352-
1353-
# process the path parameters
1354-
# process the query parameters
1355-
# process the header parameters
1356-
# process the form parameters
1357-
# process the body parameter
1358-
1359-
1360-
# set the HTTP header `Accept`
1361-
if 'Accept' not in _header_params:
1362-
_header_params['Accept'] = self.api_client.select_header_accept(
1363-
[
1364-
'application/json'
1365-
]
1366-
)
1367-
1368-
1369-
# authentication setting
1370-
_auth_settings: List[str] = [
1371-
'OAuth2',
1372-
'OAuth2'
1373-
]
1374-
1375-
return self.api_client.param_serialize(
1376-
method='GET',
1377-
resource_path='/api/v2/appsec-ui-metadata',
1378-
path_params=_path_params,
1379-
query_params=_query_params,
1380-
header_params=_header_params,
1381-
body=_body_params,
1382-
post_params=_form_params,
1383-
files=_files,
1384-
auth_settings=_auth_settings,
1385-
collection_formats=_collection_formats,
1386-
_host=_host,
1387-
_request_auth=_request_auth
1388-
)
1389-
1390-
1391-
1392-
13931153
@validate_call
13941154
def get_config_docs(
13951155
self,

docs/SessionsApi.md

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Method | HTTP request | Description
88
[**create_sessions**](SessionsApi.md#create_sessions) | **POST** /api/v2/sessions |
99
[**delete_session**](SessionsApi.md#delete_session) | **DELETE** /api/v2/sessions/{sessionId} |
1010
[**delete_session_meta**](SessionsApi.md#delete_session_meta) | **DELETE** /api/v2/sessions/{sessionId}/meta/{metaId} |
11-
[**get_appsec_ui_metadata**](SessionsApi.md#get_appsec_ui_metadata) | **GET** /api/v2/appsec-ui-metadata |
1211
[**get_config_docs**](SessionsApi.md#get_config_docs) | **GET** /api/v2/sessions/{sessionId}/config/$docs |
1312
[**get_config_granular_stats**](SessionsApi.md#get_config_granular_stats) | **GET** /api/v2/sessions/{sessionId}/config/granular-stats |
1413
[**get_config_granular_stats_filters**](SessionsApi.md#get_config_granular_stats_filters) | **GET** /api/v2/sessions/{sessionId}/config/granular-stats-filters |
@@ -361,79 +360,6 @@ void (empty response body)
361360

362361
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
363362

364-
# **get_appsec_ui_metadata**
365-
> object get_appsec_ui_metadata()
366-
367-
368-
369-
Get the UI metadata
370-
371-
### Example
372-
373-
* OAuth Authentication (OAuth2):
374-
* OAuth Authentication (OAuth2):
375-
376-
```python
377-
import cyperf
378-
from cyperf.rest import ApiException
379-
from pprint import pprint
380-
381-
# Defining the host is optional and defaults to http://localhost
382-
# See configuration.py for a list of all supported configuration parameters.
383-
configuration = cyperf.Configuration(
384-
host = "http://localhost"
385-
)
386-
387-
# The client must configure the authentication and authorization parameters
388-
# in accordance with the API server security policy.
389-
# Examples for each auth method are provided below, use the example that
390-
# satisfies your auth use case.
391-
392-
configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]
393-
394-
configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]
395-
396-
# Enter a context with an instance of the API client
397-
with cyperf.ApiClient(configuration) as api_client:
398-
# Create an instance of the API class
399-
api_instance = cyperf.SessionsApi(api_client)
400-
401-
try:
402-
api_response = api_instance.get_appsec_ui_metadata()
403-
print("The response of SessionsApi->get_appsec_ui_metadata:\n")
404-
pprint(api_response)
405-
except Exception as e:
406-
print("Exception when calling SessionsApi->get_appsec_ui_metadata: %s\n" % e)
407-
```
408-
409-
410-
411-
### Parameters
412-
413-
This endpoint does not need any parameter.
414-
415-
### Return type
416-
417-
**object**
418-
419-
### Authorization
420-
421-
[OAuth2](../README.md#OAuth2), [OAuth2](../README.md#OAuth2)
422-
423-
### HTTP request headers
424-
425-
- **Content-Type**: Not defined
426-
- **Accept**: application/json
427-
428-
### HTTP response details
429-
430-
| Status code | Description | Response headers |
431-
|-------------|-------------|------------------|
432-
**200** | The UI metadata | - |
433-
**500** | Unexpected error | - |
434-
435-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
436-
437363
# **get_config_docs**
438364
> OpenAPIDefinitions get_config_docs(session_id)
439365

test/test_sessions_api.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ def test_delete_session_meta(self) -> None:
5151
"""
5252
pass
5353

54-
def test_get_appsec_ui_metadata(self) -> None:
55-
"""Test case for get_appsec_ui_metadata
56-
57-
"""
58-
pass
59-
6054
def test_get_config_docs(self) -> None:
6155
"""Test case for get_config_docs
6256

0 commit comments

Comments
 (0)