pi ip attribute

pi ip attribute Command Overview

> pi ip attr -h
Usage: pi ip attribute [-h] SUBCOMMAND ...

Description: Commands related to IP, Line or IPV Attributes. These subcommands
are used to delete, get, list information about and set Attributes on IPs,
Lines and IP Versions.

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

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

More information and documentation available at:
  https://help.perforce.com/methodics/
Copyright © 2010-2024 Perforce, Inc.

pi ip attribute delete Command Help

> pi ip attr del -h
Usage: pi ip attribute delete [-h] identifier attr_name

Description: Delete an Attribute from a IP, Line or IPV.

Positional arguments:
  identifier  IP, Line or IPV 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 IP lib.ip
  pi ip attr del lib.ip additional_info

More information and documentation available at:
  https://help.perforce.com/methodics/
Copyright © 2010-2024 Perforce, Inc.

Example

> pi ip attr del tutorial.tutorial FAQ
Successfully removed Attribute 'FAQ' from IP 'tutorial.tutorial'.

pi ip attribute get Command Help

> pi ip attr get -h
Usage: pi ip attribute get [-h] identifier attr_name

Description: Get the value of an Attribute from a IP, Line or IPV. The
Attribute value is returned directly by this command.

Positional arguments:
  identifier  IP, Line or IPV 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 IP lib.ip
  pi ip attr get lib.ip additional_info

More information and documentation available at:
  https://help.perforce.com/methodics/
Copyright © 2010-2024 Perforce, Inc.

Example

> pi ip attr get tutorial.tutorial FAQ
{"column": 2,"display":"text","data":[
{"title":"When does this IP ship?","text":"This IP has already shipped 3 times"},
{"title":"How much does it cost?","text":"$100"}
]}

pi ip attribute list Command Help

> pi ip attr list -h
Usage: pi ip attribute list [-h] identifier

Description: List the Attributes on a IP, Line or IPV. All Attributes on the
IP, Line or IPV are listed.

Positional arguments:
  identifier  IP, Line or IPV identifier the Attributes to list are on.

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

Examples:
# List the Attributes on IP lib.ip
  pi ip attr list lib.ip

More information and documentation available at:
  https://help.perforce.com/methodics/
Copyright © 2010-2024 Perforce, Inc.

Example

> pi ip attr list tutorial.tutorial
┌───────────┬───────┬───────────────────────────────┐
│ NAME      │ USER  │ TIME                          │
╞═══════════╪═══════╪═══════════════════════════════╡
│ FAQ       │ admin │ 2019-07-26 15:58:42 -0400 EDT │
│ Resources │ admin │ 2019-07-26 15:58:49 -0400 EDT │
└───────────┴───────┴───────────────────────────────┘
Found 2 matching object(s).

pi ip attribute set Command Help

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

Description: Set the value of an Attribute on a IP, Line or IPV. Attributes
are open text fields in the IP, Line or IPV. Users can set any key/value pair
asan Attribute on a IP, Line or IPV. 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   IP, Line or IPV 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 IP lib.ip with value NONE
  pi ip attr set lib.ip additional_info "NONE"# Set Attribute additional_info on IP lib.ip with value from contents of file
info.txt
  pi ip attr set lib.ip additional_info --file info.txt

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

More information and documentation available at:
  https://help.perforce.com/methodics/
Copyright © 2010-2024 Perforce, Inc.

Example

> pi ip attr set tutorial.tutorial FAQ '{"column": 2,"display":"text","data":[{"title":"When does this IP ship?","text":"This IP has already shipped 3 times"},{"title":"How much does it cost?","text":"$100"}]}'
Successfully set Attribute 'FAQ' on IP 'tutorial.tutorial'.