github.com/onosproject/onos-api/go@v0.10.32/onos/fabricsim/fabricsim.go (about) 1 // SPDX-FileCopyrightText: 2022-present Intel Corporation 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 5 package fabricsim 6 7 import "fmt" 8 9 // DeviceID is a unique identifier of a simulated device 10 type DeviceID string 11 12 // PortID is a unique identifier of a simulated device port 13 type PortID string 14 15 // HostID is a unique identifier of a simulated host 16 type HostID string 17 18 // LinkID is a unique identifier of a simulated link 19 type LinkID string 20 21 // NewLinkID produces a singular link ID from the specified source and target port IDs 22 func NewLinkID(src PortID, tgt PortID) LinkID { 23 return LinkID(fmt.Sprintf("%s-%s", src, tgt)) 24 }