use of org.opendaylight.netconf.sal.rest.impl.NormalizedNodeJsonBodyWriter 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.rest.impl.NormalizedNodeJsonBodyWriter in project netconf by opendaylight.
the class CodecsExceptionsCatchingTest 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());
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig = resourceConfig.registerInstances(restConf, new NormalizedNodeJsonBodyWriter(), new NormalizedNodeXmlBodyWriter(), new XmlNormalizedNodeBodyReader(controllerContext), new JsonNormalizedNodeBodyReader(controllerContext));
return resourceConfig;
}
use of org.opendaylight.netconf.sal.rest.impl.NormalizedNodeJsonBodyWriter 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.rest.impl.NormalizedNodeJsonBodyWriter 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.rest.impl.NormalizedNodeJsonBodyWriter in project netconf by opendaylight.
the class MediaTypesTest 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());'
restconfService = mock(RestconfService.class);
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig = resourceConfig.registerInstances(restconfService, new NormalizedNodeJsonBodyWriter(), new NormalizedNodeXmlBodyWriter());
return resourceConfig;
}
Aggregations