Skip to content
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

User/t mihir/enableprotection #8

Open
wants to merge 2 commits into
base: recoveryservices-autorest-migration
Choose a base branch
from

Conversation

mihirkumarsingh17
Copy link
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
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
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
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
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
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
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

@@ -155,23 +150,27 @@ function New-AzRecoveryServicesReplicationProtectionContainerMapping {
process {
try {
$replicationscenario = $ProviderSpecificInput.ReplicationScenario
if($replicationscenario -eq "ReplicateAzureToAzure") {
if($replicationscenario -eq "A2A")
Copy link
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