use of org.opendaylight.netconf.sal.restconf.impl.BrokerFacade in project netconf by opendaylight.
the class RestGetOperationTest method configure.
@Override
protected Application configure() {
/* enable/disable Jersey logs to console */
// enable(TestProperties.LOG_TRAFFIC);
// enable(TestProperties.DUMP_ENTITY);
// enable(TestProperties.RECORD_LOG_LEVEL);
// set(TestProperties.RECORD_LOG_LEVEL, Level.ALL.intValue());
mountInstance = mock(DOMMountPoint.class);
controllerContext = TestRestconfUtils.newControllerContext(schemaContextYangsIetf, mountInstance);
brokerFacade = mock(BrokerFacade.class);
restconfImpl = RestconfImpl.newInstance(brokerFacade, controllerContext);
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig = resourceConfig.registerInstances(restconfImpl, new NormalizedNodeJsonBodyWriter(), new NormalizedNodeXmlBodyWriter(), new XmlNormalizedNodeBodyReader(controllerContext), new JsonNormalizedNodeBodyReader(controllerContext), new RestconfDocumentedExceptionMapper(controllerContext));
return resourceConfig;
}
use of org.opendaylight.netconf.sal.restconf.impl.BrokerFacade in project netconf by opendaylight.
the class RestPostOperationTest method configure.
@Override
protected Application configure() {
/* enable/disable Jersey logs to console */
// enable(TestProperties.LOG_TRAFFIC);
// enable(TestProperties.DUMP_ENTITY);
// enable(TestProperties.RECORD_LOG_LEVEL);
// set(TestProperties.RECORD_LOG_LEVEL, Level.ALL.intValue());
mountInstance = mock(DOMMountPoint.class);
controllerContext = TestRestconfUtils.newControllerContext(schemaContext, mountInstance);
brokerFacade = mock(BrokerFacade.class);
restconfImpl = RestconfImpl.newInstance(brokerFacade, controllerContext);
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig = resourceConfig.registerInstances(restconfImpl, new XmlNormalizedNodeBodyReader(controllerContext), new NormalizedNodeXmlBodyWriter(), new JsonNormalizedNodeBodyReader(controllerContext), new NormalizedNodeJsonBodyWriter(), new RestconfDocumentedExceptionMapper(controllerContext));
return resourceConfig;
}
use of org.opendaylight.netconf.sal.restconf.impl.BrokerFacade in project netconf by opendaylight.
the class RestPutOperationTest method configure.
@Override
protected Application configure() {
/* enable/disable Jersey logs to console */
// enable(TestProperties.LOG_TRAFFIC);
// enable(TestProperties.DUMP_ENTITY);
// enable(TestProperties.RECORD_LOG_LEVEL);
// set(TestProperties.RECORD_LOG_LEVEL, Level.ALL.intValue());
mountInstance = mock(DOMMountPoint.class);
final ControllerContext controllerContext = TestRestconfUtils.newControllerContext(schemaContextYangsIetf, mountInstance);
brokerFacade = mock(BrokerFacade.class);
restconfImpl = RestconfImpl.newInstance(brokerFacade, controllerContext);
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig = resourceConfig.registerInstances(restconfImpl, new XmlNormalizedNodeBodyReader(controllerContext), new NormalizedNodeXmlBodyWriter(), new JsonNormalizedNodeBodyReader(controllerContext), new NormalizedNodeJsonBodyWriter(), new RestconfDocumentedExceptionMapper(controllerContext));
return resourceConfig;
}
use of org.opendaylight.netconf.sal.restconf.impl.BrokerFacade in project netconf by opendaylight.
the class RestDeleteOperationTest method configure.
@Override
protected Application configure() {
/* enable/disable Jersey logs to console */
// enable(TestProperties.LOG_TRAFFIC);
// enable(TestProperties.DUMP_ENTITY);
// enable(TestProperties.RECORD_LOG_LEVEL);
// set(TestProperties.RECORD_LOG_LEVEL, Level.ALL.intValue());
controllerContext = TestRestconfUtils.newControllerContext(schemaContext);
controllerContext.setSchemas(schemaContext);
brokerFacade = mock(BrokerFacade.class);
restconfImpl = RestconfImpl.newInstance(brokerFacade, controllerContext);
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig = resourceConfig.registerInstances(restconfImpl, new NormalizedNodeJsonBodyWriter(), new NormalizedNodeXmlBodyWriter(), new XmlNormalizedNodeBodyReader(controllerContext), new JsonNormalizedNodeBodyReader(controllerContext), new RestconfDocumentedExceptionMapper(controllerContext));
return resourceConfig;
}
use of org.opendaylight.netconf.sal.restconf.impl.BrokerFacade in project netconf by opendaylight.
the class RestStreamTest method configure.
@Override
protected Application configure() {
/* enable/disable Jersey logs to console */
// enable(TestProperties.LOG_TRAFFIC);
// enable(TestProperties.DUMP_ENTITY);
// enable(TestProperties.RECORD_LOG_LEVEL);
// set(TestProperties.RECORD_LOG_LEVEL, Level.ALL.intValue());
final ControllerContext controllerContext = TestRestconfUtils.newControllerContext(schemaContextYangsIetf);
brokerFacade = mock(BrokerFacade.class);
restconfImpl = RestconfImpl.newInstance(brokerFacade, controllerContext);
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig = resourceConfig.registerInstances(restconfImpl, new NormalizedNodeJsonBodyWriter(), new NormalizedNodeXmlBodyWriter(), new XmlNormalizedNodeBodyReader(controllerContext), new JsonNormalizedNodeBodyReader(controllerContext), new RestconfDocumentedExceptionMapper(controllerContext));
return resourceConfig;
}
Aggregations