Skip to main content

CMDB Syncpack, sending active status example

  • June 13, 2025
  • 0 replies
  • 0 views

teppotahkapaa
Forum|alt.badge.img+1

In the doc site there is an example to send Active status to cmdb,

{%- set output = [] -%} {%- if device.active.unavailable == True -%}{%- set output = output + ['Unavailable'] -%} {%- endif -%} {%- if device.active.userDisabled == True -%}{%- set output = output + ['User Disabled'] -%} {%- endif -%} {%- if device.active.userInitiatedMaintenance == True -%}{%- set output = output + ['User Initiated Maintenance'] -%}{%- endif -%} {%- if device.active.userMaintenance == True -%}{%- set output = output + ['User Initiated Maintenance'] -%}{%- endif -%} {%- if output|length > 0 -%} {{ ", ".join(output) }} {%- else -%} {{ "Active" }} {%- endif -%}

that example has both single-quotation and double-quotation marks, and when the whole code needs to be put inside double-quotation marks, that will then break the JSON.

So please change those double-quotation marks to single-quotation marks in that example