Short Form Syntax

Alternative syntax for connections and connection targets

Writing out full ConnectionDefinition structures in Host Manifests can be repetitive. An alternative is to specify either the entire ConnectionDefinition or individual ConnectionTargetDefinitions in short form syntax.

Common Example

Verbose form

- from:
    instance: instance1
    port: instance1_output
  to:
    instance: instance2
    port: instance2_input

Alternative short form

- instance[instance1_output] => instance2[instance2_input]

Schematic Input/Output example

A common practice is to mirror the port name of the connected ports as the name for the attached schematic input and output. The diamond, <> is short form for <input> when in the from position and <output> in the to position with a port name of the connected port.

Verbose form

- from:
    instance: <input>   // <input> refers to the schematic input
    port: instance1_input
  to:
    instance: instance1
    port: instance1_input
- from:
    instance: instance1
    port: instance1_output
  to:
    instance: <output>
    port: instance1_output

Alternative short form

- <> => instance1[instance1_input]
- instance1[instance1_output] => <>

Schematic Input/Output with explicit port name

Verbose form

- from:
    instance: <input>
    port: schematic_input
  to:
    instance: instance1
    port: instance1_input

Alternative short form

- <>[schematic_input] => instance1[instance1_input]

Specifying default input

It’s common to specify default inputs to ports and this can be done by omitting the from reference and providing a default value. Defaults are parsed as JSON.

Verbose form

- to:
    instance: instance1
    port: instance1_input
  default: '"Default input"'

Alternative short form

- '"Default input" => instance1[instance1_input]'

Specifying single ConnectionTarget

The short form for a ConnectionTargetDefinition is valid on either the from or to fields individually.

Verbose form

- from:
    instance: instance1
    port: instance1_output
  to:
    instance: instance2
    port: instance2_input

Alternative short form

- from:
    instance: instance1
    port: instance1_output
  to: instance2[instance2_input]