- sw_if_index = Topology.get_interface_sw_index(vpp_node, interface)
- interface = 'sw_if_index {}'.format(sw_if_index)
- hostname = 'hostname {}'.format(hostname) if hostname else ''
- output = VatExecutor.cmd_from_template(vpp_node,
- "dhcp_client.vat",
- interface=interface,
- hostname=hostname)
- output = output[0]
-
- if output["retval"] != 0:
- raise RuntimeError('Unable to set DHCP client on node {} and'
- ' interface {}.'
- .format(vpp_node, interface))
+ cmd = 'dhcp_proxy_dump'
+ args = dict(is_ip6=1 if ip_version == 'ipv6' else 0)
+ err_msg = 'Failed to get DHCP proxy dump on host {host}'.format(
+ host=node['host'])
+
+ with PapiSocketExecutor(node) as papi_exec:
+ details = papi_exec.add(cmd, **args).get_details(err_msg)
+
+ return details