Commit Graph

2 Commits

Author SHA1 Message Date
Jan Kundrát
dd3d2e1152 YANG: loading and storing topologies
GNPy's in-memory representation is closely modeled on the legacy JSON
files. Everything is a node, and the edges hold no data. In our YANG
models this is different, and all Fiber instances are stored as links.

Originally I wanted to be smart with Fused nodes and automatically
remove them "when they are not needed".  In legacy JSON, the `Fused`
thingy was sometimes placed as a magic clue to signify that no EDFA can
be put on that particular place. This is not needed in YANG, so I wanted
to remove these extra Fused nodes, but boy, was it a deep hole to dig
myself in.

FIXME: EDFAs are still placed even though the docs say otherwise!

Change-Id: I27bd9414e8237d94b980a200ce9f9792602b5430
2021-06-06 12:22:51 +02:00
Jan Kundrát
5f38db2d2f YANG: Reading and saving equipment catalog and simulation options from YANG files
To make sure that I get everything right, I built this code for
initializing the equipment library around the already existing JSON IO
loader. That is far from optimal because there is no type safety
whatsoever in these classes, and object properties are created in a
super ad-hoc manner at runtime. That is rather painful to work with
because there is no place anywhere in the code which would list all
properties that are *supposed* to be present.

Change-Id: Ibbfd97a5a949cf107fd98484b19b24bf9f4ca3e9
2021-06-06 12:22:51 +02:00