def create_floatingip(self, floating_network, port=None):
        '''
        Creates a new floatingip
        '''
        net_id = self._find_network_id(floating_network)
        body = {'floating_network_id': net_id}
        if port:
            port_id = self._find_port_id(port)
            body['port_id'] = port_id

        return self.network_conn.create_floatingip(body={'floatingip': body})
def create_floatingip ( self , floating_network , port = None ) : net_id = self . _find_network_id ( floating_network ) body = { 'floating_network_id' : net_id } if port : port_id = self . _find_port_id ( port ) body [ 'port_id' ] = port_id return self . network_conn . create_floatingip ( body = { 'floatingip' : body } )
Creates a new floatingip