Skip to main content

Interface

The behaviors that interface calls, and each call that its examples make. osapi dsl chain get --name interface shows the same.

Chain​

Behaviorinterface
Chaininterface → netplan → managedfile
Callsnetplan
Used bynone

A dummy interface with a static address (create)​

CALLSENDSGETS
interface createaddresses=[10.0.1.5/24] name=osapi0 type=dummychanged=true name=osapi0
└─ netplan getname=osapi0id=osapi0 matches=[osapi0] name=osapi0 section=ethernets
└─ netplan updatecontent=<8 lines> metadata={"domain":"interface","interface":"osapi0"…changed=true path=/etc/netplan/osapi-osapi0.yaml
· └─ managedfile updatecontent=<8 lines> metadata={"domain":"interface","interface":"osapi0"…changed=true path=/etc/netplan/osapi-osapi0.yaml

Each setting (create)​

CALLSENDSGETS
interface createaddresses=[2001:db8::5/64] dhcp6=true mac_address=52:54:00:aa:bb:cc m…changed=true name=osapi0
└─ netplan getname=osapi0id=osapi0 matches=[osapi0] name=osapi0 section=ethernets
└─ netplan updatecontent=<10 lines> metadata={"domain":"interface","interface":"osapi0…changed=true path=/etc/netplan/osapi-osapi0.yaml
· └─ managedfile updatecontent=<10 lines> metadata={"domain":"interface","interface":"osapi0…changed=true path=/etc/netplan/osapi-osapi0.yaml

An interface the host has (create)​

CALLSENDSGETS
interface createdhcp4=true name=eth1 wakeonlan=truechanged=true name=eth1
└─ netplan getname=eth1id=eth1 matches=[eth1] name=eth1 section=ethernets
└─ netplan updatecontent=<7 lines> metadata={"domain":"interface","interface":"eth1"} …changed=true path=/etc/netplan/osapi-eth1.yaml
· └─ managedfile updatecontent=<7 lines> metadata={"domain":"interface","interface":"eth1"} …changed=true path=/etc/netplan/osapi-eth1.yaml

Move an interface to DHCP (update)​

CALLSENDSGETS
interface updatedhcp4=true name=osapi0 type=dummychanged=true name=osapi0
└─ netplan getname=osapi0id=osapi0 matches=[osapi0] name=osapi0 section=ethernets
└─ netplan updatecontent=<6 lines> metadata={"domain":"interface","interface":"osapi0"…changed=true path=/etc/netplan/osapi-osapi0.yaml
· └─ managedfile updatecontent=<6 lines> metadata={"domain":"interface","interface":"osapi0"…changed=true path=/etc/netplan/osapi-osapi0.yaml

A dummy interface osapi configures (delete)​

CALLSENDSGETS
interface deletename=osapi0changed=true name=osapi0
└─ netplan deletepath=/etc/netplan/osapi-osapi0.yamlchanged=true path=/etc/netplan/osapi-osapi0.yaml
· └─ managedfile deletepath=/etc/netplan/osapi-osapi0.yamlchanged=true path=/etc/netplan/osapi-osapi0.yaml

An interface osapi does not configure (delete)​

CALLSENDSGETS
interface deletename=osapi0changed=false name=osapi0
└─ netplan deletepath=/etc/netplan/osapi-osapi0.yamlchanged=false path=/etc/netplan/osapi-osapi0.yaml
· └─ managedfile deletepath=/etc/netplan/osapi-osapi0.yamlchanged=false path=/etc/netplan/osapi-osapi0.yaml