Page Menu
Home
VyOS Platform
Search
Configure Global Search
Log In
Files
F117520994
list_ipoe.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
477 B
Referenced Files
None
Subscribers
None
list_ipoe.py
View Options
#!/usr/bin/env python3
import
argparse
from
vyos.util
import
popen
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--selector'
,
help
=
'Selector: username|ifname|sid'
,
required
=
True
)
args
=
parser
.
parse_args
()
output
,
err
=
popen
(
"accel-cmd -p 2002 show sessions {0}"
.
format
(
args
.
selector
))
if
not
err
:
res
=
output
.
split
(
"
\r\n
"
)
# Delete header from list
del
res
[:
2
]
print
(
' '
.
join
(
res
))
File Metadata
Details
Attached
Mime Type
text/x-script.python
Expires
Sat, Sep 26, 1:12 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4278761
Default Alt Text
list_ipoe.py (477 B)
Attached To
Mode
rVYOSONEX vyos-1x
Attached
Detach File
Event Timeline
Log In to Comment