Package org.opennebula.client.hook
Class Hook
java.lang.Object
org.opennebula.client.PoolElement
org.opennebula.client.hook.Hook
This class represents an OpenNebula Hook.
It also offers static XML-RPC call wrappers.
-
Field Summary
Fields inherited from class org.opennebula.client.PoolElement
client, id, xml, xpath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OneResponse
Allocates a new Hook in OpenNebula.delete()
Deletes the Hook from OpenNebula.static OneResponse
Deletes a Hook from OpenNebula.info()
Retrieves the information of the Hook.static OneResponse
Retrieves the information of the given Hook.lock
(int level) Lock this Hookstatic OneResponse
lock this HookRenames this Hookstatic OneResponse
Renames this Hookretry
(int exec_id) Retry this Hookstatic OneResponse
Retry this Hookunlock()
Unlock this Hookstatic OneResponse
Unlock this HookReplaces the Hook contents.Replaces the Hook contents.static OneResponse
Replaces the Hook contents.
-
Constructor Details
-
Hook
Creates a new Hook representation.- Parameters:
id
- The Hook id.client
- XML-RPC Client.
-
Hook
- See Also:
-
-
Method Details
-
allocate
Allocates a new Hook in OpenNebula.- Parameters:
client
- XML-RPC Client.description
- A string containing the template of the Hook.- Returns:
- If successful the message contains the associated id generated for this Hook.
-
info
Retrieves the information of the given Hook.- Parameters:
client
- XML-RPC Client.id
- The Hook id for the Hook to retrieve the information from- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
delete
Deletes a Hook from OpenNebula.- Parameters:
client
- XML-RPC Client.id
- The Hook id of the target Hook we want to delete.- Returns:
- A encapsulated response.
-
update
Replaces the Hook contents.- Parameters:
client
- XML-RPC Client.id
- The Hook id of the target Hook we want to modify.new_template
- New Hook contents.append
- True to append new attributes instead of replace the whole Hook- Returns:
- If successful the message contains the Hook id.
-
rename
Renames this Hook- Parameters:
client
- XML-RPC Client.id
- The Hook id of the target Hook.name
- New name for the Hook.- Returns:
- If an error occurs the error message contains the reason.
-
lock
lock this Hook- Parameters:
client
- XML-RPC Client.id
- The hook id.level
- Lock level.- Returns:
- If an error occurs the error message contains the reason.
-
unlock
Unlock this Hook- Parameters:
client
- XML-RPC Client.id
- The Hook id.- Returns:
- If an error occurs the error message contains the reason.
-
retry
Retry this Hook- Parameters:
client
- XML-RPC Client.id
- The Hook id.exec_id
- the hook execution id.- Returns:
- If an error occurs the error message contains the reason.
-
info
Retrieves the information of the Hook.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
delete
Deletes the Hook from OpenNebula.- Returns:
- A encapsulated response.
-
update
Replaces the Hook contents.- Parameters:
new_template
- New Hook contents.- Returns:
- If successful the message contains the Hook id.
-
update
Replaces the Hook contents.- Parameters:
new_template
- New Hook contents.append
- True to append new attributes instead of replace the whole Hook- Returns:
- If successful the message contains the hook id.
-
rename
Renames this Hook- Parameters:
name
- New name for the Hook.- Returns:
- If an error occurs the error message contains the reason.
-
lock
Lock this Hook- Parameters:
level
- Lock level.- Returns:
- If an error occurs the error message contains the reason.
-
unlock
Unlock this Hook- Returns:
- If an error occurs the error message contains the reason.
-
retry
Retry this Hook- Parameters:
exec_id
- the hook execution id.- Returns:
- If an error occurs the error message contains the reason.
-