public class Hook extends PoolElement
client, id, xml, xpath
Modifier | Constructor and Description |
---|---|
|
Hook(int id,
Client client)
Creates a new Hook representation.
|
protected |
Hook(org.w3c.dom.Node xmlElement,
Client client) |
Modifier and Type | Method and Description |
---|---|
static OneResponse |
allocate(Client client,
java.lang.String description)
Allocates a new Hook in OpenNebula.
|
OneResponse |
delete()
Deletes the Hook from OpenNebula.
|
static OneResponse |
delete(Client client,
int id)
Deletes a Hook from OpenNebula.
|
OneResponse |
info()
Retrieves the information of the Hook.
|
static OneResponse |
info(Client client,
int id)
Retrieves the information of the given Hook.
|
static OneResponse |
lock(Client client,
int id,
int level)
lock this Hook
|
OneResponse |
lock(int level)
Lock this Hook
|
static OneResponse |
rename(Client client,
int id,
java.lang.String name)
Renames this Hook
|
OneResponse |
rename(java.lang.String name)
Renames this Hook
|
static OneResponse |
retry(Client client,
int id,
int exec_id)
Retry this Hook
|
OneResponse |
retry(int exec_id)
Retry this Hook
|
OneResponse |
unlock()
Unlock this Hook
|
static OneResponse |
unlock(Client client,
int id)
Unlock this Hook
|
static OneResponse |
update(Client client,
int id,
java.lang.String new_template,
boolean append)
Replaces the Hook contents.
|
OneResponse |
update(java.lang.String new_template)
Replaces the Hook contents.
|
OneResponse |
update(java.lang.String new_template,
boolean append)
Replaces the Hook contents.
|
public Hook(int id, Client client)
id
- The Hook id.client
- XML-RPC Client.protected Hook(org.w3c.dom.Node xmlElement, Client client)
PoolElement
public static OneResponse allocate(Client client, java.lang.String description)
client
- XML-RPC Client.description
- A string containing the template of the Hook.public static OneResponse info(Client client, int id)
client
- XML-RPC Client.id
- The Hook id for the Hook to retrieve the information frompublic static OneResponse delete(Client client, int id)
client
- XML-RPC Client.id
- The Hook id of the target Hook we want to delete.public static OneResponse update(Client client, int id, java.lang.String new_template, boolean append)
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 Hookpublic static OneResponse rename(Client client, int id, java.lang.String name)
client
- XML-RPC Client.id
- The Hook id of the target Hook.name
- New name for the Hook.public static OneResponse lock(Client client, int id, int level)
client
- XML-RPC Client.id
- The hook id.level
- Lock level.public static OneResponse unlock(Client client, int id)
client
- XML-RPC Client.id
- The Hook id.public static OneResponse retry(Client client, int id, int exec_id)
client
- XML-RPC Client.id
- The Hook id.exec_id
- the hook execution id.public OneResponse info()
public OneResponse delete()
public OneResponse update(java.lang.String new_template)
new_template
- New Hook contents.public OneResponse update(java.lang.String new_template, boolean append)
new_template
- New Hook contents.append
- True to append new attributes instead of replace the whole Hookpublic OneResponse rename(java.lang.String name)
name
- New name for the Hook.public OneResponse lock(int level)
level
- Lock level.public OneResponse unlock()
public OneResponse retry(int exec_id)
exec_id
- the hook execution id.Visit OpenNebula.io
Copyright 2002-2021 ©
OpenNebula Project, OpenNebula Systems.