Dynamic GC Compliance & Remediation
  • 23 May 2023
  • Dark
    Light
  • PDF

Dynamic GC Compliance & Remediation

  • Dark
    Light
  • PDF

Article summary

Dynamic GC Compliance & Remediation

Golden Configurations are frequently managed through the UI for many operations; however, it is important that we extend this functionality to Automation Studio via exposed tasks as well. Previously it was difficult to dynamically design Golden Configurations through tasks and APIs, but with two new APIs it has now become straightforward. With that being said, the following tasks have been implemented.

updateNodeConfig

The updateNodeConfig task allows you to easily update the configuration of a node in a GC tree.

Property Description
treedId Id of the Golden Config tree.
treeVersion Version of the Golden Config tree.
nodePath Path of the node to modify in the configuration.
data A JSON object that must contain a template (string) and a variables (json) key.
updateVariables Determines whether or not to use the input variables from the data parameter to update the Golden Config tree variables. If false then these variables will be ignored after run-time.

Example

{
  "treeId": "60ad5b4948555dc621052bd0",
  "treeVersion": "initial",
  "nodePath": "base/US-West",
  "data": {
      "template": "ntp server {{ntp_ip}}",
      "variables": {
          "ntp_ip": "192.15.32.146"
      }
  },
  "updateVariables": false
}

convertChangesToConfig

The convertChangesToConfig task displays the remediation payload as a native configuration to preview the config that would be sent to the device for application.

Property Description
deviceType Used for determining how to display the native-config based on the os-type.
changes The changes object that is the result of the manual-remediation task's output. This is sent to AG or NSO for remediation.

Example

{
  "deviceType": "cisco-ios",
  "changes": [
      {
          "parents": [],
          "old": null,
          "new": "hostname IOS-Device1"
      }
  ]
}

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.