Skip to content

User/t mihir/enableprotection#8

Open
mihirkumarsingh17 wants to merge 2 commits into
recoveryservices-autorest-migrationfrom
user/t-mihir/enableprotection
Open

User/t mihir/enableprotection#8
mihirkumarsingh17 wants to merge 2 commits into
recoveryservices-autorest-migrationfrom
user/t-mihir/enableprotection

Conversation

@mihirkumarsingh17

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

@vidyadharijami vidyadharijami self-assigned this Jun 26, 2023
}
$null = $PSBoundParameters.Add("CustomDetail", $ProviderDetail)
$null = $PSBoundParameters.Remove("ProviderDetail")
return Az.RecoveryServices.internal\New-AzRecoveryServicesReplicationFabric @PSBoundParameters

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please return the job as output

)
process {
try {
$protectionContainerString = $ProtectionContainer.id.Split("/")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add validation of not null or empty for Id

$null = $PSBoundParameters.Remove("ReplicationProtectedItem")
$null = $PSBoundParameters.Add("FabricName", $fabricName)
$null = $PSBoundParameters.Add("ProtectionContainerName", $protectionContainerName)
$null = $PSBoundParameters.Add("ReplicatedProtectedItemName",$replicationProtectedItemName)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return job Id

try {
$fabricName = $ReplicationProtectedItem.PrimaryFabricFriendlyName
$protectionContainerName = $ReplicationProtectedItem.Id.Split("/")[-3]
$replicationProtectedItemName = $ReplicationProtectedItem.Name

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for instance type and throw exception if it's not supported

$null = $PSBoundParameters.Add("ProtectionContainerName", $protectionContainerName)
$null = $PSBoundParameters.Add("ReplicatedProtectedItemName",$replicationProtectedItemName)
$PSBoundParameters["NoWait"] = $true
$res = Az.RecoveryServices.internal\Add-AzRecoveryServicesReplicationProtectedItemRecoveryPoint @PSBoundParameters

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename as result or output


process {
try {
$fabricName = $ReplicationProtectedItem.PrimaryFabricFriendlyName

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add validation for instance type

try {
$replicationscenario = $ProviderSpecificInput.ReplicationScenario
if($replicationscenario -eq "ReplicateAzureToAzure") {
if($replicationscenario -eq "A2A")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this change once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants