def NetshStaticIp(interface, ip=u'127.0.0.9', subnet=u'255.255.255.255', gw=u'127.0.0.1'):
 args = ['/c', 'netsh', 'interface', 'ip', 'set', 'address', interface, 'static', ip, subnet, gw, '1']
 res = client_utils_common.Execute('cmd', args, time_limit=(-1), bypass_whitelist=True)
 return res

def NetshStaticIp ( interface , ip = u'127.0.0.9' , subnet = u'255.255.255.255' , gw = u'127.0.0.1' ) : args = [ '/c' , 'netsh' , 'interface' , 'ip' , 'set' , 'address' , interface , 'static' , ip , subnet , gw , '1' ] res = client_utils_common . Execute ( 'cmd' , args , time_limit = ( - 1 ) , bypass_whitelist = True ) return res
changes interface to a staticly set ip .