Skip to content

Commit

Permalink
Fix BackendDict instantiation service names (getmoto#7723)
Browse files Browse the repository at this point in the history
  • Loading branch information
viren-nadkarni authored and jfmainville committed Jun 25, 2024
1 parent f1ca98e commit 508ba93
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
4 changes: 3 additions & 1 deletion moto/applicationautoscaling/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,4 +673,6 @@ def update(
self.end_time = end_time


applicationautoscaling_backends = BackendDict(ApplicationAutoscalingBackend, "ec2")
applicationautoscaling_backends = BackendDict(
ApplicationAutoscalingBackend, "application-autoscaling"
)
3 changes: 1 addition & 2 deletions moto/elb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,5 +665,4 @@ def detach_load_balancer_from_subnets(
return load_balancer.subnets


# Use the same regions as EC2
elb_backends = BackendDict(ELBBackend, "ec2")
elb_backends = BackendDict(ELBBackend, "elb")
2 changes: 1 addition & 1 deletion moto/elbv2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1979,4 +1979,4 @@ def _get_resource_by_arn(self, arn: str) -> Any:
return resource


elbv2_backends = BackendDict(ELBv2Backend, "ec2")
elbv2_backends = BackendDict(ELBv2Backend, "elbv2")
2 changes: 1 addition & 1 deletion moto/iotdata/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@ def list_named_shadows_for_thing(self, thing_name: str) -> List[FakeShadow]:
]


iotdata_backends = BackendDict(IoTDataPlaneBackend, "iot")
iotdata_backends = BackendDict(IoTDataPlaneBackend, "iot-data")
2 changes: 1 addition & 1 deletion moto/opsworks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,4 +630,4 @@ def start_instance(self, instance_id: str) -> None:
self.instances[instance_id].start()


opsworks_backends = BackendDict(OpsWorksBackend, "ec2")
opsworks_backends = BackendDict(OpsWorksBackend, "opsworks")
4 changes: 1 addition & 3 deletions moto/signer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,4 @@ def untag_resource(self, resource_arn: str, tag_keys: List[str]) -> None:
self.tagger.untag_resource_using_names(resource_arn, tag_keys)


# Using the lambda-regions
# boto3.Session().get_available_regions("signer") still returns an empty list
signer_backends = BackendDict(SignerBackend, "lambda")
signer_backends = BackendDict(SignerBackend, "signer")

0 comments on commit 508ba93

Please sign in to comment.