aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/Dhcp.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2019-11-12 05:27:43 +0100
committerJan Gelety <jgelety@cisco.com>2019-11-28 18:26:21 +0100
commitd68951ac245150eeefa6e0f4156e4c1b5c9e9325 (patch)
tree487554a7547218d27f0a61ec02b70502c32cdcb4 /resources/libraries/python/Dhcp.py
parented0258a440cfad7023d643f717ab78ac568dc59b (diff)
Python3: resources and libraries
Change-Id: I1392c06b1d64f62b141d24c0d42a8e36913b15e2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/Dhcp.py')
-rw-r--r--resources/libraries/python/Dhcp.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/resources/libraries/python/Dhcp.py b/resources/libraries/python/Dhcp.py
index e69ee0bcb8..ec2c895bc3 100644
--- a/resources/libraries/python/Dhcp.py
+++ b/resources/libraries/python/Dhcp.py
@@ -17,7 +17,7 @@
from resources.libraries.python.PapiExecutor import PapiSocketExecutor
-class DhcpProxy(object):
+class DhcpProxy:
"""DHCP Proxy utilities."""
@staticmethod
@@ -31,10 +31,9 @@ class DhcpProxy(object):
:returns: DHCP relay data.
:rtype: list
"""
- 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'])
+ cmd = u"dhcp_proxy_dump"
+ args = dict(is_ip6=1 if ip_version == u"ipv6" else 0)
+ err_msg = f"Failed to get DHCP proxy dump on host {node[u'host']}"
with PapiSocketExecutor(node) as papi_exec:
details = papi_exec.add(cmd, **args).get_details(err_msg)