-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Adding enable ultra ssd, eviction policy, and spot max price support for machine #9696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3752bec
b787769
bf3be79
2be46ca
ad7b35d
72f4df4
837546f
519845c
c2bde65
41fc811
601acd9
4e6cd6d
20fef2b
fb1bf72
2bf4bd9
799f29c
4d42dc5
47806a9
5712645
d7882ce
1ab8a94
360a345
e03e118
b3fdfb4
32c3206
e6b60d1
1f06734
b01fe8e
0b37b91
4a41531
cda4bc1
5de034c
e942096
cf9fbbb
8e221ee
15c0672
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,14 +84,18 @@ def constructMachine(cmd, raw_parameters, machine_name): | |
| ) | ||
| tags = raw_parameters.get("tags") | ||
| priority = raw_parameters.get("priority") | ||
| eviction_policy = raw_parameters.get("eviction_policy") | ||
| machineProperties = MachineProperties( | ||
| tags=tags, | ||
| priority=priority, | ||
| eviction_policy=eviction_policy, | ||
| network=set_machine_network(cmd, raw_parameters), | ||
| hardware=set_machine_hardware_profile(cmd, raw_parameters), | ||
| kubernetes=set_machine_kubernetes_profile(cmd, raw_parameters), | ||
| operating_system=set_machine_os_profile(cmd, raw_parameters) | ||
| operating_system=set_machine_os_profile(cmd, raw_parameters), | ||
| billing=set_machine_billing_profile(cmd, raw_parameters) | ||
| ) | ||
|
|
||
| Machine = cmd.get_models( | ||
| "Machine", | ||
| resource_type=CUSTOM_MGMT_AKS_PREVIEW, | ||
|
|
@@ -106,6 +110,7 @@ def constructMachine(cmd, raw_parameters, machine_name): | |
|
|
||
|
|
||
| def set_machine_hardware_profile(cmd, raw_parameters): | ||
| enable_ultra_ssd = raw_parameters.get("enable_ultra_ssd") | ||
| vm_size = raw_parameters.get("vm_size") | ||
| if vm_size is None: | ||
| raise RequiredArgumentMissingError( | ||
|
|
@@ -117,7 +122,8 @@ def set_machine_hardware_profile(cmd, raw_parameters): | |
| operation_group="machines" | ||
| ) | ||
| machine_hardware_profile = MachineHardwareProfile( | ||
| vm_size=vm_size | ||
| vm_size=vm_size, | ||
| ultra_ssd_enabled=enable_ultra_ssd | ||
| ) | ||
| return machine_hardware_profile | ||
|
|
||
|
|
@@ -196,3 +202,16 @@ def set_machine_os_profile(cmd, raw_parameters): | |
| enable_fips=enable_fips | ||
| ) | ||
| return machineOSProfile | ||
|
|
||
|
|
||
| def set_machine_billing_profile(cmd, raw_parameters): | ||
| spot_max_price = raw_parameters.get("spot_max_price") | ||
| MachineBillingProfile = cmd.get_models( | ||
| "MachineBillingProfile", | ||
| resource_type=CUSTOM_MGMT_AKS_PREVIEW, | ||
| operation_group="machines" | ||
| ) | ||
| machineBillingProfile = MachineBillingProfile( | ||
| spot_max_price=spot_max_price | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the default value
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh I modeled this off of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a normalization of NaN in the AP handling logic. Since the machine is a new feature, it may not yet have comprehensive unit and scenario tests to ensure that NaN values are correctly passed to RP and handled appropriately. |
||
| ) | ||
| return machineBillingProfile | ||
Uh oh!
There was an error while loading. Please reload this page.