backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / lib / of_config / classes.py
1 # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
2 # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 # implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 # convenient classes to manipulate OF-Config XML
18 # in a little more pythonic way.
19 # currently assuming OF-Config 1.1.1.
20
21 from ryu.lib import stringify
22
23
24 from .base import _Base, _ct, _e, _ns_netconf
25 from .generated_classes import *
26
27
28 # probably should not be here but for convenience
29 class NETCONF_Config(_Base):
30     _ELEMENTS = [
31         _ct('capable-switch', OFCapableSwitchType, is_list=False),
32     ]
33
34     def to_xml(self):
35         return super(NETCONF_Config, self).to_xml('{%s}config' % _ns_netconf)