fabric-testbed / InformationModel

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

Maintenance Mode Support #153

Closed kthare10 closed 1 year ago

kthare10 commented 1 year ago

Parent Issue# https://github.com/fabric-testbed/software-planning/issues/92

CF needs following information to pass in the AdvertizedTopology

ibaldin commented 1 year ago

I'm assuming this is specific only to communicating this back to the user and not needed to store this info in the CBM? @kthare10 I believe the easiest is to add a JSON-formatted property to compute nodes called MaintenanceMode that can then be populated (presumably from the Postgres database information in Broker about which nodes are in fact in maintenance)?

ibaldin commented 1 year ago

Instead of a free-formatted JSON field, probably better to actually impose some structure on it, but still have it serialized as JSON.

ibaldin commented 1 year ago

maintenance_info property on NetworkNodes and CompositeNodes can carry a dictionary keyed by node name so it looks like this:

{
   'node1': MaintenanceEntry(state, deadline, expected_end)
}

class MaintenanceEntry:
    state: MaintenanceState
    deadline: datetime = None # when it starts
    expected_end: datetime = None # how long it may be