-
Notifications
You must be signed in to change notification settings - Fork 0
/
virtualizer_info.py
194 lines (152 loc) · 6.39 KB
/
virtualizer_info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# Copyright 2018 5G Exchange (5GEx) Project
# Copyright 2016-2017 Ericsson Hungary Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Filename: virtualizer_info.py Created: 2017-02-04 17:25:55
# The original file was automatically created by a pyang plugin
# (PNC) developed at Ericsson Hungary Ltd., 2015
# Yang file info:
# Namespace: urn:unify:virtualizer_info
# Prefix: virtualizer_info
# Organization: 5GEx
# Description: Monitoring support for the virtualizer
__author__ = "5GEx Consortium, Robert Szabo, Balazs Miriszlai, Akos Recse, Raphael Vicente Rosa"
__copyright__ = "Copyright 2018 5G Exchange (5GEx) Project, Copyright 2016-2017 Ericsson Hungary Ltd."
__credits__ = "Robert Szabo, Raphael Vicente Rosa, David Jocha, Janos Elek, Balazs Miriszlai, Akos Recse"
__license__ = "Apache License, Version 2.0"
__version__ = "2016-10-09"
from baseclasses import *
# YANG construct: grouping object
class GroupingObject(Yang):
def __init__(self, tag, parent=None, object=None):
super(GroupingObject, self).__init__(tag, parent)
self._sorted_children = ["object"]
# yang construct: leaf
self.object = Leafref("object", parent=self, value=object)
""":type: Leafref"""
# YANG construct: grouping infoelement
class GroupingInfoelement(GroupingObject):
def __init__(self, tag, parent=None, object=None, data=None):
GroupingObject.__init__(self, tag, parent, object)
self._sorted_children = ["object", "data"]
# yang construct: leaf
self.data = StringLeaf("data", parent=self, value=data)
""":type: StringLeaf"""
# YANG construct: grouping connection
class GroupingConnection(GroupingObject):
def __init__(self, tag, parent=None, object=None):
GroupingObject.__init__(self, tag, parent, object)
self._sorted_children = ["object", "objects"]
# yang construct: list
self.objects = ListYang("objects", parent=self, type=Object)
""":type: ListYang(Object)"""
def add(self, item):
return self.objects.add(item)
def remove(self, item):
return self.objects.remove(item)
def __getitem__(self, key):
return self.objects[key]
def __iter__(self):
return self.objects.itervalues()
# YANG construct: list objects
class Object(ListedYang, GroupingObject):
def __init__(self, tag="objects", parent=None, object=None):
ListedYang.__init__(self, tag, ["object"])
GroupingObject.__init__(self, tag, parent, object)
self._sorted_children = ["object"]
# YANG construct: list log
class Infoelement(ListedYang, GroupingInfoelement):
def __init__(self, tag="log", parent=None, object=None, data=None):
ListedYang.__init__(self, tag, ["object"])
GroupingInfoelement.__init__(self, tag, parent, object, data)
self._sorted_children = ["object", "data"]
# YANG construct: list connection
class Connection(ListedYang, GroupingConnection):
def __init__(self, tag="connection", parent=None, object=None):
ListedYang.__init__(self, tag, ["object"])
GroupingConnection.__init__(self, tag, parent, object)
self._sorted_children = ["object", "objects"]
# YANG construct: container info
class Info(Yang):
def __init__(self, tag="info", parent=None, logs=None, tops=None, connections=None):
super(Info, self).__init__(tag, parent)
self._sorted_children = ["logs", "tops", "connections"]
# yang construct: container
self.logs = None
""":type: InfoLogs"""
if logs is not None:
self.logs = logs
else:
self.logs = InfoLogs(parent=self, tag="logs")
# yang construct: container
self.tops = None
""":type: InfoTops"""
if tops is not None:
self.tops = tops
else:
self.tops = InfoTops(parent=self, tag="tops")
# yang construct: container
self.connections = None
""":type: InfoConnections"""
if connections is not None:
self.connections = connections
else:
self.connections = InfoConnections(parent=self, tag="connections")
# YANG construct: container logs
class InfoLogs(Yang):
def __init__(self, tag="logs", parent=None):
super(InfoLogs, self).__init__(tag, parent)
self._sorted_children = ["log"]
# yang construct: list
self.log = ListYang("log", parent=self, type=Infoelement)
""":type: ListYang(Infoelement)"""
def add(self, item):
return self.log.add(item)
def remove(self, item):
return self.log.remove(item)
def __getitem__(self, key):
return self.log[key]
def __iter__(self):
return self.log.itervalues()
# YANG construct: container tops
class InfoTops(Yang):
def __init__(self, tag="tops", parent=None):
super(InfoTops, self).__init__(tag, parent)
self._sorted_children = ["top"]
# yang construct: list
self.top = ListYang("top", parent=self, type=Infoelement)
""":type: ListYang(Infoelement)"""
def add(self, item):
return self.top.add(item)
def remove(self, item):
return self.top.remove(item)
def __getitem__(self, key):
return self.top[key]
def __iter__(self):
return self.top.itervalues()
# YANG construct: container connections
class InfoConnections(Yang):
def __init__(self, tag="connections", parent=None):
super(InfoConnections, self).__init__(tag, parent)
self._sorted_children = ["connection"]
# yang construct: list
self.connection = ListYang("connection", parent=self, type=Connection)
""":type: ListYang(Connection)"""
def add(self, item):
return self.connection.add(item)
def remove(self, item):
return self.connection.remove(item)
def __getitem__(self, key):
return self.connection[key]
def __iter__(self):
return self.connection.itervalues()