Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-1604

Resource Configuration Snapshots Executor and API

XMLWordPrintable

      This is the first implementation of a new feature supporting the storage of configurations applied to resources, as well as a dry-run feature to compare configurations before applying. 

       

      The executor support three operations: fetch, store and diff. 

      Resource configuration snapshots can either be of type RUNNING or CANDIDATE, the latter being a new configuration to be applied to a resource.  The diff operation allows to compare RUNNING vs CANDIDATE snapshots, either in xml or json formats. 

      The output of these comparison, are  structured either as a json or xml patch (simplified) payload : 

      application/json-patch+json [RFC6902]
      [   
        {"op":"move","path":"/system-uptime-information/source-of-time","from":"/system-uptime-information/time-source"},    {"op":"move","path":"/system-uptime-information/system-boot-time","from":"/system-uptime-information/system-booted-time"},   
        {"op":"replace","path":"/system-uptime-information/last-configured-time/user","value":"developer"}
      ]

      application/xml-patch+json [RFC5261]
      <?xml version="1.0" encoding="UTF-8"?>
      <diff>
        <replace sel="/output[1]/interface-information[1]/interface-flapped[1]/@seconds">2343</replace>
        <replace sel="/output[1]/interface-information[1]/interface-flapped[1]/text()[1]">34</replace>
        <replace sel="/output[1]/interface-information[1]/traffic-statistics[1]/input-packets[1]/text()[1]">09098789</replace>
        <replace sel="/output[1]/interface-information[1]/traffic-statistics[1]/output-packets[1]/text()[1]">2828828</replace>
        <add sel="/output[1]/interface-information[1]/physical-interface[1]">
             <interface-name>TEGig400-int01</interface-name>
         </add>
      </diff>

            agileone agileone
            agileone agileone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: