{"type":"api","title":"Perform dry run for SR policy","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/3d89d4b5-ca39-3db6-845a-ca999a1058d3","info":{"description":"This API provides operations for managing Segment Routing (SR) policies, including creation, modification, deletion, and dry-run simulations.","version":"7.1.0","title":"Cisco Crosswork SR Policy Operations API","contact":{"name":"API Support","url":"https://www.cisco.com/support","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"}},"swagger":"2.0","host":"localhost:30603","basePath":"/crosswork/nbi/optimization/v3/restconf","securityDefinitions":{"api_key":{"description":"Authentication: Bearer $JWT","type":"apiKey","name":"api_key","in":"header"}}},"spec":{"operationId":"srPolicyDryrun","tags":["cisco-crosswork-optimization-engine-sr-policy-operations"],"summary":"Perform dry run for SR policy","description":"Simulates the creation or modification of an SR policy without applying changes.","parameters":[{"in":"body","name":"sr.policy.common.SrPolicyDryrunInput.body-param","description":"Input parameters for performing a dry run on an SR policy.","required":false,"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"head-end":{"type":"string","description":"The IP address of the SR policy source"},"end-point":{"type":"string","description":"The IP address of the SR policy destination"},"sr-policy-path":{"type":"object","properties":{"path-optimization-objective":{"description":"The objective to minimize, igp-metric, te-metric or delay","x-choice":"sr-policy-path:dynamic-path","type":"string","enum":["igp-metric","te-metric","delay","hop-count"],"$$ref":"#/definitions/sr.policy.common.OptimizationObjective"},"disjointness":{"x-choice":"sr-policy-path:dynamic-path","type":"object","properties":{"association-group":{"type":"integer","format":"int64","description":"Association group"},"disjointness-type":{"type":"string","enum":["node","circuit","srlg","srlg-node"],"$$ref":"#/definitions/sr.policy.common.DisjointnessTypeEnumeration"},"association-sub-group":{"type":"integer","format":"int64","description":"Association sub-group"}},"$$ref":"#/definitions/sr.policy.common.srpolicydynamicpath.Disjointness"},"protected":{"type":"boolean","description":"Use protected adjacency SIDs in path computation, defaults to true","x-choice":"sr-policy-path:dynamic-path"},"bandwidth":{"type":"integer","format":"int32","description":"The desired bandwidth for the SR policy","x-choice":"sr-policy-path:bandwidth-path"},"bw-path-optimization-objective":{"description":"The objective to minimize, igp-metric, te-metric or delay","x-choice":"sr-policy-path:bandwidth-path","type":"string","enum":["igp-metric","te-metric","delay","hop-count"],"$$ref":"#/definitions/sr.policy.common.OptimizationObjective"},"affinities":{"x-choice":"sr-policy-path:dynamic-path","type":"object","properties":{"include-all":{"type":"integer","format":"int64","description":"include-any affinity bits combined into an unsigned integer"},"exclude-any":{"type":"integer","format":"int64","description":"include-any affinity bits combined into an unsigned integer"},"include-any":{"type":"integer","format":"int64","description":"include-any affinity bits combined into an unsigned integer"}},"$$ref":"#/definitions/sr.policy.common.srpolicydynamicpath.Affinities"},"sid-algorithm":{"type":"integer","format":"int32","description":"The flexalgo of SIDs in path computation","x-choice":"sr-policy-path:dynamic-path"},"hops":{"type":"array","items":{"type":"object","properties":{"hop":{"type":"object","properties":{"adjacency-ipv6-address":{"type":"string","description":"The IPv6 adjacency address","x-choice":"hop:adjacency-ipv6-hop"},"adjacency-ipv4-sid":{"type":"integer","format":"int64","description":"The IPv4 adjacency segment identifier","x-choice":"hop:adjacency-ipv4-hop"},"node-ipv6-address":{"type":"string","description":"The IPv6 node address","x-choice":"hop:node-ipv6-hop"},"node-ipv4-address":{"type":"string","description":"The IPv4 node address","x-choice":"hop:node-ipv4-hop"},"adjacency-ipv6-sid":{"type":"integer","format":"int64","description":"The IPv6 adjacency segment identifier","x-choice":"hop:adjacency-ipv6-hop"},"adjacency-ipv4-address":{"type":"string","description":"The IPv4 adjacency address","x-choice":"hop:adjacency-ipv4-hop"},"node-ipv6-sid":{"type":"integer","format":"int64","description":"The IPv6 node segment identifier","x-choice":"hop:node-ipv6-hop"},"node-ipv4-sid":{"type":"integer","format":"int64","description":"The IPv4 node segment identifier","x-choice":"hop:node-ipv4-hop"}},"$$ref":"#/definitions/sr.policy.common.srpolicyexplicitpath.hops.Hop"},"step":{"type":"integer","format":"int64","description":"The representation of the hop order in the path"}},"$$ref":"#/definitions/sr.policy.common.srpolicyexplicitpath.Hops"},"x-choice":"sr-policy-path:explicit-path"},"bw-path-sid-algorithm":{"type":"integer","format":"int32","description":"The flexalgo of SIDs in bandwidth path computation","x-choice":"sr-policy-path:bandwidth-path"}},"$$ref":"#/definitions/sr.policy.common.srpolicypath.SrPolicyPath"}},"$$ref":"#/definitions/sr.policy.common.SrPolicyDryrunInput"}}}}],"responses":{"200":{"description":"Correct response","schema":{"type":"object","properties":{"output":{"type":"object","properties":{"segment-list-hops":{"type":"array","items":{"type":"object","properties":{"ip-address":{"type":"string","description":"The IP address of the hop"},"step":{"type":"integer","format":"int64","description":"The representation of the hop order in the path"},"type":{"description":"The type of the hop","type":"string","enum":["node-ipv4","adjacency-ipv4","node-ipv6","adjacency-ipv6","unknown"],"$$ref":"#/definitions/sr.policy.common.TypeEnumeration"},"sid":{"type":"integer","format":"int64","description":"The segment identifier for the hop"}},"$$ref":"#/definitions/sr.policy.common.srpolicydryrunresult.SegmentListHops"}},"state":{"description":"The result for the policy preview operation","type":"string","enum":["success","failure","degraded"],"$$ref":"#/definitions/sr.policy.common.StateEnumeration"},"message":{"type":"string","description":"The details of state above, for failure or degraded"},"igp-route":{"type":"array","items":{"type":"object","properties":{"interface":{"type":"string","description":"The name of the interface"},"node":{"type":"string","description":"The hostname of the source-node for the interface"}},"$$ref":"#/definitions/sr.policy.common.srpolicydryrunresult.IgpRoute"}}},"$$ref":"#/definitions/sr.policy.common.SrPolicyDryrunResult"}}}},"204":{"description":"No response"},"400":{"description":"Internal error"}},"__originalOperationId":"srPolicyDryrun","consumes":["application/yang-data+json"],"produces":["application/yang-data+json"],"method":"post","path":"/operations/cisco-crosswork-optimization-engine-sr-policy-operations:sr-policy-dryrun"}}