Skip to content

Instantly share code, notes, and snippets.

@kahou82
Created April 22, 2020 23:09
Show Gist options
  • Save kahou82/ac35ae0f3c96a5e94e5befa919d10b49 to your computer and use it in GitHub Desktop.
Save kahou82/ac35ae0f3c96a5e94e5befa919d10b49 to your computer and use it in GitHub Desktop.
{
"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