Coverage for abb_rws_client_python_rw6/rws/cfg.py: 100%
47 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 → CFG Service → Get CFG resources
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_cfg_resources(client: RWSClient) -> httpx.Response:
20 """
21 Get CFG resources.
23 Route: ``GET /rw/cfg``
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.
37 Example:
38 ```python
39 >>> await get_cfg_resources(client)
40 <Response [200]>
41 ```
42 """
43 return await client.get("/rw/cfg")
46async def get_cfg_actions(
47 client: RWSClient,
48 action: str | None = None,
49) -> httpx.Response:
50 """
51 Get CFG actions.
53 Route: ``GET /rw/cfg``
54 ABB constraints: Not supported in bootserver mode
56 Args:
57 client: Open RWSClient instance.
58 action: Query parameter. Optional.
60 Returns:
61 Raw HTTP response. Expected success: HTTP 200.
63 Raises:
64 RWSAuthenticationError: On HTTP 401.
65 RWSNotFoundError: On HTTP 404.
66 RWSHTTPError: On any other HTTP >= 400.
67 # ABB codes: BAD_REQUEST(400)
69 Example:
70 ```python
71 >>> await get_cfg_actions(client)
72 <Response [200]>
73 ```
74 """
75 return await client.get(
76 "/rw/cfg",
77 params={k: v for k, v in {"action": action}.items() if v is not None},
78 )
81async def validate_cfg_file(
82 client: RWSClient,
83 action: str | None = None,
84) -> httpx.Response:
85 """
86 Validate CFG file.
88 Route: ``POST /rw/cfg``
89 ABB constraints: Not supported in bootserver mode
91 Args:
92 client: Open RWSClient instance.
93 action: Query parameter. Optional.
95 Returns:
96 Raw HTTP response. Expected success: HTTP 200.
98 Raises:
99 RWSAuthenticationError: On HTTP 401.
100 RWSNotFoundError: On HTTP 404.
101 RWSHTTPError: On any other HTTP >= 400.
102 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415)
104 Example:
105 ```python
106 >>> await validate_cfg_file(client)
107 <Response [200]>
108 ```
109 """
110 return await client.post(
111 "/rw/cfg",
112 params={k: v for k, v in {"action": action}.items() if v is not None},
113 data={},
114 )
117async def load_cfg_file(
118 client: RWSClient,
119 action: str | None = None,
120) -> httpx.Response:
121 """
122 Load CFG file.
124 Route: ``POST /rw/cfg``
125 ABB constraints: Not supported in bootserver mode
127 Args:
128 client: Open RWSClient instance.
129 action: Query parameter. Optional.
131 Returns:
132 Raw HTTP response. Expected success: HTTP 204.
134 Raises:
135 RWSAuthenticationError: On HTTP 401.
136 RWSNotFoundError: On HTTP 404.
137 RWSHTTPError: On any other HTTP >= 400.
138 # ABB codes: BAD_REQUEST(400)
140 Example:
141 ```python
142 >>> await load_cfg_file(client)
143 <Response [204]>
144 ```
145 """
146 return await client.post(
147 "/rw/cfg",
148 params={k: v for k, v in {"action": action}.items() if v is not None},
149 data={},
150 )
153async def validate_cfg_instance_before_delete(
154 client: RWSClient,
155 action: str | None = None,
156 name: str | None = None,
157) -> httpx.Response:
158 """
159 Validate CFG Instance before Delete.
161 Route: ``POST /rw/cfg``
162 ABB constraints: Not supported in bootserver mode
164 Args:
165 client: Open RWSClient instance.
166 action: Query parameter. Optional.
167 name: Body parameter. Optional.
169 Returns:
170 Raw HTTP response. Expected success: HTTP 204.
172 Raises:
173 RWSAuthenticationError: On HTTP 401.
174 RWSNotFoundError: On HTTP 404.
175 RWSHTTPError: On any other HTTP >= 400.
176 # ABB codes: BAD_REQUEST(400), NOT_FOUND(404), see
178 Example:
179 ```python
180 >>> await validate_cfg_instance_before_delete(client)
181 <Response [204]>
182 ```
183 """
184 return await client.post(
185 "/rw/cfg",
186 params={k: v for k, v in {"action": action}.items() if v is not None},
187 data={k: v for k, v in {"name": name}.items() if v is not None},
188 )
191async def validate_cfg_instances(
192 client: RWSClient,
193 action: str | None = None,
194 operation: str | None = None,
195 cfgdomain: str | None = None,
196 cfgtype: str | None = None,
197 instances: str | None = None,
198 instancescount: str | None = None,
199) -> httpx.Response:
200 """
201 Validate CFG Instances.
203 Route: ``POST /rw/cfg``
204 ABB constraints: Not supported in bootserver mode
206 Args:
207 client: Open RWSClient instance.
208 action: Query parameter. Optional.
209 operation: Body parameter. Optional.
210 cfgdomain: Body parameter. Optional.
211 cfgtype: Body parameter. Optional.
212 instances: Body parameter. Optional.
213 instancescount: Body parameter. Optional.
215 Returns:
216 Raw HTTP response. Expected success: HTTP 204.
218 Raises:
219 RWSAuthenticationError: On HTTP 401.
220 RWSNotFoundError: On HTTP 404.
221 RWSHTTPError: On any other HTTP >= 400.
222 # ABB codes: BAD_REQUEST(400), NOT_FOUND(404), see
224 Example:
225 ```python
226 >>> await validate_cfg_instances(client)
227 <Response [204]>
228 ```
229 """
230 return await client.post(
231 "/rw/cfg",
232 params={k: v for k, v in {"action": action}.items() if v is not None},
233 data={
234 k: v
235 for k, v in {
236 "operation": operation,
237 "cfgdomain": cfgdomain,
238 "cfgtype": cfgtype,
239 "instances": instances,
240 "instancescount": instancescount,
241 }.items()
242 if v is not None
243 },
244 )
247async def post_keyless_motor_on(
248 client: RWSClient,
249 action: str | None = None,
250 state: str | None = None,
251) -> httpx.Response:
252 """
253 Keyless motor ON.
255 Route: ``POST /rw/cfg``
256 ABB constraints: Not supported in bootserver mode
258 Args:
259 client: Open RWSClient instance.
260 action: Query parameter. Optional.
261 state: Body parameter. Optional.
263 Returns:
264 Raw HTTP response. Expected success: HTTP 204.
266 Raises:
267 RWSAuthenticationError: On HTTP 401.
268 RWSNotFoundError: On HTTP 404.
269 RWSHTTPError: On any other HTTP >= 400.
270 # ABB codes: BAD_REQUEST(400) see
272 Example:
273 ```python
274 >>> await post_keyless_motor_on(client)
275 <Response [204]>
276 ```
277 """
278 return await client.post(
279 "/rw/cfg",
280 params={k: v for k, v in {"action": action}.items() if v is not None},
281 data={k: v for k, v in {"state": state}.items() if v is not None},
282 )
285async def subscribe_on_cfg_changecount(
286 client: RWSClient,
287 identifier: str | None = None,
288 identifier_p: str | None = None,
289) -> httpx.Response:
290 """
291 Subscribe on cfg ChangeCount.
293 Route: ``POST /subscription``
294 ABB constraints: Not supported in bootserver mode.
296 Args:
297 client: Open RWSClient instance.
298 identifier: Body parameter. Optional.
299 identifier_p: Body parameter. Optional.
301 Returns:
302 Raw HTTP response. Expected success: HTTP 201.
304 Raises:
305 RWSAuthenticationError: On HTTP 401.
306 RWSNotFoundError: On HTTP 404.
307 RWSHTTPError: On any other HTTP >= 400.
308 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415)
310 Example:
311 ```python
312 >>> await subscribe_on_cfg_changecount(client)
313 <Response [201]>
314 ```
315 """
316 return await client.post(
317 "/subscription",
318 data={
319 k: v
320 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
321 if v is not None
322 },
323 )
326async def get_cfg_domain_types(
327 client: RWSClient,
328 domain: str,
329 start: str | None = None,
330 limit: str | None = None,
331) -> httpx.Response:
332 """
333 Get CFG Domain Types.
335 Route: ``GET /rw/cfg/{domain}``
336 ABB constraints: Not supported in bootserver mode
338 Args:
339 client: Open RWSClient instance.
340 domain: URL path parameter.
341 start: Query parameter. Optional.
342 limit: Query parameter. Optional.
344 Returns:
345 Raw HTTP response. Expected success: HTTP 200.
347 Raises:
348 RWSAuthenticationError: On HTTP 401.
349 RWSNotFoundError: On HTTP 404.
350 RWSHTTPError: On any other HTTP >= 400.
352 Example:
353 ```python
354 >>> await get_cfg_domain_types(client, "domain_value")
355 <Response [200]>
356 ```
357 """
358 return await client.get(
359 f"/rw/cfg/{domain}",
360 params={k: v for k, v in {"start": start, "limit": limit}.items() if v is not None},
361 )
364async def get_actions_on_cfg_domain(
365 client: RWSClient,
366 domain: str,
367 action: str | None = None,
368) -> httpx.Response:
369 """
370 Get Actions on a CFG domain.
372 Route: ``GET /rw/cfg/{domain}``
373 ABB constraints: CFG Mastership is handled internally if not explicit held by the client. Not
374 supported in bootserver mode
376 Args:
377 client: Open RWSClient instance.
378 domain: URL path parameter.
379 action: Query parameter. Optional.
381 Returns:
382 Raw HTTP response. Expected success: HTTP 200.
384 Raises:
385 RWSAuthenticationError: On HTTP 401.
386 RWSNotFoundError: On HTTP 404.
387 RWSHTTPError: On any other HTTP >= 400.
388 # ABB codes: BAD_REQUEST(400)
390 Example:
391 ```python
392 >>> await get_actions_on_cfg_domain(client, "domain_value")
393 <Response [200]>
394 ```
395 """
396 return await client.get(
397 f"/rw/cfg/{domain}",
398 params={k: v for k, v in {"action": action}.items() if v is not None},
399 )
402async def save_cfg_domain(
403 client: RWSClient,
404 domain: str,
405 action: str | None = None,
406) -> httpx.Response:
407 """
408 Save CFG domain.
410 Route: ``POST /rw/cfg/{domain}``
411 ABB constraints: Not supported in bootserver mode
413 Args:
414 client: Open RWSClient instance.
415 domain: URL path parameter.
416 action: Query parameter. Optional.
418 Returns:
419 Raw HTTP response. Expected success: HTTP 204.
421 Raises:
422 RWSAuthenticationError: On HTTP 401.
423 RWSNotFoundError: On HTTP 404.
424 RWSHTTPError: On any other HTTP >= 400.
425 # ABB codes: BAD_REQUEST(400), FORBIDDEN(403), UNAUTHORIZED(401)
427 Example:
428 ```python
429 >>> await save_cfg_domain(client, "domain_value")
430 <Response [204]>
431 ```
432 """
433 return await client.post(
434 f"/rw/cfg/{domain}",
435 params={k: v for k, v in {"action": action}.items() if v is not None},
436 data={},
437 )
440async def reset_cfg_domain(
441 client: RWSClient,
442 domain: str,
443 action: str | None = None,
444) -> httpx.Response:
445 """
446 Reset CFG domain.
448 Route: ``POST /rw/cfg/{domain}``
449 ABB constraints: Not supported in bootserver mode
451 Args:
452 client: Open RWSClient instance.
453 domain: URL path parameter.
454 action: Query parameter. Optional.
456 Returns:
457 Raw HTTP response. Expected success: HTTP 200.
459 Raises:
460 RWSAuthenticationError: On HTTP 401.
461 RWSNotFoundError: On HTTP 404.
462 RWSHTTPError: On any other HTTP >= 400.
463 # ABB codes: BAD_REQUEST(400)
465 Example:
466 ```python
467 >>> await reset_cfg_domain(client, "domain_value")
468 <Response [200]>
469 ```
470 """
471 return await client.post(
472 f"/rw/cfg/{domain}",
473 params={k: v for k, v in {"action": action}.items() if v is not None},
474 data={},
475 )
478async def get_cfg_type(
479 client: RWSClient,
480 domain: str,
481 type: str,
482) -> httpx.Response:
483 """
484 Get CFG type.
486 Route: ``GET /rw/cfg/{domain}/{type}``
487 ABB constraints: Not supported in bootserver mode
489 Args:
490 client: Open RWSClient instance.
491 domain: URL path parameter.
492 type: URL path parameter.
494 Returns:
495 Raw HTTP response. Expected success: HTTP 200.
497 Raises:
498 RWSAuthenticationError: On HTTP 401.
499 RWSNotFoundError: On HTTP 404.
500 RWSHTTPError: On any other HTTP >= 400.
501 # ABB codes: NOT_FOUND(404)
503 Example:
504 ```python
505 >>> await get_cfg_type(client, "domain_value", "type_value")
506 <Response [200]>
507 ```
508 """
509 return await client.get(f"/rw/cfg/{domain}/{type}")
512async def get_all_attributes_of_the_given_domain(
513 client: RWSClient,
514 domain: str,
515 type: str,
516) -> httpx.Response:
517 """
518 Get all attributes of the given domain type.
520 Route: ``GET /rw/cfg/{domain}/{type}/attributes``
521 ABB constraints: Not supported in bootserver mode
523 Args:
524 client: Open RWSClient instance.
525 domain: URL path parameter.
526 type: URL path parameter.
528 Returns:
529 Raw HTTP response. Expected success: HTTP 200.
531 Raises:
532 RWSAuthenticationError: On HTTP 401.
533 RWSNotFoundError: On HTTP 404.
534 RWSHTTPError: On any other HTTP >= 400.
535 # ABB codes: BAD_REQUEST(400)
537 Example:
538 ```python
539 >>> await get_all_attributes_of_the_given_domain(client, "domain_value", "type_value")
540 <Response [200]>
541 ```
542 """
543 return await client.get(f"/rw/cfg/{domain}/{type}/attributes")
546async def get_all_instances_of_the_given_domain(
547 client: RWSClient,
548 domain: str,
549 type: str,
550) -> httpx.Response:
551 """
552 Get all instances of the given domain type.
554 Route: ``GET /rw/cfg/{domain}/{type}/instances``
555 ABB constraints: Not supported in bootserver mode
557 Args:
558 client: Open RWSClient instance.
559 domain: URL path parameter.
560 type: URL path parameter.
562 Returns:
563 Raw HTTP response. Expected success: HTTP 200.
565 Raises:
566 RWSAuthenticationError: On HTTP 401.
567 RWSNotFoundError: On HTTP 404.
568 RWSHTTPError: On any other HTTP >= 400.
569 # ABB codes: BAD_REQUEST(400)
571 Example:
572 ```python
573 >>> await get_all_instances_of_the_given_domain(client, "domain_value", "type_value")
574 <Response [200]>
575 ```
576 """
577 return await client.get(f"/rw/cfg/{domain}/{type}/instances")
580async def get_actions_on_cfg_instances(
581 client: RWSClient,
582 domain: str,
583 type: str,
584 action: str | None = None,
585) -> httpx.Response:
586 """
587 Get actions on CFG instances.
589 Route: ``GET /rw/cfg/{domain}/{type}/instances``
590 ABB constraints: Not supported in bootserver mode
592 Args:
593 client: Open RWSClient instance.
594 domain: URL path parameter.
595 type: URL path parameter.
596 action: Query parameter. Optional.
598 Returns:
599 Raw HTTP response. Expected success: HTTP 200.
601 Raises:
602 RWSAuthenticationError: On HTTP 401.
603 RWSNotFoundError: On HTTP 404.
604 RWSHTTPError: On any other HTTP >= 400.
605 # ABB codes: BAD_REQUEST(400)
607 Example:
608 ```python
609 >>> await get_actions_on_cfg_instances(client, "domain_value", "type_value")
610 <Response [200]>
611 ```
612 """
613 return await client.get(
614 f"/rw/cfg/{domain}/{type}/instances",
615 params={k: v for k, v in {"action": action}.items() if v is not None},
616 )
619async def reset_cfg_instances(
620 client: RWSClient,
621 domain: str,
622 type: str,
623 action: str | None = None,
624) -> httpx.Response:
625 """
626 Reset CFG instances.
628 Route: ``POST /rw/cfg/{domain}/{type}/instances``
629 ABB constraints: Not supported in bootserver mode
631 Args:
632 client: Open RWSClient instance.
633 domain: URL path parameter.
634 type: URL path parameter.
635 action: Query parameter. Optional.
637 Returns:
638 Raw HTTP response. Expected success: HTTP 204.
640 Raises:
641 RWSAuthenticationError: On HTTP 401.
642 RWSNotFoundError: On HTTP 404.
643 RWSHTTPError: On any other HTTP >= 400.
644 # ABB codes: BAD_REQUEST(400)
646 Example:
647 ```python
648 >>> await reset_cfg_instances(client, "domain_value", "type_value")
649 <Response [204]>
650 ```
651 """
652 return await client.post(
653 f"/rw/cfg/{domain}/{type}/instances",
654 params={k: v for k, v in {"action": action}.items() if v is not None},
655 data={},
656 )
659async def create_default_cfg_instance(
660 client: RWSClient,
661 domain: str,
662 type: str,
663 action: str | None = None,
664) -> httpx.Response:
665 """
666 Create default CFG instance.
668 Route: ``POST /rw/cfg/{domain}/{type}/instances``
669 ABB constraints: Use location header to fetch information about newly created resource. Not
670 supported in bootserver mode
672 Args:
673 client: Open RWSClient instance.
674 domain: URL path parameter.
675 type: URL path parameter.
676 action: Query parameter. Optional.
678 Returns:
679 Raw HTTP response. Expected success: HTTP 201.
681 Raises:
682 RWSAuthenticationError: On HTTP 401.
683 RWSNotFoundError: On HTTP 404.
684 RWSHTTPError: On any other HTTP >= 400.
685 # ABB codes: BAD_REQUEST(400)
687 Example:
688 ```python
689 >>> await create_default_cfg_instance(client, "domain_value", "type_value")
690 <Response [201]>
691 ```
692 """
693 return await client.post(
694 f"/rw/cfg/{domain}/{type}/instances",
695 params={k: v for k, v in {"action": action}.items() if v is not None},
696 data={},
697 )
700async def get_cfg_instance(
701 client: RWSClient,
702 domain: str,
703 type: str,
704 instance_name: str,
705) -> httpx.Response:
706 """
707 Get CFG instance.
709 Route: ``GET /rw/cfg/{domain}/{type}/instances/{instance name}``
710 ABB constraints: Not supported in bootserver mode
712 Args:
713 client: Open RWSClient instance.
714 domain: URL path parameter.
715 type: URL path parameter.
716 instance_name: URL path parameter.
718 Returns:
719 Raw HTTP response. Expected success: HTTP 200.
721 Raises:
722 RWSAuthenticationError: On HTTP 401.
723 RWSNotFoundError: On HTTP 404.
724 RWSHTTPError: On any other HTTP >= 400.
725 # ABB codes: BAD_REQUEST(400)
727 Example:
728 ```python
729 >>> await get_cfg_instance(client, "domain_value", "type_value", "instance_name_value")
730 <Response [200]>
731 ```
732 """
733 return await client.get(f"/rw/cfg/{domain}/{type}/instances/{instance_name}")
736async def get_cfg_instance_actions(
737 client: RWSClient,
738 domain: str,
739 type: str,
740 instance: str,
741 action: str | None = None,
742) -> httpx.Response:
743 """
744 Get CFG instance actions.
746 Route: ``GET /rw/cfg/{domain}/{type}/instances/{instance}``
747 ABB constraints: Not supported in bootserver mode
749 Args:
750 client: Open RWSClient instance.
751 domain: URL path parameter.
752 type: URL path parameter.
753 instance: URL path parameter.
754 action: Query parameter. Optional.
756 Returns:
757 Raw HTTP response. Expected success: HTTP 200.
759 Raises:
760 RWSAuthenticationError: On HTTP 401.
761 RWSNotFoundError: On HTTP 404.
762 RWSHTTPError: On any other HTTP >= 400.
763 # ABB codes: BAD_REQUEST(400)
765 Example:
766 ```python
767 >>> await get_cfg_instance_actions(
768 ... client,
769 ... "domain_value",
770 ... "type_value",
771 ... "instance_value"
772 ... )
773 <Response [200]>
774 ```
775 """
776 return await client.get(
777 f"/rw/cfg/{domain}/{type}/instances/{instance}",
778 params={k: v for k, v in {"action": action}.items() if v is not None},
779 )
782async def update_cfg_instance(
783 client: RWSClient,
784 domain: str,
785 type: str,
786 instance: str,
787 action: str | None = None,
788 attribute_name: str | None = None,
789) -> httpx.Response:
790 """
791 Update CFG instance.
793 Route: ``POST /rw/cfg/{domain}/{type}/instances/{instance}``
794 ABB constraints: Not supported in bootserver mode
796 Args:
797 client: Open RWSClient instance.
798 domain: URL path parameter.
799 type: URL path parameter.
800 instance: URL path parameter.
801 action: Query parameter. Optional.
802 attribute_name: Body parameter. Optional.
804 Returns:
805 Raw HTTP response. Expected success: HTTP 204.
807 Raises:
808 RWSAuthenticationError: On HTTP 401.
809 RWSNotFoundError: On HTTP 404.
810 RWSHTTPError: On any other HTTP >= 400.
811 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400)
813 Example:
814 ```python
815 >>> await update_cfg_instance(client, "domain_value", "type_value", "instance_value")
816 <Response [204]>
817 ```
818 """
819 return await client.post(
820 f"/rw/cfg/{domain}/{type}/instances/{instance}",
821 params={k: v for k, v in {"action": action}.items() if v is not None},
822 data={k: v for k, v in {"attribute_name": attribute_name}.items() if v is not None},
823 )
826async def delete_cfg_instance(
827 client: RWSClient,
828 domain: str,
829 type: str,
830 instance: str,
831) -> httpx.Response:
832 """
833 Delete CFG instance.
835 Route: ``DELETE /rw/cfg/{domain}/{type}/instances/{instance}``
836 ABB constraints: Not supported in bootserver mode
838 Args:
839 client: Open RWSClient instance.
840 domain: URL path parameter.
841 type: URL path parameter.
842 instance: URL path parameter.
844 Returns:
845 Raw HTTP response. Expected success: HTTP 204.
847 Raises:
848 RWSAuthenticationError: On HTTP 401.
849 RWSNotFoundError: On HTTP 404.
850 RWSHTTPError: On any other HTTP >= 400.
851 # ABB codes: BAD_REQUEST(400)
853 Example:
854 ```python
855 >>> await delete_cfg_instance(client, "domain_value", "type_value", "instance_value")
856 <Response [204]>
857 ```
858 """
859 return await client.delete(f"/rw/cfg/{domain}/{type}/instances/{instance}")