cloud-governance 1.1.356__py3-none-any.whl → 1.1.358__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloud_governance/common/clouds/aws/ec2/ec2_operations.py +9 -4
- cloud_governance/policy/policy_operations/aws/tag_cluster/tag_cluster_resouces.py +6 -2
- cloud_governance/policy/policy_runners/aws/upload_s3.py +6 -3
- {cloud_governance-1.1.356.dist-info → cloud_governance-1.1.358.dist-info}/METADATA +3 -3
- {cloud_governance-1.1.356.dist-info → cloud_governance-1.1.358.dist-info}/RECORD +8 -8
- {cloud_governance-1.1.356.dist-info → cloud_governance-1.1.358.dist-info}/WHEEL +0 -0
- {cloud_governance-1.1.356.dist-info → cloud_governance-1.1.358.dist-info}/licenses/LICENSE +0 -0
- {cloud_governance-1.1.356.dist-info → cloud_governance-1.1.358.dist-info}/top_level.txt +0 -0
|
@@ -346,7 +346,8 @@ class EC2Operations:
|
|
|
346
346
|
This method returns all images in the region
|
|
347
347
|
@return:
|
|
348
348
|
"""
|
|
349
|
-
return self.ec2_client.describe_images(Owners=['self'], **kwargs)[
|
|
349
|
+
return self.ec2_client.describe_images(Owners=['self'], IncludeDeprecated=True, IncludeDisabled=True, **kwargs)[
|
|
350
|
+
'Images']
|
|
350
351
|
|
|
351
352
|
def get_snapshots(self):
|
|
352
353
|
"""
|
|
@@ -624,9 +625,12 @@ class EC2Operations:
|
|
|
624
625
|
active_instances = {}
|
|
625
626
|
active_regions = self.get_active_regions()
|
|
626
627
|
for region_name in active_regions[::-1]:
|
|
627
|
-
filters = [{'Name': f'tag:{tag_name}',
|
|
628
|
+
filters = [{'Name': f'tag:{tag_name}',
|
|
629
|
+
'Values': [tag_value, tag_value.upper(), tag_value.lower(), tag_value.title()]}]
|
|
628
630
|
self.get_ec2_instance_list()
|
|
629
|
-
active_instances_in_region = self.get_ec2_instance_list(Filters=filters, ec2_client=boto3.client('ec2',
|
|
631
|
+
active_instances_in_region = self.get_ec2_instance_list(Filters=filters, ec2_client=boto3.client('ec2',
|
|
632
|
+
region_name=region_name),
|
|
633
|
+
ignore_tag=ignore_tag)
|
|
630
634
|
if active_instances_in_region:
|
|
631
635
|
if skip_full_scan:
|
|
632
636
|
return True
|
|
@@ -642,7 +646,8 @@ class EC2Operations:
|
|
|
642
646
|
:return:
|
|
643
647
|
"""
|
|
644
648
|
ignore_tag = 'TicketId'
|
|
645
|
-
return self.get_active_instances(tag_name=tag_name, tag_value=tag_value, skip_full_scan=True,
|
|
649
|
+
return self.get_active_instances(tag_name=tag_name, tag_value=tag_value, skip_full_scan=True,
|
|
650
|
+
ignore_tag=ignore_tag)
|
|
646
651
|
|
|
647
652
|
def describe_tags(self, **kwargs):
|
|
648
653
|
"""
|
|
@@ -811,9 +811,13 @@ class TagClusterResources(TagClusterOperations):
|
|
|
811
811
|
for bucket in response['Buckets']:
|
|
812
812
|
# starts with cluster name
|
|
813
813
|
if bucket['Name'].startswith(cluster_key):
|
|
814
|
-
|
|
814
|
+
try:
|
|
815
|
+
bucket_tags = self.s3_client.get_bucket_tagging(Bucket=bucket.get('Name'))
|
|
816
|
+
except Exception as err:
|
|
817
|
+
logger.info(err)
|
|
818
|
+
bucket_tags = {}
|
|
815
819
|
if bucket_tags:
|
|
816
|
-
bucket_tags = bucket_tags
|
|
820
|
+
bucket_tags = bucket_tags.get('TagSet')
|
|
817
821
|
# search that not exist permanent tags in the resource
|
|
818
822
|
if not self.__validate_existing_tag(bucket_tags):
|
|
819
823
|
add_tags = []
|
|
@@ -23,6 +23,9 @@ class UploadS3(AbstractUpload):
|
|
|
23
23
|
"""
|
|
24
24
|
if self._policy_output:
|
|
25
25
|
data = json.dumps(data, cls=JsonDateTimeEncoder)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
try:
|
|
27
|
+
self._s3operations.save_results_to_s3(policy=self._policy.replace('_', '-'),
|
|
28
|
+
policy_output=self._policy_output, policy_result=data)
|
|
29
|
+
logger.info(f"Uploaded the data s3 Bucket: {self._policy_output}")
|
|
30
|
+
except Exception as err:
|
|
31
|
+
logger.error(f"Exection raised on uploading to s3, {err}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloud-governance
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.358
|
|
4
4
|
Summary: Cloud Governance Tool
|
|
5
5
|
Home-page: https://github.com/redhat-performance/cloud-governance
|
|
6
6
|
Author: Red Hat
|
|
@@ -25,8 +25,8 @@ Requires-Dist: azure-mgmt-resource==23.0.1
|
|
|
25
25
|
Requires-Dist: azure-mgmt-compute==30.1.0
|
|
26
26
|
Requires-Dist: azure-mgmt-network==25.0.0
|
|
27
27
|
Requires-Dist: azure-mgmt-monitor==6.0.2
|
|
28
|
-
Requires-Dist: boto3==1.
|
|
29
|
-
Requires-Dist: botocore==1.
|
|
28
|
+
Requires-Dist: boto3==1.33.1
|
|
29
|
+
Requires-Dist: botocore==1.33.8
|
|
30
30
|
Requires-Dist: elasticsearch-dsl==7.4.0
|
|
31
31
|
Requires-Dist: elasticsearch==7.13.4
|
|
32
32
|
Requires-Dist: google-api-python-client==2.57.0
|
|
@@ -49,7 +49,7 @@ cloud_governance/common/clouds/aws/cost_explorer/cost_explorer_operations.py,sha
|
|
|
49
49
|
cloud_governance/common/clouds/aws/dynamodb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
50
|
cloud_governance/common/clouds/aws/dynamodb/dynamodb_operations.py,sha256=eeV3YgT2bAMwb3UmQjCGdh3ie3-Q8UvKNv4iOypYwNg,4916
|
|
51
51
|
cloud_governance/common/clouds/aws/ec2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
|
-
cloud_governance/common/clouds/aws/ec2/ec2_operations.py,sha256=
|
|
52
|
+
cloud_governance/common/clouds/aws/ec2/ec2_operations.py,sha256=wt5gLCe5EFtooaukWRS6QBliCy_1_LDurTs5i1IZH4Y,24291
|
|
53
53
|
cloud_governance/common/clouds/aws/iam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
54
|
cloud_governance/common/clouds/aws/iam/iam_operations.py,sha256=ngVh19oIse1UjzvUkImYzs3xBFt74LhdUGbOhI58ZMA,4843
|
|
55
55
|
cloud_governance/common/clouds/aws/price/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -215,7 +215,7 @@ cloud_governance/policy/policy_operations/aws/tag_cluster/__init__.py,sha256=47D
|
|
|
215
215
|
cloud_governance/policy/policy_operations/aws/tag_cluster/remove_cluster_tags.py,sha256=uNaDEvF4r8d9gcFpR29WbbWC5ezQSbtrNwe-_rSuemc,25603
|
|
216
216
|
cloud_governance/policy/policy_operations/aws/tag_cluster/run_tag_cluster_resouces.py,sha256=3FF70eXrGkqRC1uZ-XaAfoydq5kViw6d_Aplv3G2GPw,5114
|
|
217
217
|
cloud_governance/policy/policy_operations/aws/tag_cluster/tag_cluster_operations.py,sha256=uivH-ZBNS9eXId9EhSk8BVVx5tx5lTX6JZCoPuM6Jx0,3862
|
|
218
|
-
cloud_governance/policy/policy_operations/aws/tag_cluster/tag_cluster_resouces.py,sha256=
|
|
218
|
+
cloud_governance/policy/policy_operations/aws/tag_cluster/tag_cluster_resouces.py,sha256=NrQcdeDqcSiRWnQMuZXu1XdoySLuoDuBSnn8XHOSxJg,44380
|
|
219
219
|
cloud_governance/policy/policy_operations/aws/tag_non_cluster/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
220
220
|
cloud_governance/policy/policy_operations/aws/tag_non_cluster/non_cluster_operations.py,sha256=PUWS0SE7T56BejBa3FRUK-txq70gVHztNAj1JmB-Ra0,9497
|
|
221
221
|
cloud_governance/policy/policy_operations/aws/tag_non_cluster/remove_non_cluster_tags.py,sha256=d-RKpWSaZi2ALQaA9_MwqxHwzbSpsdyjQTBacJVoOLw,8362
|
|
@@ -253,7 +253,7 @@ cloud_governance/policy/policy_runners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JC
|
|
|
253
253
|
cloud_governance/policy/policy_runners/common_policy_runner.py,sha256=p3CYga0q3PqdiEu4SEnM6UnDd1bwtBPEsLFnw8U4BPY,1174
|
|
254
254
|
cloud_governance/policy/policy_runners/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
255
255
|
cloud_governance/policy/policy_runners/aws/policy_runner.py,sha256=biDRpgtBgXakdBeFloZngmtOzc1dZmtqyDtYw5spvvI,1858
|
|
256
|
-
cloud_governance/policy/policy_runners/aws/upload_s3.py,sha256=
|
|
256
|
+
cloud_governance/policy/policy_runners/aws/upload_s3.py,sha256=myw36EEnufq0df4biunQh5kI-b77P5aTqI1WcNA-TKM,1195
|
|
257
257
|
cloud_governance/policy/policy_runners/azure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
258
258
|
cloud_governance/policy/policy_runners/azure/policy_runner.py,sha256=5jGuVuFZFzn2V9zuviZ3TJS3xNwVuy2B0Cb2hnWhzxI,975
|
|
259
259
|
cloud_governance/policy/policy_runners/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -263,8 +263,8 @@ cloud_governance/policy/policy_runners/elasticsearch/__init__.py,sha256=47DEQpj8
|
|
|
263
263
|
cloud_governance/policy/policy_runners/elasticsearch/upload_elastic_search.py,sha256=pOwUJWXjJbyTy8iv3Ap8xJGnqQe-5lZgoR8-vGfAVos,1881
|
|
264
264
|
cloud_governance/policy/policy_runners/ibm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
265
265
|
cloud_governance/policy/policy_runners/ibm/policy_runner.py,sha256=V0E_f7F3hXit0aSq4BlfX1Jd4vjR2NEvOWsJ5upvZ4o,1302
|
|
266
|
-
cloud_governance-1.1.
|
|
267
|
-
cloud_governance-1.1.
|
|
268
|
-
cloud_governance-1.1.
|
|
269
|
-
cloud_governance-1.1.
|
|
270
|
-
cloud_governance-1.1.
|
|
266
|
+
cloud_governance-1.1.358.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
267
|
+
cloud_governance-1.1.358.dist-info/METADATA,sha256=4IwoOBQ0x3OceyOB6oBbAIMSiPewR2EFgRcyasRPQUE,11364
|
|
268
|
+
cloud_governance-1.1.358.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
269
|
+
cloud_governance-1.1.358.dist-info/top_level.txt,sha256=jfB1fgj7jvx3YZkZA4G6hFeS1RHO7J7XtnbjuMNMRww,17
|
|
270
|
+
cloud_governance-1.1.358.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|