Coverage for abb_rws_client_python_rw6/rws/iosystem/networks.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: RobotWare Services → IO Service → Operations on IO Networks
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_io_networks_resources(client: RWSClient) -> httpx.Response:
20 """
21 Get IO Networks resources.
23 Route: ``GET /rw/iosystem/networks``
24 ABB constraints: Not 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: BAD_REQUEST(400)
38 Example:
39 ```python
40 >>> await get_io_networks_resources(client)
41 <Response [200]>
42 ```
43 """
44 return await client.get("/rw/iosystem/networks")
47async def get_actions_on_io_networks(
48 client: RWSClient,
49 action: str | None = None,
50) -> httpx.Response:
51 """
52 Get Actions on IO Networks.
54 Route: ``GET /rw/iosystem/networks``
55 ABB constraints: Not 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: BAD_REQUEST(400)
70 Example:
71 ```python
72 >>> await get_actions_on_io_networks(client)
73 <Response [200]>
74 ```
75 """
76 return await client.get(
77 "/rw/iosystem/networks",
78 params={k: v for k, v in {"action": action}.items() if v is not None},
79 )
82async def post_search_io_networks(
83 client: RWSClient,
84 action: str | None = None,
85 name_or_state_example_name: str | None = None,
86) -> httpx.Response:
87 """
88 Search IO Networks.
90 Route: ``POST /rw/iosystem/networks``
91 ABB constraints: Not supported in bootserver mode
93 Args:
94 client: Open RWSClient instance.
95 action: Query parameter. Optional.
96 name_or_state_example_name: Body parameter. Optional.
98 Returns:
99 Raw HTTP response. Expected success: HTTP 200.
101 Raises:
102 RWSAuthenticationError: On HTTP 401.
103 RWSNotFoundError: On HTTP 404.
104 RWSHTTPError: On any other HTTP >= 400.
105 # ABB codes: BAD_REQUEST(400)
107 Example:
108 ```python
109 >>> await post_search_io_networks(client)
110 <Response [200]>
111 ```
112 """
113 return await client.post(
114 "/rw/iosystem/networks",
115 params={k: v for k, v in {"action": action}.items() if v is not None},
116 data={
117 k: v
118 for k, v in {"name_or_state_example_name": name_or_state_example_name}.items()
119 if v is not None
120 },
121 )