Citrix Systems 5.6 사용자 설명서

다운로드
페이지 235
29
Possible values:
• An empty string, representing power-control disabled
• "iLO". Lets you specify HP iLO.
• "DRAC".  Lets  you  specify  Dell  DRAC.  To  use  DRAC,  you  must  have  already  installed  the  Dell
supplemental pack.
• "wake-on-lan". Lets you specify Wake on LAN.
• Any other name (used to specify a custom power-on script). This option is used to specify a custom
script for power management.
Type: string
host.power_on_config
Definition: This contains key/value pairs for mode configuration. Provides additional information for
Possible values:
• If you configured iLO or DRAC as the type of remote-power solution, you must also specify one of the
following keys:
• "power_on_ip".  This  is  the  IP  address  you  specified  configured  to  communicate  with  the  power-
control card. Alternatively, you can enter the domain name for the network interface where iLO or
DRAC is configured.
• "power_on_user".  This  is  the  iLO  or  DRAC  user  name  that  is  associated  with  the  management
processor, which you may or may not have changed from its factory default settings.
• "power_on_password_secret". Specifies using the secrets feature to secure your password.
• To use the secrets feature to store your password, specify the key "power_on_password_secret".
Type: Map (string,string)
Sample Script
This sample script imports the XenServer API, defines itself as a custom script, and then passes parameters
specific to the host you want to control remotely. You must define the parameters 
session
remote_host
,
and 
power_on_config
 in all custom scripts.
The result is only displayed when the script is unsuccessful.
import XenAPI 
def custom(session,remote_host,
power_on_config):
result="Power On Not Successful"
for key in power_on_config.keys():
result=result+" 
key="+key+" 
value="+power_on_config[key]
return result
Note:
After creation, save the script in the /etc/xapi.d/plugins with a .py extension.