Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/use gateway id list during otap #41

Merged
merged 2 commits into from
Jan 18, 2024
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
8 changes: 7 additions & 1 deletion examples/example_otap.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
help="Network address concerned by scratchpad")
parser.add_argument('--file',
help="Scratcphad to use")
parser.add_argument("--gateway",
type=str,
nargs='+',
help="Gateway list to use. If specified, the OTAP will be performed on given Gateway IDs",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we support also input of the gateway list from a file ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is supported by default as we are using parser API.
So any parameter can come from cmd line or a file. File is passed to the script by prefixing it by @
Example:
example_otap.py --host ... --username ... @list_of_agateways

default=None)
args = parser.parse_args()

logging.basicConfig(format='%(levelname)s %(asctime)s %(message)s', level=logging.WARNING)
Expand All @@ -53,7 +58,8 @@
exit()

otapHelper = WirepasOtapHelper(wni,
args.network)
args.network,
args.gateway)

if args.cmd == "update_delay":
delay = wmm.ProcessingDelay.DELAY_THIRTY_MINUTES
Expand Down
Loading