Puppet Function: wmflib::resource::export

Defined in:
modules/wmflib/functions/resource/export.pp
Function type:
Puppet Language

Overview

wmflib::resource::export(Wmflib::Resource::Type $resource, String[1] $resource_title, String[1] $original_title, Hash $parameters = {})Any

SPDX-License-Identifier: Apache-2.0

Parameters:

  • resource (Wmflib::Resource::Type)

    The resource to create e.g. file, concat

  • resource_title (String[1])

    The title of the resource to create

  • original_title (String[1])

    The original title of the calling resource, this is used to ensure the exported resource has a unuiq title

  • parameters (Hash) (defaults to: {})

    a hash of parameters for the exported resource

Returns:

  • (Any)


7
8
9
10
11
12
13
14
15
16
17
# File 'modules/wmflib/functions/resource/export.pp', line 7

function wmflib::resource::export (
    Wmflib::Resource::Type $resource,
    String[1]              $resource_title,
    String[1]              $original_title,
    Hash                   $parameters      = {},
) {
    # Currently the title prefix is not used but it may be useful in future
    $title_prefix = 'wmflib::resource::export'
    $_title = "${title_prefix}-${original_title}||${resource_title}"
    create_resources("@@${resource.downcase}", { $_title => $parameters })
}