Skip to content

Commit

Permalink
Merge pull request #611 from deNBI/alert-autofix-83
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 83: Request without certificate validation
  • Loading branch information
vktrrdk authored Oct 10, 2024
2 parents 6843abc + 421ca75 commit 8ae49b7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions simple_vm_client/metadata_connector/metadata_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ def remove_metadata(self, ip: str):
timeout=(30, 30),
headers={
"X-Auth-Token": self.METADATA_SERVER_TOKEN,
},
verify=False,
}
)
response.raise_for_status()
logger.info(f"Metadata removed successfully for {ip}")
Expand Down Expand Up @@ -105,8 +104,7 @@ def set_metadata(self, ip: str, metadata: VirtualMachineServerMetadata):
headers={
"X-Auth-Token": self.METADATA_SERVER_TOKEN,
"Content-Type": "application/json",
},
verify=False,
}
)
response.raise_for_status()
logger.info(f"Metadata set successfully for {ip}")
Expand All @@ -125,8 +123,7 @@ def is_metadata_server_available(self):
try:
response = requests.get(
health_url,
timeout=(30, 30),
verify=False,
timeout=(30, 30)
)
response.raise_for_status()
logger.info(f"Metadata Health Check --- {response.json()}")
Expand Down

0 comments on commit 8ae49b7

Please sign in to comment.