Updates method details in monitor-driver guide
Method definitions in the monitoring driver guide is updated to be more readable. Also 'action' section is updated with 'heat'. Change-Id: I4ec8e8af1c5b756c791435142ad8af9386db277e
This commit is contained in:
parent
48f4ac2e9b
commit
6b84481420
@ -33,32 +33,35 @@ For example:
|
|||||||
tacker.tacker.monitor_drivers =
|
tacker.tacker.monitor_drivers =
|
||||||
ping = tacker.vm.monitor_drivers.ping.ping:VNFMonitorPing
|
ping = tacker.vm.monitor_drivers.ping.ping:VNFMonitorPing
|
||||||
|
|
||||||
The methods that need to override in driver are:
|
Following methods need to be overridden in the new driver:
|
||||||
1)def get_type(self)
|
|
||||||
This method must return the type of driver ex: ping
|
|
||||||
|
|
||||||
2)def get_name(self)
|
``def get_type(self)``
|
||||||
This method must return the symbolic name of the device monitor plugin
|
This method must return the type of driver. ex: ping
|
||||||
|
|
||||||
3)def get_description(self)
|
``def get_name(self)``
|
||||||
This method must return the description for the monitor driver
|
This method must return the symbolic name of the device monitor plugin.
|
||||||
|
|
||||||
4)def monitor_get_config(self, plugin, context, device)
|
``def get_description(self)``
|
||||||
This method must return dict of monitor configuration data
|
This method must return the description for the monitor driver.
|
||||||
|
|
||||||
5)def monitor_url(self, plugin, context, device)
|
``def monitor_get_config(self, plugin, context, device)``
|
||||||
This method must return the url of device to monitor
|
This method must return dictionary of configuration data for the monitor
|
||||||
|
driver.
|
||||||
|
|
||||||
6)def monitor_call(self, device, kwargs)
|
``def monitor_url(self, plugin, context, device)``
|
||||||
This method must either return boolean value True if VNF is healthy or return
|
This method must return the url of device to monitor.
|
||||||
a event string like 'failure' or 'calls-capacity-reached' for specific VNF
|
|
||||||
health condition.
|
``def monitor_call(self, device, kwargs)``
|
||||||
|
This method must either return boolean value 'True', if VNF is healthy.
|
||||||
|
Otherwise it should return an event string like 'failure' or
|
||||||
|
'calls-capacity-reached' based on specific VNF health condition. More
|
||||||
|
details on these event is given in below section.
|
||||||
|
|
||||||
Custom events
|
Custom events
|
||||||
--------------
|
--------------
|
||||||
As mentioned above, the return value of monitor_call is health status. If the
|
As mentioned in above section, if the return value of monitor_call method is
|
||||||
return value of monitor_call is other than boolean value True, then we have to
|
other than boolean value 'True', then we have to map those event to the
|
||||||
map those event to the corresponding action as described below.
|
corresponding action as described below.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -70,7 +73,7 @@ For example:
|
|||||||
actions:
|
actions:
|
||||||
failure: respawn
|
failure: respawn
|
||||||
|
|
||||||
In this example we have an event called 'failure'. So whenever monitor_call
|
In this example, we have an event called 'failure'. So whenever monitor_call
|
||||||
returns 'failure' tacker will respawn the VNF.
|
returns 'failure' tacker will respawn the VNF.
|
||||||
|
|
||||||
|
|
||||||
@ -79,9 +82,8 @@ Actions
|
|||||||
The available actions that a monitor driver can call when a particular event
|
The available actions that a monitor driver can call when a particular event
|
||||||
occurs
|
occurs
|
||||||
|
|
||||||
1. respawn
|
#. respawn
|
||||||
2. log_and_kill
|
#. log
|
||||||
3. log
|
|
||||||
|
|
||||||
How to write TOSCA template to monitor VNF entities
|
How to write TOSCA template to monitor VNF entities
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user