2 * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.md.sal.dom.store.benchmark;
10 import org.opendaylight.yangtools.yang.common.QName;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
12 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
13 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
16 * Benchmark Model class loads the odl-datastore-test.yang model from resources.
18 * This class serves as facilitator class which holds several references to initialized yang model as static final
21 * @author Lukas Sedlak
23 public final class BenchmarkModel {
25 public static final QName TEST_QNAME = QName
26 .create("urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test", "2014-03-13","test");
27 public static final QName OUTER_LIST_QNAME = QName.create(TEST_QNAME, "outer-list");
28 public static final QName INNER_LIST_QNAME = QName.create(TEST_QNAME, "inner-list");
29 public static final QName ID_QNAME = QName.create(TEST_QNAME, "id");
30 public static final QName NAME_QNAME = QName.create(TEST_QNAME, "name");
31 private static final String DATASTORE_TEST_YANG = "/odl-datastore-test.yang";
32 public static final YangInstanceIdentifier TEST_PATH = YangInstanceIdentifier.of(TEST_QNAME);
33 public static final YangInstanceIdentifier OUTER_LIST_PATH =
34 YangInstanceIdentifier.builder(TEST_PATH).node(OUTER_LIST_QNAME).build();
36 private BenchmarkModel() {
39 public static EffectiveModelContext createTestContext() {
40 return YangParserTestUtils.parseYangResources(BenchmarkModel.class, DATASTORE_TEST_YANG);