当前位置: 首页>>代码示例>>Python>>正文


Python utils.get_power_types函数代码示例

本文整理汇总了Python中utils.get_power_types函数的典型用法代码示例。如果您正苦于以下问题:Python get_power_types函数的具体用法?Python get_power_types怎么用?Python get_power_types使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_power_types函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_power_type

 def set_power_type(self, power_type):
     # FIXME: modularize this better
     if power_type is None:
         power_type = ""
     choices = utils.get_power_types()
     choices.sort()
     if power_type not in choices:
         raise CX("power type must be one of: %s" % ",".join(choices))
     self.power_type = power_type
     return True
开发者ID:aquette,项目名称:cobbler,代码行数:10,代码来源:item_system.py

示例2: set_power_type

 def set_power_type(self, power_type):
     # FIXME: modularize this better
     if power_type is None:
         power_type = ""
     choices = utils.get_power_types()
     if not choices:
         raise CX("you need to have fence-agents installed")
     if power_type not in choices:
         raise CX("power management type must be one of: %s" % ",".join(choices))
     self.power_type = power_type
     return True
开发者ID:cspargo,项目名称:cobbler,代码行数:11,代码来源:item_system.py

示例3: Size

 ["proxy","<<inherit>>",0,"Proxy",True,"Proxy URL",0,"str"],
 ["netboot_enabled",True,0,"Netboot Enabled",True,"PXE (re)install this machine at next boot?",0,"bool"],
 ["kickstart","<<inherit>>",0,"Kickstart",True,"Path to kickstart template",0,"str"],
 ["comment","",0,"Comment",True,"Free form text description",0,"str"],
 ["depth",2,0,"",False,"",0,"int"],
 ["server","<<inherit>>",0,"Server Override",True,"See manpage or leave blank",0,"str"],
 ["virt_path","<<inherit>>",0,"Virt Path",True,"Ex: /directory or VolGroup00",0,"str"],
 ["virt_type","<<inherit>>",0,"Virt Type",True,"Virtualization technology to use",["xenpv","xenfv","qemu","vmware"],"str"],
 ["virt_cpus","<<inherit>>",0,"Virt CPUs",True,"",0,"int"],
 ["virt_file_size","<<inherit>>",0,"Virt File Size(GB)",True,"",0,"float"],
 ["virt_disk_driver","<<inherit>>",0,"Virt Disk Driver Type",True,"The on-disk format for the virtualization disk","raw","str"],
 ["virt_ram","<<inherit>>",0,"Virt RAM (MB)",True,"",0,"int"],
 ["virt_auto_boot","<<inherit>>",0,"Virt Auto Boot",True,"Auto boot this VM?",0,"bool"],
 ["ctime",0,0,"",False,"",0,"float"],
 ["mtime",0,0,"",False,"",0,"float"],
 ["power_type","SETTINGS:power_management_default_type",0,"Power Management Type",True,"",utils.get_power_types(),"str"],
 ["power_address","",0,"Power Management Address",True,"Ex: power-device.example.org",0,"str"],
 ["power_user","",0,"Power Username ",True,"",0,"str"],
 ["power_pass","",0,"Power Password",True,"",0,"str"],
 ["power_id","",0,"Power ID",True,"Usually a plug number or blade name, if power type requires it",0,"str"],
 ["hostname","",0,"Hostname",True,"",0,"str"],
 ["gateway","",0,"Gateway",True,"",0,"str"],
 ["name_servers",[],0,"Name Servers",True,"space delimited",0,"list"],
 ["name_servers_search",[],0,"Name Servers Search Path",True,"space delimited",0,"list"],
 ["ipv6_default_device","",0,"IPv6 Default Device",True,"",0,"str"],
 ["ipv6_autoconfiguration",False,0,"IPv6 Autoconfiguration",True,"",0,"bool"],
 ["network_widget_a","",0,"Add Interface",True,"",0,"str"], # not a real field, a marker for the web app
 ["network_widget_b","",0,"Edit Interface",True,"",0,"str"], # not a real field, a marker for the web app
 ["*mac_address","",0,"MAC Address",True,"(Place \"random\" in this field for a random MAC Address.)",0,"str"],
 ["network_widget_c","",0,"",True,"",0,"str"], # not a real field, a marker for the web app
 ["*mtu","",0,"MTU",True,"",0,"str"],
开发者ID:aquette,项目名称:cobbler,代码行数:31,代码来源:item_system.py

示例4: Size

 ["proxy","<<inherit>>",0,"Proxy",True,"Proxy URL",0,"str"],
 ["netboot_enabled",True,0,"Netboot Enabled",True,"PXE (re)install this machine at next boot?",0,"bool"],
 ["kickstart","<<inherit>>",0,"Kickstart",True,"Path to kickstart template",0,"str"],
 ["comment","",0,"Comment",True,"Free form text description",0,"str"],
 ["depth",2,0,"",False,"",0,"int"],
 ["server","<<inherit>>",0,"Server Override",True,"See manpage or leave blank",0,"str"],
 ["virt_path","<<inherit>>",0,"Virt Path",True,"Ex: /directory or VolGroup00",0,"str"],
 ["virt_type","<<inherit>>",0,"Virt Type",True,"Virtualization technology to use",["xenpv","xenfv","qemu","vmware"],"str"],
 ["virt_cpus","<<inherit>>",0,"Virt CPUs",True,"",0,"int"],
 ["virt_file_size","<<inherit>>",0,"Virt File Size(GB)",True,"",0,"float"],
 ["virt_disk_driver","<<inherit>>",0,"Virt Disk Driver Type",True,"The on-disk format for the virtualization disk","raw","str"],
 ["virt_ram","<<inherit>>",0,"Virt RAM (MB)",True,"",0,"int"],
 ["virt_auto_boot","<<inherit>>",0,"Virt Auto Boot",True,"Auto boot this VM?",0,"bool"],
 ["ctime",0,0,"",False,"",0,"float"],
 ["mtime",0,0,"",False,"",0,"float"],
 ["power_type","SETTINGS:power_management_default_type",0,"Type",True,"Power management script to use",utils.get_power_types(),"str"],
 ["power_address","",0,"Address",True,"Ex: power-device.example.org",0,"str"],
 ["power_user","",0,"Username ",True,"",0,"str"],
 ["power_pass","",0,"Password",True,"",0,"str"],
 ["power_id","",0,"ID",True,"Usually a plug number or blade name, if power type requires it",0,"str"],
 ["hostname","",0,"Hostname",True,"",0,"str"],
 ["gateway","",0,"Gateway",True,"",0,"str"],
 ["name_servers",[],0,"Name Servers",True,"space delimited",0,"list"],
 ["name_servers_search",[],0,"Name Servers Search Path",True,"space delimited",0,"list"],
 ["ipv6_default_device","",0,"IPv6 Default Device",True,"",0,"str"],
 ["ipv6_autoconfiguration",False,0,"IPv6 Autoconfiguration",True,"",0,"bool"],
 ["network_widget_a","",0,"Add Interface",True,"",0,"str"], # not a real field, a marker for the web app
 ["network_widget_b","",0,"Edit Interface",True,"",0,"str"], # not a real field, a marker for the web app
 ["*mac_address","",0,"MAC Address",True,"(Place \"random\" in this field for a random MAC Address.)",0,"str"],
 ["network_widget_c","",0,"",True,"",0,"str"], # not a real field, a marker for the web app
 ["*mtu","",0,"MTU",True,"",0,"str"],
开发者ID:smoser,项目名称:cobbler,代码行数:31,代码来源:item_system.py

示例5: RAM

     "raw",
     "str",
 ],
 ["virt_ram", "<<inherit>>", 0, "Virt RAM (MB)", True, "", 0, "int"],
 ["virt_auto_boot", "<<inherit>>", 0, "Virt Auto Boot", True, "Auto boot this VM?", 0, "bool"],
 ["virt_pxe_boot", 0, 0, "Virt PXE Boot", True, "Use PXE to build this VM?", 0, "bool"],
 ["ctime", 0, 0, "", False, "", 0, "float"],
 ["mtime", 0, 0, "", False, "", 0, "float"],
 [
     "power_type",
     "SETTINGS:power_management_default_type",
     0,
     "Power Management Type",
     True,
     "Power management script to use",
     utils.get_power_types(),
     "str",
 ],
 ["power_address", "", 0, "Power Management Address", True, "Ex: power-device.example.org", 0, "str"],
 ["power_user", "", 0, "Power Management Username", True, "", 0, "str"],
 ["power_pass", "", 0, "Power Management Password", True, "", 0, "str"],
 [
     "power_id",
     "",
     0,
     "Power Management ID",
     True,
     "Usually a plug number or blade name, if power type requires it",
     0,
     "str",
 ],
开发者ID:aronparsons,项目名称:cobbler,代码行数:31,代码来源:item_system.py


注:本文中的utils.get_power_types函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。