Skip to main content

Interface

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

Chain​

Behaviorinterface
Chaininterface → netplan → managedfile
Callsnetplan
Used bynone

A static address (create)​

CALLSENDSGETS
interface createaddresses=[10.0.1.5/24] name=osapi0changed=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=<11 lines> metadata={"domain":"interface","interface":"osapi0…changed=true path=/etc/netplan/osapi-osapi0.yaml
· └─ managedfile updatecontent=<11 lines> metadata={"domain":"interface","interface":"osapi0…changed=true path=/etc/netplan/osapi-osapi0.yaml

Move an interface to DHCP (update)​

CALLSENDSGETS
interface updatedhcp4=true name=osapi0changed=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

An 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