b72455c851
Change-Id: I6fba7f7c237497950d4f2c4e3a664fbb82e25fe7 Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468676 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
34 lines
872 B
Python
34 lines
872 B
Python
from .helpers import deprecated_alias
|
|
|
|
|
|
@deprecated_alias('add_ip_address')
|
|
def net_interface_add_ip_address(client, ifc_index, ip_addr):
|
|
"""Add IP address.
|
|
|
|
Args:
|
|
ifc_index: ifc index of the nic device (int)
|
|
ip_addr: ip address will be added
|
|
"""
|
|
params = {'ifc_index': ifc_index, 'ip_address': ip_addr}
|
|
return client.call('net_interface_add_ip_address', params)
|
|
|
|
|
|
def delete_ip_address(client, ifc_index, ip_addr):
|
|
"""Delete IP address.
|
|
|
|
Args:
|
|
ifc_index: ifc index of the nic device (int)
|
|
ip_addr: ip address will be deleted
|
|
"""
|
|
params = {'ifc_index': ifc_index, 'ip_address': ip_addr}
|
|
return client.call('delete_ip_address', params)
|
|
|
|
|
|
def get_interfaces(client):
|
|
"""Display current interface list
|
|
|
|
Returns:
|
|
List of current interface
|
|
"""
|
|
return client.call('get_interfaces')
|