From 7f48e2270aa6fe004b2ac75fb72b0d6729887b73 Mon Sep 17 00:00:00 2001 From: Richard Liu Date: Wed, 11 Jul 2018 22:44:07 -0700 Subject: [PATCH] let instance resource supports cli reading --- aws-experiment-launch/create_instances.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aws-experiment-launch/create_instances.py b/aws-experiment-launch/create_instances.py index a2db7b824..0a4b2ec46 100644 --- a/aws-experiment-launch/create_instances.py +++ b/aws-experiment-launch/create_instances.py @@ -14,9 +14,12 @@ LOGGER = logger.getLogger(__file__) class InstanceResource(enum.Enum): - ON_DEMAND = 1 - SPOT_INSTANCE = 2 - SPOT_FLEET = 3 + ON_DEMAND = 'ondemand' + SPOT_INSTANCE = 'spot' + SPOT_FLEET = 'fleet' + + def __str__(self): + return self.value def run_one_region_on_demand_instances(config, region_number, number_of_instances): ec2_client = utils.create_client(config, region_number)