-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Compute] Redeploy Dedicated Hosts #26655
Open
haagha
wants to merge
7
commits into
Azure:main
Choose a base branch
from
PSCmdAssistant:cmdassistant-50-10480202768-1
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
7 commits
Select commit
Hold shift + click to select a range
ae21a0a
Autogen code
PSCmdAssistant 8fc9fb3
Autogen code by build fixer
PSCmdAssistant e1799e3
first pass
haagha 47dcbbc
merging main
haagha f6f03d4
Merge branch 'main' into cmdassistant-50-10480202768-1
haagha e3066a1
tests
haagha aae8d3a
Merge branch 'main' into cmdassistant-50-10480202768-1
haagha 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 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 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
774 changes: 774 additions & 0 deletions
774
...oft.Azure.Commands.Compute.Test.ScenarioTests.DedicatedHostTests/testgenupdateazhost.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
|
@@ -78,11 +78,19 @@ public override void ExecuteCmdlet() | |
parameters.Sku = new Sku(this.Sku, null, null); | ||
} | ||
|
||
if (this.IsParameterBound(c => c.Redeploy)) | ||
{ | ||
var redeployResult = DedicatedHostsClient.Redeploy(resourceGroupName, hostGroupName, Name); | ||
WriteObject(redeployResult); | ||
} | ||
else | ||
{ | ||
var result = DedicatedHostsClient.Update(resourceGroupName, hostGroupName, Name, parameters); | ||
|
||
var result = DedicatedHostsClient.Update(resourceGroupName, hostGroupName, Name, parameters); | ||
var psObject = new PSHost(); | ||
ComputeAutomationAutoMapperProfile.Mapper.Map<DedicatedHost, PSHost>(result, psObject); | ||
WriteObject(psObject); | ||
var psObject = new PSHost(); | ||
ComputeAutomationAutoMapperProfile.Mapper.Map<DedicatedHost, PSHost>(result, psObject); | ||
WriteObject(psObject); | ||
} | ||
} | ||
}); | ||
} | ||
|
@@ -123,6 +131,11 @@ public override void ExecuteCmdlet() | |
Mandatory = false)] | ||
public DedicatedHostLicenseTypes LicenseType { get; set; } | ||
|
||
[Parameter( | ||
Mandatory = false, | ||
HelpMessage = "Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.")] | ||
public bool Redeploy { get; set; } | ||
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. Refer to this guide. Please use "SwitchParameter" instead. |
||
|
||
[Parameter( | ||
ParameterSetName = "ResourceIdParameter", | ||
Position = 0, | ||
|
@@ -131,4 +144,4 @@ public override void ExecuteCmdlet() | |
public string ResourceId { get; set; } | ||
|
||
} | ||
} | ||
} |
This file contains 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please merge main to your branch again. This file has a conflict.