def remove_nio(self, port_number):
        """
        Removes the specified NIO as member of cloud.

        :param port_number: allocated port number

        :returns: the NIO that was bound to the allocated port
        """

        if port_number not in self._nios:
            raise NodeError("Port {} is not allocated".format(port_number))

        nio = self._nios[port_number]
        if isinstance(nio, NIOUDP):
            self.manager.port_manager.release_udp_port(nio.lport, self._project)

        log.info('Cloud "{name}" [{id}]: NIO {nio} removed from port {port}'.format(name=self._name,
                                                                                    id=self._id,
                                                                                    nio=nio,
                                                                                    port=port_number))

        del self._nios[port_number]
        if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running():
            yield from self._delete_ubridge_connection(port_number)
        yield from self.start()
        return nio
def remove_nio ( self , port_number ) : if port_number not in self . _nios : raise NodeError ( "Port {} is not allocated" . format ( port_number ) ) nio = self . _nios [ port_number ] if isinstance ( nio , NIOUDP ) : self . manager . port_manager . release_udp_port ( nio . lport , self . _project ) log . info ( 'Cloud "{name}" [{id}]: NIO {nio} removed from port {port}' . format ( name = self . _name , id = self . _id , nio = nio , port = port_number ) ) del self . _nios [ port_number ] if self . _ubridge_hypervisor and self . _ubridge_hypervisor . is_running ( ) : yield from self . _delete_ubridge_connection ( port_number ) yield from self . start ( ) return nio
Removes the specified NIO as member of cloud.

        :param port_number: allocated port number

        :returns: the NIO that was bound to the allocated port