Skip to content

ifacesAccepted & acceptIfaces | Topology Syntax Guide

Michael Albert edited this page Jun 27, 2017 · 1 revision

ifacesAccepted & acceptIfaces

The tag 'ifacesAccepted' is used to designate portions (ends?) of links that are not connected to interfaces (and can "accept" and interface to be connected to). At each level, ifacesAccepted need to be explicitly re-declared at each level that they are not connected/accepted (the same as ifacesProvided). To connect an interface to an 'ifacesAccepted' you must use the acceptIface[s] tag, mapping the declared iface accepted to the interface to connect it to (see below).

There are two ways to declare ifacesAccepted, within the link declaration and at the topology level. Re-declarations of ifacesAccepted from sub topologies can only be done at the topology level.

An example of a topology level declaration (declaring two unconnected ends for onlyLink):

#...
links:
  - onlyLink:
      type: csma
ifacesAccepted:
  - first: onlyLink #references link name
  - second: onlyLink

Declaring on the link level:

#...
links:
  - onlyLink:
      type: csma
      ifacesAccepted:
        - first #simply names it, because declared inside of link
        - second

Using it in a higher level:

#...
topologies:
  - subTop:
      template: topAbove
nodes:
  - node:
      iface: eth0
      num: 2
acceptIfaces:
  - subTop first: node_1 eth0 10.0.0.1
  - subTop second: node_2 eth0 10.0.0.2

You could also re-declare the interfaces accepted:

#...
topologies:
  - subTop:
      template: topAbove
ifacesAccepted:
  - left: subTop first
  - right: subTop second