- self._omf_api = OMFAPIFactory.get_api(self.get('xmppSlice'),
- self.get('xmppHost'), self.get('xmppPort'), self.get('xmppPassword'))
- super(OMFApplication, self).deploy()
+ if not self.node or self.node.state < ResourceState.READY:
+ self.debug("---- RESCHEDULING DEPLOY ---- node state %s "
+ % self.node.state )
+ self.ec.schedule(self.reschedule_delay, self.deploy)
+ return
+
+ ## For performance test
+ if self.dperf:
+ self.begin_deploy_time = tnow()
+ self.dperf = False
+
+ self._init_command()
+
+ self.set('xmppUser',self.node.get('xmppUser'))
+ self.set('xmppServer',self.node.get('xmppServer'))
+ self.set('xmppPort',self.node.get('xmppPort'))
+ self.set('xmppPassword',self.node.get('xmppPassword'))
+ self.set('version',self.node.get('version'))
+
+ if not self.get('xmppServer'):
+ msg = "XmppServer is not initialzed. XMPP Connections impossible"
+ self.error(msg)
+ raise RuntimeError, msg
+
+ if not (self.get('xmppUser') or self.get('xmppPort')
+ or self.get('xmppPassword')):
+ msg = "Credentials are not all initialzed. Default values will be used"
+ self.warn(msg)
+
+ if not self.get('command') :
+ msg = "Application's Command is not initialized"
+ self.error(msg)
+ raise RuntimeError, msg
+
+ if not self._omf_api :
+ self._omf_api = OMFAPIFactory.get_api(self.get('version'),
+ self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'),
+ self.get('xmppPassword'), exp_id = self.exp_id)
+
+ if self.get('version') == "5":
+
+ self.begin_deploy_time = tnow()