def teardown_logical_port_connectivity(self, context, port_db,<EOL>hosting_device_id):
if port_db is None or port_db.get('<STR_LIT:id>') is None:<EOL><INDENT>LOG.warning("<STR_LIT>"<EOL>"<STR_LIT>", hosting_device_id)<EOL>return<EOL><DEDENT>hosting_port_id = port_db.hosting_info.hosting_port.id<EOL>try:<EOL><INDENT>self._dev_mgr.svc_vm_mgr.interface_detach(hosting_device_id,<EOL>hosting_port_id)<EOL>self._gt_pool.spawn_n(self._cleanup_hosting_port, context,<EOL>hosting_port_id)<EOL>LOG.debug("<STR_LIT>", port_db.id)<EOL><DEDENT>except Exception as e:<EOL><INDENT>LOG.error("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>", {'<STR_LIT>': hosting_port_id,<EOL>'<STR_LIT>': hosting_device_id,<EOL>'<STR_LIT:error>': str(e)})<EOL><DEDENT>
Removes connectivity for a logical port.

        Unplugs the corresponding data interface from the VM.