Skip to content

Commit 688cc87

Browse files
author
Himani Anil Deshpande
committed
Removing unused variables and imports
1 parent d8a44c2 commit 688cc87

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

cli/src/pcluster/templates/queues_stack.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
to_comma_separated_string,
3434
)
3535
from pcluster.templates.slurm_builder import SlurmConstruct
36-
from pcluster.utils import get_attr, get_http_tokens_setting, get_resource_name_from_resource_arn, get_service_endpoint
36+
from pcluster.utils import get_attr, get_http_tokens_setting
3737

3838

3939
class QueuesStack(NestedStack):
@@ -184,20 +184,6 @@ def _add_compute_resource_launch_template(
184184
if isinstance(compute_resource, SlurmComputeResource):
185185
conditional_template_properties.update({"instance_type": compute_resource.instance_types[0]})
186186

187-
if queue.instance_profile:
188-
instance_profile_name = get_resource_name_from_resource_arn(queue.instance_profile)
189-
instance_role_name = (
190-
AWSApi.instance()
191-
.iam.get_instance_profile(instance_profile_name)
192-
.get("InstanceProfile")
193-
.get("Roles")[0]
194-
.get("RoleName")
195-
)
196-
elif queue.instance_role:
197-
instance_role_name = get_resource_name_from_resource_arn(queue.instance_role)
198-
else:
199-
instance_role_name = self.managed_compute_instance_roles[queue.name].ref
200-
201187
launch_template_id = f"LaunchTemplate{create_hash_suffix(queue.name + compute_resource.name)}"
202188

203189
dna_json = json.dumps(

0 commit comments

Comments
 (0)