+ if self.get('version') == "5":
+ res = self.configure_on_omf5()
+
+ else :
+ res = self.configure_on_omf6()
+
+ if res:
+ super(OMFWifiInterface, self).do_deploy()
+
+ def configure_on_omf6(self):
+ """ Method to configure the wifi interface when OMF 6 is used.
+
+ """
+ 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)
+
+ if self._create_cnt > confirmation_counter:
+ msg = "Couldn't retrieve the confirmation of the creation"