From c25b59490291dc5bb834e8729f5bce853f0c41ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Martin?= Date: Wed, 5 Jan 2022 20:47:25 +0100 Subject: [PATCH] Use new icons --- konijnenberg.py | 70 ++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/konijnenberg.py b/konijnenberg.py index a39a875..b3f23a6 100755 --- a/konijnenberg.py +++ b/konijnenberg.py @@ -6,44 +6,39 @@ """ from diagrams import Cluster, Diagram -from diagrams.generic.network import Firewall, Router, Switch -from diagrams.onprem.network import Internet -from diagrams.onprem.client import User, Users -from diagrams.onprem.compute import Server -from diagrams.generic.storage import Storage -from audio import Amplifier, AudioStreamer, TubeAmp, TurnTable +from audio import Amplifier, AudioStreamer, BlueSoundSpeaker, TubeAmp, TurnTable from consoles import NintendoSwitch, PlayStation4 -from devices import AndroidPhone, IPhone, Laptop, NUC, Printer, Rpi4, WashingMachine -from edges import MyEdge, Legend +from devices import AndroidPhone, EliteBook, IPhone, Laptop, NUC, Printer, Rpi4, SynologyDS, ThinkPad, WashingMachine +from edges import MyEdge from electricity import Boxx, CPL from fitbit import Aria from lights import HueBridge, HueBulb, HueSpot, SmartPlug, Tradfri -from network import Modem, UniFiAP +from network import IndustrialRouter, Modem, ProximusBBox, ProximusInternet, Switch, TelenetInternet, UniFiAP from video import ProximusTV, Television, UltraWideScreen -with Diagram('Konijnenberg', direction='TB'): +with Diagram('Konijnenberg', direction='TB', show=False): with Cluster('Bureau', direction='TB'): - office_cpl = CPL('CPL bureau') + office_cpl = CPL('') ps4 = PlayStation4() printer = Printer() rainbow = Rpi4('Rainbow') - switch = Switch('dlink') + switch = Switch('') walter = NUC('walter') - zippo = Storage('Zippo') - rpi4s = [ Rpi4('RPI4/{x}') for x in range(5) ] + zippo = SynologyDS('Zippo') + rpi4s = [ Rpi4(f'RPI4/{x}') for x in range(5) ] switch << MyEdge('ethernet') >> [office_cpl, ps4, printer, rainbow, walter, zippo] + rpi4s with Cluster('Salon'): - hue = HueBridge('Hue Bridge') - living_cpl = CPL('CPL salon') - malkovitch = Firewall('malkovitch') - proximus = Internet('Proximus') - proximus_router = Modem('Proximus') - proximus_tv = ProximusTV('Decodeur') - telenet = Internet('Telenet') - telenet_router = Modem('Telenet') + hue = HueBridge('') + living_cpl = CPL('') + malkovitch = IndustrialRouter('malkovitch') + proximus = ProximusInternet('') + proximus_router = ProximusBBox('') + proximus_tv = ProximusTV('') + telenet = TelenetInternet('') + telenet_router = ProximusBBox('') # FIXME: find the correct icon. malkovitch << MyEdge('ethernet') >> [living_cpl, proximus_router, telenet_router] proximus_router << MyEdge('adsl') >> proximus @@ -51,32 +46,35 @@ with Diagram('Konijnenberg', direction='TB'): telenet_router << MyEdge('cable') >> telenet with Cluster('Wireless', direction='TB'): - wifi_ap = UniFiAP('NanoHD') with Cluster('Misc'): with Cluster('Salon'): - boxx = Boxx() + boxx = Boxx('Thermostat') with Cluster('Salle de bain'): - balance = Aria('Balance') + balance = Aria('') with Cluster('Garage', direction='TB'): - lessiveuse = WashingMachine('Lave linge') + lessiveuse = WashingMachine('') with Cluster('Sound'): with Cluster('Cuisine', direction='TB'): - flex2i = AudioStreamer('Flex 2i') + flex2i = BlueSoundSpeaker('') with Cluster('Salon'): # ampli = Amplifier('Ampli') # has buletooth - hifi = AudioStreamer('HiFi') + hifi = BlueSoundSpeaker('') with Cluster('Video'): - tv_salon = Television('TV Salon') - jack = Rpi4('Jack') + with Cluster('Salon'): + tv_salon = Television('') + jack = Rpi4('') with Cluster('User Devices'): - laptop_clement = Laptop('Laptop Clément') - laptop_maithe = Laptop('Laptop Maïthé') - nintendo_switch = NintendoSwitch('Switch Alistair') - tel_alistair = AndroidPhone('Téléphone Alistair') - tel_clement = AndroidPhone('Téléphone Clément') - tel_maithe = IPhone('Téléphone Maïthé') + with Cluster('Clément'): + laptop_clement = ThinkPad('') + tel_clement = AndroidPhone('') + with Cluster('Maïthé'): + laptop_maithe = EliteBook('') + tel_maithe = IPhone('') + with Cluster('Alistair'): + nintendo_switch = NintendoSwitch('') + tel_alistair = AndroidPhone('') wifi_devices = [ nintendo_switch, laptop_clement, laptop_maithe, tel_alistair, tel_maithe, tel_clement ]