def host_ok

near-v-framework@0.4.0.0 · domain/architecture/ops.bend:605

import near-v-framework@0.4.0.0/domain/architecture/ops.bend as Ops
import Base
import near-v-framework@0.4.0.0/domain/architecture/environment/inventory/type.bend as I
import near-v-framework@0.4.0.0/domain/architecture/environment/inventory/ops.bend as InvO
import near-v-framework@0.4.0.0/domain/architecture/system/deployment/host/type.bend as H

605# ---- every server and device is the owner's, or on its vendor's cloud ----
606def host_ok(h: H.Host, +name: String, +inv: I.Inventory) -> Bool:
607  match h:
608    case H.Owned{k}:
609      InvO.owns(inv, k, name)
610    case H.Cloud{p}:
611      InvO.cloud_ok(inv, p)
612    case H.Other{}:
613      False{}

Uses (6)

Used by (1)