Skip to content

Commit

Permalink
Revert "Changes due to changes in RM2.0.0 (#78)"
Browse files Browse the repository at this point in the history
This reverts commit 22d56d0.
  • Loading branch information
Jozefiel authored and mirohudec committed Feb 28, 2024
1 parent 22d56d0 commit 3c52b6c
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@
},
resourceTypeId: $resource_type_id)
{
edges {
node {
id
}
}
id
}
}"""
)
Expand All @@ -85,14 +81,10 @@
"""
query SearchPools($poolTag: String!) {
SearchPoolsByTags(tags: { matchesAny: [{matchesAll: [$poolTag]}]}) {
edges {
node {
id
AllocationStrategy {Name}
Name
PoolProperties
}
}
id
AllocationStrategy {Name}
Name
PoolProperties
}
} """
)
Expand Down Expand Up @@ -224,18 +216,14 @@
"""
query getEmptyPools($resourceTypeId: ID) {
QueryEmptyResourcePools(resourceTypeId: $resourceTypeId) {
edges {
node {
id
Name
Tags {
Tag
}
AllocationStrategy {
Name
}
}
}
id
Name
Tags {
Tag
}
AllocationStrategy {
Name
}
}
}"""
)
Expand Down Expand Up @@ -727,18 +715,14 @@ def query_pool(task, logs):
Returns:
Response from uniresource. Worker output format::
"result": {
"data": {
"QueryResourcePools": {
"edges": [
{
"node": {
"id": "<id>"
}
}
]
}
}
"result":{
"data": {
"QueryResourcePools": [
{
"id": "<id>"
}
]
}
}
"""
Expand Down Expand Up @@ -816,18 +800,14 @@ def query_pool_by_tag(task, logs):
Response from uniresource. Worker output format::
"result": {
"data": {
"SearchPoolsByTags": {
"edges": [
{
"node": {
"SearchPoolsByTags": [
{
"id": "<id>",
"AllocationStrategy": <Name>
"Name": "<name>"
"PoolProperties": <PoolProperties>
}
}
]
}
}
]
}
}
Expand Down Expand Up @@ -1415,18 +1395,14 @@ def query_search_empty_pools(task, logs):
Response from uniresource. Worker output format::
"result": {
"data": {
"QueryEmptyResourcePools": {
"edges": [
{
"node": {
"id": "<id>",
"AllocationStrategy": <Name>
"Name": "<name>"
"Tags": <tag>
}
}
]
}
"QueryEmptyResourcePools": [
{
"id": "<id>",
"AllocationStrategy": <Name>
"Name": "<name>"
"Tags": <tag>
}
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down Expand Up @@ -48,8 +48,8 @@
"name": "LAMBDA_TASK",
"taskReferenceName": "lambda_print_alt_id",
"inputParameters": {
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.prefix}",
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.prefix}",
"scriptExpression": "return {'subnetAddress': $.address, 'subnetPrefix': $.prefix}"
},
"type": "LAMBDA",
Expand All @@ -67,7 +67,7 @@
"name": "RESOURCE_MANAGER_calculate_desired_size_from_prefix",
"taskReferenceName": "calculate_desired_size_from_prefix",
"inputParameters": {
"subnet": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.subnet}",
"subnet": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.subnet}",
"prefix": "${workflow.input.prefix}",
"resourceType": "ipv4_prefix"
},
Expand All @@ -92,7 +92,7 @@
"taskReferenceName": "claim_resource_with_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"userInput": {"desiredValue": "${workflow.input.desired_value}", "desiredSize": "${calculate_desired_size_from_prefix.output.result.data}"},
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
Expand All @@ -105,7 +105,7 @@
"taskReferenceName": "claim_resource_without_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"userInput": {"desiredSize": "${calculate_desired_size_from_prefix.output.result.data}"},
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down Expand Up @@ -48,8 +48,8 @@
"name": "LAMBDA_TASK",
"taskReferenceName": "lambda_print_alt_id",
"inputParameters": {
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.prefix}",
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.prefix}",
"scriptExpression": "return {'subnetAddress': $.address, 'subnetPrefix': $.prefix}"
},
"type": "LAMBDA",
Expand Down Expand Up @@ -79,7 +79,7 @@
"taskReferenceName": "claim_resource_with_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"userInput": {"desiredValue": "${workflow.input.desired_value}"},
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
Expand All @@ -92,7 +92,7 @@
"taskReferenceName": "claim_resource_without_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down Expand Up @@ -48,8 +48,8 @@
"name": "LAMBDA_TASK",
"taskReferenceName": "lambda_print_alt_id",
"inputParameters": {
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.prefix}",
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.prefix}",
"scriptExpression": "return {'subnetAddress': $.address, 'subnetPrefix': $.prefix}"
},
"type": "LAMBDA",
Expand All @@ -67,7 +67,7 @@
"name": "RESOURCE_MANAGER_calculate_desired_size_from_prefix",
"taskReferenceName": "calculate_desired_size_from_prefix",
"inputParameters": {
"subnet": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.subnet}",
"subnet": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.subnet}",
"prefix": "${workflow.input.prefix}",
"resourceType": "ipv6_prefix"
},
Expand All @@ -92,7 +92,7 @@
"taskReferenceName": "claim_resource_with_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"userInput": {"desiredValue": "${workflow.input.desired_value}", "desiredSize": "${calculate_desired_size_from_prefix.output.result.data}"},
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
Expand All @@ -105,7 +105,7 @@
"taskReferenceName": "claim_resource_without_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"userInput": {"desiredSize": "${calculate_desired_size_from_prefix.output.result.data}"},
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down Expand Up @@ -48,8 +48,8 @@
"name": "LAMBDA_TASK",
"taskReferenceName": "lambda_print_alt_id",
"inputParameters": {
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.PoolProperties.prefix}",
"address": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.address}",
"prefix": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].PoolProperties.prefix}",
"scriptExpression": "return {'subnetAddress': $.address, 'subnetPrefix': $.prefix}"
},
"type": "LAMBDA",
Expand Down Expand Up @@ -79,7 +79,7 @@
"taskReferenceName": "claim_resource_with_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"userInput": {"desiredValue": "${workflow.input.desired_value}"},
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
Expand All @@ -92,7 +92,7 @@
"taskReferenceName": "claim_resource_without_desired_value",
"type": "SIMPLE",
"inputParameters": {
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges[0].node.id}",
"poolId": "${query_pool_by_tag.output.result.data.SearchPoolsByTags[0].id}",
"description": "${workflow.input.description}",
"alternativeId": "${lambda_print_alt_id.output.result}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "decisionTask",
"taskReferenceName": "pool_exists",
"inputParameters": {
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags.edges}"
"pool_exists": "${query_pool_by_tag.output.result.data.SearchPoolsByTags}"
},
"type": "DECISION",
"caseExpression": "$.pool_exists.length > 0 ? 'True' : 'False'",
Expand Down
Loading

0 comments on commit 3c52b6c

Please sign in to comment.