Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BackendDict instantiation service names #7723

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Loading