Skip to content

Commit 9a16dc1

Browse files
authored
Merge pull request #150 from awslabs/refactor/dead-code-cleanup
refactor: delete dead code across 5 modules
2 parents a0f7250 + 45e19f2 commit 9a16dc1

26 files changed

Lines changed: 16 additions & 750 deletions

config/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ This section configures default values for VM templates:
7070
"company": "abc",
7171
"project": "awscloud",
7272
"team": "xyz"
73-
},
74-
"ssm_parameter_prefix": "/hostfactory/templates/"
73+
}
7574
}
7675
```
7776

@@ -83,7 +82,6 @@ This section configures default values for VM templates:
8382
- `default_max_number`: Default maximum number of instances per template
8483
- `default_attributes`: Default attributes for templates (used by Host Factory)
8584
- `default_instance_tags`: Default tags to apply to instances
86-
- `ssm_parameter_prefix`: Prefix for SSM parameters containing template overrides
8785

8886
### Templates File
8987

@@ -137,7 +135,7 @@ Example templates file:
137135

138136
### SSM Parameter Integration
139137

140-
Templates can be overridden or extended using AWS SSM Parameters. The application will check for parameters with the prefix specified in `ssm_parameter_prefix` (default: `/hostfactory/templates/`).
138+
Templates can be overridden or extended using AWS SSM Parameters. The application will check for parameters under the `/hostfactory/templates/` path.
141139

142140
For example, if you have a template with ID `OnDemand-Minimal-Template-VM`, you can override its properties by creating SSM parameters:
143141

config/default_config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@
8989
"extensions": {
9090
"ami_resolution": {
9191
"enabled": true,
92-
"fallback_on_failure": true,
93-
"ssm_parameter_prefix": "/hostfactory/templates/"
92+
"fallback_on_failure": true
9493
},
9594
"native_spec": {
9695
"spec_file_base_path": "config/specs/aws"

docs/root/api/multi-provider-api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export ORB_AWS_LAUNCH_TEMPLATE__CREATE_PER_REQUEST=false
9494
"aws_max_retries": {"type": "integer", "default": 3, "minimum": 0, "maximum": 10},
9595
"aws_read_timeout": {"type": "integer", "default": 30, "minimum": 1, "maximum": 300},
9696
"service_role_spot_fleet": {"type": "string", "default": "AWSServiceRoleForEC2SpotFleet"},
97-
"ssm_parameter_prefix": {"type": "string", "default": "/hostfactory/templates/"},
9897
"handlers": {
9998
"type": "object",
10099
"properties": {

docs/root/deployment/dev_deployment_documentation.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ Note: symAinst-requestor.log is visible only if plugin successfully started and
268268
"region": "us-east-1",
269269
"profile": "default",
270270
"max_retries": 3,
271-
"timeout": 30,
272-
"ssm_parameter_prefix": "/hostfactory/templates/"
271+
"timeout": 30
273272
}
274273
}
275274
],

docs/root/user_guide/templates.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,6 @@ aws ssm put-parameter \
317317
--name "/hostfactory/templates/my-template" \
318318
--type "String" \
319319
--value '{"template_id": "my-template", ...}'
320-
321-
# Configure SSM prefix in config.json
322-
{
323-
"template": {
324-
"ssm_parameter_prefix": "/hostfactory/templates/"
325-
}
326-
}
327320
```
328321

329322
### Validating Templates

src/orb/application/ports/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
from orb.application.ports.error_response_port import ErrorResponsePort
1010
from orb.application.ports.query_bus_port import QueryBusPort
1111
from orb.application.ports.registry_port import RegistryPort
12-
from orb.application.ports.scheduler_registry_port import SchedulerRegistryPort
13-
from orb.application.ports.storage_registry_port import StorageRegistryPort
1412
from orb.application.ports.template_dto_port import TemplateDTOPort
1513

1614
__all__ = [
@@ -19,7 +17,5 @@
1917
"ErrorResponsePort",
2018
"QueryBusPort",
2119
"RegistryPort",
22-
"SchedulerRegistryPort",
23-
"StorageRegistryPort",
2420
"TemplateDTOPort",
2521
]

src/orb/application/ports/scheduler_registry_port.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/orb/application/ports/storage_registry_port.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/orb/application/services/container_service.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/orb/application/services/scheduler_registry_service.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,32 @@
22

33
from typing import Any
44

5-
from orb.application.ports.scheduler_registry_port import SchedulerRegistryPort
65
from orb.domain.base.ports.logging_port import LoggingPort
76

87

98
class SchedulerRegistryService:
109
"""Application service interface for scheduler registry operations."""
1110

12-
def __init__(self, registry: SchedulerRegistryPort, logger: LoggingPort):
11+
def __init__(self, registry: Any, logger: LoggingPort):
1312
self._registry = registry
1413
self._logger = logger
1514

1615
def get_available_schedulers(self) -> list[str]:
1716
"""Get list of available scheduler types."""
18-
return self._registry.get_registered_types() # type: ignore[attr-defined]
17+
return self._registry.get_registered_types()
1918

2019
def create_scheduler_strategy(self, scheduler_type: str, config: Any) -> Any:
2120
"""Create scheduler strategy instance."""
22-
return self._registry.create_strategy(scheduler_type, config) # type: ignore[attr-defined]
21+
return self._registry.create_strategy(scheduler_type, config)
2322

2423
def is_scheduler_registered(self, scheduler_type: str) -> bool:
2524
"""Check if scheduler type is registered."""
26-
return self._registry.is_registered(scheduler_type) # type: ignore[attr-defined]
25+
return self._registry.is_registered(scheduler_type)
2726

2827
def get_scheduler_capabilities(self, scheduler_type: str) -> dict[str, Any]:
2928
"""Get scheduler capabilities (if supported)."""
3029
try:
31-
strategy = self._registry.create_strategy(scheduler_type, {}) # type: ignore[attr-defined]
30+
strategy = self._registry.create_strategy(scheduler_type, {})
3231
return getattr(strategy, "get_capabilities", lambda: {})()
3332
except Exception:
3433
return {}

0 commit comments

Comments
 (0)