rpms/xen/devel xen-xs-transactions.patch,1.2,1.3

Daniel P. Berrange (berrange) fedora-extras-commits at redhat.com
Sat Dec 1 22:11:27 UTC 2007


Author: berrange

Update of /cvs/pkgs/rpms/xen/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32642

Modified Files:
	xen-xs-transactions.patch 
Log Message:
Remove editor backup files from patch

xen-xs-transactions.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 xen-xs-transactions.patch
Index: xen-xs-transactions.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xen/devel/xen-xs-transactions.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xen-xs-transactions.patch	1 Dec 2007 22:07:49 -0000	1.2
+++ xen-xs-transactions.patch	1 Dec 2007 22:11:23 -0000	1.3
@@ -1,46 +1,3 @@
-diff -rupN xen-3.1.2-src.orig/tools/examples/#xend-config.sxp.rej# xen-3.1.2-src.new/tools/examples/#xend-config.sxp.rej#
---- xen-3.1.2-src.orig/tools/examples/#xend-config.sxp.rej#	1969-12-31 19:00:00.000000000 -0500
-+++ xen-3.1.2-src.new/tools/examples/#xend-config.sxp.rej#	2007-12-01 15:00:04.000000000 -0500
-@@ -0,0 +1,39 @@
-+***************
-+*** 202,204 ****
-+  # The default password for VNC console on HVM domain.
-+  # Empty string is no authentication.
-+  (vncpasswd '')
-+--- 202,234 ----
-+  # The default password for VNC console on HVM domain.
-+  # Empty string is no authentication.
-+  (vncpasswd '')
-++ 
-++ # The VNC server can be told to negotiate a TLS session
-++ # to encryption all traffic, and provide x509 cert to 
-++ # clients enalbing them to verify server identity. The
-++ # GTK-VNC widget, virt-viewer, virt-manager and VeNCrypt
-++ # all support the VNC extension for TLS used in QEMU. The
-++ # TightVNC/RealVNC/UltraVNC clients do not.
-++ #
-++ # To enable this create x509 certificates / keys in the
-++ # directory /etc/xen/vnc
-++ #
-++ #  ca-cert.pem       - The CA certificate
-++ #  server-cert.pem   - The Server certificate signed by the CA
-++ #  server-key.pem    - The server private key
-++ #
-++ # and then uncomment this next line
-++ # (vnc-tls 1)
-++ #
-++ # The certificate dir can be pointed elsewhere..
-++ #
-++ # (vnc-x509-cert-dir /etc/xen/vnc)
-++ # 
-++ # The server can be told to request & validate an x509
-++ # certificate from the client. Only clients with a cert
-++ # signed by the trusted CA will be able to connect. This
-++ # is more secure the password auth alone. Passwd auth can
-++ # used at the same time if desired. To enable client cert
-++ # checking uncomment this:
-++ #
-++ # (vnc-x509-verify 1)
 diff -rupN xen-3.1.2-src.orig/tools/python/xen/xend/server/blkif.py xen-3.1.2-src.new/tools/python/xen/xend/server/blkif.py
 --- xen-3.1.2-src.orig/tools/python/xen/xend/server/blkif.py	2007-11-14 18:35:27.000000000 -0500
 +++ xen-3.1.2-src.new/tools/python/xen/xend/server/blkif.py	2007-12-01 15:01:00.000000000 -0500
@@ -324,26 +281,6 @@
  
          return sxpr    
      
-diff -rupN xen-3.1.2-src.orig/tools/python/xen/xend/#XendConfig.py.rej# xen-3.1.2-src.new/tools/python/xen/xend/#XendConfig.py.rej#
---- xen-3.1.2-src.orig/tools/python/xen/xend/#XendConfig.py.rej#	1969-12-31 19:00:00.000000000 -0500
-+++ xen-3.1.2-src.new/tools/python/xen/xend/#XendConfig.py.rej#	2007-12-01 15:02:02.000000000 -0500
-@@ -0,0 +1,16 @@
-+***************
-+*** 26,31 ****
-+  from xen.xend.XendDevices import XendDevices
-+  from xen.xend.PrettyPrint import prettyprintstring
-+  from xen.xend.XendConstants import DOM_STATE_HALTED
-+  
-+  log = logging.getLogger("xend.XendConfig")
-+  log.setLevel(logging.WARN)
-+--- 26,32 ----
-+  from xen.xend.XendDevices import XendDevices
-+  from xen.xend.PrettyPrint import prettyprintstring
-+  from xen.xend.XendConstants import DOM_STATE_HALTED
-++ from xen.xend.xenstore.xstransact import xstransact
-+  
-+  log = logging.getLogger("xend.XendConfig")
-+  log.setLevel(logging.WARN)
 diff -rupN xen-3.1.2-src.orig/tools/python/xen/xend/XendDomainInfo.py xen-3.1.2-src.new/tools/python/xen/xend/XendDomainInfo.py
 --- xen-3.1.2-src.orig/tools/python/xen/xend/XendDomainInfo.py	2007-12-01 14:47:23.000000000 -0500
 +++ xen-3.1.2-src.new/tools/python/xen/xend/XendDomainInfo.py	2007-12-01 15:02:29.000000000 -0500
@@ -452,2676 +389,6 @@
          
          if refresh:
              self.refreshShutdown(info)
-diff -rupN xen-3.1.2-src.orig/tools/python/xen/xend/XendDomainInfo.py~ xen-3.1.2-src.new/tools/python/xen/xend/XendDomainInfo.py~
---- xen-3.1.2-src.orig/tools/python/xen/xend/XendDomainInfo.py~	1969-12-31 19:00:00.000000000 -0500
-+++ xen-3.1.2-src.new/tools/python/xen/xend/XendDomainInfo.py~	2007-12-01 15:01:00.000000000 -0500
-@@ -0,0 +1,2666 @@
-+#===========================================================================
-+# This library is free software; you can redistribute it and/or
-+# modify it under the terms of version 2.1 of the GNU Lesser General Public
-+# License as published by the Free Software Foundation.
-+#
-+# This library is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+# Lesser General Public License for more details.
-+#
-+# You should have received a copy of the GNU Lesser General Public
-+# License along with this library; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-+#============================================================================
-+# Copyright (C) 2004, 2005 Mike Wray <mike.wray at hp.com>
-+# Copyright (C) 2005-2007 XenSource Ltd
-+#============================================================================
-+
-+"""Representation of a single domain.
-+Includes support for domain construction, using
-+open-ended configurations.
-+
-+Author: Mike Wray <mike.wray at hp.com>
-+
-+"""
-+
-+import logging
-+import time
-+import threading
-+import re
-+import copy
-+import os
-+import traceback
-+from types import StringTypes
-+
-+import xen.lowlevel.xc
-+from xen.util import asserts
-+from xen.util.blkif import blkdev_uname_to_file, blkdev_uname_to_taptype
-+from xen.util import security
-+
-+from xen.xend import balloon, sxp, uuid, image, arch, osdep
-+from xen.xend import XendOptions, XendNode, XendConfig
-+
-+from xen.xend.XendConfig import scrub_password
-+from xen.xend.XendBootloader import bootloader, bootloader_tidy
-+from xen.xend.XendError import XendError, VmError
-+from xen.xend.XendDevices import XendDevices
-+from xen.xend.XendTask import XendTask
-+from xen.xend.xenstore.xstransact import xstransact, complete
-+from xen.xend.xenstore.xsutil import GetDomainPath, IntroduceDomain, ResumeDomain
-+from xen.xend.xenstore.xswatch import xswatch
-+from xen.xend.XendConstants import *
-+from xen.xend.XendAPIConstants import *
-+
-+from xen.xend.XendVMMetrics import XendVMMetrics
-+
-+MIGRATE_TIMEOUT = 30.0
-+BOOTLOADER_LOOPBACK_DEVICE = '/dev/xvdp'
-+
-+xc = xen.lowlevel.xc.xc()
-+xoptions = XendOptions.instance()
-+
-+log = logging.getLogger("xend.XendDomainInfo")
-+#log.setLevel(logging.TRACE)
-+
-+
-+def create(config):
-+    """Creates and start a VM using the supplied configuration. 
-+
-+    @param config: A configuration object involving lists of tuples.
-+    @type  config: list of lists, eg ['vm', ['image', 'xen.gz']]
-+
-+    @rtype:  XendDomainInfo
-+    @return: An up and running XendDomainInfo instance
-+    @raise VmError: Invalid configuration or failure to start.
-+    """
-+    from xen.xend import XendDomain
-+    domconfig = XendConfig.XendConfig(sxp_obj = config)
-+    othervm = XendDomain.instance().domain_lookup_nr(domconfig["name_label"])
-+    if othervm is None or othervm.domid is None:
-+        othervm = XendDomain.instance().domain_lookup_nr(domconfig["uuid"])
-+    if othervm is not None and othervm.domid is not None:
-+        raise VmError("Domain '%s' already exists with ID '%d'" % (domconfig["name_label"], othervm.domid))
-+    log.debug("XendDomainInfo.create(%s)", scrub_password(config))
-+    vm = XendDomainInfo(domconfig)
-+    try:
-+        vm.start()
-+    except:
-+        log.exception('Domain construction failed')
-+        vm.destroy()
-+        raise
-+
-+    return vm
-+
-+def create_from_dict(config_dict):
-+    """Creates and start a VM using the supplied configuration. 
-+
-+    @param config_dict: An configuration dictionary.
-+
-+    @rtype:  XendDomainInfo
-+    @return: An up and running XendDomainInfo instance
-+    @raise VmError: Invalid configuration or failure to start.
-+    """
-+
-+    log.debug("XendDomainInfo.create_from_dict(%s)",
-+              scrub_password(config_dict))
-+    vm = XendDomainInfo(XendConfig.XendConfig(xapi = config_dict))
-+    try:
-+        vm.start()
-+    except:
[...2359 lines suppressed...]
-+        if dev_class == 'vtpm':
-+            if not config.has_key('type'):
-+                config['type'] = 'paravirtualised' # TODO
-+            if not config.has_key('backend'):
-+                config['backend'] = "00000000-0000-0000-0000-000000000000"
-+
-+        return config
-+
-+    def get_dev_property(self, dev_class, dev_uuid, field):
-+        config = self.get_dev_xenapi_config(dev_class, dev_uuid)
-+        try:
-+            return config[field]
-+        except KeyError:
-+            raise XendError('Invalid property for device: %s' % field)
-+
-+    def set_dev_property(self, dev_class, dev_uuid, field, value):
-+        self.info['devices'][dev_uuid][1][field] = value
-+
-+    def get_vcpus_util(self):
-+        vcpu_util = {}
-+        xennode = XendNode.instance()
-+        if 'VCPUs_max' in self.info and self.domid != None:
-+            for i in range(0, self.info['VCPUs_max']):
-+                util = xennode.get_vcpu_util(self.domid, i)
-+                vcpu_util[str(i)] = util
-+                
-+        return vcpu_util
-+
-+    def get_consoles(self):
-+        return self.info.get('console_refs', [])
-+
-+    def get_vifs(self):
-+        return self.info.get('vif_refs', [])
-+
-+    def get_vbds(self):
-+        return self.info.get('vbd_refs', [])
-+
-+    def get_vtpms(self):
-+        return self.info.get('vtpm_refs', [])
-+
-+    def create_vbd(self, xenapi_vbd, vdi_image_path):
-+        """Create a VBD using a VDI from XendStorageRepository.
-+
-+        @param xenapi_vbd: vbd struct from the Xen API
-+        @param vdi_image_path: VDI UUID
-+        @rtype: string
-+        @return: uuid of the device
-+        """
-+        xenapi_vbd['image'] = vdi_image_path
-+        if vdi_image_path.startswith('tap'):
-+            dev_uuid = self.info.device_add('tap', cfg_xenapi = xenapi_vbd)
-+        else:
-+            dev_uuid = self.info.device_add('vbd', cfg_xenapi = xenapi_vbd)
-+            
-+        if not dev_uuid:
-+            raise XendError('Failed to create device')
-+
-+        if self._stateGet() in (XEN_API_VM_POWER_STATE_RUNNING,
-+                                XEN_API_VM_POWER_STATE_PAUSED):
-+            _, config = self.info['devices'][dev_uuid]
-+            
-+            if vdi_image_path.startswith('tap'):
-+                dev_control = self.getDeviceController('tap')
-+            else:
-+                dev_control = self.getDeviceController('vbd')
-+
-+            try:
-+                devid = dev_control.createDevice(config)
-+                dev_control.waitForDevice(devid)
-+                self.info.device_update(dev_uuid,
-+                                        cfg_xenapi = {'devid': devid})
-+            except Exception, exn:
-+                log.exception(exn)
-+                del self.info['devices'][dev_uuid]
-+                self.info['vbd_refs'].remove(dev_uuid)
-+                raise
-+            
-+        return dev_uuid
-+
-+    def create_phantom_vbd_with_vdi(self, xenapi_vbd, vdi_image_path):
-+        """Create a VBD using a VDI from XendStorageRepository.
-+
-+        @param xenapi_vbd: vbd struct from the Xen API
-+        @param vdi_image_path: VDI UUID
-+        @rtype: string
-+        @return: uuid of the device
-+        """
-+        xenapi_vbd['image'] = vdi_image_path
-+        dev_uuid = self.info.phantom_device_add('tap', cfg_xenapi = xenapi_vbd)
-+        if not dev_uuid:
-+            raise XendError('Failed to create device')
-+
-+        if self._stateGet() == XEN_API_VM_POWER_STATE_RUNNING:
-+            _, config = self.info['devices'][dev_uuid]
-+            config['devid'] = self.getDeviceController('tap').createDevice(config)
-+
-+        return config['devid']
-+
-+    def create_vif(self, xenapi_vif):
-+        """Create VIF device from the passed struct in Xen API format.
-+
-+        @param xenapi_vif: Xen API VIF Struct.
-+        @rtype: string
-+        @return: UUID
-+        """
-+        dev_uuid = self.info.device_add('vif', cfg_xenapi = xenapi_vif)
-+        if not dev_uuid:
-+            raise XendError('Failed to create device')
-+        
-+        if self._stateGet() in (XEN_API_VM_POWER_STATE_RUNNING,
-+                                XEN_API_VM_POWER_STATE_PAUSED):
-+
-+            _, config = self.info['devices'][dev_uuid]
-+            dev_control = self.getDeviceController('vif')
-+
-+            try:
-+                devid = dev_control.createDevice(config)
-+                dev_control.waitForDevice(devid)
-+                self.info.device_update(dev_uuid,
-+                                        cfg_xenapi = {'devid': devid})
-+            except Exception, exn:
-+                log.exception(exn)
-+                del self.info['devices'][dev_uuid]
-+                self.info['vif_refs'].remove(dev_uuid)
-+                raise            
-+ 
-+        return dev_uuid
-+
-+    def create_vtpm(self, xenapi_vtpm):
-+        """Create a VTPM device from the passed struct in Xen API format.
-+
-+        @return: uuid of the device
-+        @rtype: string
-+        """
-+
-+        if self._stateGet() not in (DOM_STATE_HALTED,):
-+            raise VmError("Can only add vTPM to a halted domain.")
-+        if self.get_vtpms() != []:
-+            raise VmError('Domain already has a vTPM.')
-+        dev_uuid = self.info.device_add('vtpm', cfg_xenapi = xenapi_vtpm)
-+        if not dev_uuid:
-+            raise XendError('Failed to create device')
-+
-+        return dev_uuid
-+
-+    def create_console(self, xenapi_console):
-+        """ Create a console device from a Xen API struct.
-+
-+        @return: uuid of device
-+        @rtype: string
-+        """
-+        if self._stateGet() not in (DOM_STATE_HALTED,):
-+            raise VmError("Can only add console to a halted domain.")
-+
-+        dev_uuid = self.info.device_add('console', cfg_xenapi = xenapi_console)
-+        if not dev_uuid:
-+            raise XendError('Failed to create device')
-+
-+        return dev_uuid
-+
-+    def destroy_device_by_uuid(self, dev_type, dev_uuid):
-+        if dev_uuid not in self.info['devices']:
-+            raise XendError('Device does not exist')
-+
-+        try:
-+            if self._stateGet() in (XEN_API_VM_POWER_STATE_RUNNING,
-+                                    XEN_API_VM_POWER_STATE_PAUSED):
-+                _, config = self.info['devices'][dev_uuid]
-+                devid = config.get('devid')
-+                if devid != None:
-+                    self.getDeviceController(dev_type).destroyDevice(devid, force = False)
-+                else:
-+                    raise XendError('Unable to get devid for device: %s:%s' %
-+                                    (dev_type, dev_uuid))
-+        finally:
-+            del self.info['devices'][dev_uuid]
-+            self.info['%s_refs' % dev_type].remove(dev_uuid)
-+
-+    def destroy_vbd(self, dev_uuid):
-+        self.destroy_device_by_uuid('vbd', dev_uuid)
-+
-+    def destroy_vif(self, dev_uuid):
-+        self.destroy_device_by_uuid('vif', dev_uuid)
-+
-+    def destroy_vtpm(self, dev_uuid):
-+        self.destroy_device_by_uuid('vtpm', dev_uuid)
-+            
-+    def has_device(self, dev_class, dev_uuid):
-+        return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
-+
-+    def __str__(self):
-+        return '<domain id=%s name=%s memory=%s state=%s>' % \
-+               (str(self.domid), self.info['name_label'],
-+                str(self.info['memory_dynamic_max']), DOM_STATES[self._stateGet()])
-+
-+    __repr__ = __str__
-+
 diff -rupN xen-3.1.2-src.orig/tools/python/xen/xend/XendDomain.py xen-3.1.2-src.new/tools/python/xen/xend/XendDomain.py
 --- xen-3.1.2-src.orig/tools/python/xen/xend/XendDomain.py	2007-11-14 18:35:27.000000000 -0500
 +++ xen-3.1.2-src.new/tools/python/xen/xend/XendDomain.py	2007-12-01 15:01:00.000000000 -0500




More information about the fedora-extras-commits mailing list