netsplit 0.2.0__tar.gz → 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {netsplit-0.2.0 → netsplit-0.3.3}/PKG-INFO +20 -3
- {netsplit-0.2.0 → netsplit-0.3.3}/README.md +19 -2
- {netsplit-0.2.0 → netsplit-0.3.3}/netsplit/cli.py +4 -4
- {netsplit-0.2.0 → netsplit-0.3.3}/pyproject.toml +11 -1
- {netsplit-0.2.0 → netsplit-0.3.3}/LICENSE +0 -0
- {netsplit-0.2.0 → netsplit-0.3.3}/netsplit/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netsplit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Netsplit can help slice and dice your IP space
|
|
5
5
|
Author: Nikos Chasiotis
|
|
6
6
|
Author-email: hasiotis@gmail.com
|
|
@@ -15,9 +15,23 @@ Requires-Dist: rich (>=13.7.0,<14.0.0)
|
|
|
15
15
|
Requires-Dist: tomli (>=2.0.1,<3.0.0)
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
# Netsplit: Slice and dice your IP space
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
[](https://pypi.org/project/netsplit/)
|
|
21
|
+
[](https://github.com/hasiotis/netsplit/actions?query=workflow%3A%22Pull+Request%22)
|
|
22
|
+
[](https://github.com/hasiotis/netsplit/blob/master/LICENSE)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
Install and update using:
|
|
28
|
+
```
|
|
29
|
+
pip3 install --user --upgrade netsplit
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
Here is a very simple network plan:
|
|
21
35
|
```
|
|
22
36
|
[netsplit]
|
|
23
37
|
description = "Global / Subnet"
|
|
@@ -40,4 +54,7 @@ We can render it with:
|
|
|
40
54
|
1 │ Global / RESERVED │ ..................192.168.0.192/26 │ 4 / 4 │ 64
|
|
41
55
|
╵ ╵ ╵ ╵
|
|
42
56
|
```
|
|
57
|
+
Make sure to check examples for complex network plans:
|
|
58
|
+
|
|
59
|
+

|
|
43
60
|
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
# Netsplit: Slice and dice your IP space
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://pypi.org/project/netsplit/)
|
|
4
|
+
[](https://github.com/hasiotis/netsplit/actions?query=workflow%3A%22Pull+Request%22)
|
|
5
|
+
[](https://github.com/hasiotis/netsplit/blob/master/LICENSE)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Install and update using:
|
|
11
|
+
```
|
|
12
|
+
pip3 install --user --upgrade netsplit
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Here is a very simple network plan:
|
|
4
18
|
```
|
|
5
19
|
[netsplit]
|
|
6
20
|
description = "Global / Subnet"
|
|
@@ -23,3 +37,6 @@ We can render it with:
|
|
|
23
37
|
1 │ Global / RESERVED │ ..................192.168.0.192/26 │ 4 / 4 │ 64
|
|
24
38
|
╵ ╵ ╵ ╵
|
|
25
39
|
```
|
|
40
|
+
Make sure to check examples for complex network plans:
|
|
41
|
+
|
|
42
|
+

|
|
@@ -47,7 +47,7 @@ def get_subnets(name, space, net, level=0, index=0, extend=0, slots=1):
|
|
|
47
47
|
slot_meta[found_index-1] = m
|
|
48
48
|
for i in range(1, 2**found_extend):
|
|
49
49
|
slot_meta[found_index-1+i] = "SKIP"
|
|
50
|
-
count += found_index + 2**found_extend
|
|
50
|
+
count += found_index + 2**found_extend - 1
|
|
51
51
|
else:
|
|
52
52
|
slot_meta[count] = m
|
|
53
53
|
for i in range(1, 2**found_extend):
|
|
@@ -81,7 +81,7 @@ def pprint_plan(options, prefixes, max_level, keyword, reserved):
|
|
|
81
81
|
t.add_column(" #", justify="right")
|
|
82
82
|
t.add_column(options["description"])
|
|
83
83
|
t.add_column("Subnet")
|
|
84
|
-
t.add_column("idx
|
|
84
|
+
t.add_column("idx/slots", justify="right")
|
|
85
85
|
t.add_column("IPs", justify="right")
|
|
86
86
|
|
|
87
87
|
for p in prefixes:
|
|
@@ -98,9 +98,9 @@ def pprint_plan(options, prefixes, max_level, keyword, reserved):
|
|
|
98
98
|
index_value = ""
|
|
99
99
|
if p['slots'] != 1:
|
|
100
100
|
if p['extend'] == 0:
|
|
101
|
-
index_value = f"{p['index']:3}
|
|
101
|
+
index_value = f"{p['index']:3} / {p['slots']:3}"
|
|
102
102
|
else:
|
|
103
|
-
index_value = f"{p['index']:3}
|
|
103
|
+
index_value = f"{p['index']:3} → {p['index']+2**p['extend']-1:2} / {p['slots']:3}"
|
|
104
104
|
|
|
105
105
|
t.add_row(
|
|
106
106
|
f"{STYLE}{RESERVED}{p['level']}",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "netsplit"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.3"
|
|
4
4
|
description = "Netsplit can help slice and dice your IP space"
|
|
5
5
|
authors = ["Nikos Chasiotis <hasiotis@gmail.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -18,10 +18,20 @@ netsplit = 'netsplit.cli:cli'
|
|
|
18
18
|
[tool.poetry.group.dev.dependencies]
|
|
19
19
|
pre-commit = "^3.6.0"
|
|
20
20
|
pytest = "^7.4.3"
|
|
21
|
+
jsonpickle = "^3.0.2"
|
|
22
|
+
commitizen = "^3.13.0"
|
|
21
23
|
|
|
22
24
|
[tool.pytest.ini_options]
|
|
23
25
|
addopts = "-ra -q"
|
|
24
26
|
|
|
27
|
+
|
|
28
|
+
[tool.commitizen]
|
|
29
|
+
name = "cz_conventional_commits"
|
|
30
|
+
tag_format = "v$version"
|
|
31
|
+
version_scheme = "semver"
|
|
32
|
+
version_provider = "poetry"
|
|
33
|
+
update_changelog_on_bump = true
|
|
34
|
+
major_version_zero = true
|
|
25
35
|
[build-system]
|
|
26
36
|
requires = ["poetry-core"]
|
|
27
37
|
build-backend = "poetry.core.masonry.api"
|
|
File without changes
|
|
File without changes
|