{"type":"api","title":"Modify an 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":"srPolicyModify","tags":["cisco-crosswork-optimization-engine-sr-policy-operations"],"summary":"Modify an SR policy","description":"Modifies the configuration of an existing Segment Routing (SR) policy.","parameters":[{"in":"body","name":"sr.policy.common.SrPolicyDetailList.body-param","description":"Input parameters for modifying an SR policy.","required":false,"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"sr-policies":{"type":"array","items":{"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"},"binding-sid":{"type":"integer","format":"int64","description":"The binding SID for the SR policy"},"path-name":{"type":"string","description":"The path name of the SR policy"},"profile-id":{"type":"integer","format":"int64","description":"The profile ID for the SR policy"},"description":{"type":"string","description":"The description of the SR policy"},"color":{"type":"integer","format":"int64","description":"The color for the SR policy"},"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.srpolicydetaillist.SrPolicies"}}},"$$ref":"#/definitions/sr.policy.common.SrPolicyDetailList"}}}}],"responses":{"200":{"description":"Correct response","schema":{"type":"object","properties":{"output":{"type":"object","properties":{"results":{"type":"array","items":{"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"},"message":{"type":"string","description":"The details of state above, for failure and degraded"},"state":{"description":"The result for a policy create, update or delete operation","type":"string","enum":["success","failure","degraded"],"$$ref":"#/definitions/sr.policy.common.StateEnumeration"},"color":{"type":"integer","format":"int64","description":"The color for the SR policy"}},"$$ref":"#/definitions/sr.policy.common.srpolicyresultlist.Results"}}},"$$ref":"#/definitions/sr.policy.common.SrPolicyResultList"}}}},"204":{"description":"No response"},"400":{"description":"Internal error"}},"__originalOperationId":"srPolicyModify","consumes":["application/yang-data+json"],"produces":["application/yang-data+json"],"method":"post","path":"/operations/cisco-crosswork-optimization-engine-sr-policy-operations:sr-policy-modify"}}