4dc0ef6f45
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>
30 lines
768 B
Python
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')
|