From fbfcb6067ed95fc540a1467b45c383215070c4a5 Mon Sep 17 00:00:00 2001 From: SrikanthMyakam Date: Fri, 31 Jan 2025 17:47:18 +0530 Subject: [PATCH] Update hyperv.py --- lisa/tools/hyperv.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisa/tools/hyperv.py b/lisa/tools/hyperv.py index d27706aad2..b59674585e 100644 --- a/lisa/tools/hyperv.py +++ b/lisa/tools/hyperv.py @@ -491,13 +491,18 @@ def enable_internal_dhcp(self, dhcp_scope_name: str = "DHCPInternalNAT") -> None # Configure the DHCP server to use the internal NAT network powershell.run_cmdlet( - f'Add-DhcpServerV4Scope -Name "{dhcp_scope_name}" -StartRange {self.INTERNAL_NAT_DHCP_IP_START} -EndRange {self.INTERNAL_NAT_DHCP_IP_END} -SubnetMask 255.255.255.0', # noqa: E501 + f'Add-DhcpServerV4Scope -Name "{dhcp_scope_name}" ' + f"-StartRange {self.INTERNAL_NAT_DHCP_IP_START} " + f"-EndRange {self.INTERNAL_NAT_DHCP_IP_END} " + f"-SubnetMask 255.255.255.0", force_run=True, ) # Set the DHCP server options powershell.run_cmdlet( - f"Set-DhcpServerV4OptionValue -Router {self.INTERNAL_NAT_ROUTER} -DnsServer {self.AZURE_DNS_SERVER}", # noqa: E501 + f"Set-DhcpServerV4OptionValue " + f"-Router {self.INTERNAL_NAT_ROUTER} " + f"-DnsServer {self.AZURE_DNS_SERVER}", force_run=True, )