numam-spdk/scripts/rpc/net.py
Pawel Wodkowski 4dc0ef6f45 scripts: fix executable attribute for includes
rpmbuild pointed out that this is wrong to have executable files without
shebang. Taking the opportunity and fix this for other files too.

Change-Id: Ib21f436672150edc0aff511bff2eb6839870cf79
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/425382
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-18 16:34:45 +00:00

30 lines
768 B
Python

def 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('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')