summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
a180ad3)
This flips the switch and uses Magnesium format for all unversioned
users. Also updates tests to reflect new expected stream sizes.
JIRA: CONTROLLER-1919
Change-Id: I0ed5abe495124b525b7a8c877a3cc7b09f3244ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* @return a new {@link NormalizedNodeDataOutput} instance
*/
public static NormalizedNodeDataOutput newDataOutput(final @NonNull DataOutput output) {
* @return a new {@link NormalizedNodeDataOutput} instance
*/
public static NormalizedNodeDataOutput newDataOutput(final @NonNull DataOutput output) {
- return new SodiumSR1DataOutput(output);
+ return new MagnesiumDataOutput(output);
nnout.writeNormalizedNode(toasterContainer);
final byte[] bytes = bos.toByteArray();
nnout.writeNormalizedNode(toasterContainer);
final byte[] bytes = bos.toByteArray();
- assertEquals(1049619, bytes.length);
+ assertEquals(1049618, bytes.length);
NormalizedNodeDataInput nnin = NormalizedNodeInputOutput.newDataInput(ByteStreams.newDataInput(bytes));
NormalizedNodeDataInput nnin = NormalizedNodeInputOutput.newDataInput(ByteStreams.newDataInput(bytes));
writer.writeYangInstanceIdentifier(path);
final byte[] bytes = bos.toByteArray();
writer.writeYangInstanceIdentifier(path);
final byte[] bytes = bos.toByteArray();
- assertEquals(826, bytes.length);
+ assertEquals(825, bytes.length);
NormalizedNodeDataInput reader = NormalizedNodeInputOutput.newDataInput(ByteStreams.newDataInput(bytes));
NormalizedNodeDataInput reader = NormalizedNodeInputOutput.newDataInput(ByteStreams.newDataInput(bytes));
import com.google.common.collect.ImmutableSet;
import java.io.InputStream;
import java.math.BigDecimal;
import com.google.common.collect.ImmutableSet;
import java.io.InputStream;
import java.math.BigDecimal;
-import java.math.BigInteger;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.opendaylight.yangtools.yang.common.QName;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint64;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
.withChild(ImmutableNodes.leafNode(BOOLEAN_LEAF_QNAME, ENABLED))
.withChild(ImmutableNodes.leafNode(SHORT_LEAF_QNAME, SHORT_ID))
.withChild(ImmutableNodes.leafNode(BYTE_LEAF_QNAME, BYTE_ID))
.withChild(ImmutableNodes.leafNode(BOOLEAN_LEAF_QNAME, ENABLED))
.withChild(ImmutableNodes.leafNode(SHORT_LEAF_QNAME, SHORT_ID))
.withChild(ImmutableNodes.leafNode(BYTE_LEAF_QNAME, BYTE_ID))
- .withChild(ImmutableNodes.leafNode(TestModel.BIGINTEGER_LEAF_QNAME, BigInteger.valueOf(100)))
+ .withChild(ImmutableNodes.leafNode(TestModel.BIGINTEGER_LEAF_QNAME, Uint64.valueOf(100)))
.withChild(ImmutableNodes.leafNode(TestModel.BIGDECIMAL_LEAF_QNAME, BigDecimal.valueOf(1.2)))
.withChild(ImmutableNodes.leafNode(SOME_REF_QNAME, instanceID))
.withChild(ImmutableNodes.leafNode(MYIDENTITY_QNAME, DESC_QNAME))
.withChild(ImmutableNodes.leafNode(TestModel.BIGDECIMAL_LEAF_QNAME, BigDecimal.valueOf(1.2)))
.withChild(ImmutableNodes.leafNode(SOME_REF_QNAME, instanceID))
.withChild(ImmutableNodes.leafNode(MYIDENTITY_QNAME, DESC_QNAME))