self.assertNotIn('DHCPREQUEST(veth-peer)', output)
self.assertNotIn('DHCPREPLY(veth-peer)', output)
+ # Check json format
+ output = check_output(*networkctl_cmd, '--json=short', 'status', 'veth99', env=env)
+ check_json(output)
+
# solicit mode
stop_dnsmasq()
start_dnsmasq('--dhcp-option=108,00:00:02:00',
self.assertIn('DHCPREPLY(veth-peer)', output)
self.assertIn('sent size: 0 option: 14 rapid-commit', output)
+ # Check json format
+ output = check_output(*networkctl_cmd, '--json=short', 'status', 'veth99', env=env)
+ check_json(output)
+
+ # Testing without rapid commit support
with open(os.path.join(network_unit_dir, '25-dhcp-client-ipv6-only.network'), mode='a', encoding='utf-8') as f:
f.write('\n[DHCPv6]\nRapidCommit=no\n')
self.assertIn('DHCPREPLY(veth-peer)', output)
self.assertNotIn('rapid-commit', output)
+ # Check json format
+ output = check_output(*networkctl_cmd, '--json=short', 'status', 'veth99', env=env)
+ check_json(output)
+
def test_dhcp_client_ipv6_dbus_status(self):
copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-ipv6-only.network')
start_networkd()