Populate data/ hierarchy
[yangtools.git] / data / yang-data-impl / src / test / resources / org / opendaylight / yangtools / yang / data / impl / config02.groovy
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 def data = {
9  network(xmlns: 'urn:opendaylight:controller:network') {
10     topologies {
11       topology {
12         'topology-id'('topId_01')
13         
14         //types()
15         nodes {
16           node {
17             'node-id'('nodeId_02')
18             'supporting-ne'('networkId_03')
19             'termination-points' {
20               'termination-point' {
21                 'tp-id'('tpId_04')
22               }
23             }
24           }
25           node {
26             'node-id'('nodeId_05')
27             'supporting-ne'('networkId_06')
28             'termination-points' {
29               'termination-point' {
30                 'tp-id'('tpId_07')
31               }
32             }
33           }
34           node {
35             'node-id'('nodeId_08')
36             'supporting-ne'('networkId_09')
37             'termination-points' {
38               'termination-point' {
39                 'tp-id'('tpId_10')
40               }
41               'termination-point' {
42                 'tp-id'('tpId_11')
43               }
44             }
45           }
46         }
47         links {
48           link {
49             'link-id'('linkId_12')
50             source {
51               'source-node'('nodeId_13')
52               'source-tp'('tpId_13')
53             }
54             destination {
55               'dest-node'('nodeId_14')
56               'dest-tp'('tpId_14')
57             }
58           }
59           link {
60             'link-id'('linkId_15')
61             source {
62               'source-node'('nodeId_16')
63               'source-tp'('tpId_16')
64             }
65             destination {
66               'dest-node'('nodeId_17')
67               'dest-tp'('tpId_17')
68             }
69           }
70         }
71       }
72     }
73     'network-elements' {
74       'network-element' {
75         'element-id'('ntElementId_18')
76       }
77       'network-element' {
78         'element-id'('ntElementId_19')
79       }
80     }
81   }
82 }
83
84 System.err.println('data inited')
85
86 import MyXmlGenerator
87
88 xmlGen = new MyXmlGenerator()
89 xmlGen.buildTree(data)