Destroys the port forwarding mapping.

 @return [Boolean] True if command was successful, false otherwise.
338567
def destroy
      results = []

      if !new_record?
        results << parent.extra_data.delete("#{key_prefix(true)}Protocol")
        results << parent.extra_data.delete("#{key_prefix(true)}GuestPort")
        results << parent.extra_data.delete("#{key_prefix(true)}HostPort")

        # Remove it from any collection
        parent_collection.delete(self, true) if parent_collection

        new_record!
      end

      results.empty? || results.all? { |o| o == true }
    end
179852
def destroy(force = false)
      delete_bucket
      true
    rescue Error::BucketNotEmpty
      if force
        objects.destroy_all
        retry
      else
        raise
      end
    end
154223
def server_delete(s_name, **connection_args):
    '''
    
    '''
    ret = True
    server = _server_get(s_name, **connection_args)
    if server is None:
        return False
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    try:
        NSServer.delete(nitro, server)
    except NSNitroError as error:
        log.debug('netscaler module error - NSServer.delete() failed: %s', error)
        ret = False
    _disconnect(nitro)
    return ret
258568
def destroy(name, conn=None, call=None):
    '''
    
    '''
    if call == 'function':
        raise SaltCloudSystemExit(
            'The destroy action must be called with -d, --destroy, '
            '-a or --action.'
        )

    __utils__['cloud.fire_event'](
        'event',
        'destroying instance',
        'salt/cloud/{0}/destroying'.format(name),
        args={'name': name},
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    if not conn:
        conn = get_conn()
    node = show_instance(name, conn=conn, call='action')
    log.info('Destroying VM: %s', name)
    ret = conn.delete_server(name)
    if ret:
        log.info('Destroyed VM: %s', name)
        # Fire destroy action
        __utils__['cloud.fire_event'](
            'event',
            'destroyed instance',
            'salt/cloud/{0}/destroyed'.format(name),
            args={'name': name},
            sock_dir=__opts__['sock_dir'],
            transport=__opts__['transport']
        )
        if __opts__.get('delete_sshkeys', False) is True:
            __utils__['cloud.remove_sshkey'](getattr(node, __opts__.get('ssh_interface', 'public_ips'))[0])
        if __opts__.get('update_cachedir', False) is True:
            __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
        __utils__['cloud.cachedir_index_del'](name)
        return True

    log.error('Failed to Destroy VM: %s', name)
    return False
1272241
public boolean sendAndDestroy(Socket socket, int flags)
    {
        boolean ret = send(socket, flags);
        if (ret) {
            destroy();
        }
        return ret;
    }
369956
private void destroy()
  {
    if (log.isLoggable(Level.FINEST)) {
      log.finest(this + " destroying connection");
    }

    try {
      _socket.forceShutdown();
    } catch (Throwable e) {
    }

    try {
      closeConnection();
    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
    }

    // XXX:
    _port.removeConnection(this);
  }
1098582
def delete!(force = false)
      if local?
        @lib.branch(@name, :force => force, :delete => true)
      else
        @lib.push(Process.server_name, nil, nil, :delete => @name)
      end
    end
1300797
def delete
      Sidekiq.redis do |conn|
        conn.multi do
          conn.del(status_key)

          conn.zrem(self.class.kill_key, self.jid)
          conn.zrem(self.class.statuses_key, self.jid)
        end
      end
    end
261945
def destroy
      # TODO: resolve the fact that there may be more than one for the same
      # provider.  either disallow multiple, or select the correct one.
      auth = Corkboard::Authorization.find_by_provider(params[:provider])
      auth.destroy if auth
      Corkboard.clear_all!

      redirect_to(authorizations_path)
    end
842648
def destroy
      return unless Feature.bfd_enabled?
      [:interval,
       :ipv4_interval,
       :ipv6_interval,
       :fabricpath_interval,
       :echo_interface,
       :echo_rx_interval,
       :ipv4_echo_rx_interval,
       :ipv6_echo_rx_interval,
       :fabricpath_vlan,
       :slow_timer,
       :ipv4_slow_timer,
       :ipv6_slow_timer,
       :fabricpath_slow_timer,
       :startup_timer,
      ].each do |prop|
        send("#{prop}=", send("default_#{prop}")) if
          send prop
      end
      set_args_keys_default
    end
1336515
def close(self):
        
        if self.__sock:
            self.__sock.close()
            self.__sock = None
            return True
        else:
            return None
399202
def disconnect(self):
        
        cmd_response = self.__send_command(const.CMD_EXIT)
        if cmd_response.get('status'):
            self.is_connect = False
            if self.__sock:
                self.__sock.close()
            return True
        else:
            raise ZKErrorResponse("can't disconnect")
678749
def destroy(self):
        
        if not hasattr(self, 'server') or not self.server:
            raise Exception(
                """FirewallRule not associated with server;
                please use or server.get_firewall_rules() to get objects
                that are associated with a server.
                """)
        return self.server.cloud_manager.delete_firewall_rule(
            self.server.uuid,
            self.position
        )
437749
def destroy(*args)
      resource = find(*args)
      if enclosing_resource
        service.destroy(*args)
        resource
      else
        resource.destroy
      end
    end
298565
public synchronized boolean stopServer() {

        if (!isProxyRunning) {
            return false;
        }

        isProxyRunning = false;
        HttpUtil.closeServerSocket(proxySocket);

        try {
            thread.join();   //(PORT_TIME_OUT);
            
        } catch (Exception e) {
        }

        proxySocket = null;

        return true;
    }
1186175
def destroy
      @page.destroy

      respond_to do |format|
        format.html { redirect_to pages_url }
        format.json { head :ok }
      end
    end
914354
def destroy
      @parameter = Parameter.find(params[:id])
      @parameter.destroy
  
      respond_to do |format|
        format.html { redirect_to parameters_url }
        format.json { head :no_content }
      end
    end