1. Create PBB sub-interface GigabitEthernet0/8/0.0
"PUT /restconf/config/ietf-interfaces:interfaces/interface/GigabitEthernet0%2F8%2F0/sub-interfaces:sub-interfaces/sub-interface/0 HTTP/1.1" 200 0
{"sub-interface": [{"admin-status": "up", "enabled": "true", "vlan-type": "dot1ah-types:802dot1ah", "pbb":
, "identifier": "0", "oper-status": "up"}]}
2. Delete PBB sub-interface GigabitEthernet0/8/0.0
"DELETE /restconf/config/ietf-interfaces:interfaces/interface/GigabitEthernet0%2F8%2F0/sub-interfaces:sub-interfaces/sub-interface/0 HTTP/1.1" 200 0
3. Create PBB sub-interface GigabitEthernet0/8/0.1
- similar to 1
4. Create PBB sub-interface GigabitEthernet0/8/0.2 - similar to 1
5. Get PBB sub-interface GigabitEthernet0/8/0.1 oper data
The GET operation fails:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /restconf/operational/ietf-interfaces:interfaces-state. Reason:
<pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalStateException: Unexpected size of list: [Mapping{getIndex=3, getName=GigabitEthernet0/8/0.0, augmentations={}}, Mapping{getIndex=3, getName=GigabitEthernet0/8/0.1, augmentations={}}]. Single item expected
.......
It seems that HC re-uses the if-index of the deleted sub-if.