Skip to content

Commit d21169c

Browse files
authored
Merge pull request #13 from livenson/claude/change-default-port-01T4aCufnjSjZqifYxAfxoZN
Change default web port to 8080
2 parents 527b4c5 + 75c2afc commit d21169c

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The emulator runs services on their standard OpenStack ports:
107107
- **Cinder (Block Storage)**: port 8776
108108
- **Glance (Image)**: port 9292
109109
- **Neutron (Networking)**: port 9696
110-
- **Status (Web UI)**: port 8000
110+
- **Status (Web UI)**: port 10000
111111

112112
```bash
113113
# Run all services on standard ports
@@ -119,15 +119,15 @@ openstack-emulator --service=nova # Port 8774
119119
openstack-emulator --service=cinder # Port 8776
120120
openstack-emulator --service=glance # Port 9292
121121
openstack-emulator --service=neutron # Port 9696
122-
openstack-emulator --service=status # Port 8000 (Web UI)
122+
openstack-emulator --service=status # Port 10000 (Web UI)
123123

124124
# Or using uvicorn directly for individual services
125125
uvicorn emulator.api.app_keystone:app --host 0.0.0.0 --port 5000
126126
uvicorn emulator.api.app_nova:app --host 0.0.0.0 --port 8774
127127
uvicorn emulator.api.app_cinder:app --host 0.0.0.0 --port 8776
128128
uvicorn emulator.api.app_glance:app --host 0.0.0.0 --port 9292
129129
uvicorn emulator.api.app_neutron:app --host 0.0.0.0 --port 9696
130-
uvicorn emulator.api.app_status:app --host 0.0.0.0 --port 8000
130+
uvicorn emulator.api.app_status:app --host 0.0.0.0 --port 10000
131131
```
132132

133133
### API Documentation
@@ -138,14 +138,14 @@ Once running, you can access Swagger UI for each service:
138138
- Cinder: http://localhost:8776/docs
139139
- Glance: http://localhost:9292/docs
140140
- Neutron: http://localhost:9696/docs
141-
- Status UI: http://localhost:8000/
141+
- Status UI: http://localhost:10000/
142142

143143
### Status Web UI
144144

145145
The Status Web UI provides a real-time dashboard to view and manage the state of the emulator:
146146

147-
- **Dashboard URL**: http://localhost:8000/
148-
- **JSON API**: http://localhost:8000/api/status
147+
- **Dashboard URL**: http://localhost:10000/
148+
- **JSON API**: http://localhost:10000/api/status
149149

150150
**Features:**
151151
- Service health status (running/offline)
@@ -704,7 +704,7 @@ GET http://localhost:8774/health # Nova
704704
GET http://localhost:8776/health # Cinder
705705
GET http://localhost:9292/health # Glance
706706
GET http://localhost:9696/health # Neutron
707-
GET http://localhost:8000/health # Status UI
707+
GET http://localhost:10000/health # Status UI
708708
```
709709
Returns `{"status": "healthy", "service": "<service-name>"}`.
710710

@@ -735,7 +735,7 @@ openstack-emulator/
735735
│ │ ├── app_cinder.py # Cinder-only app (port 8776)
736736
│ │ ├── app_glance.py # Glance-only app (port 9292)
737737
│ │ ├── app_neutron.py # Neutron-only app (port 9696)
738-
│ │ ├── app_status.py # Status Web UI app (port 8000)
738+
│ │ ├── app_status.py # Status Web UI app (port 10000)
739739
│ │ ├── cinder.py # Cinder Block Storage API endpoints
740740
│ │ ├── glance.py # Glance Image API endpoints
741741
│ │ ├── keystone.py # Keystone Identity API endpoints

‎emulator/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"cinder": 8776,
1919
"glance": 9292,
2020
"neutron": 9696,
21-
"status": 8000,
21+
"status": 10000,
2222
}
2323

2424
SERVICE_APPS = {
@@ -103,7 +103,7 @@ def main() -> None:
103103
choices=["keystone", "nova", "cinder", "glance", "neutron", "status", "all"],
104104
default="all",
105105
help="Service to run: keystone (5000), nova (8774), cinder (8776), "
106-
"glance (9292), neutron (9696), status (8000), or all (default: all)",
106+
"glance (9292), neutron (9696), status (10000), or all (default: all)",
107107
)
108108
parser.add_argument(
109109
"--port-offset",

‎emulator/api/status_ui.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ async def status_page(
20532053
) -> str:
20542054
"""Render the main status page."""
20552055
# Determine the host from the request
2056-
host = request.headers.get("host", "localhost:8000").split(":")[0]
2056+
host = request.headers.get("host", "localhost:10000").split(":")[0]
20572057
if host == "localhost" or host == "127.0.0.1":
20582058
check_host = "localhost"
20592059
else:
@@ -2402,7 +2402,7 @@ def create_btn(modal_id: str, label: str) -> str:
24022402
@router.get("/api/status")
24032403
async def api_status(request: Request) -> dict:
24042404
"""Return status as JSON for programmatic access."""
2405-
host = request.headers.get("host", "localhost:8000").split(":")[0]
2405+
host = request.headers.get("host", "localhost:10000").split(":")[0]
24062406
if host == "localhost" or host == "127.0.0.1":
24072407
check_host = "localhost"
24082408
else:

0 commit comments

Comments
 (0)