cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
767
Views
0
Helpful
1
Replies

Triggering new Servicepoint using touch/re-deploy in service package

mustapha-o
Level 1
Level 1

I have a Service Package with two separate Servicepoints, under certain conditions, I need to trigger the second servicepoint from the request coming in the first service point, e.g.:

Container Parent {
    List A {
        ncs:servicepoint
         ....
    }
     List B {
        ncs:servicepoint
         ....
    }
}

 

Inside the Python Service package, If we send request on servicepoint B, some condition may require servicepoint A to be re-applied, we have tried the use of touch(), re-deploy, as well as modifying the tree under servicepoint A, but that action does not get triggered. 

What's curious is when if I perform a re-deploy on servicepoint B after committing my changes (from CLI, or explicitly setting the "deep" option in restconf api), the changes do get applied. Re-deploy shallow does not trigger the second servicepoint.

I would prefer to have all my changes in a single transaction, but I am not sure what's the limitation that is preventing this behavior and if the alternative is using kickers or separate external requests, then we may have to live with that.

Appreciate anyone that has any insight!

1 Reply 1

mmollber
Cisco Employee
Cisco Employee

A bit late of a reply, but if the goal is to configure both in the same transaction I would recommend using a third service to configure the other two.

    C
  /  \
A     B

 With this approach, making a change in C will trigger both A and B in the same transaction.

In this example, services A and B configure values in /some-other-container/some-list.
The third service, C, configures A and B. In the same transaction we see that the change in C propagates to both services A and B and then into some-list.

admin@ncs% set Parent C test1 value 42
[ok][2025-12-16 14:22:24]

[edit]
admin@ncs% commit dry-run
cli {
    local-node {
        data  some-other-container {
             +    some-list test1-A-42 {
             +    }
             +    some-list test1-B-42 {
             +    }
              }
              Parent {
                  C test1 {
             +        value 42;
                  }
                  A test1-A {
             +        value 42;
                  }
                  B test1-B {
             +        value 42;
                  }
              }
    }
}

 The alternative is to use kickers, which will require less work but then the change will not be in the same transaction.

Did you already resolve this, what approach did you use?