Skip to content

Commit 904a7f5

Browse files
copilot suggestions
1 parent 748f899 commit 904a7f5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

linodecli/plugins/monitor-metrics-get.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import sys
88

99
PLUGIN_BASE = "linode-cli monitor-metrics-get"
10-
MANDATORY_HEADER = ["Authorization"]
11-
MANDATORY_DATA = ["metrics","time_granularity"]
1210

1311
def get_metadata_parser():
1412
"""
@@ -25,7 +23,7 @@ def get_metadata_parser():
2523
"--header", "-H",
2624
action="append",
2725
required=True,
28-
help="Add custom headers (format: Key:Value)",
26+
help="Add custom headers (format: Key: Value)",
2927
default=[]
3028
)
3129

@@ -54,7 +52,8 @@ def get_metadata_parser():
5452

5553
def header_parser(args):
5654
headers = {}
57-
print(args.header)
55+
if hasattr(args, "debug") and args.debug:
56+
print(f"[DEBUG] Headers argument: {args.header}")
5857
for h in args.header:
5958
if ":" in h:
6059
key, value = h.split(":", 1)
@@ -80,8 +79,6 @@ def call(args, context):
8079

8180
try:
8281
response = requests.post(parsed.url, headers=headers, json=data, timeout=parsed.timeout, verify=parsed.cacert)
83-
#for k, v in response.headers.items():
84-
# print(f" {k}: {v}")
8582

8683
print(response.text)
8784

0 commit comments

Comments
 (0)