Module: check_mk
Branch: master
Commit: 62f4b685a97af3269427992dbef991fa4505fc9c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=62f4b685a97af3…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Sat Feb 9 15:58:37 2019 +0100
agent_aws: Added some comments
Change-Id: I442a9b8bf11701bd3d4631ff3f93a752b41c756d
---
agents/special/agent_aws | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/agents/special/agent_aws b/agents/special/agent_aws
index 739ee8e..2aaf6f3 100755
--- a/agents/special/agent_aws
+++ b/agents/special/agent_aws
@@ -181,6 +181,8 @@ class AWSSection(object):
assert isinstance(
result,
AWSSectionResult), "%s: Result mut be of type
'AWSSectionResult'" % self.name
+ if result.content is None:
+ continue
# In the related check plugin aws.include we parse these results and
# extend list of json-loaded results.
assert isinstance(result.content,
@@ -609,6 +611,14 @@ class S3Summary(AWSSectionGeneric):
if location is None or location != self._region:
continue
bucket['LocationConstraint'] = location
+
+ #TODO
+ # Why do we get the following error while calling these methods:
+ #_response = self._client.get_public_access_block(Bucket=bucket_name)
+ #_response = self._client.get_bucket_policy_status(Bucket=bucket_name)
+ # 'S3' object has no attribute 'get_bucket_policy_status'
+ # 'list' object has no attribute 'iterkeys'
+
try:
response = self._client.get_bucket_tagging(Bucket=bucket_name)
tagging = response['TagSet']