Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
open-radio-e2e-testing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lu Xu
open-radio-e2e-testing
Commits
c2606b4c
Commit
c2606b4c
authored
Oct 07, 2022
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws.py: make url an argument
parent
b44f1bab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ws.py
ws.py
+6
-3
No files found.
ws.py
View file @
c2606b4c
import
tim
e
import
argpars
e
import
json
import
time
from
websocket
import
create_connection
url
=
"ws://[2a11:9ac0:d::1]:9002"
parser
=
argparse
.
ArgumentParser
(
description
=
'Connect to a lteue websocket to perform some testing.'
)
parser
.
add_argument
(
'url'
,
help
=
'url of the websocket in the form ws://[XXX]:XXX (eg "ws://[2a11:9ac0:d::1]:9002")'
)
args
=
parser
.
parse_args
()
class
UeError
(
Exception
):
pass
...
...
@@ -45,7 +48,7 @@ def power_off(ws, ue_id):
try
:
try
:
ws
=
create_connection
(
url
)
ws
=
create_connection
(
args
.
url
)
except
ConnectionRefusedError
:
raise
UeError
(
"Couldn't connect to remote API"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment