designer.py (nova-22.0.0) | : | designer.py (nova-22.0.1) | ||
---|---|---|---|---|
skipping to change at line 127 | skipping to change at line 127 | |||
"""Populate a LibvirtConfigGuestInterface instance | """Populate a LibvirtConfigGuestInterface instance | |||
with direct Interface. | with direct Interface. | |||
""" | """ | |||
conf.net_type = "direct" | conf.net_type = "direct" | |||
conf.source_mode = mode | conf.source_mode = mode | |||
conf.source_dev = devname | conf.source_dev = devname | |||
conf.model = "virtio" | conf.model = "virtio" | |||
def set_vif_host_backend_vhostuser_config(conf, mode, path, rx_queue_size, | def set_vif_host_backend_vhostuser_config(conf, mode, path, rx_queue_size, | |||
tx_queue_size): | tx_queue_size, tapname=None): | |||
"""Populate a LibvirtConfigGuestInterface instance | """Populate a LibvirtConfigGuestInterface instance | |||
with host backend details for vhostuser socket. | with host backend details for vhostuser socket. | |||
NOTE: @rx_queue_size and @tx_queue_size can be None | NOTE: @rx_queue_size and @tx_queue_size can be None | |||
""" | """ | |||
conf.net_type = "vhostuser" | conf.net_type = "vhostuser" | |||
conf.vhostuser_type = "unix" | conf.vhostuser_type = "unix" | |||
conf.vhostuser_mode = mode | conf.vhostuser_mode = mode | |||
conf.vhostuser_path = path | conf.vhostuser_path = path | |||
if rx_queue_size: | if rx_queue_size: | |||
conf.vhost_rx_queue_size = rx_queue_size | conf.vhost_rx_queue_size = rx_queue_size | |||
if tx_queue_size: | if tx_queue_size: | |||
conf.vhost_tx_queue_size = tx_queue_size | conf.vhost_tx_queue_size = tx_queue_size | |||
if tapname: | ||||
conf.target_dev = tapname | ||||
def set_vif_mtu_config(conf, mtu): | def set_vif_mtu_config(conf, mtu): | |||
"""Populate a LibvirtConfigGuestInterface instance | """Populate a LibvirtConfigGuestInterface instance | |||
with network mtu. | with network mtu. | |||
""" | """ | |||
conf.mtu = mtu | conf.mtu = mtu | |||
def set_vif_bandwidth_config(conf, inst_type): | def set_vif_bandwidth_config(conf, inst_type): | |||
"""Config vif inbound/outbound bandwidth limit. parameters are | """Config vif inbound/outbound bandwidth limit. parameters are | |||
set in instance_type_extra_specs table, key is in the format | set in instance_type_extra_specs table, key is in the format | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added |