Skip to content

Commit da862d9

Browse files
committed
addressing comments
1 parent 059bb0c commit da862d9

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

centml/cli/cluster.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,10 @@ def _format_ssh_key(ssh_key):
6262
def _get_replica_info(deployment, depl_type):
6363
"""Extract replica information handling V2/V3 field differences"""
6464
if depl_type == DeploymentType.CSERVE_V3:
65-
return {
66-
"min": getattr(deployment, "min_replicas", getattr(deployment, "min_scale", None)),
67-
"max": getattr(deployment, "max_replicas", getattr(deployment, "max_scale", None)),
68-
}
65+
return {"min": deployment.min_replicas, "max": deployment.max_replicas,}
6966
else: # V2
7067
return {"min": deployment.min_scale, "max": deployment.max_scale}
7168

72-
7369
def _get_ready_status(cclient, deployment):
7470
api_status = deployment.status
7571
service_status = (
@@ -204,16 +200,6 @@ def get(type, id):
204200
("Max concurrency", deployment.concurrency or "None"),
205201
]
206202

207-
# Add V3-specific rollout information
208-
if depl_type == DeploymentType.CSERVE_V3:
209-
rollout_info = {}
210-
if hasattr(deployment, "max_surge") and deployment.max_surge is not None:
211-
rollout_info["max_surge"] = deployment.max_surge
212-
if hasattr(deployment, "max_unavailable") and deployment.max_unavailable is not None:
213-
rollout_info["max_unavailable"] = deployment.max_unavailable
214-
if rollout_info:
215-
display_rows.append(("Rollout strategy", rollout_info))
216-
217203
click.echo(tabulate(display_rows, tablefmt="rounded_outline", disable_numparse=True))
218204

219205

0 commit comments

Comments
 (0)