Coverage for abb_rws_client_python_rw6/rws/ctrl/identity.py: 100%
9 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-13 22:17 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-13 22:17 +0000
1# This file is AUTO-GENERATED by utils/generator/main.py
2# DO NOT EDIT MANUALLY — run the generator to regenerate.
3# Generator author: Clement RACINET
4"""
5RWS module: Controller Service → Operations on Identity Resource → Get Identity Resource
71:1 mirror of the ABB RobotWare 6 REST API.
8Each function maps to exactly one HTTP endpoint.
9No composed logic — see highlevel/ for wrappers.
10"""
12from __future__ import annotations
14import httpx
16from abb_rws_client_python_rw6.core.client import RWSClient
19async def get_identity_resource(client: RWSClient) -> httpx.Response:
20 """
21 Get Identity Resource.
23 Route: ``GET /ctrl/identity``
24 ABB constraints: Supported in bootserver mode
26 Args:
27 client: Open RWSClient instance.
29 Returns:
30 Raw HTTP response. Expected success: HTTP 200.
32 Raises:
33 RWSAuthenticationError: On HTTP 401.
34 RWSNotFoundError: On HTTP 404.
35 RWSHTTPError: On any other HTTP >= 400.
36 # ABB codes: NOT_FOUND(404) See
38 Example:
39 ```python
40 >>> await get_identity_resource(client)
41 <Response [200]>
42 ```
43 """
44 return await client.get("/ctrl/identity")
47async def get_identity_actions(
48 client: RWSClient,
49 action: str | None = None,
50) -> httpx.Response:
51 """
52 Get Identity Actions.
54 Route: ``GET /ctrl/identity``
55 ABB constraints: Supported in bootserver mode
57 Args:
58 client: Open RWSClient instance.
59 action: Query parameter. Optional.
61 Returns:
62 Raw HTTP response. Expected success: HTTP 200.
64 Raises:
65 RWSAuthenticationError: On HTTP 401.
66 RWSNotFoundError: On HTTP 404.
67 RWSHTTPError: On any other HTTP >= 400.
68 # ABB codes: NOT_FOUND(404) See
70 Example:
71 ```python
72 >>> await get_identity_actions(client)
73 <Response [200]>
74 ```
75 """
76 return await client.get(
77 "/ctrl/identity",
78 params={k: v for k, v in {"action": action}.items() if v is not None},
79 )
82async def set_the_identity_of_the_controller(client: RWSClient) -> httpx.Response:
83 """
84 Set the Identity of the controller.
86 Route: ``PUT /ctrl/identity``
87 ABB constraints: Supported in bootserver mode
89 Args:
90 client: Open RWSClient instance.
92 Returns:
93 Raw HTTP response. Expected success: HTTP 204.
95 Raises:
96 RWSAuthenticationError: On HTTP 401.
97 RWSNotFoundError: On HTTP 404.
98 RWSHTTPError: On any other HTTP >= 400.
99 # ABB codes: UNAUTHORIZED(401), BAD_REQUEST(400), UNSUPPORTED_MEDIA(415)
101 Example:
102 ```python
103 >>> await set_the_identity_of_the_controller(client)
104 <Response [204]>
105 ```
106 """
107 return await client.put(
108 "/ctrl/identity",
109 data={},
110 )