Server extension configuration (global and instance specs)

After you have installed the server extension, configure the extension specs. One or more instance specs are required. Each instance can provide different values for the extension’s instance variables.

global

Usage: p4 extension --configure namespace::extensionName

The global spec applies to all instances of the server extension. For example, to enable all instances of a server extension to send an email, the name of the mail server would be configured globally.

The super user supplies the global details about the server extension configuration that apply to all instances of this extension, such as:

  • The list of groups whose members can create instances of this particular extension.
  • Runtime limits, such as maximum number of users or maximum number of files.

The default namespace is ExampleInc and the default extension name is extName

instance

Usage: p4 extension --configure ExampleInc::extName --name instanceOfExtensionName

For example, p4 extension --configure ExampleInc::extName --name Release1.0-fileSizeCheck

One or more instance specs are required. For example, Release1.0-fileSizeCheck-instance1 might apply to //depot/test and specify a maximum file size and a maximum number of files, while Release1.0-fileSizeCheck-instance2 might apply to //depot/main and specify a different maximum file size and a different maximum number of files.

Use the –configure and –name flags together to create a named instance of the server extension, parameterizing the server extension to be run with specific settings:

  • The –name flag takes the name of the configuration to create or modify.
  • The –configure flag takes the name of the extension.

Pre-populated, read-only fields of the extension spec

Some read-only fields are pre-populated with data from the Server Extension JSON manifest fields.

Spec field Corresponding JSON field

Meaning

ExtName

name

The name of the server extension.

ExtDescription

description

The description of the server extension.

ExtVersion

version

The version number of the server extensions.

ExtUUID

key

The universally unique identifier of the server extension.

 

Fields that can be modified

ExtMaxScriptTime

The number of seconds the server extension is allowed to run for before the server terminates it.

ExtMaxScriptMem

The number of bytes of RAM the server extension is allowed to allocate before the server terminates it.

ExtAllowedGroups

The list of groups whose depot/repo owner members are allowed to create instances of the server extension. This applies to file-based events, such as change-submit.

This does not apply to a global event, such as form-out that occurs whenever the server generates a form for display to the user.

ExtEnabled

Enable/disable an instance configuration.

ExtP4USER

The user account to use for the automatic logins.

Name

The name of the instance configuration.

Owner

The user who created the config.

Update

When the config was modified.

Description

User-supplied description of the instance config.

ExtConfig

A server extension can supply its own user-input fields here. These fields are key / value types.

ExtRev The depot-rev of the extension installed in the depot. For example, 3