find node according to endpoint url or node ID. if both are defined then search will focus on ID only
        :param endpoint_url: endpoint's url owned by node to found
        :param nid: node id
        :param selector: selector string like <node fiel> <operation (= { =, !=, >=, >, <, <= , like, =~})>
        <value (= { number, String, regex })>
        :param name: node name to found in container with provided cid or in parent node with provided pnid
        :param cid: container id
        :param pnid: parent node id
        :return: the found node or None if not found

def find_node(endpoint_url=None, nid=None, selector=None, name=None, cid=None, pnid=None):
        """
        find node according to endpoint url or node ID. if both are defined then search will focus on ID only
        :param endpoint_url: endpoint's url owned by node to found
        :param nid: node id
        :param selector: selector string like <node fiel> <operation (= { =, !=, >=, >, <, <= , like, =~})>
        <value (= { number, String, regex })>
        :param name: node name to found in container with provided cid or in parent node with provided pnid
        :param cid: container id
        :param pnid: parent node id
        :return: the found node or None if not found
        """
        LOGGER.debug("NodeService.find_node")
        ret = None
        if (nid is None or not nid) and (endpoint_url is None or not endpoint_url) and \
                (selector is None or not selector) and (name is None or not name):
            raise exceptions.ArianeCallParametersError('id and endpoint_url and selector and name')

        if (nid is not None and nid) and \
                ((endpoint_url is not None and endpoint_url) or (selector is not None and selector) or
                 (name is not None and name and ((cid is not None and cid) or (pnid is not None and pnid)))):
            LOGGER.debug('NodeService.find_node - Both id and other search params are defined. '
                         'Will give you search on id.')
            # traceback.print_stack()
            endpoint_url = None
            selector = None
            name = None
            cid = None
            pnid = None

        if (endpoint_url is not None and endpoint_url) and \
                ((selector is not None and selector) or
                 (name is not None and name and ((cid is not None and cid) or (pnid is not None and pnid)))):
            LOGGER.warning('NodeService.find_node - Both endpoint url other search params are defined. '
                           'Will give you search based on endpoint url')
            # traceback.print_stack()
            selector = None
            name = None
            cid = None
            pnid = None

        if (selector is not None and selector) and \
                (name is not None and name and ((cid is not None and cid) or (pnid is not None and pnid))):
            LOGGER.warning('NodeService.find_node - Both selector other search params are defined. '
                           'Will give you search based on selector')
            # traceback.print_stack()
            name = None
            cid = None
            pnid = None

        if (name is not None and name) and ((cid is not None and cid) and (pnid is not None and pnid)):
            LOGGER.warning('NodeService.find_node - search node by name : '
                           'both container ID and parent node ID are defined. '
                           'Will give you search based on parent node id')
            # traceback.print_stack()
            cid = None

        if (name is not None and name) and ((cid is None or not cid) and (pnid is None or not pnid)):
            raise exceptions.ArianeCallParametersError('cid and pnid')

        params = None
        return_set_of_nodes = False
        if nid is not None and nid:
            params = SessionService.complete_transactional_req({'ID': nid})
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                params['OPERATION'] = 'getNode'
        elif endpoint_url is not None and endpoint_url:
            params = SessionService.complete_transactional_req({'endpointURL': endpoint_url})
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                params['OPERATION'] = 'getNodeByEndpointURL'
        elif selector is not None and selector:
            params = SessionService.complete_transactional_req({'selector': selector})
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                params['OPERATION'] = 'getNodes'
            return_set_of_nodes = True
        elif name is not None and name:
            if cid is not None and cid:
                params = SessionService.complete_transactional_req({'name': name, 'containerID': cid})
                if MappingService.driver_type != DriverFactory.DRIVER_REST:
                    params['OPERATION'] = 'getNodeByName'
            elif pnid is not None and pnid:
                params = SessionService.complete_transactional_req({'name': name, 'parentNodeID': pnid})
                if MappingService.driver_type != DriverFactory.DRIVER_REST:
                    params['OPERATION'] = 'getNodeByName'

        if params is not None:
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                args = {'properties': params}
            else:
                args = {'http_operation': 'GET', 'operation_path': 'get', 'parameters': params}

            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                if cid is not None:
                    response = MappingService.requester.call(args)
                else:
                    response = NodeService.requester.call(args)
            else:
                response = NodeService.requester.call(args)

            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                response = response.get()

            if response.rc == 0:
                if return_set_of_nodes:
                    ret = []
                    for node in response.response_content['nodes']:
                        ret.append(Node.json_2_node(node))
                else:
                    ret = Node.json_2_node(response.response_content)
            elif response.rc != 404:
                err_msg = 'NodeService.find_node - Problem while searching node (id:' + str(nid) + \
                          ', primary admin gate url ' \
                          + str(endpoint_url) + ' ). ' + \
                          'Reason: ' + str(response.response_content) + ' - ' + str(response.error_message) + \
                          " (" + str(response.rc) + ")"
                LOGGER.warning(err_msg)
                if response.rc == 500 and ArianeMappingOverloadError.ERROR_MSG in response.error_message:
                    raise ArianeMappingOverloadError("NodeService.find_node",
                                                     ArianeMappingOverloadError.ERROR_MSG)
                # traceback.print_stack()
        return ret