File: task.yaml

package info (click to toggle)
netplan.io 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,268 kB
  • sloc: python: 34,640; ansic: 14,096; xml: 4,989; javascript: 2,165; sh: 513; makefile: 118
file content (32 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
summary: Check that the dbus integration works

debug: |
  netplan get

execute: |
  # see the basics work
  netplan get bridges.br54.dhcp4 | MATCH true
  # TODO: actually use busctl
  obj_path=$(dbus-send --system --print-reply --type=method_call \
     --dest=io.netplan.Netplan /io/netplan/Netplan \
     io.netplan.Netplan.Config|tail -1 | sed 's/.*"\(.*\)".*/\1/' )
  dbus-send --print-reply  --system --type=method_call \
     --dest=io.netplan.Netplan "$obj_path" \
     io.netplan.Netplan.Config.Get | MATCH "version: 2"
  # and updating via dbus netplan works (use 90-test origin hint for
  # easier test cleanup)
  dbus-send --print-reply  --system --type=method_call \
      --dest=io.netplan.Netplan "$obj_path"   \
      io.netplan.Netplan.Config.Set \
      string:bridges.br54.dhcp4=false string:90-test
  # not applied yet
  test ! -e /etc/netplan/90-test.yaml
  netplan get bridges.br54.dhcp4 | MATCH true
  # apply
  dbus-send --print-reply  --system --type=method_call \
      --dest=io.netplan.Netplan "$obj_path"   \
      io.netplan.Netplan.Config.Apply
  # and now it's active
  test -e /etc/netplan/90-test.yaml
  netplan get bridges.br54.dhcp4 | MATCH false