in lib/muchos/ec2.py [0:0]
def get_status(self, states):
ec2 = boto3.client("ec2")
response = ec2.describe_instances(
Filters=[
{"Name": "tag:Muchos", "Values": [self.config.cluster_name]}
]
)
nodes = []
for res in response["Reservations"]:
for inst in res["Instances"]:
if inst["State"]["Name"] in states:
nodes.append(inst)
return nodes