Пример #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);
        }
Пример #2
0
        getSrsRecoveryPlanAutomationRunbookActionDetails(ASRRecoveryPlanAutomationRunbookActionDetails automationRunbookActionDetails)
        {
            var action = new RecoveryPlanAutomationRunbookActionDetails();

            action.RunbookId      = automationRunbookActionDetails.RunbookId;
            action.Timeout        = automationRunbookActionDetails.Timeout;
            action.FabricLocation = automationRunbookActionDetails.FabricLocation;

            return(action);
        }