Skip to content

Commit ae4de9e

Browse files
committed
Cleanup repo, add setup scripts
1 parent c457089 commit ae4de9e

File tree

6 files changed

+30
-22
lines changed

6 files changed

+30
-22
lines changed

README.MD

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
# polycom-mass-provision
22
Provisions a network of phone from a CSV faster than a human can.
33

4+
# Windows
5+
Requires [Python](https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe) to be able to run the script.
6+
Requires [npcap](https://npcap.com/dist/npcap-1.79.exe) installed for the network scan functionality.
7+
Requires [Visual Studio Build Tools](https://aka.ms/vs/17/release/RemoteTools.amd64ret.enu.exe) in order to build python wheels.
8+
9+
# Setup
10+
1. Run either `setup.bat` or `setup.sh` from your system's terminal emulator/command prompt.
11+
2. Wait for the venv to setup, along with all python dependencies to build and install.
12+
3. Once this is completed, proceed to usage.
13+
414
# Usage
5-
A `./cleararpcache.sh` script is included should there be any issues locating any phones.
6-
Takes a path to a csv file, and optionally an IP Address in CIDR notation (192.168.1.0/24)
7-
May require you to run as root/admin.
15+
1. Put together a csv file with all of the phones you want to provisiong using the `template.csv` file included.
16+
2. Run the script with `run.bat` or `run.sh` from your system's terminal emulator/command prompt. Include your csv file, and any additional arguments (Ex: `run.bat phones.csv -ip 192.168.1.1/24 -p 10`)
17+
3. Wait for the script to finish. The results will be included once the script has ran to show you what phones failed to provision and why.
18+
4. Report any issues you run into with the script to this repo.
19+
20+
Takes a path to a csv file, and optionally the IP Address of your router/gateway in CIDR notation (192.168.1.1/24)
21+
May require you to run as root/admin depending on your system setup.
822

923
```
10-
usage: polycom-mass-provision [-h] [-ip IP_ADDRESS] csvfile
24+
usage: polycom-mass-provision [-h] [-ip IPADDRESS] [-p JOBS] csvfile
1125
1226
Provisions many polycom phones on a network
1327
@@ -16,8 +30,10 @@ positional arguments:
1630
1731
options:
1832
-h, --help show this help message and exit
19-
-ip IP_ADDRESS, --ip-address IP_ADDRESS
33+
-ip IPADDRESS, --ip-address IPADDRESS
2034
IP Address in CIDR notation to scan for phones
35+
-p JOBS, --parallel-jobs JOBS
36+
Sets the limit on the number of phones that can be done simultaneously
2137
2238
Alexankitty 2024
2339
```

cleararpcache.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

run.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
python -m venv .\venv
21
call .\venv\Scripts\activate.bat
3-
pip install -r requirements.txt
42
python main.py %*
53
deactivate

run.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#! env sh
2-
python -m venv ./venv
32
source ./venv/bin/activate
4-
pip install -r requirements.txt
53
python main.py "$@"
64
deactivate

setup.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
python -m venv .\venv
2+
call .\venv\Scripts\activate.bat
3+
pip install -r requirements.txt
4+
deactivate

setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#! env sh
2+
python -m venv ./venv
3+
source ./venv/bin/activate
4+
pip install -r requirements.txt
5+
deactivate

0 commit comments

Comments
 (0)