Exemple #1
0
        //
        // Summary:
        //     Initializes a new instance of the RecoveryPlanAction class.
        public static RecoveryPlanAction GetSrsRecoveryPlanAction(ASRRecoveryPlanAction asrRecoveryPlanAction)
        {
            var recoveryPlanAction = new RecoveryPlanAction();

            recoveryPlanAction.ActionName         = asrRecoveryPlanAction.ActionName;
            recoveryPlanAction.FailoverDirections = asrRecoveryPlanAction.FailoverDirections;

            if (asrRecoveryPlanAction.CustomDetails is ASRRecoveryPlanAutomationRunbookActionDetails)
            {
                recoveryPlanAction.CustomDetails = ASRRecoveryPlanAutomationRunbookActionDetails.getSrsRecoveryPlanAutomationRunbookActionDetails(
                    (ASRRecoveryPlanAutomationRunbookActionDetails)asrRecoveryPlanAction.CustomDetails);
            }
            else if (asrRecoveryPlanAction.CustomDetails is ASRRecoveryPlanManualActionDetails)
            {
                recoveryPlanAction.CustomDetails = ASRRecoveryPlanManualActionDetails.getSrsRecoveryPlanAutomationRunbookActionDetails(
                    (ASRRecoveryPlanManualActionDetails)asrRecoveryPlanAction.CustomDetails);
            }
            else if (asrRecoveryPlanAction.CustomDetails is ASRRecoveryPlanScriptActionDetails)
            {
                recoveryPlanAction.CustomDetails = ASRRecoveryPlanScriptActionDetails.getRecoveryPlanScriptActionDetails(
                    (ASRRecoveryPlanScriptActionDetails)asrRecoveryPlanAction.CustomDetails);
            }

            return(recoveryPlanAction);
        }
Exemple #2
0
        public static RecoveryPlanScriptActionDetails getRecoveryPlanScriptActionDetails(ASRRecoveryPlanScriptActionDetails recoveryPlanScriptActionDetails)
        {
            var actionDetails = new RecoveryPlanScriptActionDetails();

            actionDetails.Path           = recoveryPlanScriptActionDetails.Path;
            actionDetails.Timeout        = recoveryPlanScriptActionDetails.Timeout;
            actionDetails.FabricLocation = recoveryPlanScriptActionDetails.FabricLocation;

            return(actionDetails);
        }