def adapter_remove_nio_binding(self, adapter_number):
        """
        Removes an adapter NIO binding.

        :param adapter_number: adapter number

        :returns: NIO instance
        """

        try:
            adapter = self._ethernet_adapters[adapter_number]
        except IndexError:
            raise VMwareError("Adapter {adapter_number} doesn't exist on VMware VM '{name}'".format(name=self.name,
                                                                                                    adapter_number=adapter_number))

        nio = adapter.get_nio(0)
        if isinstance(nio, NIOUDP):
            self.manager.port_manager.release_udp_port(nio.lport, self._project)
        adapter.remove_nio(0)
        if self._started and self._ubridge_hypervisor:
            yield from self._delete_ubridge_connection(adapter_number)

        log.info("VMware VM '{name}' [{id}]: {nio} removed from adapter {adapter_number}".format(name=self.name,
                                                                                                 id=self.id,
                                                                                                 nio=nio,
                                                                                                 adapter_number=adapter_number))

        return nio
def adapter_remove_nio_binding ( self , adapter_number ) : try : adapter = self . _ethernet_adapters [ adapter_number ] except IndexError : raise VMwareError ( "Adapter {adapter_number} doesn't exist on VMware VM '{name}'" . format ( name = self . name , adapter_number = adapter_number ) ) nio = adapter . get_nio ( 0 ) if isinstance ( nio , NIOUDP ) : self . manager . port_manager . release_udp_port ( nio . lport , self . _project ) adapter . remove_nio ( 0 ) if self . _started and self . _ubridge_hypervisor : yield from self . _delete_ubridge_connection ( adapter_number ) log . info ( "VMware VM '{name}' [{id}]: {nio} removed from adapter {adapter_number}" . format ( name = self . name , id = self . id , nio = nio , adapter_number = adapter_number ) ) return nio
Removes an adapter NIO binding.

        :param adapter_number: adapter number

        :returns: NIO instance