Commit ab21c0b6 authored by Hejing Li's avatar Hejing Li
Browse files

netperf_sysconf.py: add config disk

parent 98edd40c
...@@ -22,6 +22,9 @@ sys = system.System() ...@@ -22,6 +22,9 @@ sys = system.System()
# create a host instance and a NIC instance then install the NIC on the host # create a host instance and a NIC instance then install the NIC on the host
host0 = system.I40ELinuxHost(sys) host0 = system.I40ELinuxHost(sys)
pcie0 = system.PCIeHostInterface(host0) pcie0 = system.PCIeHostInterface(host0)
cfg_disk0 = system.LinuxConfigDiskImage(host0)
host0.add_disk(cfg_disk0)
host0.add_if(pcie0) host0.add_if(pcie0)
nic0 = system.IntelI40eNIC(sys) nic0 = system.IntelI40eNIC(sys)
nic0.add_ipv4('10.0.0.1') nic0.add_ipv4('10.0.0.1')
...@@ -30,6 +33,9 @@ pcichannel0 = system.PCIeChannel(pcie0, nic0._pci_if) ...@@ -30,6 +33,9 @@ pcichannel0 = system.PCIeChannel(pcie0, nic0._pci_if)
# create a host instance and a NIC instance then install the NIC on the host # create a host instance and a NIC instance then install the NIC on the host
host1 = system.I40ELinuxHost(sys) host1 = system.I40ELinuxHost(sys)
pcie1 = system.PCIeHostInterface(host1) pcie1 = system.PCIeHostInterface(host1)
cfg_disk1 = system.LinuxConfigDiskImage(host1)
host1.add_disk(cfg_disk1)
host1.add_if(pcie0) host1.add_if(pcie0)
nic1 = system.IntelI40eNIC(sys) nic1 = system.IntelI40eNIC(sys)
nic1.add_ipv4('10.0.0.2') nic1.add_ipv4('10.0.0.2')
...@@ -48,7 +54,7 @@ ethchannel0 = system.EthChannel(switch.eth_ifs[0], nic0._eth_if) ...@@ -48,7 +54,7 @@ ethchannel0 = system.EthChannel(switch.eth_ifs[0], nic0._eth_if)
ethchannel1 = system.EthChannel(switch.eth_ifs[1], nic1._eth_if) ethchannel1 = system.EthChannel(switch.eth_ifs[1], nic1._eth_if)
# configure the software to run on the host # configure the software to run on the host
host0.add_app(system.NetperfClient(host0, nic1.ip)) host0.add_app(system.NetperfClient(host0, nic1._ip))
host1.add_app(system.NetperfServer(host1)) host1.add_app(system.NetperfServer(host1))
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment