generateDsl

Back to index

Summary

Generates a domain-specific language (DSL) script for the specified object including all nested objects, parameters, and custom properties, subject to arguments passed in with the command.
path
Stringrequired
A property path indicating a single object for which DSL will be generated.
format
Stringoptional
Format to use for the DSL. Defaults to groovy format.
Possible values: "groovy", "yaml"
includeChildren
Stringoptional
A comma-separated list of collection types to include in generated DSL, all other children will be suppressed.
suppressChildren
Booleanoptional
True to suppress all child entities in the generated DSL for the object.
suppressDefaults
Booleanoptional
True to suppress system default in the generated DSL for the object.
suppressEmpty
Booleanoptional
True to suppress properties with empty values in the generated DSL for the object.
suppressNulls
Booleanoptional
True to suppress properties with null values in the generated DSL for the object.
suppressParent
Booleanoptional
True to remove object parent reference from DSL output.
suppressParentAcl
Booleanoptionalpreview
This argument is in preview mode, and therefore subject to change.
True to suppress the parent ACL when generating ACLs for child objects. Use only if withAcls argument equals True.
useFileReferences
Booleanoptional
True to replace specific properties with file references.
withAcls
Booleanoptional
True to emit ACLs in the generated DSL for the object.

Usage

Perl

$cmdr->generateDsl( "test-path" # path # optionals );

ectool

ectool generateDsl \ "test-path" `# path` \ # optionals

Examples

Perl

To include ACLs for the parent and all nested objects:

$cmdr->generateDsl("/resources/local", {withAcls => true});

To include the Default project and only its pipelines:

$cmdr->generateDsl("/projects/Default", {includeChildren => "pipelines"});

To suppress default values:

$cmdr->generateDsl("/resources/local", {suppressDefaults => true});

ectool

To include ACLs for the parent and all nested objects:

ectool generateDsl "/resources/local" --withAcls true

To include the Default project and only its pipelines:

ectool generateDsl "/resources/local" --includeChildren "pipelines"

To suppress default values:

ectool generateDsl "/resources/local" --suppressDefaults true