Editing IPs

Permissions requirements

To edit an IP, write permission is required to the IP itself, and at least read permission is required to all the IPs and Lines of the resources and private resources of the IP to be edited. See the Permissions management section for more information.

If the user editing the IP has write access to a line of the IP, but only read access to the IP itself, the user will only be able to edit the LINE and IPV sections of the IP, and an error will be returned if an attempt is made to edit the IP section. See Creating New IPs for details on the IP fields available for editing.

Editing the dm_type

Container type IPs can be converted to Perforce (P4) or P4Stream (P4S) type IPs, and no other dm_type conversions are allowed. Edit the dm_type field from CONT to Perforce or P4Stream. Editing the dm_type field will create a new IPV, and a repo_path for the IPV must be supplied. If there are any other Lines on the IP (carried over from the original container) they will have empty repo_paths until one is added. Any workspace operations using the other Lines prior to the addition of a repo_path will fail.

Editing IP metadata

IPLM Web and PiCLI handle the attachment and editing of IP metadata somewhat differently. More information on managing metadata can be found in the IP, IPV, and IP Line Metadata section.

Metadata operation IPLM Web PiCLI
Attaching Property Sets to IPs Edit IP Form pi property-set attach command
Setting Property Values Edit IP Form pi ip properties command
Setting Attributes (Widgets) Widget Editor pi ip attribute command
Attaching Labels to IPs Edit IP Form pi label attach command

Editing IPs in IPLM Web

The Edit IP page contains IPV field values and IPV properties as set on the latest IPV release on the line. If only fields that do not create a new release are edited, the modifications are saved on the latest IPV. If any fields that do create a new release are modified, a new release will be created and the previous latest release will remain unmodified. For more details, see IP Versions (Releases).

Changing the following fields creates a new release: 

Field Details
Repo_path Location of IPV files in the DM system
Resources IPV resources of the IPV being edited
Project Properties Workspace configuration settings

Accessing the Edit IP page

The Edit IP page can be accessed from the IP page:

Configure the IP details section

The name of the IP can be changed in the Name field, and you can also edit the Host, Description, add and remove Labels, and configure the client side hooks of the IP. 

Configure the IPV details section

On the IPV details tab, set the version message for the next release of the IP, as well as the repo path for DM and Filesystem type IPs.

Configure the Project properties

Workspace configuration can be set on the  Project properties tab. Enter a value for Scope and then configure the Project property you wish to set and select Add. More information on configuring Project Properties can be found in the Workspaces section.

Add new Resource IPs

To add new Resource IPs, click Add to open the resource IP selection form.

Filter the catalog by IP Library, Label, and Quick filters. Select one or more Labels to filter the catalog down to IPs that have all of the selected labels applied. Then, select the checkbox by the IP name, select the Line, and select the Version of the IP to include as a resource. The selection defaults to the latest fixed version on the selected line. For the version, you can select a fixed IP Version or an aliased IP Version.

Optionally, select the P icon to Add as a private resource. See Editing IPs on this page for information on resources and private resources.

You must select the checkbox by the IP name to add the resource.

Select Next to view the selected IP resources. You can edit the selections from the summary page. Click Confirm.

Click Save. Once added, the IP resource will appear in the Resource summary field on the right of the form.  

Delete or edit existing resource IPs

To delete an existing IP, select checkmark for the IP in the Resources list and click Remove. To edit the configuration of an existing resource IP, use the menus in Line and Version:

Editing IPs using CLI

IPs can be edited on the command line using the 'pi ip edit' command. Note that IPs can be edited from IPLM Web and the Helix IPLM API as well. A description of the fields available for edit are listed in the Creating New IPs section.

The format of the 'pi ip edit' command is:

pi ip edit Command
pi ip edit -h
Usage: pi ip edit [-h] [--template TEMPLATE] identifier

Description: Edit an existing IP. The command puts the IP specification into a
temporary file and invokes the editor specified by the EDITOR environment
variable. Saving the file edits the IP.

Positional arguments:
  identifier            The name of the IP being edited.

Optional arguments:
  --template TEMPLATE, -t TEMPLATE
                        Use the specified template to edit the IP. The
                        template is an ASCII file that defines the IP. This
                        can be used to edit IP with a script and avoid the
                        interactive editor. To read the template from STDIN,
                        set TEMPLATE='-'.
  -h, --help            Show this help message and exit

Examples:
# Invoke the editor to modify IP mmu.
  pi ip edit mmu

# Modify IP mmu using the mmu.info template.
  pi ip edit -t mmu.info mmu

# Modify IP mmu using redirected STDOUT from script edit_ip.py as template.
  edit_ip.py | pi ip edit -t - mmu

IPs can be edited directly from the template that comes up when the command is run by default, or a template can be submitted via the --template option at the time of IP edit. Any missing fields in the template will not be modified.

Example:

pi ip edit Example
> pi ip edit mylib.myip
Successfully edited IPV 'mylib.myip@10.TRUNK'.

The template format can be found via a 'pi ip list --format=template' command on an existing IP.

pi ip list --format=template Command
>pi ip list --format=template tutorial.padring
[IP]
# IP Permissions apply
# Name is required
name = padring

# Read-only
library = tutorial

# Read-only
dm_type = P4

# Host is used for p4 IP only
host =

# Description is optional
description = pad ring

# Icon is optional
icon = analog

# Hooks are optional commands executed when certain events occur. These
# variables can be used as arguments to the hooks :
#     $IP     : IP name
#     $LIB    : Library name
#     $VER    : Version number
#               For pre-release hook, the old version number. For post-release
#               hook, the new version number.
#     $LINE   : Line name
#     $IPID   : Complete IP identifier (shorthand for $LIB.$IP@$VER.$LINE)
#     $IP_DIR : IP directory in the workspace
#     $ARGS   : Any arguments passed to the pi command with the --args argument
#               For instance, pi release lib.ip --args [arguments_for_hook]
[HOOKS]
# IP Permissions apply
pre_release =
post_release =
post_load =
post_update =
pre_integrate =
post_integrate =

# ------------------------------------------------------------------------------

[LINE]
# IP Line Permissions apply
line = L1

# Description is optional
description = Line 1 for debug

# Icon is optional
icon =

# ------------------------------------------------------------------------------

[IPV]
# IP Line Permissions apply
# Repo path
repo_path = //mdx_test/tutorial/padring/L1

# Required
version_message = padring L1 release

# Icon is optional
icon =

# Aliases are read-only. Use the "pi alias" commands to manage them.
# One alias per line
aliases = HEAD
          LATEST

# Resources are optional
# One resource per line (newlines require a leading space)
resources = tutorial.MS90G@1.TRUNK
            tutorial.io5v@1.TRUNK
            tutorial.io_tsmc18@1.TRUNK

# Private resources are only loaded when this IP is the top level of a Workspace.
# This is useful to prevent subsystem test benches from loading into bigger Workspaces.
private_resources =

# Project properties (project_props) are optional
# One resource per line (newlines require a leading space)
# A property set on a resource in the top IP overrides the same property
# set on the resource itself.
#
# Format: <ip_identifier> [--path <path>] [--mode local|refer|both]
#                         [--resolve <IPV>] [--unix_group <group>]
#   ip_identifier:    the resource IP
#                     These wildcards are allowed in resource names:
#                     *     - refers to all resources. (Default)
#                     LIB.  - refers to all resources belonging to library LIB.
#    --path: A relative path in the workspace where the IP is placed in.
#            $LIB and $IP are provided as convenience vars with the
#            default location in "$LIB.$IP" of the workspace dir.
#            ex: --path data      - IP directory is renamed to "data"#                --path $IP       - IP is placed in a top level dir "$IP"#                --path dir/$IP   - IP is placed in "dir/$IP"#    --mode: Makes the IP local only, or refer only. If the mode is unset both
#            at the top level and at the resource then the IP can be switched
#            between refer and local. The mode "both" can be used at the top
#            level to override a mode of refer or local set at a resource level.
#            ex: resource IP "SUBSYS" has mode --local set so a workspace with
#                SUBSYS at the top is always in local mode
#                an IP "TOP" that uses SUBSYS as a resource can override that
#                using a mode "both"#    --resolve: When a conflict between multiple resources occurs, this
#               specifies which one of the resources must be used. The --resolve
#               project property can only be applied to the default * group. All
#               resolutions must be specified in one single --resolve directive
#               eg: --resolve lib1.ip1@1.TRUNK lib2.ip2@ALIAS.LINE ...
#    --unix_group: Group owner of the IP directory in the shared area and
#                workspaces. eg: --unix_group group1
project_props = * --path $IP

For information on adding or editing metadata on IPs, see Helix IPLM Metadata.