From c72136037a3cd850292d8b46202947cdba9f2979 Mon Sep 17 00:00:00 2001 From: KuetTai Date: Thu, 2 May 2024 12:15:55 +0000 Subject: [PATCH 1/4] Improve error handling on Windows OS checks --- services/ec2/drivers/Ec2Instance.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/ec2/drivers/Ec2Instance.py b/services/ec2/drivers/Ec2Instance.py index e4cfcfb..2b4df4c 100644 --- a/services/ec2/drivers/Ec2Instance.py +++ b/services/ec2/drivers/Ec2Instance.py @@ -89,6 +89,8 @@ def getImageInfo(self): imageId = self.ec2InstanceData['ImageId'] resp = self.ec2Client.describe_images(ImageIds=[imageId]) images = resp.get('Images') + + self.ec2ImageInfo = None for image in images: self.ec2ImageInfo = image @@ -96,6 +98,9 @@ def getImageInfo(self): def _checkSQLServerEdition(self): EolVersion = Config.get('SQLEolVersion', 2012) + if self.ec2ImageInfo == None: + return + image = self.ec2ImageInfo if 'PlatformDetails' in image and image['PlatformDetails'].find('SQL Server') > 0: pos = image['Name'].find('SQL') @@ -105,6 +110,9 @@ def _checkSQLServerEdition(self): self.results['SQLServerEOL'] = [-1, image['Name']] def _checkWindowsServerEdition(self): + if self.ec2ImageInfo == None: + return + image = self.ec2ImageInfo if 'Platform' in image and not image['Platform'] == 'windows': return From e62ee0133b4a9e335708d44ce8e6c3416543c2c8 Mon Sep 17 00:00:00 2001 From: KuetTai Date: Fri, 3 May 2024 02:41:57 +0000 Subject: [PATCH 2/4] Added stars to encourage users to star github --- templates/sidebar.postcustom.template.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/sidebar.postcustom.template.html b/templates/sidebar.postcustom.template.html index 5a82092..6c20eda 100644 --- a/templates/sidebar.postcustom.template.html +++ b/templates/sidebar.postcustom.template.html @@ -5,6 +5,11 @@

Raise Issues

+ From 955d2843b449eef665281320d05ff7e3fdb25757 Mon Sep 17 00:00:00 2001 From: KuetTai Date: Fri, 3 May 2024 06:22:21 +0000 Subject: [PATCH 3/4] clean redshift reporter --- services/redshift/redshift.reporter.json | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/services/redshift/redshift.reporter.json b/services/redshift/redshift.reporter.json index e74487d..4eb7c3f 100644 --- a/services/redshift/redshift.reporter.json +++ b/services/redshift/redshift.reporter.json @@ -1,16 +1,3 @@ { - "": { - "category": '', //REQUIRED, valid value (combination): O,S,R,P,C - "^description": '', //REQUIRED - "shortDesc": '', //OPTIONAL - "criticality": '', //REQUIRED, valid value (single): I, L, M, H - "downtime": '', //OPTIONAL - "slowness": '', //OPTIONAL - "additionalCost": '', //OPTIONAL - "needFullTest": '', //OPTIONAL - "ref": [ //OPTIONAL - "[]", - "[]", - ], - } + } \ No newline at end of file From 23ec6eca18e9dec03af87cb509923733299eef43 Mon Sep 17 00:00:00 2001 From: KuetTai Date: Fri, 17 May 2024 09:42:36 +0000 Subject: [PATCH 4/4] Efs no-BackupPolicy handling --- services/efs/drivers/EfsDriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/efs/drivers/EfsDriver.py b/services/efs/drivers/EfsDriver.py index e186147..507e8d7 100644 --- a/services/efs/drivers/EfsDriver.py +++ b/services/efs/drivers/EfsDriver.py @@ -35,7 +35,7 @@ def _checkBackupPolicy(self): backup = self.efs_client.describe_backup_policy( FileSystemId=efs_id ) - except botocore.exceptions.PolicyNotFound as e: + except self.efs_client.exceptions.PolicyNotFound as e: print("(Not showstopper): Error encounter during efs describe_backup_policy {}".format(e.response['Error']['Code'])) return