2 * Copyright (c) 2014 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.sal.restconf.impl.test;
10 import static junit.framework.Assert.assertNotNull;
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertTrue;
13 import static org.mockito.Matchers.any;
14 import static org.mockito.Matchers.eq;
15 import static org.mockito.Mockito.mock;
16 import static org.mockito.Mockito.when;
18 import java.io.FileNotFoundException;
19 import java.io.UnsupportedEncodingException;
21 import java.net.URISyntaxException;
22 import java.text.ParseException;
23 import java.text.SimpleDateFormat;
24 import java.util.ArrayList;
25 import java.util.Date;
26 import java.util.List;
27 import java.util.regex.Matcher;
28 import java.util.regex.Pattern;
30 import javax.ws.rs.core.Application;
31 import javax.ws.rs.core.MediaType;
32 import javax.ws.rs.core.Response;
34 import org.glassfish.jersey.server.ResourceConfig;
35 import org.glassfish.jersey.test.JerseyTest;
36 import org.junit.BeforeClass;
37 import org.junit.Test;
38 import org.opendaylight.controller.sal.core.api.mount.MountInstance;
39 import org.opendaylight.controller.sal.core.api.mount.MountService;
40 import org.opendaylight.controller.sal.rest.impl.JsonToCompositeNodeProvider;
41 import org.opendaylight.controller.sal.rest.impl.RestconfDocumentedExceptionMapper;
42 import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider;
43 import org.opendaylight.controller.sal.rest.impl.StructuredDataToXmlProvider;
44 import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
45 import org.opendaylight.controller.sal.restconf.impl.BrokerFacade;
46 import org.opendaylight.controller.sal.restconf.impl.CompositeNodeWrapper;
47 import org.opendaylight.controller.sal.restconf.impl.ControllerContext;
48 import org.opendaylight.controller.sal.restconf.impl.RestconfImpl;
49 import org.opendaylight.controller.sal.restconf.impl.SimpleNodeWrapper;
50 import org.opendaylight.yangtools.yang.common.QName;
51 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
52 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
53 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
54 import org.opendaylight.yangtools.yang.data.api.Node;
55 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
57 public class RestGetOperationTest extends JerseyTest {
59 private static BrokerFacade brokerFacade;
60 private static RestconfImpl restconfImpl;
61 private static SchemaContext schemaContextYangsIetf;
62 private static SchemaContext schemaContextTestModule;
63 private static CompositeNode answerFromGet;
65 private static SchemaContext schemaContextModules;
66 private static SchemaContext schemaContextBehindMountPoint;
69 public static void init() throws FileNotFoundException {
70 schemaContextYangsIetf = TestUtils.loadSchemaContext("/full-versions/yangs");
71 schemaContextTestModule = TestUtils.loadSchemaContext("/full-versions/test-module");
72 ControllerContext controllerContext = ControllerContext.getInstance();
73 controllerContext.setSchemas(schemaContextYangsIetf);
74 brokerFacade = mock(BrokerFacade.class);
75 restconfImpl = RestconfImpl.getInstance();
76 restconfImpl.setBroker(brokerFacade);
77 restconfImpl.setControllerContext(controllerContext);
78 answerFromGet = prepareCompositeNodeWithIetfInterfacesInterfacesData();
80 schemaContextModules = TestUtils.loadSchemaContext("/modules");
81 schemaContextBehindMountPoint = TestUtils.loadSchemaContext("/modules/modules-behind-mount-point");
85 protected Application configure() {
86 /* enable/disable Jersey logs to console */
87 // enable(TestProperties.LOG_TRAFFIC);
88 // enable(TestProperties.DUMP_ENTITY);
89 // enable(TestProperties.RECORD_LOG_LEVEL);
90 // set(TestProperties.RECORD_LOG_LEVEL, Level.ALL.intValue());
91 ResourceConfig resourceConfig = new ResourceConfig();
92 resourceConfig = resourceConfig.registerInstances(restconfImpl, StructuredDataToXmlProvider.INSTANCE,
93 StructuredDataToJsonProvider.INSTANCE, XmlToCompositeNodeProvider.INSTANCE,
94 JsonToCompositeNodeProvider.INSTANCE);
95 resourceConfig.registerClasses( RestconfDocumentedExceptionMapper.class );
96 return resourceConfig;
100 * Tests of status codes for "/operational/{identifier}".
103 public void getOperationalStatusCodes() throws UnsupportedEncodingException {
104 mockReadOperationalDataMethod();
105 String uri = "/operational/ietf-interfaces:interfaces/interface/eth0";
106 assertEquals(200, get(uri, MediaType.APPLICATION_XML));
108 uri = "/operational/wrong-module:interfaces/interface/eth0";
109 assertEquals(400, get(uri, MediaType.APPLICATION_XML));
113 * Tests of status codes for "/config/{identifier}".
116 public void getConfigStatusCodes() throws UnsupportedEncodingException {
117 mockReadConfigurationDataMethod();
118 String uri = "/config/ietf-interfaces:interfaces/interface/eth0";
119 assertEquals(200, get(uri, MediaType.APPLICATION_XML));
121 uri = "/config/wrong-module:interfaces/interface/eth0";
122 assertEquals(400, get(uri, MediaType.APPLICATION_XML));
126 * MountPoint test. URI represents mount point.
129 public void getDataWithUrlMountPoint() throws UnsupportedEncodingException, URISyntaxException {
131 brokerFacade.readConfigurationDataBehindMountPoint(any(MountInstance.class),
132 any(InstanceIdentifier.class))).thenReturn(prepareCnDataForMountPointTest());
133 MountInstance mountInstance = mock(MountInstance.class);
134 when(mountInstance.getSchemaContext()).thenReturn(schemaContextTestModule);
135 MountService mockMountService = mock(MountService.class);
136 when(mockMountService.getMountPoint(any(InstanceIdentifier.class))).thenReturn(mountInstance);
138 ControllerContext.getInstance().setMountService(mockMountService);
140 String uri = "/config/ietf-interfaces:interfaces/interface/0/yang-ext:mount/test-module:cont/cont1";
141 assertEquals(200, get(uri, MediaType.APPLICATION_XML));
143 uri = "/config/ietf-interfaces:interfaces/yang-ext:mount/test-module:cont/cont1";
144 assertEquals(200, get(uri, MediaType.APPLICATION_XML));
148 * MountPoint test. URI represents mount point.
150 * Slashes in URI behind mount point. lst1 element with key
151 * GigabitEthernet0%2F0%2F0%2F0 (GigabitEthernet0/0/0/0) is requested via
152 * GET HTTP operation. It is tested whether %2F character is replaced with
153 * simple / in InstanceIdentifier parameter in method
154 * {@link BrokerFacade#readConfigurationDataBehindMountPoint(MountInstance, InstanceIdentifier)}
155 * which is called in method {@link RestconfImpl#readConfigurationData}
158 * @throws ParseException
161 public void getDataWithSlashesBehindMountPoint() throws UnsupportedEncodingException, URISyntaxException,
163 InstanceIdentifier awaitedInstanceIdentifier = prepareInstanceIdentifierForList();
165 brokerFacade.readConfigurationDataBehindMountPoint(any(MountInstance.class),
166 eq(awaitedInstanceIdentifier))).thenReturn(prepareCnDataForMountPointTest());
167 MountInstance mountInstance = mock(MountInstance.class);
168 when(mountInstance.getSchemaContext()).thenReturn(schemaContextTestModule);
169 MountService mockMountService = mock(MountService.class);
170 when(mockMountService.getMountPoint(any(InstanceIdentifier.class))).thenReturn(mountInstance);
172 ControllerContext.getInstance().setMountService(mockMountService);
174 String uri = "/config/ietf-interfaces:interfaces/interface/0/yang-ext:mount/test-module:cont/lst1/GigabitEthernet0%2F0%2F0%2F0";
175 assertEquals(200, get(uri, MediaType.APPLICATION_XML));
178 private InstanceIdentifier prepareInstanceIdentifierForList() throws URISyntaxException, ParseException {
179 List<PathArgument> parameters = new ArrayList<>();
181 Date revision = new SimpleDateFormat("yyyy-MM-dd").parse("2014-01-09");
182 URI uri = new URI("test:module");
183 QName qNameCont = QName.create(uri, revision, "cont");
184 QName qNameList = QName.create(uri, revision, "lst1");
185 QName qNameKeyList = QName.create(uri, revision, "lf11");
187 parameters.add(new InstanceIdentifier.NodeIdentifier(qNameCont));
188 parameters.add(new InstanceIdentifier.NodeIdentifierWithPredicates(qNameList, qNameKeyList,
189 "GigabitEthernet0/0/0/0"));
190 return new InstanceIdentifier(parameters);
194 public void getDataMountPointIntoHighestElement() throws UnsupportedEncodingException, URISyntaxException {
196 brokerFacade.readConfigurationDataBehindMountPoint(any(MountInstance.class),
197 any(InstanceIdentifier.class))).thenReturn(prepareCnDataForMountPointTest());
198 MountInstance mountInstance = mock(MountInstance.class);
199 when(mountInstance.getSchemaContext()).thenReturn(schemaContextTestModule);
200 MountService mockMountService = mock(MountService.class);
201 when(mockMountService.getMountPoint(any(InstanceIdentifier.class))).thenReturn(mountInstance);
203 ControllerContext.getInstance().setMountService(mockMountService);
205 String uri = "/config/ietf-interfaces:interfaces/interface/0/yang-ext:mount/";
206 assertEquals(200, get(uri, MediaType.APPLICATION_XML));
211 public void getModulesTest() throws UnsupportedEncodingException, FileNotFoundException {
212 ControllerContext.getInstance().setGlobalSchema(schemaContextModules);
214 String uri = "/modules";
216 Response response = target(uri).request("application/yang.api+json").get();
217 validateModulesResponseJson(response);
219 response = target(uri).request("application/yang.api+xml").get();
220 validateModulesResponseXml(response);
225 public void getStreamsTest() throws UnsupportedEncodingException, FileNotFoundException {
226 ControllerContext.getInstance().setGlobalSchema(schemaContextModules);
228 String uri = "/streams";
230 Response response = target(uri).request("application/yang.api+json").get();
231 String responseBody = response.readEntity(String.class);
232 assertNotNull(responseBody);
233 assertTrue(responseBody.contains("streams"));
235 response = target(uri).request("application/yang.api+xml").get();
236 responseBody = response.readEntity(String.class);
237 assertNotNull(responseBody);
238 assertTrue(responseBody.contains("<streams xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\""));
243 public void getModuleTest() throws FileNotFoundException, UnsupportedEncodingException {
244 ControllerContext.getInstance().setGlobalSchema(schemaContextModules);
246 String uri = "/modules/module/module2/2014-01-02";
248 Response response = target(uri).request("application/yang.api+xml").get();
249 assertEquals(200, response.getStatus());
250 String responseBody = response.readEntity(String.class);
251 assertTrue("Module2 in xml wasn't found", prepareXmlRegex("module2", "2014-01-02", "module:2", responseBody)
253 String[] split = responseBody.split("<module");
254 assertEquals("<module element is returned more then once", 2, split.length);
256 response = target(uri).request("application/yang.api+json").get();
257 assertEquals(200, response.getStatus());
258 responseBody = response.readEntity(String.class);
259 assertTrue("Module2 in json wasn't found", prepareJsonRegex("module2", "2014-01-02", "module:2", responseBody)
261 split = responseBody.split("\"module\"");
262 assertEquals("\"module\" element is returned more then once", 2, split.length);
268 public void getOperationsTest() throws FileNotFoundException, UnsupportedEncodingException {
269 ControllerContext.getInstance().setGlobalSchema(schemaContextModules);
271 String uri = "/operations";
273 Response response = target(uri).request("application/yang.api+xml").get();
274 assertEquals(200, response.getStatus());
275 String responseBody = response.readEntity(String.class);
276 assertTrue("Xml response for /operations dummy-rpc1-module1 is incorrect",
277 validateOperationsResponseXml(responseBody, "dummy-rpc1-module1", "module:1").find());
278 assertTrue("Xml response for /operations dummy-rpc2-module1 is incorrect",
279 validateOperationsResponseXml(responseBody, "dummy-rpc2-module1", "module:1").find());
280 assertTrue("Xml response for /operations dummy-rpc1-module2 is incorrect",
281 validateOperationsResponseXml(responseBody, "dummy-rpc1-module2", "module:2").find());
282 assertTrue("Xml response for /operations dummy-rpc2-module2 is incorrect",
283 validateOperationsResponseXml(responseBody, "dummy-rpc2-module2", "module:2").find());
285 response = target(uri).request("application/yang.api+json").get();
286 assertEquals(200, response.getStatus());
287 responseBody = response.readEntity(String.class);
288 assertTrue("Json response for /operations dummy-rpc1-module1 is incorrect",
289 validateOperationsResponseJson(responseBody, "dummy-rpc1-module1", "module1").find());
290 assertTrue("Json response for /operations dummy-rpc2-module1 is incorrect",
291 validateOperationsResponseJson(responseBody, "dummy-rpc2-module1", "module1").find());
292 assertTrue("Json response for /operations dummy-rpc1-module2 is incorrect",
293 validateOperationsResponseJson(responseBody, "dummy-rpc1-module2", "module2").find());
294 assertTrue("Json response for /operations dummy-rpc2-module2 is incorrect",
295 validateOperationsResponseJson(responseBody, "dummy-rpc2-module2", "module2").find());
299 // /operations/pathToMountPoint/yang-ext:mount
301 public void getOperationsBehindMountPointTest() throws FileNotFoundException, UnsupportedEncodingException {
302 ControllerContext controllerContext = ControllerContext.getInstance();
303 controllerContext.setGlobalSchema(schemaContextModules);
305 MountInstance mountInstance = mock(MountInstance.class);
306 when(mountInstance.getSchemaContext()).thenReturn(schemaContextBehindMountPoint);
307 MountService mockMountService = mock(MountService.class);
308 when(mockMountService.getMountPoint(any(InstanceIdentifier.class))).thenReturn(mountInstance);
310 controllerContext.setMountService(mockMountService);
312 String uri = "/operations/ietf-interfaces:interfaces/interface/0/yang-ext:mount/";
314 Response response = target(uri).request("application/yang.api+xml").get();
315 assertEquals(200, response.getStatus());
316 String responseBody = response.readEntity(String.class);
317 assertTrue("Xml response for /operations/mount_point rpc-behind-module1 is incorrect",
318 validateOperationsResponseXml(responseBody, "rpc-behind-module1", "module:1:behind:mount:point").find());
319 assertTrue("Xml response for /operations/mount_point rpc-behind-module2 is incorrect",
320 validateOperationsResponseXml(responseBody, "rpc-behind-module2", "module:2:behind:mount:point").find());
322 response = target(uri).request("application/yang.api+json").get();
323 assertEquals(200, response.getStatus());
324 responseBody = response.readEntity(String.class);
325 assertTrue("Json response for /operations/mount_point rpc-behind-module1 is incorrect",
326 validateOperationsResponseJson(responseBody, "rpc-behind-module1", "module1-behind-mount-point").find());
327 assertTrue("Json response for /operations/mount_point rpc-behind-module2 is incorrect",
328 validateOperationsResponseJson(responseBody, "rpc-behind-module2", "module2-behind-mount-point").find());
332 private Matcher validateOperationsResponseJson(String searchIn, String rpcName, String moduleName) {
333 StringBuilder regex = new StringBuilder();
336 regex.append(".*\\{");
337 regex.append(".*\"");
339 // operations prefix optional
341 regex.append("ietf-restconf:");
343 // :operations prefix optional
345 regex.append("operations\"");
347 regex.append(".*\\{");
349 regex.append(".*\"" + moduleName);
351 regex.append(rpcName + "\"");
352 regex.append(".*\\[");
353 regex.append(".*null");
354 regex.append(".*\\]");
356 regex.append(".*\\}");
357 regex.append(".*\\}");
361 Pattern ptrn = Pattern.compile(regex.toString(), Pattern.DOTALL);
362 return ptrn.matcher(searchIn);
366 private Matcher validateOperationsResponseXml(String searchIn, String rpcName, String namespace) {
367 StringBuilder regex = new StringBuilder();
371 regex.append(".*<operations");
372 regex.append(".*xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\"");
376 regex.append(".*" + rpcName);
377 regex.append(".*" + namespace);
381 regex.append(".*</operations.*");
386 Pattern ptrn = Pattern.compile(regex.toString(), Pattern.DOTALL);
387 return ptrn.matcher(searchIn);
390 // /restconf/modules/pathToMountPoint/yang-ext:mount
392 public void getModulesBehindMountPoint() throws FileNotFoundException, UnsupportedEncodingException {
393 ControllerContext controllerContext = ControllerContext.getInstance();
394 controllerContext.setGlobalSchema(schemaContextModules);
396 MountInstance mountInstance = mock(MountInstance.class);
397 when(mountInstance.getSchemaContext()).thenReturn(schemaContextBehindMountPoint);
398 MountService mockMountService = mock(MountService.class);
399 when(mockMountService.getMountPoint(any(InstanceIdentifier.class))).thenReturn(mountInstance);
401 controllerContext.setMountService(mockMountService);
403 String uri = "/modules/ietf-interfaces:interfaces/interface/0/yang-ext:mount/";
405 Response response = target(uri).request("application/yang.api+json").get();
406 assertEquals(200, response.getStatus());
407 String responseBody = response.readEntity(String.class);
410 "module1-behind-mount-point in json wasn't found",
411 prepareJsonRegex("module1-behind-mount-point", "2014-02-03", "module:1:behind:mount:point",
412 responseBody).find());
414 "module2-behind-mount-point in json wasn't found",
415 prepareJsonRegex("module2-behind-mount-point", "2014-02-04", "module:2:behind:mount:point",
416 responseBody).find());
418 response = target(uri).request("application/yang.api+xml").get();
419 assertEquals(200, response.getStatus());
420 responseBody = response.readEntity(String.class);
422 "module1-behind-mount-point in json wasn't found",
423 prepareXmlRegex("module1-behind-mount-point", "2014-02-03", "module:1:behind:mount:point", responseBody)
426 "module2-behind-mount-point in json wasn't found",
427 prepareXmlRegex("module2-behind-mount-point", "2014-02-04", "module:2:behind:mount:point", responseBody)
432 // /restconf/modules/module/pathToMountPoint/yang-ext:mount/moduleName/revision
434 public void getModuleBehindMountPoint() throws FileNotFoundException, UnsupportedEncodingException {
435 ControllerContext controllerContext = ControllerContext.getInstance();
436 controllerContext.setGlobalSchema(schemaContextModules);
438 MountInstance mountInstance = mock(MountInstance.class);
439 when(mountInstance.getSchemaContext()).thenReturn(schemaContextBehindMountPoint);
440 MountService mockMountService = mock(MountService.class);
441 when(mockMountService.getMountPoint(any(InstanceIdentifier.class))).thenReturn(mountInstance);
443 controllerContext.setMountService(mockMountService);
445 String uri = "/modules/module/ietf-interfaces:interfaces/interface/0/yang-ext:mount/module1-behind-mount-point/2014-02-03";
447 Response response = target(uri).request("application/yang.api+json").get();
448 assertEquals(200, response.getStatus());
449 String responseBody = response.readEntity(String.class);
452 "module1-behind-mount-point in json wasn't found",
453 prepareJsonRegex("module1-behind-mount-point", "2014-02-03", "module:1:behind:mount:point",
454 responseBody).find());
455 String[] split = responseBody.split("\"module\"");
456 assertEquals("\"module\" element is returned more then once", 2, split.length);
458 response = target(uri).request("application/yang.api+xml").get();
459 assertEquals(200, response.getStatus());
460 responseBody = response.readEntity(String.class);
462 "module1-behind-mount-point in json wasn't found",
463 prepareXmlRegex("module1-behind-mount-point", "2014-02-03", "module:1:behind:mount:point", responseBody)
465 split = responseBody.split("<module");
466 assertEquals("<module element is returned more then once", 2, split.length);
470 private void validateModulesResponseXml(Response response) {
471 assertEquals(200, response.getStatus());
472 String responseBody = response.readEntity(String.class);
474 assertTrue("Module1 in xml wasn't found", prepareXmlRegex("module1", "2014-01-01", "module:1", responseBody)
476 assertTrue("Module2 in xml wasn't found", prepareXmlRegex("module2", "2014-01-02", "module:2", responseBody)
478 assertTrue("Module3 in xml wasn't found", prepareXmlRegex("module3", "2014-01-03", "module:3", responseBody)
482 private void validateModulesResponseJson(Response response) {
483 assertEquals(200, response.getStatus());
484 String responseBody = response.readEntity(String.class);
486 assertTrue("Module1 in json wasn't found", prepareJsonRegex("module1", "2014-01-01", "module:1", responseBody)
488 assertTrue("Module2 in json wasn't found", prepareJsonRegex("module2", "2014-01-02", "module:2", responseBody)
490 assertTrue("Module3 in json wasn't found", prepareJsonRegex("module3", "2014-01-03", "module:3", responseBody)
494 private Matcher prepareJsonRegex(String module, String revision, String namespace, String searchIn) {
495 StringBuilder regex = new StringBuilder();
498 regex.append(".*\\{");
499 regex.append(".*\"name\"");
501 regex.append(".*\"" + module + "\",");
503 regex.append(".*\"revision\"");
505 regex.append(".*\"" + revision + "\",");
507 regex.append(".*\"namespace\"");
509 regex.append(".*\"" + namespace + "\"");
511 regex.append(".*\\}");
515 Pattern ptrn = Pattern.compile(regex.toString(), Pattern.DOTALL);
516 return ptrn.matcher(searchIn);
520 private Matcher prepareXmlRegex(String module, String revision, String namespace, String searchIn) {
521 StringBuilder regex = new StringBuilder();
524 regex.append(".*<module.*");
527 regex.append(".*<name>");
528 regex.append(".*" + module);
529 regex.append(".*<\\/name>");
531 regex.append(".*<revision>");
532 regex.append(".*" + revision);
533 regex.append(".*<\\/revision>");
535 regex.append(".*<namespace>");
536 regex.append(".*" + namespace);
537 regex.append(".*<\\/namespace>");
539 regex.append(".*<\\/module.*>");
544 Pattern ptrn = Pattern.compile(regex.toString(), Pattern.DOTALL);
545 return ptrn.matcher(searchIn);
548 private void prepareMockForModulesTest(ControllerContext mockedControllerContext) throws FileNotFoundException {
549 SchemaContext schemaContext = TestUtils.loadSchemaContext("/modules");
550 mockedControllerContext.setGlobalSchema(schemaContext);
551 // when(mockedControllerContext.getGlobalSchema()).thenReturn(schemaContext);
554 private int get(String uri, String mediaType) {
555 return target(uri).request(mediaType).get().getStatus();
558 private CompositeNode prepareCnDataForMountPointTest() throws URISyntaxException {
559 CompositeNodeWrapper cont1 = new CompositeNodeWrapper(new URI("test:module"), "cont1");
560 SimpleNodeWrapper lf11 = new SimpleNodeWrapper(new URI("test:module"), "lf11", "lf11 value");
561 cont1.addValue(lf11);
562 return cont1.unwrap();
565 private void mockReadOperationalDataMethod() {
566 when(brokerFacade.readOperationalData(any(InstanceIdentifier.class))).thenReturn(answerFromGet);
569 private void mockReadConfigurationDataMethod() {
570 when(brokerFacade.readConfigurationData(any(InstanceIdentifier.class))).thenReturn(answerFromGet);
573 private static CompositeNode prepareCompositeNodeWithIetfInterfacesInterfacesData() {
574 CompositeNode intface;
576 intface = new CompositeNodeWrapper(new URI("interface"), "interface");
577 List<Node<?>> childs = new ArrayList<>();
579 childs.add(new SimpleNodeWrapper(new URI("name"), "name", "eth0"));
580 childs.add(new SimpleNodeWrapper(new URI("type"), "type", "ethernetCsmacd"));
581 childs.add(new SimpleNodeWrapper(new URI("enabled"), "enabled", Boolean.FALSE));
582 childs.add(new SimpleNodeWrapper(new URI("description"), "description", "some interface"));
583 intface.setValue(childs);
585 } catch (URISyntaxException e) {