# Items database

An approach to implement a cmdb on steroids as a bunch of linked objects.

It's about object schemas, types and typed links to describe the world as
dependency graph.

.A bunch of linked objects
ifdef::textdiagram[]
[plantuml, format=txt]
endif::[]
ifndef::textdiagram[]
[plantuml, format=svg]
endif::[]

----
@startuml

map SwitchType {
    manufacturer => MikroTik
    model => CRS12345
    serial_number => 23468263876
}

map Switch {
    switch_type *-> SwitchType
}

map SwitchPort {
    switch *-> Switch
    port_type => RJ45
    port_speed => 1000
    port_id => ge0/1/2/3
}


map NetworkAdapter {
    mac addr => aa:bb:cc:dd:ee:ff
    port_type => RJ45
}

map ServerType {
    type => baremetal
    serial_number => 1234567890
    manufacturer => Thomas Krenn AG
    model => Model Mini 2
}

map NetworkAdapterBMC {
    mac addr => 12:34:56:78:90:ab
    port_type => RJ45
    port_speed => 1000
}
map BMC {
    bmc_type => OpenBMC
    network adapter *-> NetworkAdapterBMC

}
map Server {
    network adapter *-> NetworkAdapter
    server_type *-> ServerType
    bmc *-> BMC
}

map Patchcable {
    plug a *-> NetworkAdapter
    plug b *-> SwitchPort
}

@enduml
----

This service provides an REST API for all interactions.
