Delete template.

    Argument:

        server:     TonicDNS API server
        token:      TonicDNS API authentication token
        template:   Delete template datas

    x-authentication-token: token
763121
def delete_template(server, token, template):
    
    method = 'DELETE'
    uri = 'https://' + server + '/template/' + template
    connect.tonicdns_client(uri, method, token, data=False)
728672
def delete(options = {})
      options = options.merge(server_certificate_name: @name)
      resp = @client.delete_server_certificate(options)
      resp.data
    end
537669
def disable_template(name)
      name = name.to_sym

      return false if @disabled_templates.include?(name)

      if (template_dir = Template.templates[name])
        source_paths.delete(template_dir)

        @templates.delete_if { |template| template.path == template_dir }
        @enabled_templates.delete(name)
      end

      @disabled_templates << name
      return true
    end
1020592
def delete_template(template_disk)
      Log.debug "deleting template #{template_disk}"
      template = File.join(@templates_dir, File.basename(template_disk))
      template_flat = File.join(@templates_dir, File.basename(template_disk, ".vmdk") + "-flat.vmdk")
      Net::SSH.start(@address, @user, :password => @password) do |ssh|
        if (ssh.exec! "ls #{template} 2>/dev/null").nil?
          Log.error "Template #{template_disk} does not exist"
          raise "Template does not exist"
        end
        ssh.exec!("rm -f #{template} && rm -f #{template_flat} 2>&1")
      end
    end
895583
def _delete(self, **kwargs):
        
        requests_params = self._handle_requests_params(kwargs)

        delete_uri = self._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']
        response = session.delete(delete_uri, **requests_params)
        if response.status_code == 200 or 201:
            self.__dict__ = {'deleted': True}
268959
def delete(self,  **kwargs):       
                
                if 'cat' not in kwargs.keys():
                        kwargs['cat']=''
                cat=kwargs['cat']
                del kwargs['cat']
                res=request.publish_cat1("DELETE", self.con, self.token,  cat, kwargs)
                return res
23677
def endpoint_delete(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.delete_endpoint(**kwargs)
179928
public void deleteTemplate(ThymeLeafTemplateImplementation template) {
        // 1 - unregister the service
        try {
            ServiceRegistration reg = registrations.remove(template);
            if (reg != null) {
                reg.unregister();
            }
        } catch (Exception e) { //NOSONAR
            // May already have been unregistered during the shutdown sequence.
        }

        // 2 - as templates can have dependencies, and expressions kept in memory, we clear all caches.
        // Despite this may really impact performance, it should not happen too often on real systems.
        synchronized (this) {
            engine.getCacheManager().clearAllCaches();
        }
        OgnlRuntime.clearCache();
        // Unfortunately, the previous method do not clear the get and set method cache
        // (ognl.OgnlRuntime.cacheGetMethod and ognl.OgnlRuntime.cacheSetMethod)
        clearMethodCaches();
    }
585942
public void deleteTemplate(DeleteTemplateRequest request) {
        checkNotNull(request, "object request should not be null.");
        assertStringNotNullOrEmpty(request.getTemplateId(), "object templateId should not be null or empty.");

        InternalRequest internalRequest =
                this.createRequest("template", request, HttpMethodName.DELETE, request.getTemplateId());
        this.invokeHttpClient(internalRequest, SmsResponse.class);
    }
1099769
def _delete(self, *args, **kwargs):
        
        response = requests.delete(*args, **kwargs)
        response.raise_for_status()
1057195
def delete_host_template(self, name):
    
    return host_templates.delete_host_template(self._get_resource_root(), name, self.name)
1218999
function(removed_templates) {

		for (var i = 0, removed_count = removed_templates.length; i < removed_count; i++) {

			removed_templates[i].destroy();

		}

	}
683624
def search_template_delete(id, hosts=None, profile=None):
    '''
    
    '''
    es = _get_instance(hosts, profile)

    try:
        result = es.delete_template(id=id)

        return result.get('acknowledged', False)
    except elasticsearch.NotFoundError:
        return True
    except elasticsearch.TransportError as e:
        raise CommandExecutionError("Cannot delete search template {0}, server returned code {1} with message {2}".format(id, e.status_code, e.error))
1056746
public function deleteTemplate($template_id) {
		$data = $this->getData('/cgi-bin/template/del_private_template', [
			'access_token' => $this->getAccessToken(),
		], Json::encode([
			'template_id' => $template_id,
		]));

		return $this->errcode == 0;
	}
1026218
def do_delete(endpoint, access_token):
    '''
    '''
    headers = {"Authorization": 'Bearer ' + access_token}
    headers['User-Agent'] = get_user_agent()
    return requests.delete(endpoint, headers=headers)
1008675
def delete_metadata(address=None, tx_hash=None, block_hash=None, api_key=None, coin_symbol='btc'):
    '''
    
    '''
    assert is_valid_coin_symbol(coin_symbol), coin_symbol
    assert api_key, 'api_key required'

    kwarg = get_valid_metadata_identifier(
        coin_symbol=coin_symbol,
        address=address,
        tx_hash=tx_hash,
        block_hash=block_hash,
        )

    url = make_url(coin_symbol, meta=True, **kwarg)

    params = {'token': api_key}

    r = requests.delete(url, params=params, verify=True, timeout=TIMEOUT_IN_SECONDS)
    return get_valid_json(r, allow_204=True)
129618
def delete_templatetype(type_id,template_i=None, **kwargs):
    
    try:
        tmpltype_i = db.DBSession.query(TemplateType).filter(TemplateType.id == type_id).one()
    except NoResultFound:
        raise ResourceNotFoundError("Template Type %s not found"%(type_id,))

    if template_i is None:
        template_i = db.DBSession.query(Template).filter(Template.id==tmpltype_i.template_id).one()

    template_i.templatetypes.remove(tmpltype_i)

    db.DBSession.delete(tmpltype_i)
    db.DBSession.flush()