Skip to content

Commit

Permalink
Release first
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Seichter committed Jul 7, 2024
1 parent bfb2fbd commit 3cf3bec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
17 changes: 10 additions & 7 deletions src/aws_ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,39 @@
# get all ECS clusters of a region and return a list of ECS clusters
def get_ecs_clusters(region):
session = aws_session_handler.get_session()
ecs = session.client('ecs', region_name=region)
ecs = session.client("ecs", region_name=region)
clusters = ecs.list_clusters()
clusters_list = []
for cluster in clusters['clusterArns']:
for cluster in clusters["clusterArns"]:
clusters_list.append(cluster)
return clusters_list


# get all ECS services of a cluster and return a list of ECS services
def get_ecs_services(region, cluster):
session = aws_session_handler.get_session()
ecs = session.client('ecs', region_name=region)
ecs = session.client("ecs", region_name=region)
services = ecs.list_services(cluster=cluster)
services_list = []
for service in services['serviceArns']:
for service in services["serviceArns"]:
services_list.append(service)
return services_list


# get all ECS tasks of a service and return a list of ECS tasks
def get_ecs_tasks(region, cluster, service):
session = aws_session_handler.get_session()
ecs = session.client('ecs', region_name=region)
ecs = session.client("ecs", region_name=region)
tasks = ecs.list_tasks(cluster=cluster, serviceName=service)
tasks_list = []
for task in tasks['taskArns']:
for task in tasks["taskArns"]:
tasks_list.append(task)
return tasks_list


# load the details of the service
def get_ecs_service_details(region, cluster, service):
session = aws_session_handler.get_session()
ecs = session.client('ecs', region_name=region)
ecs = session.client("ecs", region_name=region)
service_details = ecs.describe_services(cluster=cluster, services=[service])
return service_details
4 changes: 2 additions & 2 deletions src/awsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ def aws_s3_menu_delete_object(self, event):

def aws_rds_reload(self, event):
ui_aws_rds.aws_rds_reload(self, event)

def aws_ecs_reload(self, event):
ui_aws_ecs.aws_ecs_reload(self, event)
ui_aws_ecs.aws_ecs_reload(self, event)

def aws_cloudfront_load_details(self, event):
ui_aws_cloudfront.aws_cloudfront_load_details(self, event)
Expand Down
2 changes: 1 addition & 1 deletion src/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import logging

VERSION = "v2024-07-07"
VERSION = "v2024-07-08"
UPDATEURL = 'https://api.github.com/repos/dseichter/AWSManager/releases/latest'
RELEASES = 'https://github.com/dseichter/AWSManager/releases'
NAME = 'AWSManager'
Expand Down

0 comments on commit 3cf3bec

Please sign in to comment.