Search in sources :

Example 1 with DOMMountPointServiceImpl

use of org.opendaylight.mdsal.dom.broker.DOMMountPointServiceImpl in project netconf by opendaylight.

the class ParserIdentifierTest method setup.

@Before
public void setup() throws Exception {
    this.mountPointService = new DOMMountPointServiceImpl();
    // create and register mount point
    final YangInstanceIdentifier mountPointId = YangInstanceIdentifier.builder().node(QName.create("mount:point", "2016-06-02", "mount-container")).node(QName.create("mount:point", "2016-06-02", "point-number")).build();
    mountPoint = mountPointService.createMountPoint(mountPointId).addService(DOMSchemaService.class, FixedDOMSchemaService.of(SCHEMA_CONTEXT_ON_MOUNT_POINT)).register().getInstance();
    // register mount point with null schema context
    when(this.mockMountPointService.getMountPoint(YangInstanceIdentifier.empty())).thenReturn(Optional.of(this.mockMountPoint));
}
Also used : DOMMountPointServiceImpl(org.opendaylight.mdsal.dom.broker.DOMMountPointServiceImpl) YangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier) FixedDOMSchemaService(org.opendaylight.mdsal.dom.spi.FixedDOMSchemaService) DOMSchemaService(org.opendaylight.mdsal.dom.api.DOMSchemaService) Before(org.junit.Before)

Example 2 with DOMMountPointServiceImpl

use of org.opendaylight.mdsal.dom.broker.DOMMountPointServiceImpl in project netconf by opendaylight.

the class RestconfSchemaServiceTest method setup.

@Before
public void setup() throws Exception {
    this.mountPointService = new DOMMountPointServiceImpl();
    // create and register mount points
    mountPointService.createMountPoint(YangInstanceIdentifier.of(QName.create("mount:point:1", "2016-01-01", "cont"))).addService(DOMSchemaService.class, FixedDOMSchemaService.of(SCHEMA_CONTEXT_BEHIND_MOUNT_POINT)).register();
    mountPointService.createMountPoint(YangInstanceIdentifier.of(QName.create("mount:point:2", "2016-01-01", "cont"))).register();
    this.schemaService = new RestconfSchemaServiceImpl(this.mockContextHandler, mountPointService, sourceProvider);
}
Also used : DOMMountPointServiceImpl(org.opendaylight.mdsal.dom.broker.DOMMountPointServiceImpl) FixedDOMSchemaService(org.opendaylight.mdsal.dom.spi.FixedDOMSchemaService) DOMSchemaService(org.opendaylight.mdsal.dom.api.DOMSchemaService) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 DOMSchemaService (org.opendaylight.mdsal.dom.api.DOMSchemaService)2 DOMMountPointServiceImpl (org.opendaylight.mdsal.dom.broker.DOMMountPointServiceImpl)2 FixedDOMSchemaService (org.opendaylight.mdsal.dom.spi.FixedDOMSchemaService)2 YangInstanceIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier)1