Patch cleanup. Refreshed several patches.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=69
This commit is contained in:
Charles Arnold 2010-07-30 22:40:48 +00:00 committed by Git OBS Bridge
parent 393ad2e586
commit 1fbd8d52a6
13 changed files with 45 additions and 45 deletions

View File

@ -2,7 +2,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2914,7 +2914,7 @@ class XendDomainInfo:
@@ -2917,7 +2917,7 @@ class XendDomainInfo:
self.guest_bitsize = self.image.getBitSize()
# Make sure there's enough RAM available for the domain

View File

@ -5,7 +5,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3287,7 +3287,7 @@ class XendDomainInfo:
@@ -3290,7 +3290,7 @@ class XendDomainInfo:
(fn, BOOTLOADER_LOOPBACK_DEVICE))
vbd = {

View File

@ -1530,7 +1530,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
from xen.xend.server.DevConstants import xenbusState
from xen.xend.server.BlktapController import TAPDISK_DEVICE, parseDeviceString
@@ -2566,6 +2567,19 @@ class XendDomainInfo:
@@ -2569,6 +2570,19 @@ class XendDomainInfo:
oos = self.info['platform'].get('oos', 1)
oos_off = 1 - int(oos)
@ -1550,7 +1550,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
flags = (int(hvm) << 0) | (int(hap) << 1) | (int(s3_integrity) << 2) | (int(oos_off) << 3)
try:
@@ -2587,6 +2601,11 @@ class XendDomainInfo:
@@ -2590,6 +2604,11 @@ class XendDomainInfo:
failmsg += ', error=%i' % int(self.domid)
raise VmError(failmsg)
@ -1562,7 +1562,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
self.dompath = GetDomainPath(self.domid)
self._recreateDom()
@@ -3614,6 +3633,11 @@ class XendDomainInfo:
@@ -3617,6 +3636,11 @@ class XendDomainInfo:
retval = xc.sched_credit_domain_get(self.getDomid())
return retval
@ -1798,7 +1798,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
from xen.util import auxbin
import XenAPI
@@ -235,6 +236,23 @@ SUBCOMMAND_HELP = {
@@ -237,6 +238,23 @@ SUBCOMMAND_HELP = {
'tmem-freeable' : ('', 'Print freeable tmem (in MiB).'),
'tmem-shared-auth' : ('[<Domain>|-a|--all] [--uuid=<uuid>] [--auth=<0|1>]', 'De/authenticate shared tmem pool.'),
@ -1822,7 +1822,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
# security
'addlabel' : ('<label> {dom <ConfigFile>|res <resource>|mgt <managed domain>} [<policy>]',
@@ -281,6 +299,7 @@ SUBCOMMAND_OPTIONS = {
@@ -283,6 +301,7 @@ SUBCOMMAND_OPTIONS = {
('-l', '--long', 'Output all VM details in SXP'),
('', '--label', 'Include security labels'),
('', '--state=<state>', 'Select only VMs with the specified state'),
@ -1830,7 +1830,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
),
'console': (
('-q', '--quiet', 'Do not print an error message if the domain does not exist'),
@@ -342,6 +361,10 @@ SUBCOMMAND_OPTIONS = {
@@ -344,6 +363,10 @@ SUBCOMMAND_OPTIONS = {
('-u', '--uuid', 'Specify uuid (abcdef01-2345-6789-01234567890abcdef).'),
('-A', '--auth', '0=auth,1=deauth'),
),
@ -1841,7 +1841,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
}
common_commands = [
@@ -486,9 +509,21 @@ tmem_commands = [
@@ -490,9 +513,21 @@ tmem_commands = [
"tmem-shared-auth",
]
@ -1864,7 +1864,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
['shell', 'event-monitor'])
@@ -885,7 +920,7 @@ def datetime_to_secs(v):
@@ -889,7 +924,7 @@ def datetime_to_secs(v):
v = str(v).replace(c, "")
return time.mktime(time.strptime(v[0:14], '%Y%m%dT%H%M%S'))
@ -1873,7 +1873,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
if serverType == SERVER_XEN_API:
doms_sxp = []
doms_dict = []
@@ -894,6 +929,9 @@ def getDomains(domain_names, state, full
@@ -898,6 +933,9 @@ def getDomains(domain_names, state, full
dom_metrics_recs = server.xenapi.VM_metrics.get_all_records()
for dom_ref, dom_rec in dom_recs.items():
@ -1883,7 +1883,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
dom_metrics_rec = dom_metrics_recs[dom_rec['metrics']]
states = ('running', 'blocked', 'paused', 'shutdown',
@@ -934,7 +972,15 @@ def getDomains(domain_names, state, full
@@ -937,7 +975,15 @@ def getDomains(domain_names, state, full
if domain_names:
return [server.xend.domain(dom, full) for dom in domain_names]
else:
@ -1900,7 +1900,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
def xm_list(args):
@@ -942,10 +988,11 @@ def xm_list(args):
@@ -945,10 +991,11 @@ def xm_list(args):
show_vcpus = 0
show_labels = 0
state = 'all'
@ -1913,7 +1913,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
except getopt.GetoptError, opterr:
err(opterr)
usage('list')
@@ -959,18 +1006,24 @@ def xm_list(args):
@@ -962,18 +1009,24 @@ def xm_list(args):
show_labels = 1
if k in ['--state']:
state = v
@ -1939,7 +1939,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
if use_long:
map(PrettyPrint.prettyprint, doms)
@@ -1806,6 +1859,13 @@ def xm_info(args):
@@ -1839,6 +1892,13 @@ def xm_info(args):
else:
return ""
@ -1953,7 +1953,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
info = {
"host": getVal(["name_label"]),
"release": getVal(["software_version", "release"]),
@@ -1817,6 +1877,7 @@ def xm_info(args):
@@ -1850,6 +1910,7 @@ def xm_info(args):
"threads_per_core": getVal(["cpu_configuration", "threads_per_core"]),
"cpu_mhz": getCpuMhz(),
"hw_caps": getCpuFeatures(),
@ -1961,7 +1961,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
"total_memory": int(host_metrics_record["memory_total"])/1024/1024,
"free_memory": int(host_metrics_record["memory_free"])/1024/1024,
"xen_major": getVal(["software_version", "xen_major"]),
@@ -3451,6 +3512,169 @@ def xm_tmem_shared_auth(args):
@@ -3484,6 +3545,169 @@ def xm_tmem_shared_auth(args):
else:
return server.xend.node.tmem_shared_auth(domid,uuid_str,auth)
@ -2131,7 +2131,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
commands = {
"shell": xm_shell,
@@ -3536,6 +3760,14 @@ commands = {
@@ -3569,6 +3793,14 @@ commands = {
"usb-list-assignable-devices": xm_usb_list_assignable_devices,
"usb-hc-create": xm_usb_hc_create,
"usb-hc-destroy": xm_usb_hc_destroy,
@ -2146,7 +2146,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
# tmem
"tmem-thaw": xm_tmem_thaw,
"tmem-freeze": xm_tmem_freeze,
@@ -3567,6 +3799,8 @@ IMPORTED_COMMANDS = [
@@ -3602,6 +3834,8 @@ IMPORTED_COMMANDS = [
'resetpolicy',
'getenforce',
'setenforce',

View File

@ -2,7 +2,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1307,8 +1307,15 @@ class XendDomainInfo:
@@ -1310,8 +1310,15 @@ class XendDomainInfo:
frontpath = self.getDeviceController(deviceClass).frontendPath(dev)
backpath = xstransact.Read(frontpath, "backend")
thread.start_new_thread(self.getDeviceController(deviceClass).finishDeviceCleanup, (backpath, path))

View File

@ -93,7 +93,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py
def op_dump(self, op, req):
self.acceptCommand(req)
return req.threadRequest(self.do_dump, op, req)
@@ -245,7 +270,7 @@ class SrvDomain(SrvDir):
@@ -259,7 +284,7 @@ class SrvDomain(SrvDir):
def render_GET(self, req):
op = req.args.get('op')
@ -345,7 +345,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py
xc = xen.lowlevel.xc.xc()
xoptions = XendOptions.instance()
@@ -1564,6 +1565,187 @@ class XendDomain:
@@ -1576,6 +1577,187 @@ class XendDomain:
else:
log.debug("error: Domain is not running!")
@ -552,7 +552,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
'shutdown' : ('<Domain> [-waRH]', 'Shutdown a domain.'),
'top' : ('', 'Monitor a host and the domains in real time.'),
'unpause' : ('<Domain>', 'Unpause a paused domain.'),
@@ -335,6 +343,9 @@ SUBCOMMAND_OPTIONS = {
@@ -337,6 +345,9 @@ SUBCOMMAND_OPTIONS = {
('-c', '--checkpoint', 'Leave domain running after creating snapshot'),
('-f', '--force', 'Force to overwrite exist file'),
),
@ -562,7 +562,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
'restore': (
('-p', '--paused', 'Do not unpause domain after restoring it'),
),
@@ -385,6 +396,10 @@ common_commands = [
@@ -387,6 +398,10 @@ common_commands = [
"restore",
"resume",
"save",
@ -573,7 +573,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
"shell",
"shutdown",
"start",
@@ -418,6 +433,10 @@ domain_commands = [
@@ -421,6 +436,10 @@ domain_commands = [
"restore",
"resume",
"save",
@ -584,7 +584,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
"shutdown",
"start",
"suspend",
@@ -850,6 +869,62 @@ def xm_event_monitor(args):
@@ -854,6 +873,62 @@ def xm_event_monitor(args):
#
#########################################################################
@ -647,7 +647,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
def xm_save(args):
arg_check(args, "save", 2, 4)
@@ -3696,6 +3771,10 @@ commands = {
@@ -3729,6 +3804,10 @@ commands = {
"restore": xm_restore,
"resume": xm_resume,
"save": xm_save,

View File

@ -2,7 +2,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py
+++ xen-4.0.0-testing/tools/python/xen/xm/main.py
@@ -2489,8 +2489,10 @@ def xm_usb_list_assignable_devices(args)
@@ -2522,8 +2522,10 @@ def xm_usb_list_assignable_devices(args)
def parse_block_configuration(args):
dom = args[0]

View File

@ -125,7 +125,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
import xen.util.xsm.xsm as security
from xen.util import xsconstants
from xen.util import mkdir
@@ -2343,6 +2343,10 @@ class XendDomainInfo:
@@ -2346,6 +2346,10 @@ class XendDomainInfo:
deviceClass, config = self.info['devices'].get(dev_uuid)
self._waitForDevice(deviceClass, config['devid'])
@ -136,7 +136,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
return self.getDeviceController(deviceClass).waitForDevice_destroy(
devid, backpath)
@@ -3231,7 +3235,7 @@ class XendDomainInfo:
@@ -3234,7 +3238,7 @@ class XendDomainInfo:
devtype = devinfo[0]
disk = devinfo[1]['uname']
@ -145,7 +145,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
# If this is a drbd volume, check if we need to activate it
if disk.find(":") != -1:
@@ -3242,8 +3246,17 @@ class XendDomainInfo:
@@ -3245,8 +3249,17 @@ class XendDomainInfo:
if state == 'Secondary':
os.system('/sbin/drbdadm primary ' + diskname)
@ -165,7 +165,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
if mounted:
# This is a file, not a device. pygrub can cope with a
# file if it's raw, but if it's QCOW or other such formats
@@ -3259,7 +3272,8 @@ class XendDomainInfo:
@@ -3262,7 +3275,8 @@ class XendDomainInfo:
from xen.xend import XendDomain
dom0 = XendDomain.instance().privilegedDomain()
@ -175,7 +175,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
fn = BOOTLOADER_LOOPBACK_DEVICE
try:
@@ -3269,8 +3283,10 @@ class XendDomainInfo:
@@ -3272,8 +3286,10 @@ class XendDomainInfo:
if mounted:
log.info("Unmounting %s from %s." %
(fn, BOOTLOADER_LOOPBACK_DEVICE))

View File

@ -98,7 +98,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1470,6 +1470,27 @@ class XendDomainInfo:
@@ -1473,6 +1473,27 @@ class XendDomainInfo:
pci_conf = self.info['devices'][dev_uuid][1]
return map(pci_dict_to_bdf_str, pci_conf['devs'])

View File

@ -5,7 +5,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py
+++ xen-4.0.0-testing/tools/python/xen/xm/main.py
@@ -2019,6 +2019,10 @@ def xm_debug_keys(args):
@@ -2052,6 +2052,10 @@ def xm_debug_keys(args):
def xm_top(args):
arg_check(args, "top", 0)

View File

@ -2,7 +2,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3921,6 +3921,14 @@ class XendDomainInfo:
@@ -3924,6 +3924,14 @@ class XendDomainInfo:
if not config.has_key('backend'):
config['backend'] = "00000000-0000-0000-0000-000000000000"

View File

@ -2,7 +2,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2314,7 +2314,7 @@ class XendDomainInfo:
@@ -2317,7 +2317,7 @@ class XendDomainInfo:
# To prohibit directory traversal
based_name = os.path.basename(self.info['name_label'])

View File

@ -86,7 +86,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
from xen.util.blkif import parse_uname
import xen.util.xsm.xsm as security
from xen.util import xsconstants
@@ -466,6 +467,7 @@ class XendDomainInfo:
@@ -469,6 +470,7 @@ class XendDomainInfo:
if self._stateGet() in (XEN_API_VM_POWER_STATE_HALTED, XEN_API_VM_POWER_STATE_SUSPENDED, XEN_API_VM_POWER_STATE_CRASHED):
try:
@ -94,7 +94,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
XendTask.log_progress(0, 30, self._constructDomain)
XendTask.log_progress(31, 60, self._initDomain)
@@ -2984,6 +2986,11 @@ class XendDomainInfo:
@@ -2987,6 +2989,11 @@ class XendDomainInfo:
self._stateSet(DOM_STATE_HALTED)
self.domid = None # Do not push into _stateSet()!
@ -106,7 +106,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py
finally:
self.refresh_shutdown_lock.release()
@@ -4490,6 +4497,74 @@ class XendDomainInfo:
@@ -4493,6 +4500,74 @@ class XendDomainInfo:
def has_device(self, dev_class, dev_uuid):
return (dev_uuid in self.info['%s_refs' % dev_class.lower()])

View File

@ -19,7 +19,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py
@@ -1484,7 +1484,7 @@ class XendDomain:
@@ -1496,7 +1496,7 @@ class XendDomain:
pass
sock.close()
@ -28,7 +28,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py
"""Start saving a domain to file.
@param domid: Domain ID or Name
@@ -1500,6 +1500,9 @@ class XendDomain:
@@ -1512,6 +1512,9 @@ class XendDomain:
if not dominfo:
raise XendInvalidDomain(str(domid))
@ -51,7 +51,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
'Save a domain state to restore later.'),
'shutdown' : ('<Domain> [-waRH]', 'Shutdown a domain.'),
'top' : ('', 'Monitor a host and the domains in real time.'),
@@ -314,6 +314,7 @@ SUBCOMMAND_OPTIONS = {
@@ -316,6 +316,7 @@ SUBCOMMAND_OPTIONS = {
),
'save': (
('-c', '--checkpoint', 'Leave domain running after creating snapshot'),
@ -59,7 +59,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
),
'restore': (
('-p', '--paused', 'Do not unpause domain after restoring it'),
@@ -816,18 +817,21 @@ def xm_event_monitor(args):
@@ -820,18 +821,21 @@ def xm_event_monitor(args):
def xm_save(args):
@ -83,7 +83,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
if len(params) != 2:
err("Wrong number of parameters")
@@ -841,9 +845,9 @@ def xm_save(args):
@@ -845,9 +849,9 @@ def xm_save(args):
sys.exit(1)
if serverType == SERVER_XEN_API: