cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
775
Views
10
Helpful
3
Replies

Action does not exist in kicker invocation

Gastonper
Level 1
Level 1

I have a problem with kicker invocation, ncs cant find the action, It says that doesn't exist. Even if I change the action-name with another I have the same problem. If I call the action directly from the cli I have no problem, all my actions works well, but the kicker cant find them for some reason

  • devel.log:

 

<INFO> 9-Sep-2022::13:16:28.317 37693c46734f ncs[1]: ncs progress usid=1835 tid=59488 datastore=running context=cli check data kickers
<ERR> 9-Sep-2022::13:16:28.318 37693c46734f ncs[1]: ncs Action, addmdu, does not exist

 

  •  kicker configuration:

 

kickers data-kicker mdurequest
 monitor     /services/pon/actions/mdu-request
 kick-node   mgmt-ip-address
 action-name addmdu
!

 

  • Yang:

 

	augment "/ncs:services/pon:pon/pon:actions" {
		list mdu-request {
			key "olt rack shelf slot port onuid";

			uses input-onu;

			leaf mgmt-ip-address {
				mandatory true;
				type inet:ip-address;
			}

			tailf:action addmdu {
				tailf:actionpoint addmdu;

				input {
					uses kicker:action-input-params;

				}
				output {
					leaf message {
						type string;
					}
				}
			}
		}
	}

 

  •  ncs --status:

 

actionpoints:
      id=addmdu daemonId=1271 daemonName=ncs-dp-18324-pon-actions:config-mdu callbacks=action,init

 

  • debug kicker:

 

admin@ncs(config)# services pon actions mdu-request CEYD-01Z 1 1 3 1 70 mgmt-ip-address 192.168.7.3
admin@ncs(config-mdu-request-CEYD-01Z/1/1/3/1/70)# commit | debug kicker                                                           2022-09-09T13:46:20.064 kicker: mdurequest at /ncs:services/pon:pon/pon:actions/config-mdu:mdu-request[config-mdu:olt='CEYD-01Z'][config-mdu:rack='1'][config-mdu:shelf='1'][config-mdu:slot='3'][config-mdu:port='1'][config-mdu:onuid='70'] changed; invoking addmdu
Commit complete.

 

1 Accepted Solution

Accepted Solutions

radioman
Spotlight

Hi

The action does not exist as you are invoking it from wrong location.

If you want it triggered for any change under mdu-request you could try something like this:

kickers data-kicker mdurequest
 monitor     /services/pon/actions/mdu-request
 kick-node  .
 action-name addmdu
!

Or if you want it triggered only when mgmt-ip-address is change you could try something like this:

kickers data-kicker mdurequest
 monitor     /services/pon/actions/mdu-request/mgmt-ip-address
 kick-node   ../
 action-name addmdu
!

 

br.

Kristoffer Larsen

View solution in original post

3 Replies 3

ygorelik
Cisco Employee
Cisco Employee

It looks like the action is not registered with the Python/Java process. In Python code for the action you should have this:

class ActionClass(Action):
@Action.action
def cb_action(self, uinfo, name, kp, _input, output, trans):
self.log.debug(f"Entered cb_action {name}")

class Main(ncs.application.Application):
def setup(self
# The application class sets up logging for us. It is accessible
# through 'self.log' and is a ncs.log.Log instance.
self.log.info('Main RUNNING')

# When using actions, this is how we register them:
#
self.register_action('addmdu', ActionClass)

When you reload the package you should see in the log for your package that your action is registered.

<INFO> 08-Sep-2022::17:18:06.188 <name-of-the-package> ComponentThread:addmdu: - Main RUNNING

Yan

radioman
Spotlight

Hi

The action does not exist as you are invoking it from wrong location.

If you want it triggered for any change under mdu-request you could try something like this:

kickers data-kicker mdurequest
 monitor     /services/pon/actions/mdu-request
 kick-node  .
 action-name addmdu
!

Or if you want it triggered only when mgmt-ip-address is change you could try something like this:

kickers data-kicker mdurequest
 monitor     /services/pon/actions/mdu-request/mgmt-ip-address
 kick-node   ../
 action-name addmdu
!

 

br.

Kristoffer Larsen

That works, thank you!