예제 #1
0
from cexceptions import *
import codes
from utils import _

FIELDS = [
  ['name','',0,"Name",True,"",0],
  ['arch','i386',0,"Architecture",True,"",["i386","x86_64","ia64","s390","ppc"]],
  ['breed','redhat',0,"Breed",True,"",codes.VALID_OS_BREEDS],
  ['comment','',0,"Comment",True,"Free form text description",0],
  ['ctime',0,0,"",False,"",0],
  ['mtime',0,0,"",False,"",0],
  ['file','',0,"File",True,"Path to local file or nfs://user@host:path",0],
  ['depth',0,0,"",False,"",0],
  ['image_type',"iso",0,"Image Type",True,"", ["iso","direct","virt-image"]], #FIXME:complete?
  ['network_count',1,0,"Virt NICs",True,"",0],
  ['os_version','',0,"OS Version",True,"ex: rhel4",codes.get_all_os_versions()],
  ['owners',"SETTINGS:default_ownership",0,"Owners",True,"Owners list for authz_ownership (space delimited)",[]],
  ['parent','',0,"",False,"",0],
  ['kickstart','',0,"Kickstart",True,"Path to kickstart/answer file template",0],
  ['virt_auto_boot',"SETTINGS:virt_auto_boot",0,"Virt Auto Boot",True,"Auto boot this VM?",0],
  ['virt_bridge',"SETTINGS:default_virt_bridge",0,"Virt Bridge",True,"",0],
  ['virt_cpus',1,0,"Virt CPUs",True,"",0],
  ['virt_file_size',"SETTINGS:default_virt_file_size",0,"Virt File Size (GB)",True,"",0],
  ['virt_path','',0,"Virt Path",True,"Ex: /directory or VolGroup00",0],
  ['virt_ram',"SETTINGS:default_virt_ram",0,"Virt RAM (MB)",True,"",0],
  ['virt_type',"SETTINGS:default_virt_type",0,"Virt Type",True,"",["xenpv","xenfv","qemu","vmware"]],
  ['uid',"",0,"",False,"",0]
]

class Image(item.Item):
예제 #2
0
# must operate as normal with the default value for all fields and not choke on the default values.

FIELDS = [
   [ "name","",0,"Name",True,"Ex: Fedora-11-i386",0,"str"],
   ["ctime",0,0,"",False,"",0,"float"],
   ["mtime",0,0,"",False,"",0,"float"],
   [ "uid","",0,"",False,"",0,"str"],
   [ "owners","SETTINGS:default_ownership",0,"Owners",True,"Owners list for authz_ownership (space delimited)",0,"list"],
   [ "kernel",None,0,"Kernel",True,"Absolute path to kernel on filesystem",0,"str"],
   [ "initrd",None,0,"Initrd",True,"Absolute path to kernel on filesystem",0,"str"],
   [ "kernel_options",{},0,"Kernel Options",True,"Ex: selinux=permissive",0,"dict"],
   [ "kernel_options_post",{},0,"Kernel Options (Post Install)",True,"Ex: clocksource=pit noapic",0,"dict"],
   [ "ks_meta",{},0,"Kickstart Metadata",True,"Ex: dog=fang agent=86", 0,"dict"],
   [ "arch",'i386',0,"Architecture",True,"", ['i386','x86_64','ia64','ppc','s390'],"str"],
   [ "breed",'redhat',0,"Breed",True,"What is the type of distribution?",codes.VALID_OS_BREEDS,"str"],
   [ "os_version","generic26",0,"OS Version",True,"Needed for some virtualization optimizations",codes.get_all_os_versions(),"str"],
   [ "source_repos",[],0,"Source Repos", False,"",0,"list"],
   [ "depth",0,0,"Depth",False,"",0,"int"],
   [ "comment","",0,"Comment",True,"Free form text description",0,"str"],
   [ "tree_build_time",0,0,"Tree Build Time",False,"",0,"str"],
   [ "mgmt_classes",[],0,"Management Classes",True,"Management classes for external config management",0,"list"],
   [ "boot_files",{},0,"TFTP Boot Files",True,"Files copied into tftpboot beyond the kernel/initrd",0,"list"],
   [ "fetchable_files",{},0,"Fetchable Files",True,"Templates for tftp or wget",0,"list"],
   [ "template_files",{},0,"Template Files",True,"File mappings for built-in config management",0,"list"],
   [ "redhat_management_key","<<inherit>>",0,"Red Hat Management Key",True,"Registration key for RHN, Spacewalk, or Satellite",0,"str"],
   [ "redhat_management_server", "<<inherit>>",0,"Red Hat Management Server",True,"Address of Spacewalk or Satellite Server",0,"str"]
]

class Distro(item.Item):

    TYPE_NAME = _("distro")
예제 #3
0
from utils import _

# this datastructure is described in great detail in item_distro.py -- read the comments there.

FIELDS = [
    ["name", "", 0, "Name", True, "", 0],
    ["arch", "i386", 0, "Architecture", True, "", ["i386", "x86_64", "ia64", "s390", "ppc"]],
    ["breed", "redhat", 0, "Breed", True, "", codes.VALID_OS_BREEDS],
    ["comment", "", 0, "Comment", True, "Free form text description", 0],
    ["ctime", 0, 0, "", False, "", 0],
    ["mtime", 0, 0, "", False, "", 0],
    ["file", "", 0, "File", True, "Path to local file or nfs://user@host:path", 0],
    ["depth", 0, 0, "", False, "", 0],
    ["image_type", "iso", 0, "Image Type", True, "", ["iso", "direct", "virt-image"]],  # FIXME:complete?
    ["network_count", 1, 0, "Virt NICs", True, "", 0],
    ["os_version", "", 0, "OS Version", True, "ex: rhel4", codes.get_all_os_versions()],
    [
        "owners",
        "SETTINGS:default_ownership",
        0,
        "Owners",
        True,
        "Owners list for authz_ownership (space delimited)",
        [],
    ],
    ["parent", "", 0, "", False, "", 0],
    ["kickstart", "", 0, "Kickstart", True, "Path to kickstart/answer file template", 0],
    ["virt_auto_boot", "SETTINGS:virt_auto_boot", 0, "Virt Auto Boot", True, "Auto boot this VM?", 0],
    ["virt_bridge", "SETTINGS:default_virt_bridge", 0, "Virt Bridge", True, "", 0],
    ["virt_cpus", 1, 0, "Virt CPUs", True, "", 0],
    ["virt_file_size", "SETTINGS:default_virt_file_size", 0, "Virt File Size (GB)", True, "", 0],
예제 #4
0
 [
     "ks_meta", {}, 0, "Kickstart Metadata", True, "Ex: dog=fang agent=86",
     0, "dict"
 ],
 [
     "arch", 'i386', 0, "Architecture", True, "",
     ['i386', 'x86_64', 'ia64', 'ppc', 's390'], "str"
 ],
 [
     "breed", 'redhat', 0, "Breed", True,
     "What is the type of distribution?", codes.VALID_OS_BREEDS, "str"
 ],
 [
     "os_version", "generic26", 0, "OS Version", True,
     "Needed for some virtualization optimizations",
     codes.get_all_os_versions(), "str"
 ],
 ["source_repos", [], 0, "Source Repos", False, "", 0, "list"],
 ["depth", 0, 0, "Depth", False, "", 0, "int"],
 [
     "comment", "", 0, "Comment", True, "Free form text description", 0,
     "str"
 ],
 ["tree_build_time", 0, 0, "Tree Build Time", False, "", 0, "str"],
 ["network_widget_c", "", 0, "Add Management Class", True, "", 0,
  "str"],  # not a real field, a marker for the web app
 [
     "mgmt_classes", [], 0, "Management Classes", True,
     "Management classes for external config management", 0, "list"
 ],
 ["network_widget_d", "", 0, "Remove Selected Classes", True, "", 0,
예제 #5
0
파일: item_image.py 프로젝트: vogxn/cobbler
from utils import _

# this datastructure is described in great detail in item_distro.py -- read the comments there.

FIELDS = [
  ['name','',0,"Name",True,"",0,"str"],
  ['arch','i386',0,"Architecture",True,"",["i386","x86_64","ia64","s390","ppc", "arm"],"str"],
  ['breed','redhat',0,"Breed",True,"",codes.VALID_OS_BREEDS,"str"],
  ['comment','',0,"Comment",True,"Free form text description",0,"str"],
  ['ctime',0,0,"",False,"",0,"float"],
  ['mtime',0,0,"",False,"",0,"float"],
  ['file','',0,"File",True,"Path to local file or nfs://user@host:path",0,"str"],
  ['depth',0,0,"",False,"",0,"int"],
  ['image_type',"iso",0,"Image Type",True,"", ["iso","direct","memdisk","virt-image"],"str"], #FIXME:complete?
  ['network_count',1,0,"Virt NICs",True,"",0,"int"],
  ['os_version','',0,"OS Version",True,"ex: rhel4",codes.get_all_os_versions(),"str"],
  ['owners',"SETTINGS:default_ownership",0,"Owners",True,"Owners list for authz_ownership (space delimited)",[],"list"],
  ['parent','',0,"",False,"",0,"str"],
  ['kickstart','',0,"Kickstart",True,"Path to kickstart/answer file template",0,"str"],
  ['virt_auto_boot',"SETTINGS:virt_auto_boot",0,"Virt Auto Boot",True,"Auto boot this VM?",0,"bool"],
  ['virt_bridge',"SETTINGS:default_virt_bridge",0,"Virt Bridge",True,"",0,"str"],
  ['virt_cpus',1,0,"Virt CPUs",True,"",0,"int"],
  ['virt_file_size',"SETTINGS:default_virt_file_size",0,"Virt File Size (GB)",True,"",0,"float"],
  ["virt_disk_driver","SETTINGS:default_virt_disk_driver",0,"Virt Disk Driver Type",True,"The on-disk format for the virtualization disk","raw","str"],
  ['virt_path','',0,"Virt Path",True,"Ex: /directory or VolGroup00",0,"str"],
  ['virt_ram',"SETTINGS:default_virt_ram",0,"Virt RAM (MB)",True,"",0,"int"],
  ['virt_type',"SETTINGS:default_virt_type",0,"Virt Type",True,"",["xenpv","xenfv","qemu","kvm", "vmware"],"str"],
  ['uid',"",0,"",False,"",0,"str"]
]

class Image(item.Item):
예제 #6
0
# must operate as normal with the default value for all fields and not choke on the default values.

FIELDS = [
   [ "name","",0,"Name",True,"Ex: Fedora-11-i386",0,"str"],
   ["ctime",0,0,"",False,"",0,"float"],
   ["mtime",0,0,"",False,"",0,"float"],
   [ "uid","",0,"",False,"",0,"str"],
   [ "owners","SETTINGS:default_ownership",0,"Owners",True,"Owners list for authz_ownership (space delimited)",0,"list"],
   [ "kernel",None,0,"Kernel",True,"Absolute path to kernel on filesystem",0,"str"],
   [ "initrd",None,0,"Initrd",True,"Absolute path to kernel on filesystem",0,"str"],
   [ "kernel_options",{},0,"Kernel Options",True,"Ex: selinux=permissive",0,"dict"],
   [ "kernel_options_post",{},0,"Kernel Options (Post Install)",True,"Ex: clocksource=pit noapic",0,"dict"],
   [ "ks_meta",{},0,"Kickstart Metadata",True,"Ex: dog=fang agent=86", 0,"dict"],
   [ "arch",'i386',0,"Architecture",True,"", ['i386','x86_64','ia64','ppc','s390'],"str"],
   [ "breed",'redhat',0,"Breed",True,"What is the type of distribution?",codes.VALID_OS_BREEDS,"str"],
   [ "os_version","generic26",0,"OS Version",True,"Needed for some virtualization optimizations",codes.get_all_os_versions(),"str"],
   [ "source_repos",[],0,"Source Repos", False,"",0,"list"],
   [ "depth",0,0,"Depth",False,"",0,"int"],
   [ "comment","",0,"Comment",True,"Free form text description",0,"str"],
   [ "tree_build_time",0,0,"Tree Build Time",False,"",0,"str"],
   [ "mgmt_classes",[],0,"Management Classes",True,"Management classes for external config management",0,"list"],
   [ "template_files",{},0,"Template Files",True,"File mappings for built-in config management",0,"list"],
   [ "redhat_management_key","<<inherit>>",0,"Red Hat Management Key",True,"Registration key for RHN, Spacewalk, or Satellite",0,"str"],
   [ "redhat_management_server", "<<inherit>>",0,"Red Hat Management Server",True,"Address of Spacewalk or Satellite Server",0,"str"]
]

class Distro(item.Item):

    TYPE_NAME = _("distro")
    COLLECTION_TYPE = "distro"