ionos-cloud / dim

DNS and IP Management
MIT License
46 stars 31 forks source link

[L3D] make list ipblocks great for layer3domains #127

Open miesi opened 2 years ago

miesi commented 2 years ago

Router style

$ ndcli list ipblocks -t container,subnet --all
layer3domain: office
10.16.0.0/12 (container) comment:all office networks
  10.23.0.0/16 (container) comment:admin office super network
     10.23.16.0/22 (subnet) comment:admin office location 1 network

layer3domain: server-internal
10.0.0.0/8 (container) comment: origin rfc1918
  10.108.0.0/12 (container) comment: rmc interfaces supernet
    10.110.0.0/16 (subnet) comment: rmc interfaces location 1

flatted out

$ ndcli list ipblocks -t container,subnet --all --flat
server-internal 10.0.0.0/8 (container) comment: origin rfc1918
office          10.16.0.0/12 (container) comment:all office networks
office            10.23.0.0/16 (container) comment:admin office super network
office              10.23.16.0/22 (subnet) comment:admin office location 1 network
server-internal   10.108.0.0/12 (container) comment: rmc interfaces supernet
server-internal     10.110.0.0/16 (subnet) comment: rmc interfaces location 1
Srudush commented 2 years ago

How does this interact with #125? There is also no list ipblocks command currently in ndcli. The only command with a similar output is list containers. This could get an option --flat to make sure the output is changed in that way.