Skip to content

Commit f41ad88

Browse files
authored
fix(interactive): minor changes on list_service_status (#4313)
- Change localhost to 127.0.0.1 - Move the comment message to a new filed `info`
1 parent 2cd1144 commit f41ad88

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

coordinator/gscoordinator/flex/core/interactive/hqps.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def list_service_status(self) -> List[dict]:
236236
api_instance = gs_interactive.AdminServiceServiceManagementApi(api_client)
237237
response = api_instance.get_service_status()
238238
if CLUSTER_TYPE == "HOSTS":
239-
host = 'localhost' # for interactive deployed in hosts, we could not determine the public ip in container. So we let user to replace with the public ip.
239+
host = '127.0.0.1' # for interactive deployed in hosts, we could not determine the public ip in container. So we let user to replace with the public ip.
240240
if response.status == "Running" and response.graph is not None:
241241
g = response.graph.to_dict()
242242
serving_graph_id = g["id"]
@@ -246,10 +246,11 @@ def list_service_status(self) -> List[dict]:
246246
status = {
247247
"status": response.status,
248248
"sdk_endpoints": {
249-
"cypher": f"neo4j://{host}:{self._get_mapped_port(response.bolt_port)} (Replace localhost with public ip if connecting from outside)",
250-
"hqps": f"http://{host}:{self._get_mapped_port(response.hqps_port)} (Replace localhost with public ip if connecting from outside)",
251-
"gremlin": f"ws://{host}:{self._get_mapped_port(response.gremlin_port)}/gremlin (Replace localhost with public ip if connecting from outside)",
249+
"cypher": f"neo4j://{host}:{self._get_mapped_port(response.bolt_port)}",
250+
"hqps": f"http://{host}:{self._get_mapped_port(response.hqps_port)}",
251+
"gremlin": f"ws://{host}:{self._get_mapped_port(response.gremlin_port)}/gremlin",
252252
},
253+
"info": "Replace 127.0.0.1 with public ip if connecting from outside",
253254
"start_time": service_start_time,
254255
"graph_id": g["id"],
255256
}

flex/openapi/openapi_coordinator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ components:
250250
type: string
251251
grpc:
252252
type: string
253+
info:
254+
type: string
255+
nullable: true
253256
start_time:
254257
type: string
255258

@@ -2196,6 +2199,7 @@ paths:
21962199
cypher: neo4j://mock.api.cypher:7676
21972200
gremlin: ws://mock.api.gremlin/gremlin
21982201
hqps: http://mock.api.hqps:10000
2202+
info: "Replace 127.0.0.1 with public ip if connecting from outside"
21992203
start_time: "2024-01-01 00:00:00"
22002204
500:
22012205
$ref: "#/components/responses/500"

0 commit comments

Comments
 (0)