From c787aae5645643373267578c0b7f362dfd866934 Mon Sep 17 00:00:00 2001 From: Ania Misiorek Date: Tue, 5 Sep 2023 16:54:43 -0400 Subject: [PATCH 1/3] implementation --- docs/modules/instance_type_list.md | 26 ++++++++++++++++++- .../doc_fragments/instance_type_list.py | 26 ++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/docs/modules/instance_type_list.md b/docs/modules/instance_type_list.md index 473b8e9c..cfdffc60 100644 --- a/docs/modules/instance_type_list.md +++ b/docs/modules/instance_type_list.md @@ -51,9 +51,33 @@ List and filter on Linode Instance Types. "price": { "hourly": 0.008, "monthly": 5 - } + }, + "region_prices": [ + { + "id": "ap-west", + "hourly": 0.02, + "monthly": 20 + }, + { + "id": "ap-northeast", + "hourly": 0.02, + "monthly": 20 + } + ] } }, + "region_prices": [ + { + "id": "ap-west", + "hourly": 0.02, + "monthly": 20 + }, + { + "id": "ap-northeast", + "hourly": 0.02, + "monthly": 20 + } + ], "class": "standard", "disk": 81920, "gpus": 0, diff --git a/plugins/module_utils/doc_fragments/instance_type_list.py b/plugins/module_utils/doc_fragments/instance_type_list.py index d434d31e..43e0d1bd 100644 --- a/plugins/module_utils/doc_fragments/instance_type_list.py +++ b/plugins/module_utils/doc_fragments/instance_type_list.py @@ -16,9 +16,33 @@ "price": { "hourly": 0.008, "monthly": 5 - } + }, + "region_prices": [ + { + "id": "ap-west", + "hourly": 0.02, + "monthly": 20 + }, + { + "id": "ap-northeast", + "hourly": 0.02, + "monthly": 20 + } + ] } }, + "region_prices": [ + { + "id": "ap-west", + "hourly": 0.02, + "monthly": 20 + }, + { + "id": "ap-northeast", + "hourly": 0.02, + "monthly": 20 + } + ], "class": "standard", "disk": 81920, "gpus": 0, From 4185c27b0ce6f1887e355b115206024b876e1a50 Mon Sep 17 00:00:00 2001 From: Ania Misiorek Date: Wed, 6 Sep 2023 13:53:43 -0400 Subject: [PATCH 2/3] testing line --- tests/integration/targets/instance_type_list/tasks/main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/targets/instance_type_list/tasks/main.yaml b/tests/integration/targets/instance_type_list/tasks/main.yaml index d534fcd2..2f4dbc8b 100644 --- a/tests/integration/targets/instance_type_list/tasks/main.yaml +++ b/tests/integration/targets/instance_type_list/tasks/main.yaml @@ -19,6 +19,7 @@ that: - filter.instance_types | length >= 1 - filter.instance_types[0].class == 'nanode' + - filter.instance_types[0].region_prices | length >= 1 environment: LINODE_UA_PREFIX: '{{ ua_prefix }}' From 48ddddd7d221ac6559eb9811229a2ccc895a6362 Mon Sep 17 00:00:00 2001 From: Ania Misiorek Date: Wed, 6 Sep 2023 15:32:29 -0400 Subject: [PATCH 3/3] gendocs --- docs/modules/instance_type_list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/instance_type_list.md b/docs/modules/instance_type_list.md index cfdffc60..ec728994 100644 --- a/docs/modules/instance_type_list.md +++ b/docs/modules/instance_type_list.md @@ -59,7 +59,7 @@ List and filter on Linode Instance Types. "monthly": 20 }, { - "id": "ap-northeast", + "id": "ap-northeast", "hourly": 0.02, "monthly": 20 }