from nepi.resources.omf.omf_api import OMFAPIFactory
-import nepi
-import logging
import time
@clsinit
self._omf_api = None
- self._logger = logging.getLogger("nepi.omf.omfNode ")
-
# XXX: TO DISCUSS
- self._logger.setLevel(nepi.LOGLEVEL)
def _validate_connection(self, guid):
"""Check if the connection is available.
"""
rm = self.ec.get_resource(guid)
if rm.rtype() in self._authorized_connections:
- self._logger.debug("Connection between %s %s and %s %s accepted" %
- (self.rtype(), self._guid, rm.rtype(), guid))
+ msg = "Connection between %s %s and %s %s accepted" % (self.rtype(), self._guid, rm.rtype(), guid)
+ self.debug(msg)
return True
- self._logger.debug("Connection between %s %s and %s %s refused" %
- (self.rtype(), self._guid, rm.rtype(), guid))
+ msg = "Connection between %s %s and %s %s refused" % (self.rtype(), self._guid, rm.rtype(), guid)
+ self.debug(msg)
return False
- def deploy_action(self):
+ def deploy(self):
"""Deploy the RM
"""
self.get('xmppHost'), self.get('xmppPort'), self.get('xmppPassword'))
self._omf_api.enroll_host(self.get('hostname'))
- super(OMFNode, self).deploy_action()
+ super(OMFNode, self).deploy()
def discover(self):
""" Discover the availables nodes