c++ CHANGE set_item_example fix
@@ -37,14 +37,14 @@ main(int argc, char **argv)
sysrepo::S_Session sess(new sysrepo::Session(conn));
/* create new interface named 'gigaeth0' of type 'ethernetCsmacd' */
- const char *xpath = "/ietf-interfaces:interfaces/interface[name='gigaeth0']/type";
- const char *ethernet = "ethernetCsmacd";
+ const char *xpath = "/ietf-interfaces:interfaces/interface[name='eth0']/type";
+ const char *ethernet = "iana-if-type:ethernetCsmacd";
sysrepo::S_Val value(new sysrepo::Val((char *)ethernet, SR_IDENTITYREF_T));
sess->set_item(xpath, value);
/* set 'prefix-length' leaf inside of the 'address' list entry with key 'fe80::ab8'
(list entry will be automatically created if it does not exist) */
- const char *xpath_num = "/ietf-interfaces:interfaces/interface[name='gigaeth0']/ietf-ip:ipv6/address[ip='fe80::ab8']/prefix-length";
+ const char *xpath_num = "/ietf-interfaces:interfaces/interface[name='eth0']/ietf-ip:ipv6/address[ip='fe80::ab8']/prefix-length";
uint8_t num = 64;
sysrepo::S_Val value_num(new sysrepo::Val(num));
sess->set_item(xpath_num, value_num);
