ixnetwork_restpy icon indicating copy to clipboard operation
ixnetwork_restpy copied to clipboard

DHCP Server

Open fonsecazord23 opened this issue 1 year ago • 1 comments

I'm new to ixia. In the visual part of ixia there is a Protocols parameter and underneath DHCP Server and DHCP/PD w/Auth , and by clicking I can change the VLANs . I haven't found any way to change this using this api. Can anyone help me?

fonsecazord23 avatar Jun 12 '24 14:06 fonsecazord23

Hi, For VLAN-ID under DHCP Server, the code snip to set VLAN-ID is: from ixnetwork_restpy import SessionAssistant session_assistant = SessionAssistant(IpAddress='127.0.0.1', LogLevel=SessionAssistant.LOGLEVEL_INFO, ClearConfig=True) ixnetwork = session_assistant.Ixnetwork

vlanidinfo = ixnetwork
.Vport.find()
.ProtocolStack.find()
.Ethernet.find()
.DhcpServerEndpoint.find()
.Range.find()
.VlanRange.find()
.VlanIdInfo.find() print(vlanidinfo.FirstId) vlanidinfo.FirstId = ''

For VLAN-ID under DHCP/PD w/Auth, the code to set VLAN ID is: vlanidinfo = ixnetwork
.Vport.find()
.ProtocolStack.find()
.Ethernet.find()
.DhcpEndpoint.find()
.Range.find()
.VlanRange.find()
.VlanIdInfo.find() print(vlanidinfo.FirstId) vlanidinfo.FirstId = ''

therkong avatar Jun 13 '24 01:06 therkong