OpenIxia / IxNetwork

A central location for IxNetwork sample scripts and utilities. Please also visit http://openixia.com
MIT License
50 stars 59 forks source link

How do I select the port assignment between Copper and SFP+? #73

Closed jimset closed 5 years ago

jimset commented 5 years ago

After getting available test port (test_port) in the card, I used the following code to assign the virtual port to the test_port: vport.add(Name='Port 1', ConnectedTo=test_port)

I think the code will assume that I want to assign it to "Copper" type of test_port. I have both Copper and SFP+ ports on my card. How do I connect virtual port to the SFP+ port instead?

ajbalogh commented 5 years ago

the media type of the vport is under the L1Config of the Vport. more information about the media can be found here

vport.add(Name='Port 1', ConnectedTo=test_port).L1Config.Ethernet.Media = 'fiber'