fixeria has uploaded this change for review.

View Change

[REST] EnbItem: expose name of the selected MME

For each eNB connection, include the name of the MME that was selected
from the pool. Update the OpenAPI spec, CLI (enb_list/enb_info tables),
and user manual accordingly.

Change-Id: I4839275efa5d3545e84d684ad1b8b989214ef76a
Related: SYS#7066, SYS#7052
---
M contrib/openapi.yaml
M contrib/osmo-s1gw-cli.py
M doc/manuals/chapters/cli.adoc
M doc/manuals/chapters/rest.adoc
M priv/openapi.json
M src/rest_server.erl
6 files changed, 18 insertions(+), 6 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/31/42431/1
diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml
index c50ccce..bb6b79a 100644
--- a/contrib/openapi.yaml
+++ b/contrib/openapi.yaml
@@ -438,6 +438,9 @@
mme_sctp_aid:
type: integer
description: SCTP association identifier of the S1GW-MME connection
+ mme_name:
+ type: string
+ description: Human-readable identifier of the selected MME

Config:
type: object
diff --git a/contrib/osmo-s1gw-cli.py b/contrib/osmo-s1gw-cli.py
index 5d60e16..487b18c 100755
--- a/contrib/osmo-s1gw-cli.py
+++ b/contrib/osmo-s1gw-cli.py
@@ -407,6 +407,7 @@
'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,
+ 'MME name': item.get('mme_name'),
'Uptime (s)': item.get('uptime'),
'# E-RABs': item.get('erab_count'),
}
diff --git a/doc/manuals/chapters/cli.adoc b/doc/manuals/chapters/cli.adoc
index 52fe54b..24287a1 100644
--- a/doc/manuals/chapters/cli.adoc
+++ b/doc/manuals/chapters/cli.adoc
@@ -282,11 +282,11 @@

----
OsmoS1GW# enb_list
-| handle | PID | Global-eNB-ID | State | eNB addr:port (aid) | MME addr:port (aid) | Uptime | E-RABs |
-|----------|-----------|---------------|-----------|-------------------------|-------------------------|----------|----------|
-| 0 | <0.699.0> | 001-01-0 | connected | 127.0.1.10:56767 (5706) | 127.0.2.10:36412 (5707) | 418 | 0 |
-| 1 | <0.701.0> | 001-01-1 | connected | 127.0.1.10:54140 (5710) | 127.0.2.10:36412 (5711) | 33 | 3 |
-| 2 | <0.703.0> | 001-01-2 | connected | 127.0.1.10:34076 (5714) | 127.0.2.10:36412 (5715) | 3600 | 20 |
+| handle | PID | Global-eNB-ID | State | eNB addr:port (aid) | MME addr:port (aid) | MME name | Uptime | E-RABs |
+|----------|-----------|---------------|-----------|-------------------------|-------------------------|----------|----------|----------|
+| 0 | <0.699.0> | 001-01-0 | connected | 127.0.1.10:56767 (5706) | 127.0.2.10:36412 (5707) | mme0 | 418 | 0 |
+| 1 | <0.701.0> | 001-01-1 | connected | 127.0.1.10:54140 (5710) | 127.0.2.10:36412 (5711) | mme0 | 33 | 3 |
+| 2 | <0.703.0> | 001-01-2 | connected | 127.0.1.10:34076 (5714) | 127.0.2.10:36412 (5715) | mme0 | 3600 | 20 |
----

==== `enb_info`
@@ -320,6 +320,7 @@
| State | connected |
| eNB addr:port (aid) | 127.0.1.10:57362 (5734) |
| MME addr:port (aid) | 127.0.2.10:36412 (5745) |
+| MME name | mme0 |
| Uptime (s) | 521 |
| # E-RABs | 99 |
----
diff --git a/doc/manuals/chapters/rest.adoc b/doc/manuals/chapters/rest.adoc
index c907ece..7c1383b 100644
--- a/doc/manuals/chapters/rest.adoc
+++ b/doc/manuals/chapters/rest.adoc
@@ -258,6 +258,7 @@
"enb_saddr": "192.168.1.10",
"enb_sport": 56767,
"enb_sctp_aid": 5706,
+ "mme_name": "mme0",
"mme_daddr": "192.168.2.10",
"mme_dport": 36412,
"mme_sport": 34500,
@@ -276,6 +277,7 @@
`wait_s1setup_rsp`, or `connected`.
`enb_saddr` / `enb_sport`:: Source address and port of the eNB's SCTP connection.
`enb_sctp_aid`:: SCTP association ID of the eNB-S1GW connection.
+`mme_name`:: Name of the selected MME (from the MME pool).
`mme_daddr` / `mme_dport`:: Destination address and port of the MME.
`mme_sport`:: Local source port of the S1GW-MME SCTP connection.
`mme_sctp_aid`:: SCTP association ID of the S1GW-MME connection.
diff --git a/priv/openapi.json b/priv/openapi.json
index 8289c02..48158ca 100644
--- a/priv/openapi.json
+++ b/priv/openapi.json
@@ -645,6 +645,10 @@
"mme_sctp_aid": {
"type": "integer",
"description": "SCTP association identifier of the S1GW-MME connection"
+ },
+ "mme_name": {
+ "type": "string",
+ "description": "Human-readable identifier of the selected MME"
}
}
},
diff --git a/src/rest_server.erl b/src/rest_server.erl
index b326852..0b384a4 100644
--- a/src/rest_server.erl
+++ b/src/rest_server.erl
@@ -471,7 +471,8 @@

-spec enb_item_add_mme_info(map(), enb_registry:enb_info()) -> map().
enb_item_add_mme_info(M0, #{mme_info := MmeInfo}) ->
- M0#{mme_daddr => inet:ntoa(maps:get(raddr, MmeInfo)),
+ M0#{mme_name => maps:get(name, MmeInfo),
+ mme_daddr => inet:ntoa(maps:get(raddr, MmeInfo)),
mme_dport => maps:get(rport, MmeInfo)
};


To view, visit change 42431. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I4839275efa5d3545e84d684ad1b8b989214ef76a
Gerrit-Change-Number: 42431
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>