Client configuration

PiCLI can be customized and configured with the settings in the piclient.conf configuration file or by using an environmental variable. The piclient.conf configuration file configures default and model command table formats, workspace file setup automation, and various other configuration options. 

Client configuration overview

The behavior of PiCLI can be customized using the piclient.conf configuration file. The default location is ~/.methodics/piclient.conf, but may be placed in another directory by using the 'MDX_CONFIG_DIR' variable.

If a configuration item is set in multiple locations, the following precedence is used, where each subsequent level overrides the one before it:

  1. Program default settings

  2. piclient.conf

  3. Environmental options

  4. CLI args

The configuration file is segmented into several sections, each is described in the following tables.

General section

Configuring PiServer

Setting Example Environment Variable Description
pi_server pi_server = http://localhost:8080/ MDX_PI_SERVER

The URL of the PiServer, including the port number.

May also be supplied via the command line via the "--piserver (-s)" command line argument.

Example: pi -s http://localhost:8080 ip list

Setting ASCII mode

Setting Example Environment Variable Description
pi_ascii pi_ascii = True | False
MDX_PI_ASCII

This enables ASCII mode on PiCLI (for terminals that do not support unicode).

Terminal output will be limited to ASCII characters.

Configuring time reporting format

Setting Example Environment Variable Description
report_time_format

report_time_format =

%Y-%m-%d %H:%M:%S %z %Z

MDX_PI_TIME_FORMAT

Format string for reporting timestamps in Pi output. The format is constructed from strftime directives (see strftime.org for details).

Default is %Y-%m-%d %H:%M:%S %z %Z

Configuring the Workspace Manager

Setting Example Environment Variable Description
workspace_manager

workspace_manager = PWM

MDX_WORKSPACE_MANAGER

This selects which Workspace Manager to use. Default is PWM.

Configuring the maximum number of results

Setting Example Environment Variable Description
max_list_records_limit

max_list_records_limit =

MDX_MAX_LIST_RECORDS_LIMIT

Set the max number of records returned by pi ip ls and pi ws ls.

This global setting can be overridden by specifying the --limit LIMIT option to the 'pi ws list' and 'pi ip list' commands

valid values: unset, 1-100000

PWM section

The details of the PWM section are described on the Workspace configuration page.

Configuring unmanaged files save location

Setting Example Environment Variable Description
N/A BACKUP_DIR BACKUP_DIR

Configure the directory used to backup unmanaged or improperly edited files when an IPV directory is to be moved within/removed from a workspace.

field value = NONE - unmanaged files will be discarded

field value = <DIRECTORY NAME> unmanaged files will be saved to the specified directory

Format: string

Default: system temp dir ($TMPDIR)

This can also be set through the MDX_PWM_BACKUP_DIR environment variable.

Example:

backup_dir = /tmp

Configuring PiClient compression

Setting Example Environment Variable Description
pi_compress pi_compress = True MDX_PI_COMPRESS

Set compress to True to enable gzip, deflate compression in accept-encoding headers set to False to disable. Default is False.

Configuring PiClient p4 sync Batch Size

Setting Example Environment Variable Description
p4_sync_batchsize

p4_sync_batchsize = 512

MDX_PWM_P4_SYNC_BATCHSIZE

Sets the batch size (p4 -b option) to use when syncing files from an IPV filelist. Default is 128.

Configuring whether to set access in the workspace

Setting Example Environment Variable Description
no_setaccess

no_setaccess=True

MDX_PWM_NO_SETACCESS

If set to TRUE workspace unix permissions will not be set. Default is False.

PICACHE (IPLM Cache) section

Configuring IPLM Cache server

Setting Example Environment Variable Description
picache_server picache_server = picacheserver:5000 MDX_PICACHE_SERVER

Host and port of the IPLM Cache server

Configuring IPLM Cache compression

Setting Example Environment Variable Description
picache_compression

picache_compression = True

MDX_PICACHE_COMPRESSION

Controls client-side filelist compression to IPLM Cache for older Pi Client versions.

From version 2.35.1 and later, we use the IPLM Cache 1.5 (and later) compression setting and this client compression setting is ignored.  For IPLM Cache version 1.4.1 and older, Pi Client's compression setting will be used. Server-side compression is enabled by setting the IPLM Cache configuration file's 'compression' setting, in the file's [main] section, to True.

Configuring STATIC_HEAD

Setting Example Default Environment Variable Description
static_head static_head = true False MDX_PICACHE_STATIC_HEAD IPVs loaded @HEAD in refer mode are loaded in static mode. The IPV directory contains the files corresponding to @HEAD at the time the IPV is loaded into the cache. The directory is named according to the revision number that corresponds to the @HEAD files loaded. Subsequent @HEAD refer mode loads and updates load into new directories without updating previously loaded @HEAD directories, which remain static.

Configuring PiCLI wait time for IPLM Cache populate

Setting Example Environment Variable Description
data_wait_time

data_wait_time = 10

MDX_PICACHE_DATA_WAIT_TIME

Amount of time in seconds that the Pi client will wait for data to become available in IPLM Cache. Default is 10.

Configuring IPLM Cache to mimic BuildIC directory structure

Setting Example Environment Variable Description
bic_dir

bic_dir = True

MDX_PICACHE_BIC_DIR

Setting to 'True' will cause IPLM Cache to create a directory structure in the cache like BuildIC's directory structure: <root>/library/IP/line/version/library.IP

Default is False.

Perforce specific section

Configuring Perforce behavior

Setting Example Environment Variable Description
N/A MDX_PWM_P4_SYNC_BATCHSIZE = 2000 MDX_PWM_P4_SYNC_BATCHSIZE

Sets number of files to be processed by each parallel sync

Models

Model sections work exactly like the Reports section described above. The name of the section provides the name of the model. This will create a model named foo that will redefine the view for pi ip list only. The other commands will use the base settings defined in the [Reports] section:

[Reports_foo]
ip = name --sort --nowrap
    description --rtrim --width 20
    resources --multiline
    private_resources --multiline --optional

Examples

Model Section Example
[Reports_uuid]
workspace = top_ipv --sort --nowrap --title "TOP IPV"     creator  --title "CREATED BY"     path --nowrap
     uuid --title "UUID"[Reports_updated]
workspace = top_ipv --title "TOP IPV" --sort --nowrap
            last_updater --title "UPDATED BY"            last_update_timestamp --title "UPDATED ON"            path --nowrap

[Reports_copies]
ip = name --sort --nowrap
     creator --title "CREATED BY"     creation_timestamp --title "CREATED ON"     version_message --title "VERSION MESSAGE"     source --title "COPIED FROM"[Reports_power]
ip = name --sort --nowrap
     dm_type --title DM
     aliases
     creator --title "CREATED BY"     prop_power --title "POWER" --optional
     prop_target_power --title "TARGET POWER" --optional
     version_message --title "VERSION MESSAGE"[Reports_p4client]
workspace = top_ipv --sort --nowrap --title "TOP IPV"     creator --title "CREATED BY"     path --nowrap
     p4_client --nowrap --title "P4 CLIENT"[Reports_wman]
workspace = top_ipv --sort --nowrap --title "TOP IPV"     creator --title "CREATED BY"     path --nowrap
     workspace_manager --nowrap --title "WMAN"[Reports_license]
ip = name --sort --nowrap
	dm_type --title DM
	prop_process_name --title "PROCESS" --optional
	prop_process_node --title "NODE" --optional
	prop_external_ip --title "EXT" --optional
	prop_license_agreement --title "LICENSE" --optional
	prop_owner --title "OWNER" --optional
        prop_internal_ipid --title "ID" --optional
	aliases

Related information

PiCLI environment