Library metadata

Helix IPLM Libraries support Label and Widget (Attribute) metadata types, as well as the Library vendor field. This section contains a set of commands and examples that enable the management and configuration of Libraries.

Libraries and labels

Labels are created by a member of the Helix IPLM admin group, and can then be attached or detached from Libraries or IPs using the 'pi label attach/detach' commands. See the Labels section for more information on Labels.

Labels can be used to filter Libraries in the IPLM Web Library catalog or on the command line via the 'pi library list' command. See the Listing Libraries in the System section for details on these functions.

Libraries, attributes, and widgets

Attributes are text strings that can be attached to various Helix IPLM objects. Specially formatted attributes will display on IPLM Web as Widgets, if the attribute does not match the formatting of a particular widget type, it isn't displayed on IPLM Web but is still accessible via PiCLI and the Helix IPLM API. See Attributes and Widgets for more information.

Attributes are managed via PiCLI or the Helix IPLM API.

Display widgets are set on Libraries using the Library Attribute commands described in the following section. For more details on how to format attributes so they display as widgets, see the Widgets section. All available widget formats are supported on Libraries.

Libraries and property sets

Libraries do not support properties directly, but it is possible to attach a property set to a Library. The properties in the attached property set(s) will automatically be applied to all the IPs/IPVs (depending on property type) in that Library. See the Properties page for more information.

Command line

Managing Library attributes

The 'pi library attribute' commands are used to manage attributes on Library objects.

pi library attribute Commands
> pi lib attr -h
Usage: pi library attribute [-h] SUBCOMMAND ...

Description: Commands related to Library Attributes. These subcommands are
used to delete, get, list information about and set Attributes on Libraries.

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

Available sub-commands:
  SUBCOMMAND
    delete (del, remove, rm)
                        Delete an Attribute from a Library.
    get                 Get the value of an Attribute from a Library.
    list (ls)           List the Attributes on a Library.
    set                 Set the value of an Attribute on a Library.

Setting attributes on Libraries

The 'pi library attribute set' command is used to set an attribute on a Library.

pi library attribute set Command
> pi lib attr set -h
Usage: pi library attribute set [-h] [--file FILE]
                                identifier attr_name [attr_value]

Description: Set the value of an Attribute on a Library. Attributes are open
text fields in the Library. Users can set any key/value pair as an Attribute on
a Library. Helix IPLM performs no checks on Attributes. Optionally users can
define the Attribute value in a text file, location specified with --file
option (useful for complicated JSON strings, etc). Users may also read from
command STDIN directly and redirect with standard Unix. Note that the use of
attr_value and --file are mutually exclusive.

Positional arguments:
  identifier   Library identifier on which to set the Attribute.
  attr_name    Name of Attribute to set.
  attr_value   Value of Attribute to set.

Optional arguments:
  --file FILE  Specify path to file containing the Attribute value.
  -h, --help   Show this help message and exit

Examples:
# Set Attribute additional_info on Library my_lib with value NONE
  pi lib attr set my_lib additional_info "NONE"# Set Attribute additional_info on Library my_lib with value from contents of
file info.txt
  pi lib attr set my_lib additional_info --file info.txt

# Set Attribute test_results on Library my_lib with value from STDOUT of
script run_regression.py
  run_regression.py | pi lib attr set my_lib test_results --file -

Example Library Attribute Set
> pi lib attr set tutorial 'MDXDocBtn' '{"display": "button", "data":{"text":"Helix Docs", "url":"https://help.perforce.com/methodics/"}}'
Successfully set Attribute 'MDXDocBtn' on Library 'tutorial'.

Listing attributes on Libraries

The 'pi library attribute list' command is used to list the attribute set on a Library.

pi library attribute list Command
> pi lib attr list -h
Usage: pi library attribute list [-h] identifier

Description: List the Attributes on a Library. All Attributes on the Library
are listed.

Positional arguments:
  identifier  Library identifier the Attributes to list are on.

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

Examples:
# List the Attributes on Library my_lib
  pi library attr list my_lib

Example Library Attribute List
> pi lib attr list tutorial
┌─────────────────────┬───────┬───────────────────────────────┐
│ NAME                │ USER  │ TIME                          │
╞═════════════════════╪═══════╪═══════════════════════════════╡
│ Overview            │ admin │ 2020-03-26 14:44:09 -0400 EDT │
│ PROC_BLOCK_DIAGRAM  │ admin │ 2020-03-26 15:57:45 -0400 EDT │
│ Project_Leads       │ admin │ 2020-03-26 15:56:54 -0400 EDT │
│ Project_Links       │ admin │ 2020-03-26 14:44:09 -0400 EDT │
│ REQUIREMENTS_TRACE  │ admin │ 2020-03-26 15:58:56 -0400 EDT │
│ RESOURCE_TREE       │ admin │ 2020-03-26 15:56:54 -0400 EDT │
│ Regressions_Summary │ admin │ 2020-03-26 15:58:09 -0400 EDT │
│ TUTORIAL_PROGRESS   │ admin │ 2020-03-26 15:56:59 -0400 EDT │
└─────────────────────┴───────┴───────────────────────────────┘
Found 8 matching object(s).

Getting attribute values from Libraries

The 'pi library attribute get' command is used to retrieve the attribute set on a Library.

pi library attribute get Command
> pi lib attr get -h
Usage: pi library attribute get [-h] identifier attr_name

Description: Get the value of an Attribute from a Library. The Attribute value
is returned directly by this command.

Positional arguments:
  identifier  Library identifier to get Attribute value from.
  attr_name   Name of Attribute to get.

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

Examples:
# Get the value of Attribute additional_info from Library my_lib
  pi lib attr get my_lib additional_info

Example Library Attribute Get
> pi lib attr get tutorial Overview
{"display":"text", "column":2, "position":"top", "order":10, "data":[{"title":"Summary","text":"The tutorial project library contains the top level IP (tutorial.tutorial) and all IPs developed specifically for the project. These project IPs may be shared with other projects at a later date, but for the focus is on this SoC."},{"title":"Target Application","text":"The tutorial SoC is a HV regulator targeted at the automotive industry. The design is low-power, with a focus on stability."}]}

Deleting attributes from Libraries

The 'pi library attribute delete' command is used to delete an attribute set on a Library.

pi library attribute delete Command
> pi lib attr delete -h
Usage: pi library attribute delete [-h] identifier attr_name

Description: Delete an Attribute from a Library.

Positional arguments:
  identifier  Library identifier to delete Attribute from.
  attr_name   Name of Attribute to delete.

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

Examples:
# Delete Attribute additional_info from Library my_lib
  pi lib attr del my_lib additional_info

Example Library Attribute Delete
> pi lib attr delete tutorial MDXDocBtn
Successfully removed Attribute 'MDXDocBtn' from Library 'tutorial'.

Library vendor field

The vendor field is available from the 'pi ip edit' template on PiCLi or from the IPLM Web Administration->Libraries page. The vendor field can be used to filter Libraries on PiCLI.

Library Vendor Field
> pi lib list --vendor Helix
┌──────────┬───────────┬──────────────────────────────────────────┬─────────┐
│ NAME     │ VENDOR    │ DESCRIPTION                              │ LABELS  │
╞══════════╪═══════════╪══════════════════════════════════════════╪═════════╡
│ PDK      │ Helix │ PDK IPs                                  │ shared  │
│ tutorial │ Helix │ The Helix tutorial SoC project, a    │ project │
│          │           │ mixed signal automotive project based on │         │
│          │           │ TMS 90nm technology                      │         │
└──────────┴───────────┴──────────────────────────────────────────┴─────────┘
Found 2 matching object(s).