Changes interface to a staticly set IP.

  Sets IP configs to local if no paramaters passed.

  Args:
    interface: Name of the interface.
    ip: IP address.
    subnet: Subnet mask.
    gw: IP address of the default gateway.

  Returns:
    A tuple of stdout, stderr, exit_status.

def NetshStaticIp(interface,
                  ip=u'127.0.0.9',
                  subnet=u'255.255.255.255',
                  gw=u'127.0.0.1'):
  """Changes interface to a staticly set IP.

  Sets IP configs to local if no paramaters passed.

  Args:
    interface: Name of the interface.
    ip: IP address.
    subnet: Subnet mask.
    gw: IP address of the default gateway.

  Returns:
    A tuple of stdout, stderr, exit_status.
  """
  args = [
      '/c', 'netsh', 'interface', 'ip', 'set', 'address', interface, 'static',
      ip, subnet, gw, '1'
  ]
  # pylint: disable=undefined-variable
  res = client_utils_common.Execute(
      'cmd', args, time_limit=-1, bypass_whitelist=True)
  return res