'Creates a network interface.
:param lan_id: The ID for the LAN.
:type lan_id: : ``int``
:param ips: The IP addresses for the NIC.
:type ips: ``list``
:param nic_name: The name of the NIC, e.g. PUBLIC.
:type nic_name: ``str``
:param dhcp_active: Set to false to disable.
:type dhcp_active: ``bool``
:return:    Instance of class ``ProfitBricksNetworkInterface``
:rtype:     :class:`ProfitBricksNetworkInterface`'

def ex_create_network_interface(self, node, lan_id=None, ips=None, nic_name=None, dhcp_active=True):

    if (lan_id is not None):
        lan_id = str(lan_id)
    else:
        lan_id = str(1)
    action = (node.extra['href'] + '/nics')
    body = {'properties': {'lan': lan_id, 'dhcp': dhcp_active}}
    if (ips is not None):
        body['properties']['ips'] = ips
    if (nic_name is not None):
        body['properties']['name'] = nic_name
    response = self.connection.request(action=action, headers={'Content-Type': 'application/json'}, data=body, method='POST', with_full_url=True)
    return self._to_interface(response.object, response.headers)
