Getting started

This Training page provides an overview of accessing Perforce IPLM, setting up access to the Tutorial database, and getting help with commands, settings, and the current Perforce IPLM Version.

Setting up the tutorial database

The Perforce IPLM Training Guide is based on the example Tutorial database which is provided as a part of the PiExtras package. It can be installed on a local dedicated machine with the instructions provided in the Installation Guide in the Tutorial Installation section. The Tutorial installation instructions will load the database into Perforce IPLM and set up a Perforce server with matching file level DM data. Please contact Perforce for the licenses necessary to run the tutorial.

Setting up your environment

After completing the Pi Tutorial Install instructions you will have a 'mdx.bash' containing the environment setup information to run Perforce IPLM. Source this file, or include it as part of your environment initialization.

Source Your Project Variables
> source /usr/share/mdx/config/mdx.bash

Users and logins

Perforce IPLM requires you to login as a user registered with the system. Information on logging in to Perforce IPLM is available on the Accessing Perforce IPLM page of the User Guide.

Perforce IPLM account types

There are two levels of accounts in Perforce IPLM, administrator accounts and regular accounts. Regular user accounts are constrained by Perforce IPLM permissions granted at the Library, IP, and Line levels, and admin accounts are not; they have full access to everything in the system. Admin status is granted to any user account by adding it to the built in 'admin' group in Perforce IPLM. Only a current Perforce IPLM admin can elevate a regular user account to admin status.

Perforce IPLM supports both internally and externally defined user and group configuration and authentication. The instructions here assume internal Perforce IPLM accounts. More information on Internal and External user accounts can be found on the Users and Groups page of the Administration Manual.

User account in the tutorial

The tutorial can either be run as an admin user, in which case permissions will not have any effect, or as a standard user, in which case permissions must be set appropriately for that user.

To add an internal Perforce IPLM user account (as an admin):

User Account in the Tutorial
1. Add the user using pi cli
> pi user add <username>
2. Fill out the template file that comes up
3. Save and exit

Adding a User to the Admin Group
1. Edit the group template using pi cli
> pi group edit admin
2. Edit the 'users' section of the template to include the new admin user account

If the tutorial is to be run as a standard user, run the following as an admin user (or owner of the tutorial Library):

Running the Tutorial as a Standard User
> pi perm add u:<username>:rw tutorial. --all-ip

Changing an Internal User Account's Password
> pi passwd <username>

Logging into Perforce IPLM
> pi login <username>

The same command can be used to switch to a new user account.

Command line 

The PI command line client is 'pi' .The standard PI command format is: pi CMD SUBCMD [options]

pi CMD SUBCMD [options] Structure
> pi --help
Usage: pi [-h] [--picache PICACHE] [--piserver PISERVER] [--project PROJECT]
          SUBCOMMAND ...

Optional arguments:
  --picache PICACHE     Specify the IPLM Cache server to connect to
  --piserver PISERVER, -s PISERVER
                        Specify the PiServer to connect to
  --project PROJECT     Specify the Project
  -h, --help            Show this help message and exit

Available sub-commands:
  SUBCOMMAND
    alias               Commands related to Aliases.
    dmtype (dm)         Commands related to DM Types.
    group               Commands related to Groups.
    integrate (merge)   Merge another IPV's resources into your Workspace.
    ip                  Commands related to IP.
    label               Manipulate and list Labels.
    library (lib)       Commands related to Libraries.
    license (lic)       Commands related to Licenses.
    login               Authenticate with the Perforce IPLM server.
    logout              Logout from the Perforce IPLM server.
    passwd              Change a User password.
    perm                Commands related to Permissions.
    property (prop)     Commands related to Properties.
    property-set (propset)
                        Commands related to Property Sets.
    query               Commands related to Queries.
    release (rel)       Make a new release.
    settings            Show settings of configuration variables.
    snapshot (snap)     Commands related to Snapshots.
    subscription (sub)  Commands related to Subscriptions.
    update (up)         Update a Workspace.
    user                Commands related to Users.
    version             Report Pi Client and Server versions.

    whoami              Report who you are logged in as.
    workspace (ws)      Commands related to Workspaces.

Getting Help:
  The -h or --help flag will display help specific to the arguments
  preceding their position in the command line:
    pi -h          Display generic help about pi (this screen)
    pi ip -h       Display help about the ip sub-commands
    pi ip load -h  Display help about the ip load sub-command
    pi ip -h load  Display help about the ip sub-commands, NOT the
                   ip load sub-command

Links to detailed overviews of all the Perforce IPLM commands can be found on the Command Cheat Sheet page in the User Guide.

Getting help

For each command or subcommand in Perforce IPLM you can type the command followed by '-h' or '–help' to get more information about how to use it.

For example

-h or -help Command
> pi ip -h
Usage: pi ip [-h] SUBCOMMAND ...

Description: Commands related to IP. These subcommands are used to add, edit,
delete and list information about IP.

Optional arguments:
  -h, --help            Show this help message and exit

Available sub-commands:
  SUBCOMMAND
    add                 Create a new IP.
    attribute (attr)    Commands related to IP, Line or IPV Attributes.
    copy (cp)           Create a new IP or new Line based on an existing IPV.
    delete (del, remove, rm)
                        Delete an IP, Line or IPV.
    diff                Compare two IPVs.
    edit                Edit an existing IP.
    list (ls)           List all matching IP.
    load                Load an IP into a Workspace.
    local               Create a local copy of an IP.
    obliterate          Obliterate an existing IP.
    properties (prop)   Edit the IP/IPV Properties on an existing IP.
    publish             Publish the given IPV to a IPLM Cache.
    refer               Switch an IP to refer mode.
    rm-from-filelist    Remove a file from the filelists of IPVs on a Line.
    tree                Display the hierarchy of the specified IPV.
    usage               Report on IPV usage by other IPVs.

In the case of the 'pi ip list' sub command we see that it has an alias (ls) such that 'pi ip list' and 'pi ip ls' are the same command. The descriptive text tells us that the list subcommand can be used to list all matching IP. To get more information on the usage of the 'pi ip list' command we can type:

pi ip list -h Command
> pi ip list -h
Usage: pi ip list [-h] [--format {csv,json,long,table,template} | --verbose]
                  [--model MODEL] [--all | --max MAX] [--limit LIMIT]
                  [--contents] [--label LABEL [LABEL ...]]
                  [--match-substring MATCH_SUBSTRING | --query QUERY | --squery SQUERY]
                  [identifier [identifier ...]]

Description: List all matching IP. A variety of format and filtering options
are supported.

Positional arguments:
  identifier            Filter IP by name.

Optional arguments:
  --all, -a             Include all IP Versions (IPVs), equivalent to --max 0.
  --contents            Display a list of all files and the version of each
                        file for the specified IP. This can generate a LOT of
                        output if an IP contains a large number of files.
  --format {csv,json,long,table,template}
                        Return the results using the specified data structure.
                        The template format produces files that can be used by
                        the pi add|edit commands with the --template option.
  --limit LIMIT         Limit the output to the specified number of records
  --match-substring MATCH_SUBSTRING, -m MATCH_SUBSTRING
                        Filter by matching substring. All fields in the output
                        are considered
  --max MAX             Include at most MAX IP Versions (IPVs).
  --model MODEL         Use the specified report model (table report only).
  --query QUERY, -q QUERY
                        Filter using the Perforce IPLM Query Language.
  --squery SQUERY, -sq SQUERY
                        Filter using a Saved Perforce IPLM Query.
  --verbose, -v         Alias for --format long.
  -h, --help            Show this help message and exit

Filters:
  --label LABEL [LABEL ...]
                        Filter by IP Label.

Examples:
# List all latest versions of all IP
  pi ip list

# List all latest versions of IP foo.bar
  pi ip list foo.bar

# Show five most recent foo.bar versions
  pi ip list --max 5 foo.bar

# List all latest versions of all IP in library foo
  pi ip list foo.

Here we see a description of the usage of the command including arguments and the various possible options. In addition we see several examples of how to use the command. Each command in the Perforce IPLM command line interface has similar detailed help available with the '-h' option.

Understanding the Perforce IPLM Configuration

Several commands are available to get more information on the current state of Perforce IPLM (also see the PiCLI Environment page of the User Guide):

Finding the Perforce IPLM version

Use the 'pi version' command to get the version of the Perforce IPLM server and client:

pi version Command
> pi version
PiServer version : 3.0.5
PiClient version : 3.0.5
IPLM Cache version : 1.8.3

Showing the Perforce IPLM setup

Use the 'pi settings' command to get the Perforce IPLM configuration:

pi settings Command
> pi settings 
You are logged in as 'admin'.

MDX_CONFIG_DIR                 Env var    /usr/share/mdx/config
MDX_MAX_LIST_RECORDS_LIMIT     Unset      
MDX_PI_ASCII                   Config     False
MDX_PI_COMPRESS                Default    False
MDX_PI_SERVER                  Env var    http://demo2:8080
MDX_PI_TIME_FORMAT             Config     %Y-%m-%d %H:%M:%S %z %Z
MDX_PROJECT                    Unset      
MDX_WORKSPACE_MANAGER          Config     PWM
MDX_PWM_CLIENT_FORMAT          Default    ws:{user}:{lib_ip}:{wsid}
MDX_PWM_DEFINE_CDSLIB          Config     .:cds/*
MDX_PWM_INCLUDE_CDSLIB         Config     cds.lib
MDX_PWM_P4_SYNC_BATCHSIZE      Default    2000
MDX_PWM_POST_REFERENCE_CDSLIB  Config     /mdx/tools/cds/IC617/share/cdssetup/dfII/cds.lib
MDX_PWM_PRE_REFERENCE_CDSLIB   Unset      
MDX_PWM_TEMPLATE_CLIENT        Unset      
MDX_PWM_UNDEFINE_CDSLIB        Unset      
MDX_PWM_WORKSPACE_CDSLIB       Unset      
MDX_PWM_WORK_LINK              Config     $VSC_INSTALL_DIR/config/cadence/dot_cdsinit:cds_run/.cdsinit,$VSC_INSTALL_DIR/config/cadence/cdsLibMgr.il:cds_run/cdsLibMgr.il,cds.lib:cds_run/cds.lib
MDX_PICACHE_BIC_DIR            Unset      
MDX_PICACHE_COMPRESSION        Unset      
MDX_PICACHE_DATA_WAIT_TIME     Default    10
MDX_PICACHE_SERVER             Env var    demo2:5000

IPLM Cache Server configuration:
Root                                      /picache-root
Server Version                            1.5.0
Site                                      demo2

Finding the currently logged in user

Use the 'pi whoami' command (or 'pi settings' - see above) to get the currently logged in Perforce IPLM user:

pi whoami Command
> pi whoami
You are logged in as 'admin'