-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
425f7bf
commit 5fc9862
Showing
38 changed files
with
1,249 additions
and
472 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
...oarding.Orchestrator/AwsCloudFormation/CloudFormationWrapper/ChangeSetStatusExtensions.cs
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
using Amazon.CloudFormation; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Dome9.CloudGuardOnboarding.Orchestrator | ||
{ | ||
public static class ChangeSetStatusExtensions | ||
{ | ||
public static bool IsFinal(this ChangeSetStatus changeSetStatus) | ||
{ | ||
switch (changeSetStatus) | ||
{ | ||
case "FAILED": | ||
case "DELETE_COMPLETE": | ||
case "CREATE_COMPLETE": | ||
case "DELETE_FAILED": | ||
return true; | ||
|
||
default: | ||
return false; | ||
} | ||
} | ||
|
||
public static bool IsSuccess(this ChangeSetStatus changeSetStatus) | ||
{ | ||
switch (changeSetStatus) | ||
{ | ||
case "CREATE_COMPLETE": | ||
return true; | ||
|
||
default: | ||
return false; | ||
} | ||
} | ||
|
||
public static bool IsFinal(this ExecutionStatus executionStatus) | ||
{ | ||
switch (executionStatus) | ||
{ | ||
case "UNAVAILABLE": | ||
case "AVAILABLE": | ||
case "EXECUTE_COMPLETE": | ||
case "EXECUTE_FAILED": | ||
case "OBSOLETE": | ||
return true; | ||
|
||
default: | ||
return false; | ||
} | ||
} | ||
|
||
public static bool IsSuccess(this ExecutionStatus executionStatus) | ||
{ | ||
switch (executionStatus) | ||
{ | ||
case "EXECUTE_COMPLETE": | ||
return true; | ||
|
||
default: | ||
return false; | ||
} | ||
} | ||
|
||
public static bool IsReady(this ExecutionStatus executionStatus) | ||
{ | ||
switch (executionStatus) | ||
{ | ||
case "AVAILABLE": | ||
return true; | ||
|
||
default: | ||
return false; | ||
} | ||
} | ||
} | ||
} |
451 changes: 364 additions & 87 deletions
451
...dOnboarding.Orchestrator/AwsCloudFormation/CloudFormationWrapper/CloudFormationWrapper.cs
Large diffs are not rendered by default.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
...oarding.Orchestrator/AwsCloudFormation/CloudFormationWrapper/CloudGuardChangeSetStatus.cs
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Amazon.CloudFormation; | ||
|
||
namespace Dome9.CloudGuardOnboarding.Orchestrator | ||
{ | ||
public class CloudGuardChangeSetStatus | ||
{ | ||
public bool? HasChanges { get; set; } | ||
public ExecutionStatus ExecutionStatus { get; set; } | ||
public ChangeSetStatus ChangeSetStatus { get; set; } | ||
public string StatusReason { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return $"{nameof(HasChanges)}='{HasChanges}', {nameof(ExecutionStatus)}='{ExecutionStatus}', {nameof(ChangeSetStatus)}='{ChangeSetStatus}', {nameof(StatusReason)}='{StatusReason}'"; | ||
} | ||
|
||
|
||
} | ||
} |
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
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.