-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Open
erinborders
wants to merge
26
commits into
Azure:main
Choose a base branch
from
erinborders:erinborders/machine-preview
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
3752bec
add spot max price flag
erinborders b787769
enable ultra ssd and eviction policy
erinborders bf3be79
change notes
erinborders 2be46ca
linting
erinborders ad7b35d
linting
erinborders 72f4df4
test coverage
erinborders 837546f
Merge branch 'main' of https://github.com/erinborders/azure-cli-exten…
erinborders 519845c
fix default
erinborders c2bde65
Merge branch 'Azure:main' into erinborders/machine-preview
erinborders 41fc811
Merge branch 'main' of https://github.com/erinborders/azure-cli-exten…
erinborders 601acd9
Merge branch 'erinborders/machine-preview' of https://github.com/erin…
erinborders 4e6cd6d
Merge branch 'main' of https://github.com/erinborders/azure-cli-exten…
erinborders 20fef2b
modify test
erinborders fb1bf72
hardware property name
erinborders 2bf4bd9
Merge branch 'main' of https://github.com/erinborders/azure-cli-exten…
erinborders 799f29c
add zones
erinborders 4d42dc5
space
erinborders 47806a9
nodepool zone
erinborders 5712645
multiple zones
erinborders d7882ce
typo
erinborders 1ab8a94
Merge branch 'main' of https://github.com/erinborders/azure-cli-exten…
erinborders 360a345
fix silently discarded zones property
erinborders e03e118
Merge branch 'main' of https://github.com/erinborders/azure-cli-exten…
erinborders b3fdfb4
key error
erinborders 32c3206
restore to main
erinborders e6b60d1
zones argument
erinborders File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
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 |
||
| ) | ||
| return machineBillingProfile | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.