def host_in_inventory

near-architecture@0.9.1.0 · arc.bend:305

import near-architecture@0.9.1.0/arc.bend as Arc
import Base

305def host_in_inventory(h: Host, name: String, o: Org) -> Bool:
306  match h o:
307    case Owned{key} Org{_, _, devices}:
308      owned_device(key, name, devices)
309    case Cloud{provider} Org{_, Vendor{_, cloud}, _}:
310      str_eq(provider, cloud)
311    case Other{} _:
312      False{}

Uses (7)

Used by (1)