fabric-testbed / InformationModel

FABRIC Information Model library
MIT License
7 stars 1 forks source link

Issue 89 #90

Closed ibaldin closed 2 years ago

ibaldin commented 2 years ago

Addresses #89 by making any child of JSONField (Labels, Capacities etc) an immutable object. Added update constructor to these objects (a copy + update constructore) as well as two helper methods update_labels() and update_capacities() on all ModelElement objects (Nodes, Components, Interfaces etc).

Updated all unit tests accordingly.

Now set_fields() method on any child of JSONField (Labels, Capacities or any other) is private. See ticket for code examples.