Difference between revisions of "PluginsAPI"

From VNUML-WIKI
Jump to: navigation, search
(New page: {| border=1 |- ! Method Name ! Arguments ! Return ! VNUML call point ! Since |- | createPlugin | mode ("t", "d", "x" or "P"), file (from <extension>) conf attribute | Nothing (if plugin cr...)
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Title|VNUML Plugins API}}
 +
 +
The plugins API version 1.0 includes the following methods:
 +
 
{| border=1
 
{| border=1
 
|-
 
|-
Line 8: Line 12:
 
|-
 
|-
 
| createPlugin
 
| createPlugin
| mode ("t", "d", "x" or "P"), file (from <extension>) conf attribute
+
| ''mode'' ("t", "d", "x" or "P"), ''file'' (from <extension> conf attribute)
 
| Nothing (if plugin creation is ok) or error string (if error occurs during creation)
 
| Nothing (if plugin creation is ok) or error string (if error occurs during creation)
 
| Main objects creation at the beginning of VNUML operation
 
| Main objects creation at the beginning of VNUML operation
| 1.9.0
+
| 1.9.0beta1
 
|-
 
|-
 
| bootingCreateFiles
 
| bootingCreateFiles
| -
+
| <vm> name
| -
+
| Hash:
| -
+
* Key (string): the absolute pathname of the file to create in the VM filesystem (as root) at booting time
| 1.9.0
+
* Value (string): the absolute pathname of the file in the host filesystem. The file would be removed after VNUML process it (so temporal files in /tmp are preferable)
 +
'''NOTE''': if the "ERROR" key exists, then VNUML interrupts execution, printing
 +
the value of "ERROR" key as output.
 +
| In &UML_bootfile, just after adding the /mnt/hostfs mountpoint.
 +
| 1.9.0beta2
 
|-
 
|-
 
| bootingCommands
 
| bootingCommands
| -
+
| <vm> name
| -
+
| A list of strings. The first element in the list is an empty string (if there was not any error during plugin operation) or a error string (which is printed by VNUML, interruption execution afterwards). All the remaining elements are the commands to execute in the virtual machine at booting time (in the same order).
| -
+
| In &UML_bootfile, just after bootingCreateFiles
| 1.9.0
+
| 1.9.0beta2
 
|-
 
|-
 
| execVmsToUse
 
| execVmsToUse
| -
+
| command sequence
| -
+
| List of VM names that take part in the sequence passed as argument
| -
+
| In &get_vm_to_use within the DataHandler.pm module
| 1.9.0
+
| 1.9.0beta3
 
|-
 
|-
 
| execCreateFiles
 
| execCreateFiles
| -
+
| <vm> name, command sequence
| -
+
| Hash:
| -
+
* Key (string): the absolute pathname of the file to create in the VM filesystem (as root) just after the <exec> processing loop
| 1.9.0
+
* Value (string): the absolute pathname of the file in the host filesystem. The file would be removed after VNUML process it (so temporal files in /tmp are preferable)
 +
'''NOTE''': if the "ERROR" key exists, then VNUML interrupts execution, printing
 +
the value of "ERROR" key as output.
 +
| In &conf_files, just after <filetree> processing loop
 +
| 1.9.0beta5
 
|-
 
|-
 
| execCommands
 
| execCommands
| -
+
| <vm> name, command sequence
| -
+
| A list of strings. The first element in the list is an empty string (if there was not any error during plugin operation) or a error string (which is printed by VNUML, interruption execution afterwards). All the remaining elements are the commands to execute in the virtual machine after <exec> (in the same order).
| -
+
| In &command_files, just after the <exec> processing loop
| 1.9.0
+
| 1.9.0beta2
 
|-
 
|-
 
| finalizePlugin
 
| finalizePlugin
| -
+
| None
| -
+
| None
| -
+
| Just before ending program
| 1.9.0
+
| 1.9.0beta1
 
|-
 
|-
 
|}
 
|}

Latest revision as of 01:12, 3 March 2009

VNUML Plugins API

The plugins API version 1.0 includes the following methods:

Method Name Arguments Return VNUML call point Since
createPlugin mode ("t", "d", "x" or "P"), file (from <extension> conf attribute) Nothing (if plugin creation is ok) or error string (if error occurs during creation) Main objects creation at the beginning of VNUML operation 1.9.0beta1
bootingCreateFiles <vm> name Hash:
  • Key (string): the absolute pathname of the file to create in the VM filesystem (as root) at booting time
  • Value (string): the absolute pathname of the file in the host filesystem. The file would be removed after VNUML process it (so temporal files in /tmp are preferable)

NOTE: if the "ERROR" key exists, then VNUML interrupts execution, printing the value of "ERROR" key as output.

In &UML_bootfile, just after adding the /mnt/hostfs mountpoint. 1.9.0beta2
bootingCommands <vm> name A list of strings. The first element in the list is an empty string (if there was not any error during plugin operation) or a error string (which is printed by VNUML, interruption execution afterwards). All the remaining elements are the commands to execute in the virtual machine at booting time (in the same order). In &UML_bootfile, just after bootingCreateFiles 1.9.0beta2
execVmsToUse command sequence List of VM names that take part in the sequence passed as argument In &get_vm_to_use within the DataHandler.pm module 1.9.0beta3
execCreateFiles <vm> name, command sequence Hash:
  • Key (string): the absolute pathname of the file to create in the VM filesystem (as root) just after the <exec> processing loop
  • Value (string): the absolute pathname of the file in the host filesystem. The file would be removed after VNUML process it (so temporal files in /tmp are preferable)

NOTE: if the "ERROR" key exists, then VNUML interrupts execution, printing the value of "ERROR" key as output.

In &conf_files, just after <filetree> processing loop 1.9.0beta5
execCommands <vm> name, command sequence A list of strings. The first element in the list is an empty string (if there was not any error during plugin operation) or a error string (which is printed by VNUML, interruption execution afterwards). All the remaining elements are the commands to execute in the virtual machine after <exec> (in the same order). In &command_files, just after the <exec> processing loop 1.9.0beta2
finalizePlugin None None Just before ending program 1.9.0beta1