Remove a network. Similar to the ``docker network rm`` command.

        Args:
            net_id (str): The network's id
558071
def remove_network(self, net_id):
        
        url = self._url("/networks/{0}", net_id)
        res = self._delete(url)
        self._raise_for_status(res)
1228516
def network_delete_notif(self, tenant_id, tenant_name, network_id):
        
        router_id = self.get_router_id(tenant_id, tenant_name)
        if router_id is None:
            LOG.error("Rout ID not present for tenant")
            return False
        ret = self._program_dcnm_static_route(tenant_id, tenant_name)
        if not ret:
            LOG.error("Program DCNM with static routes failed for "
                      "router %s", router_id)
            return False

        # Program router namespace to have this network to be routed
        # to IN service network
        in_ip_dict = self.get_in_ip_addr(tenant_id)
        in_gw = in_ip_dict.get('gateway')
        in_ip = in_ip_dict.get('subnet')
        if in_gw is None:
            LOG.error("No FW service GW present")
            return False
        out_ip_dict = self.get_out_ip_addr(tenant_id)
        out_ip = out_ip_dict.get('subnet')
        excl_list = []
        excl_list.append(in_ip)
        excl_list.append(out_ip)
        subnet_lst = self.os_helper.get_subnet_nwk_excl(tenant_id, excl_list,
                                                        excl_part=True)
        ret = self.os_helper.remove_rtr_nwk_next_hop(router_id, in_gw,
                                                     subnet_lst, excl_list)
        if not ret:
            LOG.error("Unable to program default router next hop %s",
                      router_id)
            return False
        return True
656363
def detach_network_interface(self, network_interface_id, force=False):
        
        params = {'NetworkInterfaceId' : network_interface_id}
        if force:
            params['Force'] = 'true'
        return self.get_status('DetachNetworkInterface', params, verb='POST')
765642
def delete_dcnm_in_nwk(self, tenant_id, fw_dict, is_fw_virt=False):
        
        tenant_name = fw_dict.get('tenant_name')
        ret = self._delete_service_nwk(tenant_id, tenant_name, 'in')
        if ret:
            res = fw_const.DCNM_IN_NETWORK_DEL_SUCCESS
            LOG.info("In Service network deleted for tenant %s",
                     tenant_id)
        else:
            res = fw_const.DCNM_IN_NETWORK_DEL_FAIL
            LOG.info("In Service network deleted failed for tenant %s",
                     tenant_id)
        self.update_fw_db_result(tenant_id, dcnm_status=res)
        return ret
896030
def drop_network_by_id(self, network_id: int) -> None:
        """"""
        network = self.session.query(Network).get(network_id)
        self.drop_network(network)
481851
def remove_dnc(self, obj_id, channel):
        
        response = self._client.session.post(
            '{url}/{id}/dnc/remove/{channel}'.format(
                url=self.endpoint_url, id=obj_id, channel=channel
            )
        )
        return self.process_response(response)
1142371
def remove_member(self, member_id):
        
        member_rm_request = etcdrpc.MemberRemoveRequest(ID=member_id)
        self.clusterstub.MemberRemove(
            member_rm_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )
631917
def remove(id_):
    
    with LOCK:
        thread = REGISTRY.pop(id_, None)
        if thread is not None:
            thread.cancel()

    return thread
845972
async def disconnect(self, conn_id):
        

        resp = await self._execute(self._adapter.disconnect_sync, conn_id)
        _raise_error(conn_id, 'disconnect', resp)
        self._teardown_connection(conn_id, force=True)
1018720
def remove(cls, id):
        

        api = Client.instance().api
        api.index(id).delete()
59658
def detach_remote(self, id, name):
        

        if name in self.widgets:
            if id in self.widgets[name]:
                del self.widgets[name]
1227731
def delete(self, vpn_id: int):
        
        vpn = self._get_or_abort(vpn_id)
        session.delete(vpn)
        session.commit()
        return '', 204
1141235
def delete(self, network):
        
        try:
            return super(CloudNetworkClient, self).delete(network)
        except exc.Forbidden as e:
            # Network is in use
            raise exc.NetworkInUse("Cannot delete a network in use by a server.")
1296001
def delete(self):
        
        try:
            return super(CloudNetwork, self).delete()
        except exc.Forbidden as e:
            # Network is in use
            raise exc.NetworkInUse("Cannot delete a network in use by a server.")
454774
def delete(self, ids):
        
        url = build_uri_with_ids('api/v4/ipv6/%s/', ids)
        return super(ApiV4IPv6, self).delete(url)
1322072
def delete(gandi, resource):
    

    result = gandi.dnssec.delete(resource)
    gandi.echo('Delete successful.')

    return result
1236545
def delete(network):
    
    try:
        network.destroy()
    except libvirt.libvirtError as error:
        raise RuntimeError("Unable to destroy network: {}".format(error))