Skip to content

Commit

Permalink
AAP-36328 Remove DAB validation of service type
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Havenstein committed Dec 5, 2024
1 parent 48fd1ec commit eb73d68
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ansible_base/resource_registry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,10 @@ class ResourceRegistry:
registry = {}

def __init__(self, resource_list: List[ResourceConfig], service_api_config: ServiceAPIConfig = None):
self._validate_api_config(service_api_config)
self.api_config = service_api_config
for r in resource_list:
self.registry[r.model_label] = r

def _validate_api_config(self, config):
"""
Needs to validate that:
- Viewsets have the correct serializer, pagination and filter classes
- Service type is set to one of awx, galaxy, eda or aap
"""
assert config.service_type in ["aap", "awx", "galaxy", "eda", "example"]

def get_resources(self):
return self.registry

Expand Down

0 comments on commit eb73d68

Please sign in to comment.