Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit dcb706f

Browse files
authored
Changing CLI Scaleset size parameter to max_size. (#2293)
* Changing size parameter to max_size. * Adding default param for clarity. * FIxing param * Setting size to 1. * Adding comment. * Trailing white spaces. * Adding initialized_size param. * Using initialized_at. * Changing variable name.
1 parent d213eac commit dcb706f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/cli/onefuzz/api.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,9 @@ def _expand_scaleset_machine(
13931393
def create(
13941394
self,
13951395
pool_name: primitives.PoolName,
1396-
size: int,
1396+
max_size: int,
13971397
*,
1398+
initial_size: Optional[int] = 1,
13981399
image: Optional[str] = None,
13991400
vm_sku: Optional[str] = "Standard_D2s_v3",
14001401
region: Optional[primitives.Region] = None,
@@ -1423,14 +1424,16 @@ def create(
14231424

14241425
auto_scale = requests.AutoScaleOptions(
14251426
min=min_instances,
1426-
max=size,
1427-
default=size,
1427+
max=max_size,
1428+
default=max_size,
14281429
scale_out_amount=scale_out_amount,
14291430
scale_out_cooldown=scale_out_cooldown,
14301431
scale_in_amount=scale_in_amount,
14311432
scale_in_cooldown=scale_in_cooldown,
14321433
)
14331434

1435+
# Setting size=1 so that the scaleset is intialized with only 1 node.
1436+
# The default and max are defined above
14341437
return self._req_model(
14351438
"POST",
14361439
models.Scaleset,
@@ -1439,7 +1442,7 @@ def create(
14391442
vm_sku=vm_sku,
14401443
image=image,
14411444
region=region,
1442-
size=size,
1445+
size=initial_size,
14431446
spot_instances=spot_instances,
14441447
ephemeral_os_disks=ephemeral_os_disks,
14451448
tags=tags,

0 commit comments

Comments
 (0)