Created
April 22, 2020 23:09
-
-
Save kahou82/ac35ae0f3c96a5e94e5befa919d10b49 to your computer and use it in GitHub Desktop.
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
{ | |
"Task": { | |
"Name": "RemoveIPLease", | |
"Label": "Remove IP Lease", | |
"Description": "Task to remove IP Lease", | |
"Version": 1, | |
"Properties": { | |
"InputDefinition": [ | |
{ | |
"ObjectType": "workflow.MoReferenceDataType", | |
"Label": "IP Lease Moid", | |
"Name": "IpLeaseMoid", | |
"Properties": { | |
"Type": "string" | |
} | |
} | |
], | |
"Timeout": 600, | |
"TimeoutPolicy": "Retry", | |
"RetryPolicy": "Fixed", | |
"RetryCount": 3, | |
"RetryDelay": 10, | |
"ExternalMeta": true | |
}, | |
"Tags": [ | |
{ | |
"Key": "category", | |
"Value": "Kubernetes" | |
} | |
] | |
}, | |
"BatchApi": { | |
"Name": "RemoveIPLease", | |
"Description": "Remove IP Lease", | |
"Batch": [ | |
{ | |
"ObjectType": "workflow.WebApi", | |
"Name": "RemoveIPLease", | |
"TargetType": "Local", | |
"ContentType": "json", | |
"Protocol": "https", | |
"Method": "DELETE", | |
"Url": "/v1/ippool/IpLeases/{{.global.task.input.IpLeaseMoid}}", | |
"Outcomes": [ | |
{ | |
"Condition": "{{eq .global.RemoveIPLease.output.HttpStatusCode 200}}", | |
"Message": "Task Succeeded", | |
"ObjectType": "workflow.Outcome" | |
}, | |
{ | |
"Condition": "true", | |
"Error": true, | |
"Message": "API Failed", | |
"ObjectType": "workflow.Outcome" | |
} | |
] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment