lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2025

  • 1 participants
  • 1216 discussions
[L] Change in ...osmo-s1gw[master]: [REST] Implement EnbErabList
by fixeria 27 Sep '25

27 Sep '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41103?usp=email ) Change subject: [REST] Implement EnbErabList ...................................................................... [REST] Implement EnbErabList Change-Id: I846974dd79e737acaac17918d18da55967a9abf2 Related: SYS#7066 --- M contrib/openapi.yaml M contrib/osmo-s1gw-cli.py M doc/osmo-s1gw-cli.md M priv/openapi.json M src/rest_server.erl 5 files changed, 323 insertions(+), 1 deletion(-) Approvals: osmith: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml index 24bc2c8..0041274 100644 --- a/contrib/openapi.yaml +++ b/contrib/openapi.yaml @@ -92,6 +92,22 @@ '404': description: Unsuccessful outcome (eNB not found) + /enb/{EnbId}/erab-list: + get: + summary: Get E-RAB list for a specific eNB + operationId: EnbErabList + parameters: + - $ref: '#/components/parameters/EnbId' + responses: + '200': + description: Successful outcome (E-RAB list) + content: + application/json: + schema: + $ref: '#/components/schemas/ErabList' + '404': + description: Unsuccessful outcome (eNB not found) + components: responses: OperationResult: @@ -248,3 +264,62 @@ mme_sctp_aid: type: integer description: SCTP association identifier of the S1GW-MME connection + + ErabList: + type: array + items: + $ref: '#/components/schemas/ErabItem' + + FTEID: + type: object + required: + - teid + - tla + properties: + teid: + type: integer + description: GTP-U TEID + tla: + type: string + description: GTP-U TLA (Transport Layer Address) + + ErabItem: + type: object + required: + - mme_ue_id + - erab_id + - state + - pid + properties: + mme_ue_id: + type: integer + description: MME-UE-S1AP-ID + erab_id: + type: integer + description: E-RAB-ID + state: + type: string + description: E-RAB FSM state + example: erab_wait_release_rsp + pid: + type: string + pattern: '^<[0-9]+\.[0-9]+\.[0-9]+>$' + description: E-RAB FSM process ID + pfcp_lseid: + type: integer + description: PFCP SEID (local) + pfcp_rseid: + type: integer + description: PFCP SEID (remote) + f_teid_u2c: + $ref: '#/components/schemas/FTEID' + description: GTP-U F-TEID for UPF -> Core + f_teid_c2u: + $ref: '#/components/schemas/FTEID' + description: GTP-U F-TEID for UPF <- Core + f_teid_a2u: + $ref: '#/components/schemas/FTEID' + description: GTP-U F-TEID for UPF <- Access + f_teid_u2a: + $ref: '#/components/schemas/FTEID' + description: GTP-U F-TEID for UPF -> Access diff --git a/contrib/osmo-s1gw-cli.py b/contrib/osmo-s1gw-cli.py index 56d08c3..5b749aa 100755 --- a/contrib/osmo-s1gw-cli.py +++ b/contrib/osmo-s1gw-cli.py @@ -112,6 +112,11 @@ with self.send_get_req(f'enb/{enb_id}') as f: return json.load(f) + def enb_erab_list(self, enb_id: str) -> RESTResponse: + ''' EnbErabList :: Get E-RAB list for a specific eNB ''' + with self.send_get_req(f'enb/{enb_id}/erab-list') as f: + return json.load(f) + class OsmoS1GWCli(cmd2.Cmd): DESC = 'Interactive CLI for OsmoS1GW' @@ -283,6 +288,51 @@ data = self.iface.enb_info(enb_id) self.enb_info_print(data) + @staticmethod + def erab_list_item(item: dict) -> dict: + ''' Generate a table row for the given E-RAB (brief) ''' + return { + 'PID': item.get('pid'), + 'MME-UE-S1AP-ID': item.get('mme_ue_id'), + 'E-RAB-ID': item.get('erab_id'), + 'State': item.get('state'), + } + + @classmethod + def erab_list_item_full(cls, item: dict) -> dict: + ''' Generate a table row for the given E-RAB (full) ''' + f_teid = lambda params: '0x{teid:08x}@{tla}'.format(**params) + seid = lambda val: f'0x{val:016x}' + return { + **cls.erab_list_item(item), + 'SEID (local)': seid(item.get('pfcp_lseid')) if 'pfcp_lseid' in item else None, + 'SEID (remote)': seid(item.get('pfcp_rseid')) if 'pfcp_rseid' in item else None, + 'U2C F-TEID': f_teid(item.get('f_teid_u2c')) if 'f_teid_u2c' in item else None, + 'C2U F-TEID': f_teid(item.get('f_teid_c2u')) if 'f_teid_c2u' in item else None, + 'A2U F-TEID': f_teid(item.get('f_teid_a2u')) if 'f_teid_a2u' in item else None, + 'U2A F-TEID': f_teid(item.get('f_teid_u2a')) if 'f_teid_u2a' in item else None, + } + + def erab_list_print(self, items: list[dict], full: bool) -> None: + ''' Print a list of E-RABs in tabular form ''' + func = self.erab_list_item_full if full else self.erab_list_item + self.poutput(tabulate.tabulate(map(func, items), + headers='keys', tablefmt=self.tablefmt)) + + enb_erab_list_parser = cmd2.Cmd2ArgumentParser() + enb_erab_list_parser.add_argument('-f', '--full', + action='store_true', + help='Print full table (more columns)') + add_enb_id_group(enb_erab_list_parser) + + @cmd2.with_argparser(enb_erab_list_parser) + @cmd2.with_category(CAT_ENB) + def do_enb_erab_list(self, opts) -> None: + ''' Get E-RAB list for a specific eNB ''' + enb_id = self.gen_enb_id(opts) + data = self.iface.enb_erab_list(enb_id) + self.erab_list_print(data, opts.full) + ap = argparse.ArgumentParser(prog='osmo-s1gw-cli', description=OsmoS1GWCli.DESC) diff --git a/doc/osmo-s1gw-cli.md b/doc/osmo-s1gw-cli.md index 3ae2da6..6509563 100644 --- a/doc/osmo-s1gw-cli.md +++ b/doc/osmo-s1gw-cli.md @@ -236,3 +236,35 @@ EXCEPTION of type 'HTTPError' occurred with message: HTTP Error 400: Bad Request To enable full traceback, run the following command: 'set debug true' ``` + +### `enb_erab_list` + +Get E-RAB list for a specific eNB. + +``` +Usage: enb_erab_list [-h] [-f] (-H HANDLE | -P PID | -G GENBID | --enb-sctp-aid AID | --mme-sctp-aid AID) + +Get E-RAB list for a specific eNB + +optional arguments: + -h, --help show this help message and exit + -f, --full Print full table (more columns) + +eNB ID: + -H, --handle HANDLE eNB handle (example: 0) + -P, --pid PID eNB process ID (example: 0.33.1) + -G, --genbid GENBID Global-eNB-ID (example: 262-42-1337) + --enb-sctp-aid AID eNB association identifier (example: 42) + --mme-sctp-aid AID MME association identifier (example: 42) +``` + +Example: Obtaining E-RAB list for an eNB with the given Global-eNB-ID. + +``` +OsmoS1GW# enb_erab_list -G 001-01-0 +| PID | MME-UE-S1AP-ID | E-RAB-ID | State | +|-----------|------------------|------------|------------| +| <0.708.0> | 4242 | 1 | erab_setup | +| <0.707.0> | 4242 | 0 | erab_setup | +| <0.709.0> | 4242 | 2 | erab_setup | +``` diff --git a/priv/openapi.json b/priv/openapi.json index 3e8f22e..07a11b8 100644 --- a/priv/openapi.json +++ b/priv/openapi.json @@ -140,6 +140,32 @@ } } } + }, + "/enb/{EnbId}/erab-list": { + "get": { + "summary": "Get E-RAB list for a specific eNB", + "operationId": "EnbErabList", + "parameters": [ + { + "$ref": "#/components/parameters/EnbId" + } + ], + "responses": { + "200": { + "description": "Successful outcome (E-RAB list)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErabList" + } + } + } + }, + "404": { + "description": "Unsuccessful outcome (eNB not found)" + } + } + } } }, "components": { @@ -358,6 +384,82 @@ "description": "SCTP association identifier of the S1GW-MME connection" } } + }, + "ErabList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErabItem" + } + }, + "FTEID": { + "type": "object", + "required": [ + "teid", + "tla" + ], + "properties": { + "teid": { + "type": "integer", + "description": "GTP-U TEID" + }, + "tla": { + "type": "string", + "description": "GTP-U TLA (Transport Layer Address)" + } + } + }, + "ErabItem": { + "type": "object", + "required": [ + "mme_ue_id", + "erab_id", + "state", + "pid" + ], + "properties": { + "mme_ue_id": { + "type": "integer", + "description": "MME-UE-S1AP-ID" + }, + "erab_id": { + "type": "integer", + "description": "E-RAB-ID" + }, + "state": { + "type": "string", + "description": "E-RAB FSM state", + "example": "erab_wait_release_rsp" + }, + "pid": { + "type": "string", + "pattern": "^<[0-9]+\\.[0-9]+\\.[0-9]+>$", + "description": "E-RAB FSM process ID" + }, + "pfcp_lseid": { + "type": "integer", + "description": "PFCP SEID (local)" + }, + "pfcp_rseid": { + "type": "integer", + "description": "PFCP SEID (remote)" + }, + "f_teid_u2c": { + "$ref": "#/components/schemas/FTEID", + "description": "GTP-U F-TEID for UPF -> Core" + }, + "f_teid_c2u": { + "$ref": "#/components/schemas/FTEID", + "description": "GTP-U F-TEID for UPF <- Core" + }, + "f_teid_a2u": { + "$ref": "#/components/schemas/FTEID", + "description": "GTP-U F-TEID for UPF <- Access" + }, + "f_teid_u2a": { + "$ref": "#/components/schemas/FTEID", + "description": "GTP-U F-TEID for UPF -> Access" + } + } } } } diff --git a/src/rest_server.erl b/src/rest_server.erl index f546ad9..2f805da 100644 --- a/src/rest_server.erl +++ b/src/rest_server.erl @@ -38,7 +38,8 @@ pfcp_assoc_state/1, pfcp_heartbeat/1, enb_list/1, - enb_info/1 + enb_info/1, + enb_erab_list/1 ]). -include_lib("kernel/include/logger.hrl"). @@ -105,6 +106,20 @@ end. +%% EnbErabList :: Get E-RAB list for a specific eNB +enb_erab_list(#{path_parameters := PP}) -> + [{<< "EnbId" >>, << ID/bytes >>}] = PP, + case fetch_enb_info(ID) of + [EnbInfo | _] -> + Rsp = fetch_erab_list(EnbInfo), + {200, [], Rsp}; + [] -> + {404, [], undefined}; + error -> + {500, [], undefined} + end. + + %% ------------------------------------------------------------------ %% private API %% ------------------------------------------------------------------ @@ -230,6 +245,54 @@ error. +-spec fetch_erab_list(enb_registry:enb_info()) -> [map()]. +fetch_erab_list(#{mme_conn_info := ConnInfo}) -> + Pid = maps:get(handler, ConnInfo), %% s1ap_proxy process pid + ERABs = s1ap_proxy:fetch_erab_list(Pid), + lists:map(fun erab_list_item/1, ERABs); + +fetch_erab_list(_) -> []. + + +-spec erab_list_item({term(), pid()}) -> map(). +erab_list_item({_, Pid}) -> + %% XXX: E-RAB FSM process might be dead here + Info = erab_fsm:fetch_info(Pid), + {MmeUeId, ErabId} = maps:get(uid, Info), + M0 = #{mme_ue_id => MmeUeId, + erab_id => ErabId, + state => maps:get(state, Info), + pid => pid_to_list(Pid)}, + M1 = erab_list_item_add_seid(Info, M0), + M2 = erab_list_item_add_f_teid(f_teid_u2c, Info, M1), + M3 = erab_list_item_add_f_teid(f_teid_c2u, Info, M2), + M4 = erab_list_item_add_f_teid(f_teid_a2u, Info, M3), + M5 = erab_list_item_add_f_teid(f_teid_u2a, Info, M4), + rsp_map(M5). + + +-spec erab_list_item_add_seid(erab_fsm:erab_info(), map()) -> map(). +erab_list_item_add_seid(Info, M0) -> + %% local SEID is always known/present + M1 = M0#{pfcp_lseid => maps:get(seid_loc, Info)}, + %% remote SEID may or may not be known/present + case maps:find(seid_rem, Info) of + {ok, SEID} -> M1#{pfcp_rseid => SEID}; + error -> M1 + end. + + +-spec erab_list_item_add_f_teid(atom(), erab_fsm:erab_info(), map()) -> map(). +erab_list_item_add_f_teid(Key, Info, M0) -> + case maps:find(Key, Info) of + {ok, {TEID, AddrBin}} -> + Addr = list_to_tuple(binary_to_list(AddrBin)), + M0#{Key => #{teid => TEID, + tla => inet:ntoa(Addr)}}; + error -> M0 + end. + + -spec parse_pid(binary() | list()) -> pid(). parse_pid(Data) when is_binary(Data) -> parse_pid(binary_to_list(Data)); -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41103?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I846974dd79e737acaac17918d18da55967a9abf2 Gerrit-Change-Number: 41103 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[M] Change in ...osmo-s1gw[master]: [REST] Implement ErabList and ErabInfo
by fixeria 27 Sep '25

27 Sep '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41104?usp=email ) Change subject: [REST] Implement ErabList and ErabInfo ...................................................................... [REST] Implement ErabList and ErabInfo Change-Id: Ia98498143fd0e38030429171e42a0c4c4887df64 Related: SYS#7066 --- M contrib/openapi.yaml M contrib/osmo-s1gw-cli.py M doc/osmo-s1gw-cli.md M priv/openapi.json M src/rest_server.erl 5 files changed, 229 insertions(+), 1 deletion(-) Approvals: osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml index 0041274..adf3e58 100644 --- a/contrib/openapi.yaml +++ b/contrib/openapi.yaml @@ -108,6 +108,34 @@ '404': description: Unsuccessful outcome (eNB not found) + /erab-list: + get: + summary: Get E-RAB list for all eNBs + operationId: ErabList + responses: + '200': + description: A list of E-RABs + content: + application/json: + schema: + $ref: '#/components/schemas/ErabList' + + /erab/{ErabId}: + get: + summary: Get information about a specific E-RAB + operationId: ErabInfo + parameters: + - $ref: '#/components/parameters/ErabId' + responses: + '200': + description: Successful outcome (E-RAB info) + content: + application/json: + schema: + $ref: '#/components/schemas/ErabItem' + '404': + description: Unsuccessful outcome (E-RAB not found) + components: responses: OperationResult: @@ -146,6 +174,18 @@ description: eNB connection address/port example: enb-conn:192.168.1.1-34650 + ErabId: + name: ErabId + in: path + description: E-RAB identifier (selector) + required: true + schema: + oneOf: + - type: string + pattern: '^pid:[0-9]+\.[0-9]+\.[0-9]+$' + description: Process ID + example: pid:0.33.1 + schemas: OperationResult: type: object diff --git a/contrib/osmo-s1gw-cli.py b/contrib/osmo-s1gw-cli.py index 5b749aa..99b62da 100755 --- a/contrib/osmo-s1gw-cli.py +++ b/contrib/osmo-s1gw-cli.py @@ -117,6 +117,16 @@ with self.send_get_req(f'enb/{enb_id}/erab-list') as f: return json.load(f) + def erab_list(self) -> RESTResponse: + ''' ErabList :: Get E-RAB list for all eNBs ''' + with self.send_get_req('erab-list') as f: + return json.load(f) + + def erab_info(self, pid: str) -> RESTResponse: + ''' ErabInfo :: Get information about a specific E-RAB ''' + with self.send_get_req(f'erab/pid:{pid}') as f: + return json.load(f) + class OsmoS1GWCli(cmd2.Cmd): DESC = 'Interactive CLI for OsmoS1GW' @@ -124,6 +134,7 @@ CAT_METRICS = 'Metrics commands' CAT_PFCP = 'PFCP related commands' CAT_ENB = 'eNB related commands' + CAT_ERAB = 'E-RAB related commands' def __init__(self, argv): super().__init__(allow_cli_args=False, include_py=True) @@ -319,6 +330,12 @@ self.poutput(tabulate.tabulate(map(func, items), headers='keys', tablefmt=self.tablefmt)) + def erab_info_print(self, item: dict) -> None: + ''' Print E-RAB info in tabular form ''' + self.poutput(tabulate.tabulate(self.erab_list_item_full(item).items(), + headers=['Parameter', 'Value'], + tablefmt=self.tablefmt)) + enb_erab_list_parser = cmd2.Cmd2ArgumentParser() enb_erab_list_parser.add_argument('-f', '--full', action='store_true', @@ -333,6 +350,30 @@ data = self.iface.enb_erab_list(enb_id) self.erab_list_print(data, opts.full) + erab_list_parser = cmd2.Cmd2ArgumentParser() + erab_list_parser.add_argument('-f', '--full', + action='store_true', + help='Print full table (more columns)') + + @cmd2.with_argparser(erab_list_parser) + @cmd2.with_category(CAT_ERAB) + def do_erab_list(self, opts) -> None: + ''' Get E-RAB list for all eNBs ''' + data = self.iface.erab_list() + self.erab_list_print(data, opts.full) + + erab_info_parser = cmd2.Cmd2ArgumentParser() + erab_info_parser.add_argument('-P', '--pid', + type=str, required=True, + help='E-RAB process ID (example: 0.33.1)') + + @cmd2.with_argparser(erab_info_parser) + @cmd2.with_category(CAT_ERAB) + def do_erab_info(self, opts) -> None: + ''' Get information about a specific E-RAB ''' + data = self.iface.erab_info(opts.pid) + self.erab_info_print(data) + ap = argparse.ArgumentParser(prog='osmo-s1gw-cli', description=OsmoS1GWCli.DESC) diff --git a/doc/osmo-s1gw-cli.md b/doc/osmo-s1gw-cli.md index 6509563..b801b25 100644 --- a/doc/osmo-s1gw-cli.md +++ b/doc/osmo-s1gw-cli.md @@ -268,3 +268,54 @@ | <0.707.0> | 4242 | 0 | erab_setup | | <0.709.0> | 4242 | 2 | erab_setup | ``` + +### `erab_list` + +Get E-RAB list for all eNBs. + +``` +Usage: erab_list [-h] [-f] + +Get E-RAB list for all eNBs + +optional arguments: + -h, --help show this help message and exit + -f, --full Print full table (more columns) +``` + +The output format is the same as produced by the `enb_erab_list` command. + +### `erab_info` + +Get information about a specific E-RAB. + +``` +Usage: erab_info -P PID [-h] + +Get information about a specific E-RAB + +required arguments: + -P, --pid PID E-RAB process ID (example: 0.33.1) + +optional arguments: + -h, --help show this help message and exit + +``` + +Example: Obtaining E-RAB info using process ID. + +``` +OsmoS1GW# erab_info -P 0.714.0 +| Parameter | Value | +|----------------|----------------------| +| PID | <0.714.0> | +| MME-UE-S1AP-ID | 4242 | +| E-RAB-ID | 1 | +| State | erab_setup | +| SEID (local) | 0x0000000000000002 | +| SEID (remote) | 0x5454434e2d330001 | +| U2C F-TEID | 0x00010001(a)127.0.0.1 | +| C2U F-TEID | 0x01010001(a)127.0.1.1 | +| A2U F-TEID | 0x02020001(a)127.0.2.2 | +| U2A F-TEID | 0x00020001(a)127.0.0.2 | +``` diff --git a/priv/openapi.json b/priv/openapi.json index 07a11b8..bfe82a3 100644 --- a/priv/openapi.json +++ b/priv/openapi.json @@ -166,6 +166,50 @@ } } } + }, + "/erab-list": { + "get": { + "summary": "Get E-RAB list for all eNBs", + "operationId": "ErabList", + "responses": { + "200": { + "description": "A list of E-RABs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErabList" + } + } + } + } + } + } + }, + "/erab/{ErabId}": { + "get": { + "summary": "Get information about a specific E-RAB", + "operationId": "ErabInfo", + "parameters": [ + { + "$ref": "#/components/parameters/ErabId" + } + ], + "responses": { + "200": { + "description": "Successful outcome (E-RAB info)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErabItem" + } + } + } + }, + "404": { + "description": "Unsuccessful outcome (E-RAB not found)" + } + } + } } }, "components": { @@ -221,6 +265,22 @@ } ] } + }, + "ErabId": { + "name": "ErabId", + "in": "path", + "description": "E-RAB identifier (selector)", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string", + "pattern": "^pid:[0-9]+\\.[0-9]+\\.[0-9]+$", + "description": "Process ID", + "example": "pid:0.33.1" + } + ] + } } }, "schemas": { diff --git a/src/rest_server.erl b/src/rest_server.erl index 2f805da..e1333c0 100644 --- a/src/rest_server.erl +++ b/src/rest_server.erl @@ -39,7 +39,9 @@ pfcp_heartbeat/1, enb_list/1, enb_info/1, - enb_erab_list/1 + enb_erab_list/1, + erab_list/1, + erab_info/1 ]). -include_lib("kernel/include/logger.hrl"). @@ -120,6 +122,24 @@ end. +%% ErabList :: Get E-RAB list for all eNBs +erab_list(#{}) -> + EnbList = enb_registry:fetch_enb_list(), + ErabList = lists:map(fun fetch_erab_list/1, EnbList), + {200, [], lists:flatten(ErabList)}. + + +%% ErabInfo :: Get information about a specific E-RAB +erab_info(#{path_parameters := PP}) -> + [{<< "ErabId" >>, << ID/bytes >>}] = PP, + case fetch_erab_info(ID) of + {ok, ErabInfo} -> + {200, [], ErabInfo}; + error -> + {404, [], undefined} + end. + + %% ------------------------------------------------------------------ %% private API %% ------------------------------------------------------------------ @@ -245,6 +265,22 @@ error. +-spec fetch_erab_info(binary()) -> {ok, erab_fsm:erab_info()} | error. +fetch_erab_info(<< "pid:", Val/bytes >>) -> + Pid = parse_pid(Val), + %% guard against non-existent process IDs + %% TODO: check if the given Pid is actually an erab_fsm + try erab_list_item({pid, Pid}) of + ErabInfo -> {ok, ErabInfo} + catch + exit:{noproc, _} -> error + end; + +fetch_erab_info(ID) -> + ?LOG_ERROR("Unhandled E-RAB ID ~p", [ID]), + error. + + -spec fetch_erab_list(enb_registry:enb_info()) -> [map()]. fetch_erab_list(#{mme_conn_info := ConnInfo}) -> Pid = maps:get(handler, ConnInfo), %% s1ap_proxy process pid -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41104?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ia98498143fd0e38030429171e42a0c4c4887df64 Gerrit-Change-Number: 41104 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Implement MetricsList
by fixeria 27 Sep '25

27 Sep '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41099?usp=email ) Change subject: [REST] Implement MetricsList ...................................................................... [REST] Implement MetricsList Change-Id: I43114aa8f5f8a388dd6a436f83ad1ee97f1d2ab1 Related: SYS#7066 --- M contrib/openapi.yaml M contrib/osmo-s1gw-cli.py M doc/osmo-s1gw-cli.md M priv/openapi.json M src/rest_server.erl 5 files changed, 265 insertions(+), 3 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml index c7f7ec8..696e7a2 100644 --- a/contrib/openapi.yaml +++ b/contrib/openapi.yaml @@ -4,5 +4,52 @@ title: 'OsmoS1GW REST interface' paths: + /metrics-list: + get: + summary: Get a list of metrics + operationId: MetricsList + parameters: + - name: type + in: query + description: Metric type + required: false + schema: + type: string + enum: [all, counter, gauge] + default: all + - name: path + in: query + description: Metrics path + required: false + schema: + type: string + example: s1ap.proxy + responses: + '200': + description: A list of metrics + content: + application/json: + schema: + $ref: '#/components/schemas/MetricsList' components: + schemas: + MetricsList: + type: array + items: + $ref: '#/components/schemas/MetricsItem' + + MetricsItem: + type: object + required: + - type + - name + - value + properties: + type: + type: string + enum: [counter, gauge] + name: + type: string + value: + type: integer diff --git a/contrib/osmo-s1gw-cli.py b/contrib/osmo-s1gw-cli.py index 8007314..76c444e 100755 --- a/contrib/osmo-s1gw-cli.py +++ b/contrib/osmo-s1gw-cli.py @@ -74,10 +74,20 @@ with self.send_get_req('swagger/spec.json') as f: return json.load(f) + def metrics_list(self, type: str = 'all', path: str = '') -> RESTResponse: + ''' MetricsList :: Get a list of metrics ''' + query = {'type' : type} + if path: + query['path'] = path + with self.send_get_req('metrics-list', query) as f: + return json.load(f) + class OsmoS1GWCli(cmd2.Cmd): DESC = 'Interactive CLI for OsmoS1GW' + CAT_METRICS = 'Metrics commands' + def __init__(self, argv): super().__init__(allow_cli_args=False, include_py=True) @@ -100,6 +110,32 @@ spec = self.iface.fetch_spec() self.poutput(json.dumps(spec, indent=4)) + @staticmethod + def metrics_list_item(item: dict) -> dict: + ''' Generate a table row for the given metric ''' + return { + 'Name': item.get('name'), + 'Type': item.get('type'), + 'Value': item.get('value'), + } + + metrics_list_parser = cmd2.Cmd2ArgumentParser() + metrics_list_parser.add_argument('-t', '--type', + type=str, default='all', + choices=('all', 'counter', 'gauge'), + help='Metric type (default: %(default)s)') + metrics_list_parser.add_argument('PATH', + type=str, default='', nargs='?', + help='Metric path') + + @cmd2.with_argparser(metrics_list_parser) + @cmd2.with_category(CAT_METRICS) + def do_metrics_list(self, opts) -> None: + ''' Get a list of metrics ''' + data = self.iface.metrics_list(opts.type, opts.PATH) + self.poutput(tabulate.tabulate(map(self.metrics_list_item, data), + headers='keys', tablefmt=self.tablefmt)) + ap = argparse.ArgumentParser(prog='osmo-s1gw-cli', description=OsmoS1GWCli.DESC) diff --git a/doc/osmo-s1gw-cli.md b/doc/osmo-s1gw-cli.md index 9cbac7b..d5ceb94 100644 --- a/doc/osmo-s1gw-cli.md +++ b/doc/osmo-s1gw-cli.md @@ -81,3 +81,46 @@ ### `fetch_openapi_spec` Fetch the OpenAPI specification (JSON), dump as text. + +### `metrics_list` + +Get a list of metrics. + +``` +Usage: metrics_list [-h] [-t {all, counter, gauge}] [PATH] + +Get a list of metrics + +positional arguments: + PATH Metric path + +optional arguments: + -h, --help show this help message and exit + -t, --type {all, counter, gauge} + Metric type (default: all) +``` + +Example: Obtaining PFCP association related metrics. + +``` +OsmoS1GW# metrics_list pfcp.assoc +| Name | Type | Value | +|-------------------------------|---------|---------| +| pfcp.assoc_setup_req.timeout | counter | 21 | +| pfcp.assoc_setup_req.tx | counter | 22 | +| pfcp.assoc_setup_resp.rx | counter | 0 | +| pfcp.assoc_setup_resp.rx_ack | counter | 0 | +| pfcp.assoc_setup_resp.rx_nack | counter | 0 | +| pfcp.associated | gauge | 0 | +``` + +Example: Obtaining all gauges. + +``` +OsmoS1GW# metrics_list --type gauge +| Name | Type | Value | +|----------------------------------|--------|---------| +| pfcp.associated | gauge | 0 | +| s1ap.enb.num_sctp_connections | gauge | 0 | +| s1ap.proxy.uplink_packets_queued | gauge | 0 | +``` diff --git a/priv/openapi.json b/priv/openapi.json index 25ff62a..7323e9a 100644 --- a/priv/openapi.json +++ b/priv/openapi.json @@ -4,6 +4,84 @@ "version": "0.1.0", "title": "OsmoS1GW REST interface" }, - "paths": null, - "components": null + "paths": { + "/metrics-list": { + "get": { + "summary": "Get a list of metrics", + "operationId": "MetricsList", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Metric type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "counter", + "gauge" + ], + "default": "all" + } + }, + { + "name": "path", + "in": "query", + "description": "Metrics path", + "required": false, + "schema": { + "type": "string", + "example": "s1ap.proxy" + } + } + ], + "responses": { + "200": { + "description": "A list of metrics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricsList" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "MetricsList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricsItem" + } + }, + "MetricsItem": { + "type": "object", + "required": [ + "type", + "name", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "counter", + "gauge" + ] + }, + "name": { + "type": "string" + }, + "value": { + "type": "integer" + } + } + } + } + } } \ No newline at end of file diff --git a/src/rest_server.erl b/src/rest_server.erl index c4e0373..ee0a7de 100644 --- a/src/rest_server.erl +++ b/src/rest_server.erl @@ -34,19 +34,77 @@ -module(rest_server). --export([]). +-export([metrics_list/1 + ]). -include_lib("kernel/include/logger.hrl"). +-include("s1gw_metrics.hrl"). + %% ------------------------------------------------------------------ %% public API %% ------------------------------------------------------------------ +%% MetricsList :: Get a list of metrics +metrics_list(#{query_parameters := QP}) -> + L0 = case proplists:get_value(<< "type" >>, QP, << "all" >>) of + << "counter" >> -> metric_list([ctr]); + << "gauge" >> -> metric_list([gauge]); + << "all" >> -> metric_list([]) + end, + L1 = case proplists:get_value(<< "path" >>, QP) of + undefined -> L0; + Path -> lists:filter(fun(M) -> metric_filter_path(M, Path) end, L0) + end, + {200, [], L1}. + %% ------------------------------------------------------------------ %% private API %% ------------------------------------------------------------------ +-spec metric_list(list()) -> [map()]. +metric_list(Path) -> + L = exometer:get_values(Path), + lists:map(fun metric_item/1, L). + + +-spec metric_item({Name, Props}) -> map() + when Name :: s1gw_metrics:metric(), + Props :: proplists:proplist(). +metric_item({Name, Props}) -> + Value = proplists:get_value(value, Props), + #{<< "type" >> => metric_type(Name), + << "name" >> => metric_name(Name), + << "value" >> => Value}. + + +-spec metric_type(s1gw_metrics:metric()) -> binary(). +metric_type([ctr | _]) -> << "counter" >>; +metric_type([gauge | _]) -> << "gauge" >>. + + +-spec metric_filter_path(map(), binary()) -> boolean(). +metric_filter_path(#{<< "name" >> := Name}, Path) -> + Len = erlang:min(byte_size(Name), byte_size(Path)), + binary:part(Name, 0, Len) =:= Path. + + +-spec metric_name(s1gw_metrics:metric()) -> binary(). +metric_name([_Type | P0]) -> + %% turn each list member into a string + P1 = lists:map(fun thing_to_list/1, P0), + %% put the dot-separator in between + P2 = string:join(P1, "."), + list_to_binary(P2). + + +%% stolen from exometer_report_statsd.git +thing_to_list(X) when is_atom(X) -> atom_to_list(X); +thing_to_list(X) when is_integer(X) -> integer_to_list(X); +thing_to_list(X) when is_binary(X) -> X; +thing_to_list(X) when is_list(X) -> X. + %% vim:set ts=4 sw=4 et: -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41099?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I43114aa8f5f8a388dd6a436f83ad1ee97f1d2ab1 Gerrit-Change-Number: 41099 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Implement Pfcp{AssocState,Heartbeat}
by fixeria 27 Sep '25

27 Sep '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41100?usp=email ) Change subject: [REST] Implement Pfcp{AssocState,Heartbeat} ...................................................................... [REST] Implement Pfcp{AssocState,Heartbeat} Change-Id: Idc98952d46d8e224969da343dc29ef323c6ed813 Related: SYS#7066 --- M contrib/openapi.yaml M contrib/osmo-s1gw-cli.py M doc/osmo-s1gw-cli.md M priv/openapi.json M src/rest_server.erl 5 files changed, 307 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml index 696e7a2..df079a9 100644 --- a/contrib/openapi.yaml +++ b/contrib/openapi.yaml @@ -32,8 +32,61 @@ schema: $ref: '#/components/schemas/MetricsList' + /pfcp/assoc: + get: + summary: Get the PFCP association state + operationId: PfcpAssocState + responses: + '200': + description: PFCP association state + content: + application/json: + schema: + $ref: '#/components/schemas/PfcpAssocState' + post: + summary: Initiate the PFCP Association Setup procedure + operationId: PfcpAssocSetup + responses: + '200': + $ref: '#/components/responses/OperationResult' + delete: + summary: Initiate the PFCP Association Release procedure + operationId: PfcpAssocRelease + responses: + '200': + $ref: '#/components/responses/OperationResult' + + /pfcp/heartbeat: + post: + summary: Send a PFCP Heartbeat Request to the peer + operationId: PfcpHeartbeat + responses: + '200': + $ref: '#/components/responses/OperationResult' + components: + responses: + OperationResult: + description: Generic operation result response + content: + application/json: + schema: + $ref: '#/components/schemas/OperationResult' + schemas: + OperationResult: + type: object + required: + - success + properties: + success: + type: boolean + description: Indicates whether the operation was successful + message: + type: string + nullable: true + description: Human-readable explanation of the result + MetricsList: type: array items: @@ -53,3 +106,27 @@ type: string value: type: integer + + PfcpAssocState: + type: object + required: + - state + - laddr + - raddr + properties: + state: + type: string + enum: [connecting, connected] + description: Current association state + laddr: + type: string + description: Local (bind) IP address + raddr: + type: string + description: Remote (connect) IP address + lrts: + type: integer + description: Local Recovery TimeStamp + rrts: + type: integer + description: Remote Recovery TimeStamp diff --git a/contrib/osmo-s1gw-cli.py b/contrib/osmo-s1gw-cli.py index 76c444e..77014ad 100755 --- a/contrib/osmo-s1gw-cli.py +++ b/contrib/osmo-s1gw-cli.py @@ -82,11 +82,32 @@ with self.send_get_req('metrics-list', query) as f: return json.load(f) + def pfcp_assoc_state(self) -> RESTResponse: + ''' PfcpAssocState :: Get the PFCP association state ''' + with self.send_get_req('pfcp/assoc') as f: + return json.load(f) + + def pfcp_assoc_setup(self) -> RESTResponse: + ''' PfcpAssocSetup :: Initiate the PFCP Association Setup procedure ''' + with self.send_post_req('pfcp/assoc') as f: + return json.load(f) + + def pfcp_assoc_release(self) -> RESTResponse: + ''' PfcpAssocRelease :: Initiate the PFCP Association Release procedure ''' + with self.send_delete_req('pfcp/assoc') as f: + return json.load(f) + + def pfcp_heartbeat(self) -> RESTResponse: + ''' PfcpHeartbeat :: Send a PFCP Heartbeat Request to the peer ''' + with self.send_post_req('pfcp/heartbeat') as f: + return json.load(f) + class OsmoS1GWCli(cmd2.Cmd): DESC = 'Interactive CLI for OsmoS1GW' CAT_METRICS = 'Metrics commands' + CAT_PFCP = 'PFCP related commands' def __init__(self, argv): super().__init__(allow_cli_args=False, include_py=True) @@ -136,6 +157,40 @@ self.poutput(tabulate.tabulate(map(self.metrics_list_item, data), headers='keys', tablefmt=self.tablefmt)) + @cmd2.with_category(CAT_PFCP) + def do_pfcp_assoc_state(self, opts) -> None: + ''' Get the PFCP association state ''' + data = self.iface.pfcp_assoc_state() + table = [] # [param, value] + table.append(['State', data['state']]) + table.append(['Local address', data['laddr']]) + table.append(['Remote address', data['raddr']]) + table.append(['Local Recovery TimeStamp', data['lrts']]) + if 'rrts' in data: + table.append(['Remote Recovery TimeStamp', data['rrts']]) + self.poutput(tabulate.tabulate(table, + headers=['Parameter', 'Value'], + tablefmt=self.tablefmt)) + + @cmd2.with_category(CAT_PFCP) + def do_pfcp_assoc_setup(self, opts) -> None: + ''' Initiate the PFCP Association Setup procedure ''' + raise NotImplementedError + + @cmd2.with_category(CAT_PFCP) + def do_pfcp_assoc_release(self, opts) -> None: + ''' Initiate the PFCP Association Release procedure ''' + raise NotImplementedError + + @cmd2.with_category(CAT_PFCP) + def do_pfcp_heartbeat(self, opts) -> None: + ''' Send a PFCP Heartbeat Request ''' + data = self.iface.pfcp_heartbeat() + if data['success']: + self.poutput('Heartbeat succeeded') + else: + self.perror('Heartbeat failed: {message}'.format(**data)) + ap = argparse.ArgumentParser(prog='osmo-s1gw-cli', description=OsmoS1GWCli.DESC) diff --git a/doc/osmo-s1gw-cli.md b/doc/osmo-s1gw-cli.md index d5ceb94..64298ab 100644 --- a/doc/osmo-s1gw-cli.md +++ b/doc/osmo-s1gw-cli.md @@ -124,3 +124,29 @@ | s1ap.enb.num_sctp_connections | gauge | 0 | | s1ap.proxy.uplink_packets_queued | gauge | 0 | ``` + +### `pfcp_assoc_state` + +Get the PFCP association state. + +``` +| Parameter | Value | +|---------------------------|------------| +| State | connected | +| Local address | 127.0.3.1 | +| Remote address | 127.0.3.10 | +| Local Recovery TimeStamp | 3967211233 | +| Remote Recovery TimeStamp | 3965211123 | +``` + +### `pfcp_heartbeat` + +Send a PFCP Heartbeat Request. + +``` +OsmoS1GW# pfcp_heartbeat +Heartbeat succeeded + +OsmoS1GW# pfcp_heartbeat +Heartbeat failed: timeout +``` diff --git a/priv/openapi.json b/priv/openapi.json index 7323e9a..c55c312 100644 --- a/priv/openapi.json +++ b/priv/openapi.json @@ -49,10 +49,86 @@ } } } + }, + "/pfcp/assoc": { + "get": { + "summary": "Get the PFCP association state", + "operationId": "PfcpAssocState", + "responses": { + "200": { + "description": "PFCP association state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PfcpAssocState" + } + } + } + } + } + }, + "post": { + "summary": "Initiate the PFCP Association Setup procedure", + "operationId": "PfcpAssocSetup", + "responses": { + "200": { + "$ref": "#/components/responses/OperationResult" + } + } + }, + "delete": { + "summary": "Initiate the PFCP Association Release procedure", + "operationId": "PfcpAssocRelease", + "responses": { + "200": { + "$ref": "#/components/responses/OperationResult" + } + } + } + }, + "/pfcp/heartbeat": { + "post": { + "summary": "Send a PFCP Heartbeat Request to the peer", + "operationId": "PfcpHeartbeat", + "responses": { + "200": { + "$ref": "#/components/responses/OperationResult" + } + } + } } }, "components": { + "responses": { + "OperationResult": { + "description": "Generic operation result response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperationResult" + } + } + } + } + }, "schemas": { + "OperationResult": { + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean", + "description": "Indicates whether the operation was successful" + }, + "message": { + "type": "string", + "nullable": true, + "description": "Human-readable explanation of the result" + } + } + }, "MetricsList": { "type": "array", "items": { @@ -81,6 +157,40 @@ "type": "integer" } } + }, + "PfcpAssocState": { + "type": "object", + "required": [ + "state", + "laddr", + "raddr" + ], + "properties": { + "state": { + "type": "string", + "enum": [ + "connecting", + "connected" + ], + "description": "Current association state" + }, + "laddr": { + "type": "string", + "description": "Local (bind) IP address" + }, + "raddr": { + "type": "string", + "description": "Remote (connect) IP address" + }, + "lrts": { + "type": "integer", + "description": "Local Recovery TimeStamp" + }, + "rrts": { + "type": "integer", + "description": "Remote Recovery TimeStamp" + } + } } } } diff --git a/src/rest_server.erl b/src/rest_server.erl index ee0a7de..d1597a9 100644 --- a/src/rest_server.erl +++ b/src/rest_server.erl @@ -34,7 +34,9 @@ -module(rest_server). --export([metrics_list/1 +-export([metrics_list/1, + pfcp_assoc_state/1, + pfcp_heartbeat/1 ]). -include_lib("kernel/include/logger.hrl"). @@ -60,6 +62,28 @@ {200, [], L1}. +%% PfcpAssocState :: Get the PFCP association state +pfcp_assoc_state(#{}) -> + Info0 = pfcp_peer:fetch_info(), + Info1 = maps:update_with(laddr, fun inet:ntoa/1, Info0), + Info2 = maps:update_with(raddr, fun inet:ntoa/1, Info1), + {200, [], rsp_map(Info2)}. + +%% TODO: PfcpAssocSetup :: Initiate the PFCP Association Setup procedure +%% TODO: PfcpAssocRelease :: Initiate the PFCP Association Release procedure + + +%% PfcpHeartbeat :: Send a PFCP Heartbeat Request to the peer +pfcp_heartbeat(#{}) -> + case pfcp_peer:heartbeat_req() of + ok -> + {200, [], rsp_map(#{success => true})}; + {error, Error} -> + {200, [], rsp_map(#{success => false, + message => Error})} + end. + + %% ------------------------------------------------------------------ %% private API %% ------------------------------------------------------------------ @@ -107,4 +131,18 @@ thing_to_list(X) when is_list(X) -> X. +%% Convert the given response map to a format acceptable by the erf +-spec rsp_map(map()) -> map(). +rsp_map(M) -> + Fun = fun(K, V) -> {bval(K), bval(V)} end, + maps:from_list([Fun(K, V) || {K, V} <- maps:to_list(M)]). + + +bval(V) when is_boolean(V) -> V; +bval(V) when is_atom(V) -> atom_to_binary(V); +bval(V) when is_list(V) -> list_to_binary(V); +bval(V) when is_map(V) -> rsp_map(V); +bval(V) -> V. + + %% vim:set ts=4 sw=4 et: -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41100?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Idc98952d46d8e224969da343dc29ef323c6ed813 Gerrit-Change-Number: 41100 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Implement EnbList and EnbInfo
by fixeria 27 Sep '25

27 Sep '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41101?usp=email ) Change subject: [REST] Implement EnbList and EnbInfo ...................................................................... [REST] Implement EnbList and EnbInfo Change-Id: Iba5a36678cf4bc245e9ae8cecc20ced76dfb7d75 Related: SYS#7066 --- M contrib/openapi.yaml M contrib/osmo-s1gw-cli.py M doc/osmo-s1gw-cli.md M priv/openapi.json M src/rest_server.erl 5 files changed, 571 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml index df079a9..24bc2c8 100644 --- a/contrib/openapi.yaml +++ b/contrib/openapi.yaml @@ -64,6 +64,34 @@ '200': $ref: '#/components/responses/OperationResult' + /enb-list: + get: + summary: Get a list of eNB connections + operationId: EnbList + responses: + '200': + description: A list of eNB connections + content: + application/json: + schema: + $ref: '#/components/schemas/EnbList' + + /enb/{EnbId}: + get: + summary: Get information about a specific eNB + operationId: EnbInfo + parameters: + - $ref: '#/components/parameters/EnbId' + responses: + '200': + description: Successful outcome (eNB info) + content: + application/json: + schema: + $ref: '#/components/schemas/EnbItem' + '404': + description: Unsuccessful outcome (eNB not found) + components: responses: OperationResult: @@ -73,6 +101,35 @@ schema: $ref: '#/components/schemas/OperationResult' + parameters: + EnbId: + name: EnbId + in: path + description: eNB identifier (selector) + required: true + schema: + oneOf: + - type: string + pattern: '^handle:[0-9]+$' + description: Unique identifier in the eNB registry + example: handle:42 + - type: string + pattern: '^pid:[0-9]+\.[0-9]+\.[0-9]+$' + description: Process ID + example: pid:0.33.1 + - type: string + pattern: '^genbid:[0-9]{3}-[0-9]{2,3}-[0-9]+$' + description: Global-eNB-ID (MCC-MNC-eNBId) + example: genbid:999-70-1337 + - type: string + pattern: '^(enb|mme)-sctp-aid:[0-9]+$' + description: eNB/MME SCTP association identifier + example: enb-aid:42 + - type: string + pattern: '^enb-conn:[0-9:.]+-[0-9]+$' + description: eNB connection address/port + example: enb-conn:192.168.1.1-34650 + schemas: OperationResult: type: object @@ -87,6 +144,11 @@ nullable: true description: Human-readable explanation of the result + Pid: + type: string + pattern: '^<[0-9]+\.[0-9]+\.[0-9]+>$' + description: Process ID + MetricsList: type: array items: @@ -130,3 +192,59 @@ rrts: type: integer description: Remote Recovery TimeStamp + + EnbList: + type: array + items: + $ref: '#/components/schemas/EnbItem' + + EnbItem: + type: object + required: + - handle + - pid + - state + - uptime + - erab_count + properties: + handle: + type: integer + description: Unique number in the eNB registry + pid: + $ref: '#/components/schemas/Pid' + state: + type: string + enum: [connecting, connected, s1setup] + description: Connection state + uptime: + type: integer + description: Uptime (in seconds) + erab_count: + type: integer + description: Total number of E-RABs + genb_id: + type: string + pattern: '^[0-9]{3}-[0-9]{2,3}-[0-9]+$' + example: 001-01-1337 + description: Global-eNB-ID + enb_saddr: + type: string + description: Source (remote) address of the eNB + mme_daddr: + type: string + description: Destination (remote) address of the MME + enb_sport: + type: integer + description: Source (remote) port of the eNB-S1GW connection + mme_sport: + type: integer + description: Source (local) port of the S1GW-MME connection + mme_dport: + type: integer + description: Destination (remote) port of the S1GW-MME connection + enb_sctp_aid: + type: integer + description: SCTP association identifier of the eNB-S1GW connection + mme_sctp_aid: + type: integer + description: SCTP association identifier of the S1GW-MME connection diff --git a/contrib/osmo-s1gw-cli.py b/contrib/osmo-s1gw-cli.py index 77014ad..56d08c3 100755 --- a/contrib/osmo-s1gw-cli.py +++ b/contrib/osmo-s1gw-cli.py @@ -102,12 +102,23 @@ with self.send_post_req('pfcp/heartbeat') as f: return json.load(f) + def enb_list(self) -> RESTResponse: + ''' EnbList :: Get a list of eNB connections ''' + with self.send_get_req('enb-list') as f: + return json.load(f) + + def enb_info(self, enb_id: str) -> RESTResponse: + ''' EnbInfo :: Get information about a specific eNB ''' + with self.send_get_req(f'enb/{enb_id}') as f: + return json.load(f) + class OsmoS1GWCli(cmd2.Cmd): DESC = 'Interactive CLI for OsmoS1GW' CAT_METRICS = 'Metrics commands' CAT_PFCP = 'PFCP related commands' + CAT_ENB = 'eNB related commands' def __init__(self, argv): super().__init__(allow_cli_args=False, include_py=True) @@ -191,6 +202,87 @@ else: self.perror('Heartbeat failed: {message}'.format(**data)) + @staticmethod + def enb_list_item(item: dict) -> dict: + ''' Generate a table row for the given eNB ''' + enb_addr = lambda item: '{enb_saddr}:{enb_sport} ({enb_sctp_aid})'.format(**item) + mme_addr = lambda item: '{mme_daddr}:{mme_dport} ({mme_sctp_aid})'.format(**item) + return { + 'eNB handle': item.get('handle'), + 'PID': item.get('pid'), + 'Global-eNB-ID': item.get('genb_id', '(unknown)'), + 'State': item.get('state'), + 'eNB addr:port (aid)': enb_addr(item) if 'enb_saddr' in item else None, + 'MME addr:port (aid)': mme_addr(item) if 'mme_daddr' in item else None, + 'Uptime (s)': item.get('uptime'), + '# E-RABs': item.get('erab_count'), + } + + def enb_list_print(self, items: list[dict]) -> None: + ''' Print a list of eNBs in tabular form ''' + self.poutput(tabulate.tabulate(map(self.enb_list_item, items), + headers='keys', tablefmt=self.tablefmt)) + + def enb_info_print(self, item: dict) -> None: + ''' Print eNB info in tabular form ''' + self.poutput(tabulate.tabulate(self.enb_list_item(item).items(), + headers=['Parameter', 'Value'], + tablefmt=self.tablefmt)) + + @cmd2.with_category(CAT_ENB) + def do_enb_list(self, opts) -> None: + ''' Get a list of eNB connections ''' + data = self.iface.enb_list() + self.enb_list_print(data) + + @staticmethod + def gen_enb_id(opts) -> str: + ''' Generate the EnbId parameter value (for URL) ''' + if opts.handle is not None: + return f'handle:{opts.handle}' + elif opts.pid is not None: + return f'pid:{opts.pid}' + elif opts.genbid is not None: + return f'genbid:{opts.genbid}' + elif opts.enb_sctp_aid is not None: + return f'enb-sctp-aid:{opts.enb_sctp_aid}' + elif opts.mme_sctp_aid is not None: + return f'mme-sctp-aid:{opts.mme_sctp_aid}' + raise ValueError # shall not happen + + @staticmethod + def add_enb_id_group(parser): + ''' Add argparse group for the EnbId parameter ''' + enb_id_group = parser.add_argument_group('eNB ID') + enb_id_group = enb_id_group.add_mutually_exclusive_group(required=True) + enb_id_group.add_argument('-H', '--handle', + type=int, + help='eNB handle (example: 0)') + enb_id_group.add_argument('-P', '--pid', + type=str, + help='eNB process ID (example: 0.33.1)') + enb_id_group.add_argument('-G', '--genbid', + type=str, + help='Global-eNB-ID (example: 262-42-1337)') + enb_id_group.add_argument('--enb-sctp-aid', + type=int, metavar='AID', + help='eNB association identifier (example: 42)') + enb_id_group.add_argument('--mme-sctp-aid', + type=int, metavar='AID', + help='MME association identifier (example: 42)') + return enb_id_group + + enb_info_parser = cmd2.Cmd2ArgumentParser() + add_enb_id_group(enb_info_parser) + + @cmd2.with_argparser(enb_info_parser) + @cmd2.with_category(CAT_ENB) + def do_enb_info(self, opts) -> None: + ''' Get information about a specific eNB ''' + enb_id = self.gen_enb_id(opts) + data = self.iface.enb_info(enb_id) + self.enb_info_print(data) + ap = argparse.ArgumentParser(prog='osmo-s1gw-cli', description=OsmoS1GWCli.DESC) diff --git a/doc/osmo-s1gw-cli.md b/doc/osmo-s1gw-cli.md index 64298ab..3ae2da6 100644 --- a/doc/osmo-s1gw-cli.md +++ b/doc/osmo-s1gw-cli.md @@ -150,3 +150,89 @@ OsmoS1GW# pfcp_heartbeat Heartbeat failed: timeout ``` + +### `do_enb_list` + +Get a list of eNB connections. + +``` +OsmoS1GW# enb_list +| eNB handle | PID | Global-eNB-ID | State | eNB addr:port (aid) | MME addr:port (aid) | Uptime (s) | # E-RABs | +|--------------|-----------|-----------------|---------|-------------------------|-------------------------|--------------|------------| +| 0 | <0.699.0> | 001-01-0 | s1setup | 127.0.1.10:56767 (5706) | 127.0.2.10:36412 (5707) | 418 | 0 | +| 1 | <0.701.0> | 001-01-1 | s1setup | 127.0.1.10:54140 (5710) | 127.0.2.10:36412 (5711) | 33 | 3 | +| 2 | <0.703.0> | 001-01-2 | s1setup | 127.0.1.10:34076 (5714) | 127.0.2.10:36412 (5715) | 3600 | 20 | +| 3 | <0.705.0> | 001-01-3 | s1setup | 127.0.1.10:46501 (5718) | 127.0.2.10:36412 (5719) | 869 | 13 | +| 4 | <0.707.0> | 001-01-4 | s1setup | 127.0.1.10:35610 (5722) | 127.0.2.10:36412 (5723) | 18 | 0 | +| 5 | <0.709.0> | 001-01-5 | s1setup | 127.0.1.10:37610 (5726) | 127.0.2.10:36412 (5727) | 933 | 129 | +| 6 | <0.711.0> | 001-01-6 | s1setup | 127.0.1.10:58447 (5730) | 127.0.2.10:36412 (5741) | 535 | 6 | +| 7 | <0.713.0> | 001-01-7 | s1setup | 127.0.1.10:35842 (5732) | 127.0.2.10:36412 (5743) | 736 | 8 | +| 8 | <0.715.0> | 001-01-8 | s1setup | 127.0.1.10:57362 (5734) | 127.0.2.10:36412 (5745) | 521 | 99 | +| 9 | <0.717.0> | 001-01-9 | s1setup | 127.0.1.10:50955 (5736) | 127.0.2.10:36412 (5747) | 33 | 1 | +``` + +### `enb_info` + +Get information about a specific eNB. + +``` +Usage: enb_info [-h] (-H HANDLE | -P PID | -G GENBID | + --enb-sctp-aid AID | + --mme-sctp-aid AID) + +Get information about a specific eNB + +optional arguments: + -h, --help show this help message and exit + +eNB ID: + -H, --handle HANDLE eNB handle (example: 0) + -P, --pid PID eNB process ID (example: 0.33.1) + -G, --genbid GENBID Global-eNB-ID (example: 262-42-1337) + --enb-sctp-aid AID eNB association identifier (example: 42) + --mme-sctp-aid AID MME association identifier (example: 42) +``` + +Example: Getting eNB information using a handle. + +``` +OsmoS1GW# enb_info -H8 +| Parameter | Value | +|---------------------|-------------------------| +| eNB handle | 8 | +| PID | <0.715.0> | +| Global-eNB-ID | 001-01-8 | +| State | s1setup | +| eNB addr:port (aid) | 127.0.1.10:57362 (5734) | +| MME addr:port (aid) | 127.0.2.10:36412 (5745) | +| Uptime (s) | 521 | +| # E-RABs | 99 | +``` + +Example: Getting eNB information using a pricess ID. + +``` +OsmoS1GW# enb_info --pid 0.715.0 +| Parameter | Value | +|---------------------|-------------------------| +| eNB handle | 8 | +| PID | <0.715.0> | +| Global-eNB-ID | 001-01-8 | +| State | s1setup | +| eNB addr:port (aid) | 127.0.1.10:57362 (5734) | +| MME addr:port (aid) | 127.0.2.10:36412 (5745) | +| Uptime (s) | 521 | +| # E-RABs | 99 | +``` + +Example: Unsuccessful outcome for an unknown/invalid Global-eNB-ID. + +``` +OsmoS1GW# enb_info -G 001-01-42 +EXCEPTION of type 'HTTPError' occurred with message: HTTP Error 404: Not Found +To enable full traceback, run the following command: 'set debug true' + +OsmoS1GW# enb_info -G 123456 +EXCEPTION of type 'HTTPError' occurred with message: HTTP Error 400: Bad Request +To enable full traceback, run the following command: 'set debug true' +``` diff --git a/priv/openapi.json b/priv/openapi.json index c55c312..3e8f22e 100644 --- a/priv/openapi.json +++ b/priv/openapi.json @@ -96,6 +96,50 @@ } } } + }, + "/enb-list": { + "get": { + "summary": "Get a list of eNB connections", + "operationId": "EnbList", + "responses": { + "200": { + "description": "A list of eNB connections", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnbList" + } + } + } + } + } + } + }, + "/enb/{EnbId}": { + "get": { + "summary": "Get information about a specific eNB", + "operationId": "EnbInfo", + "parameters": [ + { + "$ref": "#/components/parameters/EnbId" + } + ], + "responses": { + "200": { + "description": "Successful outcome (eNB info)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnbItem" + } + } + } + }, + "404": { + "description": "Unsuccessful outcome (eNB not found)" + } + } + } } }, "components": { @@ -111,6 +155,48 @@ } } }, + "parameters": { + "EnbId": { + "name": "EnbId", + "in": "path", + "description": "eNB identifier (selector)", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string", + "pattern": "^handle:[0-9]+$", + "description": "Unique identifier in the eNB registry", + "example": "handle:42" + }, + { + "type": "string", + "pattern": "^pid:[0-9]+\\.[0-9]+\\.[0-9]+$", + "description": "Process ID", + "example": "pid:0.33.1" + }, + { + "type": "string", + "pattern": "^genbid:[0-9]{3}-[0-9]{2,3}-[0-9]+$", + "description": "Global-eNB-ID (MCC-MNC-eNBId)", + "example": "genbid:999-70-1337" + }, + { + "type": "string", + "pattern": "^(enb|mme)-sctp-aid:[0-9]+$", + "description": "eNB/MME SCTP association identifier", + "example": "enb-aid:42" + }, + { + "type": "string", + "pattern": "^enb-conn:[0-9:.]+-[0-9]+$", + "description": "eNB connection address/port", + "example": "enb-conn:192.168.1.1-34650" + } + ] + } + } + }, "schemas": { "OperationResult": { "type": "object", @@ -129,6 +215,11 @@ } } }, + "Pid": { + "type": "string", + "pattern": "^<[0-9]+\\.[0-9]+\\.[0-9]+>$", + "description": "Process ID" + }, "MetricsList": { "type": "array", "items": { @@ -191,6 +282,82 @@ "description": "Remote Recovery TimeStamp" } } + }, + "EnbList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnbItem" + } + }, + "EnbItem": { + "type": "object", + "required": [ + "handle", + "pid", + "state", + "uptime", + "erab_count" + ], + "properties": { + "handle": { + "type": "integer", + "description": "Unique number in the eNB registry" + }, + "pid": { + "$ref": "#/components/schemas/Pid" + }, + "state": { + "type": "string", + "enum": [ + "connecting", + "connected", + "s1setup" + ], + "description": "Connection state" + }, + "uptime": { + "type": "integer", + "description": "Uptime (in seconds)" + }, + "erab_count": { + "type": "integer", + "description": "Total number of E-RABs" + }, + "genb_id": { + "type": "string", + "pattern": "^[0-9]{3}-[0-9]{2,3}-[0-9]+$", + "example": "001-01-1337", + "description": "Global-eNB-ID" + }, + "enb_saddr": { + "type": "string", + "description": "Source (remote) address of the eNB" + }, + "mme_daddr": { + "type": "string", + "description": "Destination (remote) address of the MME" + }, + "enb_sport": { + "type": "integer", + "description": "Source (remote) port of the eNB-S1GW connection" + }, + "mme_sport": { + "type": "integer", + "description": "Source (local) port of the S1GW-MME connection" + }, + "mme_dport": { + "type": "integer", + "description": "Destination (remote) port of the S1GW-MME connection" + }, + "enb_sctp_aid": { + "type": "integer", + "description": "SCTP association identifier of the eNB-S1GW connection" + }, + "mme_sctp_aid": { + "type": "integer", + "description": "SCTP association identifier of the S1GW-MME connection" + } + } } } } diff --git a/src/rest_server.erl b/src/rest_server.erl index d1597a9..f546ad9 100644 --- a/src/rest_server.erl +++ b/src/rest_server.erl @@ -36,7 +36,9 @@ -export([metrics_list/1, pfcp_assoc_state/1, - pfcp_heartbeat/1 + pfcp_heartbeat/1, + enb_list/1, + enb_info/1 ]). -include_lib("kernel/include/logger.hrl"). @@ -84,6 +86,25 @@ end. +%% EnbList :: Get a list of eNB connections +enb_list(#{}) -> + EnbList = enb_registry:fetch_enb_list(), + {200, [], lists:map(fun enb_item/1, EnbList)}. + + +%% EnbInfo :: Get information about a specific eNB +enb_info(#{path_parameters := PP}) -> + [{<< "EnbId" >>, << ID/bytes >>}] = PP, + case fetch_enb_info(ID) of + [EnbInfo | _] -> + {200, [], enb_item(EnbInfo)}; + [] -> + {404, [], undefined}; + error -> + {500, [], undefined} + end. + + %% ------------------------------------------------------------------ %% private API %% ------------------------------------------------------------------ @@ -131,6 +152,92 @@ thing_to_list(X) when is_list(X) -> X. +-spec enb_item(enb_registry:enb_info()) -> map(). +enb_item(EnbInfo) -> + M0 = #{handle => maps:get(handle, EnbInfo), + pid => pid_to_list(maps:get(pid, EnbInfo)), + state => maps:get(state, EnbInfo), + uptime => maps:get(uptime, EnbInfo), + erab_count => 0}, + M1 = enb_item_add_enb_info(M0, EnbInfo), + M2 = enb_item_add_enb_conn_info(M1, EnbInfo), + M3 = enb_item_add_mme_conn_info(M2, EnbInfo), + rsp_map(M3). + + +-spec enb_item_add_enb_info(map(), enb_registry:enb_info()) -> map(). +enb_item_add_enb_info(M0, #{genb_id_str := GlobalENBId}) -> + %% TODO: add enb_id and plmn_id + M0#{genb_id => GlobalENBId}; + +enb_item_add_enb_info(M0, _) -> M0. + + +-spec enb_item_add_enb_conn_info(map(), enb_registry:enb_info()) -> map(). +enb_item_add_enb_conn_info(M0, #{enb_conn_info := ConnInfo}) -> + M0#{enb_saddr => inet:ntoa(maps:get(addr, ConnInfo)), + enb_sport => maps:get(port, ConnInfo), + enb_sctp_aid => maps:get(aid, ConnInfo) + }; + +enb_item_add_enb_conn_info(M0, _) -> M0. + + +-spec enb_item_add_mme_conn_info(map(), enb_registry:enb_info()) -> map(). +enb_item_add_mme_conn_info(M0, #{mme_conn_info := ConnInfo}) -> + Pid = maps:get(handler, ConnInfo), + ERABs = s1ap_proxy:fetch_erab_list(Pid), + M0#{mme_daddr => maps:get(mme_addr, ConnInfo), %% XXX inet:ntoa + mme_dport => maps:get(mme_port, ConnInfo), + %% TODO: mme_sport + mme_sctp_aid => maps:get(mme_aid, ConnInfo), + erab_count => length(ERABs) + }; + +enb_item_add_mme_conn_info(M0, _) -> M0. + + +-spec fetch_enb_info(binary()) -> [enb_registry:enb_info()] | error. +fetch_enb_info(<< "handle:", Val/bytes >>) -> + Handle = binary_to_integer(Val), + case enb_registry:fetch_enb_info(Handle) of + {ok, EnbInfo} -> [EnbInfo]; + error -> [] + end; + +fetch_enb_info(<< "pid:", Val/bytes >>) -> + Pid = parse_pid(Val), + case enb_registry:fetch_enb_info(Pid) of + {ok, EnbInfo} -> [EnbInfo]; + error -> [] + end; + +fetch_enb_info(<< "genbid:", Val/bytes >>) -> + GlobalENBId = binary_to_list(Val), + enb_registry:fetch_enb_list({genb_id_str, GlobalENBId}); + +fetch_enb_info(<< "enb-sctp-aid:", Val/bytes >>) -> + Aid = binary_to_integer(Val), + enb_registry:fetch_enb_list({enb_sctp_aid, Aid}); + +fetch_enb_info(<< "mme-sctp-aid:", Val/bytes >>) -> + Aid = binary_to_integer(Val), + enb_registry:fetch_enb_list({mme_sctp_aid, Aid}); + +%% TODO: '^enb-conn:[0-9:.]+-[0-9]+$' +fetch_enb_info(ID) -> + ?LOG_ERROR("Unhandled eNB ID ~p", [ID]), + error. + + +-spec parse_pid(binary() | list()) -> pid(). +parse_pid(Data) when is_binary(Data) -> + parse_pid(binary_to_list(Data)); + +parse_pid(Data) when is_list(Data) -> + list_to_pid("<" ++ Data ++ ">"). + + %% Convert the given response map to a format acceptable by the erf -spec rsp_map(map()) -> map(). rsp_map(M) -> -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41101?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Iba5a36678cf4bc245e9ae8cecc20ced76dfb7d75 Gerrit-Change-Number: 41101 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[M] Change in ...osmo-s1gw[master]: [REST] Implement ErabList and ErabInfo
by fixeria 27 Sep '25

27 Sep '25
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41104?usp=email ) Change subject: [REST] Implement ErabList and ErabInfo ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41104?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ia98498143fd0e38030429171e42a0c4c4887df64 Gerrit-Change-Number: 41104 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Sat, 27 Sep 2025 12:18:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Implement EnbErabList
by fixeria 27 Sep '25

27 Sep '25
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41103?usp=email ) Change subject: [REST] Implement EnbErabList ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41103?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I846974dd79e737acaac17918d18da55967a9abf2 Gerrit-Change-Number: 41103 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Sat, 27 Sep 2025 12:18:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Implement EnbList and EnbInfo
by fixeria 27 Sep '25

27 Sep '25
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41101?usp=email ) Change subject: [REST] Implement EnbList and EnbInfo ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41101?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Iba5a36678cf4bc245e9ae8cecc20ced76dfb7d75 Gerrit-Change-Number: 41101 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Sat, 27 Sep 2025 12:18:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Implement Pfcp{AssocState,Heartbeat}
by fixeria 27 Sep '25

27 Sep '25
Attention is currently required from: osmith, pespin. fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41100?usp=email ) Change subject: [REST] Implement Pfcp{AssocState,Heartbeat} ...................................................................... Patch Set 8: Code-Review+2 (1 comment) File contrib/openapi.yaml: https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41100/comment/03b4a155_a70a… : PS8, Line 46: post: > looks like post and delete are not implemented yet. Right. > maybe mention this here in summary as comment? The OpenAPI specification for `PfcpAssocSetup` and `PfcpAssocRelease` is complete, so adding comments here makes no sense. I've added TODOs to `rest_server.erl`. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41100?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Idc98952d46d8e224969da343dc29ef323c6ed813 Gerrit-Change-Number: 41100 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 27 Sep 2025 12:18:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Implement MetricsList
by fixeria 27 Sep '25

27 Sep '25
Attention is currently required from: osmith, pespin. fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41099?usp=email ) Change subject: [REST] Implement MetricsList ...................................................................... Patch Set 8: Code-Review+2 (1 comment) File contrib/openapi.yaml: https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41099/comment/56a84eb6_829e… : PS8, Line 27: responses: > > If the requested metric type is invalid, then such a request is considered invalid and rejected wi […] Done, see https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41170. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41099?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I43114aa8f5f8a388dd6a436f83ad1ee97f1d2ab1 Gerrit-Change-Number: 41099 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 27 Sep 2025 12:15:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • ...
  • 122
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.