Fetching leaf-lists inside nested-list

Hi, I am having the below yang,

 container bgp-neighbor-data {
    tailf:callpoint show-oper-cli;
    config false;

    leaf source-ppeid {
      type string;
    }

    list neighbors {
      key "neighbor";
      leaf neighbor {
        type string;
      }
      leaf local-as {
        type uint32;
      }
      list address-family {
        key "address-family-name";
        leaf source-ppeid {
          type string;
        }
        leaf address-family-name {
          type string;
        }
        list inbound-route-map {
          key "name";
          leaf name {
            type string;
          }
          leaf-list rules {
            type string;
          }
        }
      }
    }
  }

when I am trying to send data for “rules” which is a leaf-list. I am getting error saying that Not a leaf-list value. whenever I am processing a nested-list I am returning C_NOEXISTS for list so that I get a get_next_object callback for nested-list, but in this call while processing a nested-list, I got a leaf-list, how to process that, should I still send a C_NOEXISTS. when will get_elem() be called for leaf-list. can someone explain me the flow. I am using python for implementation.

Since you are using low-level Python that maps to the C-API, see the confd_lib_dp(3) man page under confd_data_reply_value_array:

Values for leaf-lists may be passed as a single array element with type C_LIST (as
described in the specification)
...
alternatively treat the leaf-list as a list, and pass an element with type C_NOEXISTS in the array, in
which case ConfD will issue separate callback invocations to retrieve the data for the leaf-list. In case the
leaf-list does not exist, these extra invocations can be avoided by passing a C_LIST with size 0 in the array.

So you have two options:
a. provide all leaf-list elements from the get_next_object callback with type C_LIST
b. provide C_NOEXISTS so that ConfD will ask for the leaf-list elements with a separate find_next/get_next callback for each element.

Thanks, by using C_LIST I was able to fetch the data.