Package: batchscanner-siklu
Note: Project still under development.Batchscanner is a script to batch-scan and/or query and/or configure multiple Siklu radios
via their CLI (SSH) interface.
It operates over a user-defined range of IP addresses and/or networks, executes some action,
and writes the results to csv/txt files.Note: This program is a personal initiative and contribution.
Although it is designed for managing radios bySiklu Communications, no use
has been made of any company resources, nor any intellectual proprietary nor
confidential information.Batchscanner supports the followingactions:scan: For each IP address, identify if the device is a Siklu radio, and if so what kind.
Information is extracted from the SSH banner (if one exists) and/or from the CLI prompt.show: executes CLI ‘show’ commands to extract key metrics from each radios (e.g., link up/down).script: executes a sequence of commands read from text file.set_tod: configure the date and time of the radios based on that of the computer.Actions can be applied to specific types of radios, according to the following classification:EH: Etherhaul radiosBU: Classic MultiHaul base units (BUs)TU: Classic MultiHul terminal units (TUs)TG: MultiHaul TG radios. For these radios, there is a further option for batchscanner to action
over remote CNs (which may not have unique IP addresses).InstallationAs a standalone (executable) scriptThis option does not require a Python environment set up.Download one of the following zip files based on your OS:Windows 64bit:download linkExtract the zip file to your local driveAs a Python script$pipinstallbatchscanner-sikluNote: you might like to copy the files:config.toml,sikssh_config.toml, andnetwork.txtfrom theLib/site-packages/batchscannerdirectory (in your Python environment) to
your working directory - as templates, then edit them as required.UsageUse a standard text editor to edit the defaultnetwork filenetwork.txtto specify
the range of IP addresses, and log-in credentials to the radio.
Alternatively, create a new file and refer to it with the -c option (below).If required, use a standard text editor to edit the default programconfiguration fileconfig.toml.
Alternatively, create a new file and refer to it with the -p option (below).Run the script:Usage: batchscanner [-h] [-a {scan,show,script,set_tod}] [-n NETWORK_FILENAME] [-c CONFIG_FILENAME]

options:
  -h, --help            Show this help message and exit
  -a {scan,show,script,set_tod}
            Action for batchscanner to take (default: show). One of:
                scan: scan the network and identify which IP address is a Siklu radio;
                show: extract key metrics from radios (parsed outputs of 'show' commands);
                script: execute a script: send list of commands read from text file;
                set_tod: set date and time.
  -n NETWORK_FILENAME   Mandatory filename specifying the Network (range of IP addresses to scan and login credentials.
            Default: 'network.txt'
  -c CONFIG_FILENAME    Optional configuration file for overriding default program parameters.
            Default: 'config.toml'Network fileThe range of IP addresses is specified as a text file, with the following format:Username and password to log into the radiosA range of IP addresses, described by any number of the following (which can be mixed and matched):A single IP addressA range of IP addresses: start and end addresses, separated by a hyphenA subnet with a forward slash denoting the number of subnet bits.Example content of network file defining a total of 1 + 200 + 252 IP addresses:username=adminpassword=admin192.168.0.110.11.12.1-10.11.12.20010.10.10.0/24Config fileThe configuration file (simpleTOMLformat) may be used to override
the default program parameters. For a list of these parameters and their respective
meanings, refer to theParameterssection of the documentation for therun_batch function.Example content of configuration file:batch_size=1000# Number of IP addresses in single batch (results saved after each batch)script_filename='script.txt'# filename containing list of commands to send to radio (applicable only if action='script')include_eh=true# If true, action EtherHaul radiosinclude_bu=true# If true, action MultiHaul BU radiosinclude_tu=true# If true, action MultiHaul TU radiosinclude_tg=true# If true, action MultiHaul TG radiosinclude_tg_remote_cns=false# If true, action all remote CNs (applicable only to TG DNs)multiprocessing_flag=true# If true, Run concurrently (much faster running time)multiprocessing_num_processes=50# Number of processes to run concurrentlyoutput_directory='output'# Results are written to this directorysave_show_tg_per_radio=false# If true, save also parsed 'show' output per radio (applicable only to TG)save_show_tg_per_radio_raw=false# If true, save aso the raw (unparsed) 'show' output per radio (applicable only to TG)time_shift=0# Number of hours to add to computer time when configuring date/time (applicable only if action='set_tod')