'Validate the provided network id or return a default.
:param module: the module to validate
:param datacenter: the datacenter to search for a network id
:return: a valid network id'

@staticmethod
def _find_network_id(module, datacenter):

    network_id = module.params.get('network_id')
    if (not network_id):
        try:
            network_id = datacenter.Networks().networks[0].id
        except CLCException:
            module.fail_json(msg=str(('Unable    to    find    a    network    in    location:    ' + datacenter.id)))
    return network_id
