FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 03-11-2009, 10:20 PM
John Levon
 
Default Support NetWare PV installs

# HG changeset patch
# User John Levon <john.levon@sun.com>
# Date 1236813503 25200
# Node ID bc57f31980f9a408db53e83e177a00931be0a479
# Parent 143cad71a2a6e83bfff7f46a0f7105e3eeb43ab2
Support NetWare PV installs

Signed-off-by: John Levon <john.levon@sun.com>

diff --git a/virtinst/DistroInstaller.py b/virtinst/DistroInstaller.py
--- a/virtinst/DistroInstaller.py
+++ b/virtinst/DistroInstaller.py
@@ -196,7 +196,8 @@ class DistroInstaller(Installer.Installe
self.install["extraargs"] = args

self._tmpfiles.append(kernelfn)
- self._tmpfiles.append(initrdfn)
+ if initrdfn:
+ self._tmpfiles.append(initrdfn)

# If they're installing off a local file/device, we map it
# through to a virtual CD or disk
diff --git a/virtinst/OSDistro.py b/virtinst/OSDistro.py
--- a/virtinst/OSDistro.py
+++ b/virtinst/OSDistro.py
@@ -86,6 +86,8 @@ def _storeForDistro(fetcher, baseuri, ty
stores.append(SolarisDistro)
if distro == "solaris" or distro is None:
stores.append(OpenSolarisDistro)
+ if distro == "netware" or distro is None:
+ stores.append(NetWareDistro)

stores.append(GenericDistro)

@@ -1022,6 +1024,9 @@ class SolarisDistro(SunDistro):
self.initrdpath)

class OpenSolarisDistro(SunDistro):
+
+ os_variant = "opensolaris"
+
kernelpath = "platform/i86xpv/kernel/unix"
initrdpath = "boot/x86.microroot"

@@ -1065,3 +1070,21 @@ class OpenSolarisDistro(SunDistro):
os.unlink(kernel)
raise RuntimeError(_("OpenSolaris microroot not found at %s") %
self.initrdpath)
+
+# NetWare 6 PV
+class NetWareDistro(Distro):
+ name = "NetWare"
+ os_type = "other"
+ os_variant = "netware6"
+
+ loaderpath = "STARTUP/XNLOADER.SYS"
+
+ def isValidStore(self, fetcher, progresscb):
+ if fetcher.hasFile(self.loaderpath):
+ logging.debug("Detected NetWare")
+ return True
+ return False
+
+ def acquireKernel(self, guest, fetcher, progresscb):
+ loader = fetcher.acquireFile(self.loaderpath, progresscb)
+ return (loader, "", "")
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -211,7 +211,7 @@ OS_TYPES = {
"msdos": { "label": "MS-DOS", "acpi": False, "apic": False },
"netware4": { "label": "Novell Netware 4" },
"netware5": { "label": "Novell Netware 5" },
- "netware6": { "label": "Novell Netware 6" },
+ "netware6": { "label": "Novell Netware 6", "pv_cdrom_install": True, },
"generic": { "label": "Generic" },
},
},}

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 03-18-2009, 02:55 PM
Cole Robinson
 
Default Support NetWare PV installs

John Levon wrote:
> # HG changeset patch
> # User John Levon <john.levon@sun.com>
> # Date 1236813503 25200
> # Node ID bc57f31980f9a408db53e83e177a00931be0a479
> # Parent 143cad71a2a6e83bfff7f46a0f7105e3eeb43ab2
> Support NetWare PV installs
>
> Signed-off-by: John Levon <john.levon@sun.com>
>

Thanks, applied.

- Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 03-18-2009, 03:35 PM
Daniel J Walsh
 
Default Support NetWare PV installs

This patch allows the creating of seclabel in the XML.
diff -r 143cad71a2a6 virtinst/Guest.py
--- a/virtinst/Guest.py Mon Mar 09 23:31:51 2009 -0400
+++ b/virtinst/Guest.py Wed Mar 18 11:26:04 2009 -0400
@@ -32,7 +32,7 @@
from virtinst import _virtinst as _
import logging
import signal
-
+import selinux

class Guest(object):

@@ -40,6 +40,14 @@
_DEFAULTS = osdict.DEFAULTS
_OS_TYPES = osdict.OS_TYPES

+ SEC_MODEL_NONE = "none"
+ SEC_MODEL_SELINUX = "selinux"
+ sec_models = [SEC_MODEL_NONE, SEC_MODEL_SELINUX ]
+
+ SEC_TYPE_DYNAMIC = "dynamic"
+ SEC_TYPE_STATIC = "static"
+ sec_types = [SEC_TYPE_DYNAMIC, SEC_TYPE_STATIC ]
+
def list_os_types():
return osdict.sort_helper(Guest._OS_TYPES)
list_os_types = staticmethod(list_os_types)
@@ -71,6 +79,10 @@
self._cpuset = None
self._graphics_dev = None
self._consolechild = None
+ self._secmodel = None
+ self._sectype = self.SEC_TYPE_DYNAMIC
+
+ self._seclabel = None

self._os_type = None
self._os_variant = None
@@ -326,6 +338,40 @@

# Properties that are mapped through to the Installer

+ # Security model used to secure guest image
+ def get_secmodel(self):
+ return self._secmodel
+ def set_secmodel(self, val):
+ if val in self.sec_models:
+ self._secmodel = val
+ else:
+ raise ValueError, _("Security model must be one of: %s") % ", ".join(self.sec_models)
+
+ secmodel = property(get_secmodel, set_secmodel)
+
+ def get_sectype(self):
+ return self._sectype
+ def set_sectype(self, val):
+ if val in self.sec_types:
+ self._sectype = val
+ else:
+ raise ValueError, _("Security type must be one of: %s") % ", ".join(self.sec_types)
+
+ sectype = property(get_sectype, set_sectype)
+
+ # Security context used to secure guest process
+ def get_seclabel(self):
+ return self._seclabel
+ def set_seclabel(self, val):
+ self._seclabel = val
+ if self.get_secmodel() == self.SEC_MODEL_SELINUX:
+ try:
+ selinux.security_check_context(val)
+ except OSError:
+ raise ValueError, _("Security label %s invalid") % val
+
+ seclabel = property(get_seclabel, set_seclabel)
+
# Hypervisor name (qemu, xen, kvm, etc.)
def get_type(self):
return self._installer.type
@@ -425,6 +471,24 @@
xml = _util.xml_append(xml, hostdev.get_xml_config())
return xml

+ def _get_sectype_xml(self):
+ xml = ""
+ if self._sectype != None:
+ xml = " type='%s'" % self._sectype
+ return xml
+
+ def _get_seclabel_xml(self):
+ xml = ""
+ if self._seclabel != None:
+ xml = "
<label>%s</label>" % self._seclabel
+ return xml
+
+ def _get_security_xml(self):
+ xml = ""
+ if self._secmodel != None:
+ xml = " <seclabel model='%s'%s>%s
</seclabel>" % ( self._secmodel, self._get_sectype_xml(), self._get_seclabel_xml())
+ return xml
+
def _get_device_xml(self, install=True):
xml = ""

@@ -513,6 +577,7 @@
<devices>
%(devices)s
</devices>
+%(security)s
</domain>
""" % { "type": self.type,
"name": self.name,
@@ -523,7 +588,8 @@
"maxramkb": self.maxmemory * 1024,
"devices": self._get_device_xml(install),
"osblob": osblob,
- "action": action }
+ "action": action,
+ "security": self._get_security_xml()}


def start_install(self, consolecb=None, meter=None, removeOld=False,
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 01:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org