-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #750 from kbrock/sm-md-lg
add small med large ASL workflow
- Loading branch information
Showing
1 changed file
with
100 additions
and
0 deletions.
There are no files selected for viewing
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,100 @@ | ||
{ | ||
"Comment": "Provision VM with choice for small medium large", | ||
"StartAt": "DetermineSize", | ||
"States": { | ||
"DetermineSize": { | ||
"Comment": "Determine dialog value", | ||
"Type": "Choice", | ||
"Choices": [ | ||
{ | ||
"Variable": "$.size", | ||
"StringEquals": "small", | ||
"Next": "SmallSizeState" | ||
}, | ||
{ | ||
"Variable": "$.size", | ||
"StringEquals": "medium", | ||
"Next": "MediumSizeState" | ||
}, | ||
{ | ||
"Variable": "$.size", | ||
"StringEquals": "large", | ||
"Next": "LargeSizeState" | ||
} | ||
], | ||
"Default": "SmallSizeState" | ||
}, | ||
"SmallSizeState": { | ||
"Type": "Pass", | ||
"Next": "SmallSetMemory" | ||
}, | ||
"SmallSetMemory": { | ||
"Comment": "set vm_memory=2GB for small", | ||
"Type": "Pass", | ||
"ResultPath": "$.vm_memory", | ||
"Result": "2048", | ||
"Next": "SmallSetCpus" | ||
}, | ||
"SmallSetCpus": { | ||
"Comment": "1 cpu for small", | ||
"Type": "Pass", | ||
"ResultPath": "$.number_of_sockets", | ||
"Result": "1", | ||
"Next": "Provision" | ||
}, | ||
"MediumSizeState": { | ||
"Type": "Pass", | ||
"Next": "MediumSetMemory" | ||
}, | ||
"MediumSetMemory": { | ||
"Comment": "set vm_memory=4GB for medium", | ||
"Type": "Pass", | ||
"ResultPath": "$.vm_memory", | ||
"Result": "4096", | ||
"Next": "MediumSetCpus" | ||
}, | ||
"MediumSetCpus": { | ||
"Comment": "2 cpus for medium", | ||
"Type": "Pass", | ||
"ResultPath": "$.number_of_sockets", | ||
"Result": "2", | ||
"Next": "Provision" | ||
}, | ||
"LargeSizeState": { | ||
"Type": "Pass", | ||
"Next": "LargeSetMemory" | ||
}, | ||
"LargeSetMemory": { | ||
"Comment": "set vm_memory=8GB for large", | ||
"Type": "Pass", | ||
"ResultPath": "$.vm_memory", | ||
"Result": "8192", | ||
"Next": "LargeSetCpus" | ||
}, | ||
"LargeSetCpus": { | ||
"Comment": "4 cpus for large", | ||
"Type": "Pass", | ||
"ResultPath": "$.number_of_sockets", | ||
"Result": "4", | ||
"Next": "Provision" | ||
}, | ||
"Provision": { | ||
"Type": "Task", | ||
"Resource": "manageiq://provision_execute", | ||
"Next": "SendEmail" | ||
}, | ||
"SendEmail": { | ||
"Type": "Task", | ||
"Resource": "manageiq://email", | ||
"Parameters": { | ||
"To": "user@example.com", | ||
"Title": "Your provisioning has completed", | ||
"Body": "Your provisioning request has completed" | ||
}, | ||
"Next": "Finished" | ||
}, | ||
"Finished": { | ||
"Type": "Succeed" | ||
} | ||
} | ||
} |