+ def configure_on_omf6(self):
+ if not self.create_id :
+ props = {}
+ props['wlan:if_name'] = self.get('name')
+ props['wlan:mode'] = {
+ "mode": self.get('mode'),
+ "hw_mode" : self.get('hw_mode'),
+ "channel" : self.channel.get('channel'),
+ "essid" : self.get('essid'),
+ "ip_addr" : self.get('ip'),
+ "frequency" : self.channel.frequency,
+ "phy" : "%0%"
+ }
+ props['wlan:hrn'] = self.get('name')
+ props['wlan:type'] = "wlan"
+
+ self.create_id = os.urandom(16).encode('hex')
+ self._omf_api.frcp_create( self.create_id, self.node.get('hostname'), "wlan", props = props)
+
+ self.check_deploy(self.create_id)
+ self._omf_api.enroll_topic(self._topic_iface)
+
+ def check_deploy(self, cid):
+ delay = 1.0
+ for i in xrange(10):
+ uid = self._omf_api.check_mailbox("create", cid)
+ if uid:
+ self._topic_iface = uid
+ break
+ else:
+ time.sleep(delay)
+ delay = delay * 1.5
+ else:
+ msg = "Couldn't retrieve the confirmation of the creation"
+ self.error(msg)
+ raise RuntimeError, msg
+
+ def check_release(self, cid):
+ res = self._omf_api.check_mailbox("release", cid)
+ if res :
+ return res
+ return False
+