Next in thread →
Next in month →
RE: Notation for reference to a notification in an event
Hi Arturo,
Thanks for bringing this up. Your question illustrates that the description of our Event/Condition/Action policy grammar needs more work
😊
That said, I believe that in your example, the full interface type name should be used rather than the interface name. The reason is that the policy can be associated with multiple (node) targets, each of which could use a different name
for the interface of the type that includes the notification.
Of course, this then leads to more questions. For example, is it legal to define multiple interfaces of the same type in a node type? If so, how would that work?
A topic for more discussions later this year?
Thanks,
Chris
From: <>
On Behalf Of Arturo Martin De Nicolas
Sent: Monday, January 4, 2021 2:45 AM
To:
Subject: [tosca] Notation for reference to a notification in an event
Hello Calin, Chris, all,
Happy New Year to all of you!
If I want to use a notification as an event in a trigger definition it is not clear to me how I should refer to the notification.
Should it be:
a) <interface_type_name>.<notification_name>
or
b) <interface_name>.<notification_name>
For example:
tosca_definitions_version: tosca_simple_yaml_1_3
interface_types:
MyCompany.nfv.interfaces.VnfIndicator
derived_from: tosca.interfaces.nfv.VnfIndicator
notifications:
utilization:
description: this notification is used to received asynchronous information of value change of the utilization_vnf_indicator
outputs:
utilization_vnf_indicator:
type: float
â
node_types:
MyCompany.SunshineDB.1_0.1_0:
derived_from: tosca.nodes.nfv.VNF
â
interfaces:
VnfIndicator:
type: MyCompany.nfv.interfaces.VnfIndicator
notifications:
utilization:
outputs:
utilization_vnf_indicator: [ SELF, utilization_vnf_indicator ]
â
policies:
- auto_scale:
type: tosca.policies.nfv.VnfIndicator
properties:
source: vnf
triggers:
scale_out:
event:
MyCompany.nfv.interfaces.VnfIndicator.utilization
# or
# event:
VnfIndicator.utilization
condition:
- utilization_vnf_indicator: [ { greater_or_equal: 60.0 } ]
- call_proc_scale_level: [ { less_than: 3 } ]
action:
- call_operation:
operation: Vnflcm.scale
inputs:
- type:
value: scale_out
- aspect:
value: call_proc
- number_of_steps:
value: 1 # optional
I dug up the document from Calin that introduced it (attached) as I had the memory that the full interface type should be used. However, in the document the node template does not indicate an interface name (or it uses the same name for
the interface as for interface type) so from the document it is not possible to say what notation is used for the notification in the event definition.
Best regards,
Arturo
Next in thread →
Next in month →