Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions moler/cmd/at/get_apns.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
(always check against latest version of standard)
"""

__author__ = "Adam Klekowski"
__copyright__ = "Copyright (C) 2020, Nokia"
__email__ = "adam.klekowski@nokia.com"
__author__ = "Adam Klekowski, Kamil Pielka"
__copyright__ = "Copyright (C) 2020-2026, Nokia"
__email__ = "adam.klekowski@nokia.com, kamil.pielka@nokia.com"

import re

Expand Down Expand Up @@ -73,7 +73,7 @@ def on_new_line(self, line, is_full_line):
# +CGDCONT: 1,"IPV4V6","apn1-ips-05","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
_re_apn = re.compile(
r"^\s*\+CGDCONT\:\s(?P<apn_num>([0-9]+)),\"(?P<apn_ip_name>(IP(V4V6)?))\",\""
'(?P<apn_name>([a-zA-Z0-9-]*))".*$'
'(?P<apn_name>([a-zA-Z0-9._-]*))".*$'
)

def _parse_apns(self, line):
Expand Down Expand Up @@ -136,6 +136,7 @@ def _parse_apns(self, line):
+CGDCONT: 1,"IP","","0.0.0.0",0,0,0,0
+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 4,"IP","site.server.com","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0

OK
"""
Expand All @@ -146,4 +147,5 @@ def _parse_apns(self, line):
{"apn_num": "1", "apn_ip_name": "IP", "apn_name": ""},
{"apn_num": "2", "apn_ip_name": "IPV4V6", "apn_name": ""},
{"apn_num": "3", "apn_ip_name": "IPV4V6", "apn_name": ""},
{"apn_num": "4", "apn_ip_name": "IP", "apn_name": "site.server.com"},
]
Loading