[CONTROLLER-109] Read of stored data with augmentation, from operational datastore does not return augmentations Created: 03/Jan/14 Updated: 25/Jul/23 Resolved: 14/Jan/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Deepthi V V | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Windows |
||
| External issue ID: | 267 |
| Description |
|
If we insert a NodeConnector object with FlowCapableNode augmentation into operational datastore and read the same data using the same instance identifier, data retrieved does not contain augmentation. Steps to reproduce the issue: 3. After the commit is successful, read the data from the operational datastore using instance identifier: InstanceIdentifier.builder(Nodes.class).child(Node.class, nodeKey).child(NodeConnector.class, nodeConnectorKey).augmentation(FlowCapableNodeConnector.class).toInstance(); The data read will be null. If same instance identifier specified in step 2 is used, we will receive all data except for the augmentation. 4. If we read the data through restconf, the data persisted is received correctly: I used the following code: String nodeIdValue = "openflow:" + dpId; String nodeConnectorIdValue = nodeIdValue + ":" + portno; NodeConnectorBuilder data = new NodeConnectorBuilder(); InstanceIdentifier<NodeConnector> ncIdentifierWriter = catch (InterruptedException e) { LOG.error(e.getMessage(), e); }catch (ExecutionException e) { LOG.error(e.getMessage(), e); } InstanceIdentifier<FlowCapableNodeConnector> ncIdentifierReader = } private static FlowCapableNodeConnector loadPortData() { final FlowCapableNodeConnectorBuilder flowCapableNodeConnectorBuilder = new FlowCapableNodeConnectorBuilder(); PortFeatures _advertisedFeatures = PortFeatures.getDefaultInstance("_100mbFd"); flowCapableNodeConnectorBuilder.setAdvertisedFeatures(_advertisedFeatures); PortConfig _configuration = PortConfig.getDefaultInstance("nOPACKETIN"); flowCapableNodeConnectorBuilder.setConfiguration(_configuration); PortFeatures _currentFeature = PortFeatures.getDefaultInstance("_100mbFd"); flowCapableNodeConnectorBuilder.setCurrentFeature(_currentFeature); Long _currentSpeed = 1L; flowCapableNodeConnectorBuilder.setCurrentSpeed(_currentSpeed); MacAddress _hardwareAddress = new MacAddress("11:12:13:14:15:16"); flowCapableNodeConnectorBuilder.setHardwareAddress(_hardwareAddress); Long _maximumSpeed = 1L; flowCapableNodeConnectorBuilder.setMaximumSpeed(_maximumSpeed); String _name = "test"; flowCapableNodeConnectorBuilder.setName(_name); PortFeatures _peerFeatures = PortFeatures.getDefaultInstance("_100mbFd"); flowCapableNodeConnectorBuilder.setPeerFeatures(_peerFeatures); Long _portNumber = 1L; flowCapableNodeConnectorBuilder.setPortNumber(_portNumber); PortState _state = PortState.forValue(0); flowCapableNodeConnectorBuilder.setState(_state); PortFeatures _supported = PortFeatures.getDefaultInstance("_100mbFd"); flowCapableNodeConnectorBuilder.setSupported(_supported); return flowCapableNodeConnectorBuilder.build(); }Some observations: |