<PropertyDef> element

The <PropertyDef> element defines a property that can be used in a <Property> element.


Parent element: <Catalog>

The following attribute is supported:
Table 1. Attribute
Attribute Required Type Description
name yes string Specifies the name of the property.
The following child elements are supported:
Table 2. Child element
Child element Required Description
<Command> no Command
<Argument> no Command-line arguments
<Stdin> no Arguments supported by the <Stdin> elements
<Filter> no Filter
<Mask> no Output capturing mask
Note: The <Command> element must be defined for each property: at the <ParameterDef> level, at the <CfgMethod> level, or in a <PropertyDef> element.


Properties are key-value pairs associated with a parameter. The value of the key-value pairs are retrieved by the artexget –r and artexget –n commands and saved in the output profile. Property values saved in a profile can be inserted into a command line by using the %p[property_name] sequence.

The <PropertyDef> element defines a property. This property can later be associated to a parameter or configuration method by using a <Property> element that has the same name attribute.


The following example assigns a nodeId property to the netaddr and netaddr6 parameters:

<PropertyDef name="nodeId">
  <Command>/usr/bin/uname -f</Command>

<ParameterDef name="netaddr" type="string" targetClass="device" cfgmethod="attr">
  <Property name="nodeId"/>

<ParameterDef name="netaddr6" type="string" targetClass="device" cfgmethod="attr">
  <Property name="nodeId"/>

In this example, the uname command is run only once, because the two parameters use the same <Command> element for their property, and the generated command line is the same for the two parameters.

Related Information