Topology: tap to trace on phones, name cables into a patch panel
Lint / JS (eslint) (push) Successful in 19s
Lint / Python (flake8) (push) Successful in 1m20s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / JS (eslint) (pull_request) Successful in 27s
Lint / Python (flake8) (pull_request) Successful in 1m46s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 1m9s
Test / Python Tests (pytest) (pull_request) Successful in 1m23s
Security / Python Security (bandit) (push) Successful in 1m10s
Test / Python Tests (pytest) (push) Successful in 1m18s
Lint / JS (eslint) (push) Successful in 19s
Lint / Python (flake8) (push) Successful in 1m20s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / JS (eslint) (pull_request) Successful in 27s
Lint / Python (flake8) (pull_request) Successful in 1m46s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 1m9s
Test / Python Tests (pytest) (pull_request) Successful in 1m23s
Security / Python Security (bandit) (push) Successful in 1m10s
Test / Python Tests (pytest) (push) Successful in 1m18s
- Touch screens have no hover, so the first tap on a device traces its path to the internet and its power feeds; a second tap opens it. Tapping empty canvas clears it, and the trace survives the 30 s refresh. - A cutsheet cable now carries where its other end goes. An unknown device on a cable documented into a patch panel is drawn as that panel's jacks, named "Patch panel port N"; a named stub notes "via Patch panel port N". The cable panel shows the far end of the cutsheet cable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+26
-1
@@ -326,10 +326,35 @@ class TestCutsheetLabels:
|
||||
'b_port': '', 'status': 'retired'}]
|
||||
g = build(items=items, cables=cables)
|
||||
(stub,) = find(g, 'Dream Machine Pro', 'stub:Dream Machine Pro:8')
|
||||
assert stub['cable'] == {'id': 7, 'label': 'C07', 'type': 'Cat6', 'color': 'Black'}
|
||||
assert stub['cable'] == {'id': 7, 'label': 'C07', 'type': 'Cat6', 'color': 'Black',
|
||||
'far': {'device': 'Patch', 'port': '1', 'kind': ''}}
|
||||
# Retired cables are not on the network any more
|
||||
assert find(g, 'Dream Machine Pro', 'host-a')[0]['cable'] is None
|
||||
|
||||
def test_unknown_device_behind_a_patch_panel_is_named_after_it(self):
|
||||
items = [{'name': 'PP1', 'device': '', 'kind': 'patch_panel'},
|
||||
{'name': 'UDM-Pro', 'device': 'Dream Machine Pro'}]
|
||||
cables = [{'id': 7, 'label': 'C07', 'a_device': 'UDM-Pro', 'a_port': '8', 'b_device': 'PP1',
|
||||
'b_port': '3', 'status': 'installed'}]
|
||||
stub = node(build(items=items, cables=cables), 'stub:Dream Machine Pro:8')
|
||||
assert stub['name'] == 'Patch panel port 3' and stub['named_by_via']
|
||||
assert stub['via'] == {'device': 'PP1', 'port': '3', 'kind': 'patch_panel', 'name': 'Patch panel port 3',
|
||||
'cable': 'C07'}
|
||||
|
||||
def test_a_named_stub_keeps_its_name_and_notes_the_panel(self):
|
||||
items = [{'name': 'PP1', 'device': '', 'kind': 'patch_panel'}]
|
||||
cables = [{'id': 2, 'label': 'C02', 'a_device': '24RJ45-POE', 'a_port': '1', 'b_device': 'PP1',
|
||||
'b_port': '2', 'status': 'installed'}]
|
||||
g = build(items=items, cables=cables)
|
||||
stub = node(g, 'stub:24RJ45-POE:1')
|
||||
assert stub['name'] == 'Micro 2 Eth2' and not stub.get('named_by_via')
|
||||
assert stub['via']['name'] == 'Patch panel port 2'
|
||||
|
||||
def test_a_cable_to_a_live_device_is_not_a_via(self):
|
||||
cables = [{'id': 3, 'label': 'C03', 'a_device': 'Dream Machine Pro', 'a_port': '8',
|
||||
'b_device': '8SFP-AGG', 'b_port': '1', 'status': 'installed'}]
|
||||
assert 'via' not in node(build(cables=cables), 'stub:Dream Machine Pro:8')
|
||||
|
||||
|
||||
class TestEmpty:
|
||||
def test_no_data_yet(self):
|
||||
|
||||
Reference in New Issue
Block a user