Skip to content

Commit

Permalink
Add Full Support for ServiceDiscovery (#7770)
Browse files Browse the repository at this point in the history
  • Loading branch information
PisanoCyberG authored Jul 2, 2024
1 parent 39d8419 commit e0f244d
Show file tree
Hide file tree
Showing 10 changed files with 887 additions and 24 deletions.
20 changes: 10 additions & 10 deletions IMPLEMENTATION_COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7553,32 +7553,32 @@

## servicediscovery
<details>
<summary>66% implemented</summary>
<summary>100% implemented</summary>

- [X] create_http_namespace
- [X] create_private_dns_namespace
- [X] create_public_dns_namespace
- [X] create_service
- [X] delete_namespace
- [X] delete_service
- [ ] deregister_instance
- [ ] discover_instances
- [ ] discover_instances_revision
- [ ] get_instance
- [ ] get_instances_health_status
- [X] deregister_instance
- [X] discover_instances
- [X] discover_instances_revision
- [X] get_instance
- [X] get_instances_health_status
- [X] get_namespace
- [X] get_operation
- [X] get_service
- [ ] list_instances
- [X] list_instances
- [X] list_namespaces
- [X] list_operations
- [X] list_services
- [X] list_tags_for_resource
- [ ] register_instance
- [X] register_instance
- [X] tag_resource
- [X] untag_resource
- [ ] update_http_namespace
- [ ] update_instance_custom_health_status
- [X] update_http_namespace
- [X] update_instance_custom_health_status
- [X] update_private_dns_namespace
- [X] update_public_dns_namespace
- [X] update_service
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/services/cf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Please let us know if you'd like support for a resource not yet listed here.
+---------------------------------------+--------+--------+--------+----------------------------------------+
|AWS::EC2::InternetGateway | x | | | - [ ] InternetGatewayId |
+---------------------------------------+--------+--------+--------+----------------------------------------+
|AWS::EC2::LaunchTemplate | x | x | x | - [x] LatestVersionNumber |
|AWS::EC2::LaunchTemplate | x | x | | - [x] LatestVersionNumber |
+---------------------------------------+--------+--------+--------+ - [x] LaunchTemplateId |
| | | | | - [x] DefaultVersionNumber |
+---------------------------------------+--------+--------+--------+----------------------------------------+
Expand Down
18 changes: 9 additions & 9 deletions docs/docs/services/servicediscovery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ servicediscovery
- [X] create_service
- [X] delete_namespace
- [X] delete_service
- [ ] deregister_instance
- [ ] discover_instances
- [ ] discover_instances_revision
- [ ] get_instance
- [ ] get_instances_health_status
- [X] deregister_instance
- [X] discover_instances
- [X] discover_instances_revision
- [X] get_instance
- [X] get_instances_health_status
- [X] get_namespace
- [X] get_operation
- [X] get_service
- [ ] list_instances
- [X] list_instances
- [X] list_namespaces

Pagination or the Filters-parameter is not yet implemented
Expand All @@ -47,11 +47,11 @@ servicediscovery


- [X] list_tags_for_resource
- [ ] register_instance
- [X] register_instance
- [X] tag_resource
- [X] untag_resource
- [ ] update_http_namespace
- [ ] update_instance_custom_health_status
- [X] update_http_namespace
- [X] update_instance_custom_health_status
- [X] update_private_dns_namespace
- [X] update_public_dns_namespace
- [X] update_service
Expand Down
2 changes: 1 addition & 1 deletion moto/backend_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
("secretsmanager", re.compile("https?://secretsmanager\\.(.+)\\.amazonaws\\.com")),
(
"servicediscovery",
re.compile("https?://servicediscovery\\.(.+)\\.amazonaws\\.com"),
re.compile("https?://(data-)?servicediscovery\\.(.+)\\.amazonaws\\.com"),
),
("servicequotas", re.compile("https?://servicequotas\\.(.+)\\.amazonaws\\.com")),
("ses", re.compile("https?://email\\.(.+)\\.amazonaws\\.com")),
Expand Down
15 changes: 15 additions & 0 deletions moto/servicediscovery/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ def __init__(self, ns_id: str):
super().__init__("ServiceNotFound", f"{ns_id}")


class InstanceNotFound(JsonRESTError):
def __init__(self, ns_id: str):
super().__init__("InstanceNotFound", f"{ns_id}")


class ConflictingDomainExists(JsonRESTError):
def __init__(self, vpc_id: str):
super().__init__("ConflictingDomainExists", f"{vpc_id}")


class CustomHealthNotFound(JsonRESTError):
def __init__(self, ns_id: str):
super().__init__("CustomHealthNotFound", f"{ns_id}")


class InvalidInput(JsonRESTError):
def __init__(self, message: str):
super().__init__("InvalidInput", message)
Loading

0 comments on commit e0f244d

Please sign in to comment.