From 316f20f5399447b06c4976744960a6316b41ad08 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:32:10 +0100 Subject: [PATCH 1/4] feat(lib): add example manifest for tdp finder --- manifests/examples/tdp-finder.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 manifests/examples/tdp-finder.yml diff --git a/manifests/examples/tdp-finder.yml b/manifests/examples/tdp-finder.yml new file mode 100644 index 000000000..f0d8751c6 --- /dev/null +++ b/manifests/examples/tdp-finder.yml @@ -0,0 +1,23 @@ +name: csv-demo +description: +tags: +initialize: + plugins: + cloud-instance-metadata: + method: CSVLookup + path: "builtin" + global-config: + filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv + query: + name: instance-id + output: "tdp" +tree: + children: + child: + pipeline: + - cloud-instance-metadata + inputs: + - timestamp: 2023-08-06T00:00 + duration: 3600 + cpu/energy: 0.001 + instance-id: "AMD A10-9700" From d74fa639919c1dc8be88dcb13eed5bd5185d1fbb Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:45:54 +0100 Subject: [PATCH 2/4] fix(lib): rename instance to tdp-finder --- manifests/examples/tdp-finder.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/examples/tdp-finder.yml b/manifests/examples/tdp-finder.yml index f0d8751c6..5ce1b5903 100644 --- a/manifests/examples/tdp-finder.yml +++ b/manifests/examples/tdp-finder.yml @@ -3,7 +3,7 @@ description: tags: initialize: plugins: - cloud-instance-metadata: + tdp-finder: method: CSVLookup path: "builtin" global-config: @@ -15,7 +15,7 @@ tree: children: child: pipeline: - - cloud-instance-metadata + - tdp-finder inputs: - timestamp: 2023-08-06T00:00 duration: 3600 From 36b7e1e4db411e1b0f233c842c576804a4f7af5c Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:02:48 +0100 Subject: [PATCH 3/4] feat(lib): add example manifest for region-metadata --- manifests/examples/region-metadata.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 manifests/examples/region-metadata.yml diff --git a/manifests/examples/region-metadata.yml b/manifests/examples/region-metadata.yml new file mode 100644 index 000000000..d43b5bc65 --- /dev/null +++ b/manifests/examples/region-metadata.yml @@ -0,0 +1,26 @@ +name: csv-demo +description: +tags: +initialize: + plugins: + cloud-region-metadata: + method: CSVLookup + path: "builtin" + global-config: + filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/region-metadata.csv + query: + cloud-provider: cloud-provider + cloud-region: cloud-region + output: "*" +tree: + children: + child: + pipeline: + - cloud-region-metadata + inputs: + - timestamp: 2023-08-06T00:00 + duration: 3600 + cpu/energy: 0.001 + instance-id: AMD A10-9700 + cloud-provider: "Google Cloud" + cloud-region: "asia-east1" From cb63b7093bc4b0265a2a51d1cf9578c15091da87 Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:36:03 +0100 Subject: [PATCH 4/4] feat(lib): add example manifest for instance metadata --- manifests/examples/instance-metadata.yml | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 manifests/examples/instance-metadata.yml diff --git a/manifests/examples/instance-metadata.yml b/manifests/examples/instance-metadata.yml new file mode 100644 index 000000000..dc4da68f1 --- /dev/null +++ b/manifests/examples/instance-metadata.yml @@ -0,0 +1,33 @@ +name: csv-demo +description: +tags: +initialize: + plugins: + cloud-instance-metadata: + method: CSVLookup + path: "builtin" + global-config: + filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-azure-instances.csv + query: + instance-class: "cloud/instance-type" + output: "*" + extract-processor-name: + method: Regex + path: "builtin" + global-config: + parameter: cpu-model-name + match: /^([^,])+/g + output: cpu/name +tree: + children: + child: + pipeline: + - cloud-instance-metadata + - extract-processor-name + inputs: + - timestamp: 2023-08-06T00:00 + duration: 3600 + cpu/energy: 0.001 + cloud/provider: gcp + cloud/region: asia-east + cloud/instance-type: Standard_A1_v2