File tree 2 files changed +12
-3
lines changed 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2135,7 +2135,8 @@ def update_lab_groups(
2135
2135
:returns: Updated objects consisting of group ID and permissions.
2136
2136
"""
2137
2137
warnings .warn (
2138
- "'Lab.update_lab_groups()' is deprecated. Use '.update_associations()' instead." ,
2138
+ "'Lab.update_lab_groups()' is deprecated. Use '.update_associations()'"
2139
+ " instead." ,
2139
2140
DeprecationWarning ,
2140
2141
)
2141
2142
url = self ._url_for ("lab" )
Original file line number Diff line number Diff line change 23
23
import logging
24
24
import time
25
25
from typing import TYPE_CHECKING , Any
26
+ import warnings
26
27
27
28
from virl2_client .exceptions import ControllerNotFound
28
29
@@ -398,7 +399,9 @@ def __init__(
398
399
:param is_connected: Whether the compute host is connected.
399
400
:param is_synced: Whether the compute host is synced.
400
401
:param admission_state: The admission state of the compute host.
401
- :param nodes: The list of nodes associated with the compute host.
402
+ :param node_counts: The counts of deployed and running nodes and orphans.
403
+ :param nodes: DEPRECATED: replaced by node_counts.
404
+ The list of node IDs associated with the compute host.
402
405
"""
403
406
self ._system = system
404
407
self ._session : httpx .Client = system ._session
@@ -468,13 +471,18 @@ def is_synced(self) -> bool:
468
471
469
472
@property
470
473
def node_counts (self ) -> dict [str , int ]:
471
- """Return the count of deployed and running nodes and orphans."""
474
+ """Return the counts of deployed and running nodes and orphans."""
472
475
self ._system .sync_compute_hosts_if_outdated ()
473
476
return self ._node_counts
474
477
475
478
@property
476
479
def nodes (self ) -> list [str ]:
477
480
"""Return the list of nodes associated with the compute host."""
481
+ warnings .warn (
482
+ "'ComputeHost.nodes' is deprecated. Use 'ComputeHost.node_counts' or "
483
+ "'ClientLibrary.get_diagnostics(DiagnosticsCategory.COMPUTES)' instead." ,
484
+ DeprecationWarning ,
485
+ )
478
486
self ._system .sync_compute_hosts_if_outdated ()
479
487
return self ._nodes
480
488
You can’t perform that action at this time.
0 commit comments