2 # NEPI, a framework to manage network experiments
3 # Copyright (C) 2013 INRIA
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Author: Julien Tribino <julien.tribino@inria.fr>
19 # Lucia Guevgeozian <lucia.guevgeozian_odizzio@inria.fr>
21 from nepi.execution.attribute import Attribute, Flags, Types
22 from nepi.execution.resource import ResourceManager, clsinit_copy, \
23 ResourceState, reschedule_delay
27 class OMF6Resource(ResourceManager):
29 Generic resource gathering XMPP credential information and common methods
30 for OMF nodes, channels, applications, etc.
32 _rtype = "OMFResource"
35 def _register_attributes(cls):
37 xmppHost = Attribute("xmppServer", "Xmpp Server",
38 flags = Flags.Credential)
39 xmppUser = Attribute("xmppUser", "Xmpp User")
40 xmppPort = Attribute("xmppPort", "Xmpp Port",
41 flags = Flags.Credential)
42 xmppPassword = Attribute("xmppPassword", "Xmpp Password",
43 flags = Flags.Credential)
44 version = Attribute("xmppPassword", "Xmpp Password",
45 flags = Flags.Credential)
47 cls._register_attribute(xmppHost)
48 cls._register_attribute(xmppUser)
49 cls._register_attribute(xmppPort)
50 cls._register_attribute(xmppPassword)
51 cls._register_attribute(version)
53 def __init__(self, ec, guid):
54 super(OMF6Resource, self).__init__(ec, guid)