Get_object/get_next_object issue when the list contains a augment containner

I have extended your yang model described in How to implement get_object for a container inside of a list
to use another augment model to describe my new question.
Please see below.

module arpe {
  namespace "http://tail-f.com/ns/example/arpe";
  prefix arpe;
  import ietf-inet-types {
  prefix inet;
  }
  import tailf-common {
  prefix tailf;
  }

container arpentries {
config false;
tailf:callpoint arpe;
list arpe {
  key "ip ifname";
  max-elements 1024;
  leaf ip {
    type inet:ip-address;
  }
  leaf ifname {
    type string;
  }
  container stat {
    leaf hwaddr {
      type string;
      mandatory true;
    }
    leaf permanent {
      type boolean;
      mandatory true;
    }
    leaf published {
      type boolean;
      mandatory true;
    }
  }
}
}
}

module augment_arpe_test {
namespace "http://tail-f.com/ns/example/augment_arpe_test";
prefix "augment_arpe_test";
augment "/arpe:arpentries/arpe:arpe"
container arpe_stats_test {
    description "";
    leaf arp_up_time {
        type uint32;
        config false;
        description "xxxx";
    }
    leaf arp_down_time {
        type uint32;
        config false;
        description "xxxx";
    }
}
}

Hi, I have extended your yang model described in How to implement get_object for a container inside of a list
to use another augment model to describe my new question.
In the arp list, there is an augment container called augment_arpe_test.
In this case, I implemented the get_object like this:

static int get_object(struct confd_trans_ctx *tctx,
confd_hkeypath_t *keypath)
{
confd_value_t v[10];

struct aentry *ae = find_ae(keypath, tctx->t_opaque, 0);
if (ae == NULL) {
    confd_data_reply_not_found(tctx);
    return CONFD_OK;
}

CONFD_SET_IPV4(&v[0], ae->ip4);
CONFD_SET_STR(&v[1], ae->iface);

CONFD_SET_XMLTAG(&v[2], arpe_stat, arpe__ns);

if (ae->hwaddr == NULL) {
    CONFD_SET_NOEXISTS(&v[3]);
} else {
    CONFD_SET_STR(&v[3], ae->hwaddr);
}
CONFD_SET_BOOL(&v[4], ae->perm);
CONFD_SET_BOOL(&v[5], ae->pub);

CONFD_SET_XMLTAG(&v[6], arpe_stats_test, augment_arpe_test__ns);
CONFD_SET_UINT32(&v[7], 20);
CONFD_SET_UINT32(&v[8], 20);
confd_data_reply_value_array(tctx, v, 9);

return CONFD_OK;

}

And I have made similar change for get_next_object.
But when triggering [show arpentries arpe], following “Bad tag value” for arpe_stats_test is reported.
Is it because arpe_stats_test is an augment?
I tried to not use augment but to add the container arpe_stats_test directly to the arpe list, the issue is gone.
It is a known issue that when using augment inside a list?

R1# show arpentries arpe ?
TRACE New user session: 11 for user:root ctx:cli --> CONFD_OK
TRACE CALL trans init(thandle=6,mode=“r”,db=running)
–> CONFD_OK
TRACE CALL data get_next_object(thandle=6, /arpentries/arpe, -1)
–> CONFD_OK
?
Possible completions:
displaylevel Depth to show
| Output modifiers

2-Sep-2016::00:08:39.651
R1 confd[4189]: devel-c bad get_next_object() return value: /arpe:arpentries/arpe{192.168.0.1 eth0}/arpe_stats_test: Bad tag value 260382441

Your augment statement is missing the curly brackets “{...}” around what you want to augment.
Did you compile your “augment_arpe_test” module?
If so, confdc would have caught that error.

The format is not so good
it is here before “hi”
}

Hi, I have extended your yang mode.

And now I have reformat it.

Tried the augment variant you are working on, and yes, the confd_value_array_t type in a confd_data_reply_value_array() reply from get_object() and get/find_next_object() callbacks do not work with augments.

Instead you can use the confd_tag_value_array_t type in a confd_data_reply_tag_value_array() reply from the get_object() and find_next_object() callbacks.

Example:

#define N_TVS 9
static int get_object(struct confd_trans_ctx *tctx,
                      confd_hkeypath_t *keypath)
{
    confd_tag_value_t tv[N_TVS];

    struct aentry *ae = find_ae(keypath, tctx->t_opaque, 0);
    if (ae == NULL) {
        confd_data_reply_not_found(tctx);
        return CONFD_OK;
    }

    CONFD_SET_TAG_IPV4(&tv[0], arpe_ip, ae->ip4);
    CONFD_SET_TAG_STR(&tv[1], arpe_ifname, ae->iface);
    CONFD_SET_TAG_STR(&tv[2], arpe_hwaddr, ae->hwaddr);
    CONFD_SET_TAG_BOOL(&tv[3], arpe_permanent, ae->perm);
    CONFD_SET_TAG_BOOL(&tv[4], arpe_published, ae->pub);
    CONFD_SET_TAG_XMLBEGIN(&tv[5], augment_arpe_test_arpe_stats_test, augment_arpe_test__ns);
    CONFD_SET_TAG_UINT32(&tv[6], augment_arpe_test_arp_up_time, 42);
    CONFD_SET_TAG_UINT32(&tv[7], augment_arpe_test_arp_down_time, 43);
    CONFD_SET_TAG_XMLEND(&tv[8], augment_arpe_test_arpe_stats_test, augment_arpe_test__ns);

    confd_data_reply_tag_value_array(tctx, tv, N_TVS);

return CONFD_OK;
}