selftest: Add helper function to get interfaces config
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 12 Mar 2019 01:00:55 +0000 (14:00 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Mar 2019 02:12:18 +0000 (02:12 +0000)
commite9c01fdbb8eb1a185f4c45a5928e9d13d46e3aed
treeb96cd274555c03ea84b4133a516a49044cf1dd5a
parenta3da2f63be4bff6ca77b7e1e4d45f42dcf177eef
selftest: Add helper function to get interfaces config

Add a helper function to return the IPv4/IPv6 addresses for the
smb.conf. This keeps the netmask assumptions in the same places as
the IP subnet assumptions.

This refactor means we no longer need to store $ctx->{interfaces}, as it
was only used in one place.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/target/Samba.pm
selftest/target/Samba3.pm
selftest/target/Samba4.pm