Skip to content

Commit 83b58a9

Browse files
authored
Merge pull request #4 from alsigna:pip_prepare
pip_prepare
2 parents 4e5fb6d + 01399e7 commit 83b58a9

File tree

4 files changed

+39
-28
lines changed

4 files changed

+39
-28
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,5 @@ venv.bak/
132132
dmypy.json
133133

134134
# Pyre type checker
135-
.pyre/
135+
.pyre/
136+
requirements-dev.txt

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ Detailed information about task and execution log.
7575

7676
Instruction below describes installation for Docker-compose instance of NetBox.
7777

78-
### 1. Create new docker image based on latest-ldap netbox image
78+
For bare-metal setup pip can be used for installation. But some changes (ftp/redis etc) will be requared anyway.
79+
```shell
80+
pip install netbox-plugin-software-manager
81+
```
82+
83+
## 1. Create new docker image based on latest-ldap netbox image
7984

8085
```shell
8186
cd {{ your-netbox-locaton }}
@@ -112,7 +117,7 @@ docker build -t netbox-plugin .
112117
> #--Pip
113118
> RUN /opt/netbox/venv/bin/python -m pip install /source/SoftwareManager/
114119
115-
### 2. Create FTP docker image based on [docker-alpine-ftp-server](https://github.com/delfer/docker-alpine-ftp-server)
120+
## 2. Create FTP docker image based on [docker-alpine-ftp-server](https://github.com/delfer/docker-alpine-ftp-server)
116121
117122
>Why FTP? Originally scp was used to transfer files, but based on experience, FTP is much faster.
118123
@@ -121,7 +126,7 @@ cd ftp
121126
docker build -t ftp_for_netbox .
122127
cd ../../
123128
```
124-
### 3. Change docker-compose.yml
129+
## 3. Change docker-compose.yml
125130

126131
```dockerfile
127132
...
@@ -172,7 +177,7 @@ cd ../../
172177
- ADDRESS=192.168.0.1
173178
```
174179

175-
### 4. Change NetBox configuration.py
180+
## 4. Change NetBox configuration.py
176181

177182
```python
178183
PLUGINS = [
@@ -206,19 +211,19 @@ PLUGINS_CONFIG = {
206211
}
207212
```
208213

209-
### 6. Rester docker-compose
214+
## 6. Restart docker-compose
210215

211-
### 7. Add Custom Field
216+
## 7. Add Custom Field
212217

213218
| Name | Type | Label | Object(s) |
214219
|---------------|--------|---------------|-----------------|
215220
| sw_version | Text | SW Version | dcim > device |
216221

217-
### 8. Try to use
222+
## 8. Try to use
218223

219224
- - -
220225

221-
### nginx-unit.json
226+
## nginx-unit.json
222227

223228
Original NetBox config is used with max_body_size:
224229
```json
@@ -229,7 +234,7 @@ Original NetBox config is used with max_body_size:
229234
}
230235
```
231236

232-
### rq.sh script
237+
## rq.sh script
233238
```shell
234239
#!/bin/bash
235240

setup.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
from setuptools import find_packages, setup
22

3+
with open("README.md", "r") as f:
4+
long_description = f.read()
5+
36
setup(
4-
name='software_manager',
5-
version='0.1',
6-
description='Software Manager for Cisco IOS/IOS-XE devices',
7-
author='Alexander Ignatov',
8-
license='MIT',
7+
name="netbox-plugin-software-manager",
8+
version="0.0.2",
9+
description="Software Manager for Cisco IOS/IOS-XE devices",
10+
long_description=long_description,
11+
long_description_content_type="text/markdown",
12+
author="Alexander Ignatov",
13+
license="MIT",
914
install_requires=[
10-
'scrapli[paramiko]',
11-
'rq-scheduler',
12-
'xlsxwriter',
15+
"scrapli[paramiko]",
16+
"rq-scheduler",
17+
"xlsxwriter",
1318
],
1419
packages=find_packages(),
1520
include_package_data=True,
16-
url='https://github.com/alsigna/netbox-software-manager',
21+
url="https://github.com/alsigna/netbox-software-manager",
1722
)

software_manager/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from extras.plugins import PluginConfig
22

33

4-
class software_manager(PluginConfig):
5-
name = 'software_manager'
6-
verbose_name = 'Software Manager'
7-
description = 'Software Manager for Cisco IOS/IOS-XE devices'
8-
version = '0.1'
9-
author = 'Alexander Ignatov'
10-
author_email = 'ignatov.alx@gmail.com'
4+
class SoftwareManager(PluginConfig):
5+
name = "software_manager"
6+
verbose_name = "Software Manager"
7+
description = "Software Manager for Cisco IOS/IOS-XE devices"
8+
version = "0.0.2"
9+
author = "Alexander Ignatov"
10+
author_email = "ignatov.alx@gmail.com"
1111
required_settings = []
1212
default_settings = {}
13-
base_url = 'software_manager'
13+
base_url = "software-manager"
1414
caching_config = {}
1515

1616

17-
config = software_manager
17+
config = SoftwareManager

0 commit comments

Comments
 (0)