<86>Sep 14 11:58:34 userdel[488921]: delete user 'rooter' <86>Sep 14 11:58:34 userdel[488921]: removed group 'rooter' owned by 'rooter' <86>Sep 14 11:58:34 groupadd[488927]: group added to /etc/group: name=rooter, GID=693 <86>Sep 14 11:58:34 groupadd[488927]: group added to /etc/gshadow: name=rooter <86>Sep 14 11:58:34 groupadd[488927]: new group: name=rooter, GID=693 <86>Sep 14 11:58:34 useradd[488933]: new user: name=rooter, UID=693, GID=693, home=/root, shell=/bin/bash <86>Sep 14 11:58:34 userdel[488942]: delete user 'builder' <86>Sep 14 11:58:34 userdel[488942]: removed group 'builder' owned by 'builder' <86>Sep 14 11:58:34 userdel[488942]: removed shadow group 'builder' owned by 'builder' <86>Sep 14 11:58:34 groupadd[488950]: group added to /etc/group: name=builder, GID=694 <86>Sep 14 11:58:34 groupadd[488950]: group added to /etc/gshadow: name=builder <86>Sep 14 11:58:34 groupadd[488950]: new group: name=builder, GID=694 <86>Sep 14 11:58:34 useradd[488954]: new user: name=builder, UID=694, GID=694, home=/usr/src, shell=/bin/bash /usr/src/in/srpm/python3-module-XenAPI-1.127.1-alt1.src.rpm: The use of such a license name is ambiguous: LGPL /usr/src/in/srpm/python3-module-XenAPI-1.127.1-alt1.src.rpm: license not found in '/usr/share/license' directory: 2.1 <13>Sep 14 11:58:36 rpmi: libgdbm-1.8.3-alt10 sisyphus+278100.1600.1.1 1626059138 installed <13>Sep 14 11:58:36 rpmi: libexpat-2.2.10-alt1 sisyphus+276608.100.1.2 1625153360 installed <13>Sep 14 11:58:36 rpmi: libp11-kit-0.23.15-alt2 sisyphus+278382.100.1.2 1626190687 installed <13>Sep 14 11:58:36 rpmi: libtasn1-4.17.0-alt1 sisyphus+276722.100.1.1 1625211286 installed <13>Sep 14 11:58:36 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+278157.100.2.1 1626055790 installed <13>Sep 14 11:58:36 rpmi: alternatives-0.5.1-alt1 sisyphus+278157.100.2.1 1626055790 installed <13>Sep 14 11:58:36 rpmi: ca-certificates-2021.06.03-alt1 sisyphus+273509.400.1.1 1622736045 installed <13>Sep 14 11:58:36 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Sep 14 11:58:36 rpmi: p11-kit-trust-0.23.15-alt2 sisyphus+278382.100.1.2 1626190687 installed <13>Sep 14 11:58:36 rpmi: libcrypto1.1-1.1.1l-alt1 sisyphus+283685.100.1.1 1629816097 installed <13>Sep 14 11:58:36 rpmi: libssl1.1-1.1.1l-alt1 sisyphus+283685.100.1.1 1629816097 installed <13>Sep 14 11:58:36 rpmi: python3-3.9.6-alt2 sisyphus+283178.100.2.1 1629243244 installed <13>Sep 14 11:58:37 rpmi: python3-base-3.9.6-alt2 sisyphus+283178.100.2.1 1629243244 installed <13>Sep 14 11:58:37 rpmi: libpython3-3.9.6-alt2 sisyphus+283178.100.2.1 1629243244 installed <13>Sep 14 11:58:37 rpmi: tests-for-installed-python3-pkgs-0.1.17-alt1 sisyphus+271082.100.1.1 1619820927 installed <13>Sep 14 11:58:37 rpmi: rpm-build-python3-0.1.17-alt1 sisyphus+271082.100.1.1 1619820927 installed <13>Sep 14 11:58:39 rpmi: libpython-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python2-base-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-encodings-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-compiler-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-email-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-unittest-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-ctypes-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-multiprocessing-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-modules-logging-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed <13>Sep 14 11:58:39 rpmi: python-tools-2to3-2.7.18-alt7 sisyphus+284067.100.1.1 1630124815 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-XenAPI-1.127.1-alt1.nosrc.rpm (w1.gzdio) <13>Sep 14 11:58:41 rpmi: python3-module-pkg_resources-1:57.4.0-alt1 sisyphus+280768.100.2.1 1627367207 installed <13>Sep 14 11:58:41 rpmi: libncurses-6.2.20210123-alt2 sisyphus+283886.200.2.1 1630022624 installed <13>Sep 14 11:58:41 rpmi: libtinfo-devel-6.2.20210123-alt2 sisyphus+283886.200.2.1 1630022624 installed <13>Sep 14 11:58:41 rpmi: libncurses-devel-6.2.20210123-alt2 sisyphus+283886.200.2.1 1630022624 installed <13>Sep 14 11:58:41 rpmi: python3-dev-3.9.6-alt2 sisyphus+283178.100.2.1 1629243244 installed <13>Sep 14 11:58:41 rpmi: python3-module-setuptools-1:57.4.0-alt1 sisyphus+280768.100.2.1 1627367207 installed Installing python3-module-XenAPI-1.127.1-alt1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.17810 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-XenAPI-1.127.1 + echo 'Source #0 (python3-module-XenAPI-1.127.1.tar.gz):' Source #0 (python3-module-XenAPI-1.127.1.tar.gz): + /bin/gzip -dc /usr/src/RPM/SOURCES/python3-module-XenAPI-1.127.1.tar.gz + /bin/tar -xf - + cd python3-module-XenAPI-1.127.1 + /bin/chmod -c -Rf u+rwX,go-w . + echo 'Patch #0 (fix-import.patch):' Patch #0 (fix-import.patch): + /usr/bin/patch -p1 patching file xenapi/XenAPIPlugin.py + find -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./xenapi/XenAPIPlugin.py RefactoringTool: No changes to ./xenapi/inventory.py RefactoringTool: No changes to ./xenapi/XenAPI.py RefactoringTool: Refactored ./setup.py RefactoringTool: Refactored ./examples/xva.py --- ./xenapi/XenAPIPlugin.py (original) +++ ./xenapi/XenAPIPlugin.py (refactored) @@ -2,7 +2,7 @@ # XenAPI python plugin boilerplate code -import sys, xmlrpclib +import sys, xmlrpc.client from xenapi import XenAPI class Failure(Exception): @@ -16,16 +16,16 @@ def success_message(result): rpcparams = { 'Status': 'Success', 'Value': result } - return xmlrpclib.dumps((rpcparams, ), '', True) + return xmlrpc.client.dumps((rpcparams, ), '', True) def failure_message(description): rpcparams = { 'Status': 'Failure', 'ErrorDescription': description } - return xmlrpclib.dumps((rpcparams, ), '', True) + return xmlrpc.client.dumps((rpcparams, ), '', True) def dispatch(fn_table): - if len(sys.argv) <> 2: + if len(sys.argv) != 2: raise "Incorrect number of commandline arguments" - params, methodname = xmlrpclib.loads(sys.argv[1]) + params, methodname = xmlrpc.client.loads(sys.argv[1]) session_id = params[0] args = params[1] if methodname in fn_table: @@ -33,14 +33,14 @@ x._session = session_id try: result = fn_table[methodname](x, args) - print success_message(result) + print(success_message(result)) except SystemExit: # SystemExit should not be caught, as it is handled elsewhere in the plugin system. raise - except Failure, e: - print failure_message(e.params) - except Exception, e: - print failure_message(['XENAPI_PLUGIN_FAILURE', - methodname, e.__class__.__name__, str(e)]) + except Failure as e: + print(failure_message(e.params)) + except Exception as e: + print(failure_message(['XENAPI_PLUGIN_FAILURE', + methodname, e.__class__.__name__, str(e)])) else: - print failure_message(['UNKNOWN_XENAPI_PLUGIN_FUNCTION', methodname]) + print(failure_message(['UNKNOWN_XENAPI_PLUGIN_FUNCTION', methodname])) --- ./setup.py (original) +++ ./setup.py (refactored) @@ -8,7 +8,7 @@ def read(filename): filename = os.path.join(os.path.dirname(__file__), filename) - text_type = type(u"") + text_type = type("") with io.open(filename, mode="r", encoding='utf-8') as fd: return re.sub(text_type(r':[a-z]+:`~?(.*?)`'), text_type(r'``\1``'), fd.read()) --- ./examples/xva.py (original) +++ ./examples/xva.py (refactored) @@ -2,7 +2,7 @@ # Rewrite the VDI.sm_config:SCSIid fields in XVA metadata -import tarfile, xmlrpclib, optparse, StringIO, sys +import tarfile, xmlrpc.client, optparse, io, sys class Object(object): """Represents an XVA metadata object, for example a VM, VBD, VDI, SR, VIF or Network. @@ -42,14 +42,14 @@ def __init__(self, input, ova): self._input = input self._version = ova["version"] - self._objects = map(lambda x: Object(x["class"], x["id"], x["snapshot"]), ova["objects"]) + self._objects = [Object(x["class"], x["id"], x["snapshot"]) for x in ova["objects"]] def list(self): return self._objects def save(self, fileobj): # Reconstruct the ova.xml from Objects - ova_txt = xmlrpclib.dumps(({"version": self._version, "objects": map(lambda x:x.marshal(), self._objects)}, )) + ova_txt = xmlrpc.client.dumps(({"version": self._version, "objects": [x.marshal() for x in self._objects]}, )) prefix="\n\n" suffix="\n\n" if not(ova_txt.startswith(prefix)) or not(ova_txt.endswith(suffix)): @@ -60,7 +60,7 @@ output = tarfile.TarFile(mode='w', fileobj=fileobj) tarinfo = tarfile.TarInfo("ova.xml") tarinfo.size = len(ova_txt) - output.addfile(tarinfo, StringIO.StringIO(ova_txt)) + output.addfile(tarinfo, io.StringIO(ova_txt)) # Stream the contents of the input, copying to the output for name in self._input.getnames(): if name == "ova.xml": @@ -72,7 +72,7 @@ def open_xva(name): t = tarfRefactoringTool: Refactored ./examples/wake-on-lan.py RefactoringTool: Refactored ./examples/shell.py RefactoringTool: Refactored ./examples/renameif.py ile.open(name = name) ova_txt = t.extractfile("ova.xml").read() - ova = xmlrpclib.loads("" + ova_txt + "")[0][0] + ova = xmlrpc.client.loads("" + ova_txt + "")[0][0] return XVA(t, ova) if __name__ == "__main__": @@ -85,19 +85,19 @@ (options, args) = parser.parse_args() if options.input is None: - print "Please supply an --input argument" + print("Please supply an --input argument") parser.print_help() sys.exit(1) if options.output is None: - print "Please supply an --output argument" + print("Please supply an --output argument") parser.print_help() sys.exit(1) if options.oldprefix is None: - print "Please supply an --oldprefix argument" + print("Please supply an --oldprefix argument") parser.print_help() sys.exit(1) if options.newprefix is None: - print "Please supply a --newprefix argument" + print("Please supply a --newprefix argument") parser.print_help() sys.exit(1) --- ./examples/wake-on-lan.py (original) +++ ./examples/wake-on-lan.py (refactored) @@ -20,7 +20,7 @@ def find_interface_broadcast_ip(interface): """Return the broadcast IP address of the supplied local interface""" (rc, stdout, stderr) = doexec( [ "ip", "address", "show", "dev", interface ] ) - if rc <> 0: + if rc != 0: raise "Failed to find IP address of local network interface %s: %s" % (interface, stderr) words = stdout.split() try: --- ./examples/shell.py (original) +++ ./examples/shell.py (refactored) @@ -62,7 +62,7 @@ pass def do_EOF(self, line): - print + print() sys.exit(0) def munge_types (str): @@ -78,16 +78,16 @@ if __name__ == "__main__": if len(sys.argv) < 2: - print "Usage:" - print sys.argv[0], " " + print("Usage:") + print(sys.argv[0], " ") sys.exit(1) - if sys.argv[1] <> "-" and len(sys.argv) < 4: - print "Usage:" - print sys.argv[0], " " + if sys.argv[1] != "-" and len(sys.argv) < 4: + print("Usage:") + print(sys.argv[0], " ") sys.exit(1) - if sys.argv[1] <> "-": + if sys.argv[1] != "-": url = sys.argv[1] username = sys.argv[2] password = sys.argv[3] @@ -105,12 +105,12 @@ cmd = sys.argv[cmdAt] params = [munge_types(x) for x in sys.argv[(cmdAt + 1):]] try: - print >> sys.stdout, session.xenapi_request(cmd, tuple(params)) - except XenAPI.Failure, x: - print >> sys.stderr, x + print(session.xenapi_request(cmd, tuple(params)), file=sys.stdout) + except XenAPI.Failure as x: + print(x, file=sys.stderr) sys.exit(2) - except Exception, e: - print >> sys.stderr, e + except Exception as e: + print(e, file=sys.stderr) sys.exit(3) sys.exit(0) else: --- ./examples/renameif.py (original) +++ ./examples/renameif.py (refactored) @@ -18,12 +18,12 @@ import XenAPI, inventory, sys def warn(txt): - print >> sys.stderr, txt + print(txt, file=sys.stderr) def show_pifs(pifs): - print "NIC MAC Notes" - print "----------------------------------------------" - for ref in pifs.keys(): + print("NIC MAC Notes") + print("----------------------------------------------") + for ref in list(pifs.keys()): notes = [] if pifs[ref]['management']: notes.append("management interface") @@ -37,11 +37,11 @@ except: pass - print "%3s %s %s" % (nic, pifs[ref]['MAC'], ", ".join(notes)) + print("%3s %s %s" % (nic, pifs[ref]['MAC'], ", ".join(notes))) def select(pifs, key): """Select a PIF by device name or MAC""" - for ref in pifs.keys(): + for ref in list(pifs.keys()): if pifs[ref]['device'][3:] == key: return ref if pifs[ref]['MAC'].upper() == key.upper(): @@ -52,16 +52,16 @@ """Commit changes""" # Check that device names are unique devices = [] - for ref in pifs.keys(): + for ref in list(pifs.keys()): devices.append(pifs[ref]['device'][3:]) for i in set(devices): devices.remove(i) - if devices <> []: - print "ERROR: cannot assign two interfaces the same NIC number (%s)" % (", ".join(i)) - print "Aborted." + if devices != []: + print("ERROR: cannot assign two interfaces the same NIC number (%s)" % (", ".join(i))) + print("Aborted.") sys.exit(1) vifs = [] - for ref in pifs.keys(): + for ref in list(pifs.keys()): net = pifs[ref]['network'] for vif in session.xenapi.network.get_VIFs(net): if session.xenapi.VIF.get_currently_attached(vif): @@ -70,25 +70,25 @@ plural = "" if len(vifs) > 1: plural = "s" - print "WARNING: this operation requires unplugging %d guest network interface%s" % (len(vifs), plural) - print "Are you sure you want to continue? (yes/no) > ", - if sys.stdin.readline().strip().lower() <> "yes": - print "Aborted." + print("WARNING: this operation requires unplugging %d guest network interface%s" % (len(vifs), plural)) + print("Are you sure you want to continue? (yes/no) > ", end=' ') + if sys.stdin.readline().strip().lower() != "yes": + print("Aborted.") sys.exit(1) for vif in vifs: dev = session.xenapi.VIF.get_device(vif) vm = session.xenapi.VIF.get_VM(vif) uuid = session.xenapi.VM.get_uuid(vm) - print "Hot-unplugging interface %s on VM %s" % (dev, uuid) + print("Hot-unplugging interface %s on VM %s" % (dev, uuid)) session.xenapi.VIF.unplug(vif) - for ref in pifs.keys(): + for ref in list(pifs.keys()): mac = pifs[ref]['MAC'] if pifs[ref]['management']: - print "Disabling management NIC (%s)" % mac + print("Disabling management NIC (%s)" % mac) session.xenapi.host.management_disable() session.xenapi.PIF.forget(ref) - for ref in pifs.keys(): + for ref in list(pifs.keys()): mac = pifs[ref]['MAC'] device = pifs[ref]['device'] mode = pifs[ref]['ip_configuration_mode'] @@ -99,14 +99,14 @@ new_ref = session.xenapi.PIF.introduce(host, mac, device) session.xenapi.PIF.reconfigure_ip(new_ref, mode, IP, netmask, gateway, DNS) if pifs[ref]['management']: - print "Re-enabling management NIC (%s)" % mac + print("Re-enabling management NIC (%s)" % mac) session.xenapi.host.management_reconfigure(new_ref) for vif in vifs: dev = session.xenapi.VIF.get_device(vif) vm = session.xenapi.VIF.get_VM(vif) uuid = session.xenapi.VM.get_uuid(vm) - print "Hot-plugging interface %s on VM %s" % (dev, uuid) + print("Hot-plugging interface %s on VM %s" % (dev, uuid)) session.xenapi.VIF.plug(vif) def renameif(session): @@ -114,47 +114,47 @@ host = session.xenapi.host.get_by_uuid(uuid) pool = session.xenapi.pool.get_all()[0] master = session.xenapi.pool.get_master(pool) - if host <> master: + if host != master: warn("This host is a slave; it is not possible to rename the management interface") pifs = session.xenapi.PIF.get_all_records() - for ref in pifs.keys(): - if pifs[ref]['host'] <> host or pifs[ref]['physical'] <> True: + for ref in list(pifs.keys()): + if pifs[ref]['host'] != host or pifs[ref]['physical'] != True: del pifs[ref] while True: - print "Current mappings:" + print("Current mappings:") show_pifs(pifs) - RefactoringTool: Refactored ./examples/provision.py RefactoringTool: Refactored ./examples/monitor-unwanted-domains.py print - print "Type 'quit' to quit; 'save' to save; or a NIC number or MAC address to edit" - print "> ", + print() + print("Type 'quit' to quit; 'save' to save; or a NIC number or MAC address to edit") + print("> ", end=' ') x = sys.stdin.readline().strip() if x.lower() == 'quit': sys.exit(0) if x.lower() == 'save': # If a slave, filter out the management PIF - if host <> master: - for ref in pifs.keys(): + if host != master: + for ref in list(pifs.keys()): if pifs[ref]['management']: del pifs[ref] save(session, host, pifs) sys.exit(0) pif = select(pifs, x) - if pif <> None: + if pif != None: # Make sure this is not a slave's management PIF - if host <> master and pifs[pif]['management']: - print "ERROR: cannot modify the management interface of a slave." + if host != master and pifs[pif]['management']: + print("ERROR: cannot modify the management interface of a slave.") else: - print "Selected NIC with MAC '%s'. Enter new NIC number:" % pifs[pif]['MAC'] - print "> ", + print("Selected NIC with MAC '%s'. Enter new NIC number:" % pifs[pif]['MAC']) + print("> ", end=' ') nic = sys.stdin.readline().strip() if not(nic.isdigit()): - print "ERROR: must enter a number (e.g. 0, 1, 2, 3, ...)" + print("ERROR: must enter a number (e.g. 0, 1, 2, 3, ...)") else: pifs[pif]['device'] = "eth" + nic else: - print "NIC '%s' not found" % (x) - print + print("NIC '%s' not found" % (x)) + print() if __name__ == "__main__": --- ./examples/provision.py (original) +++ ./examples/provision.py (refactored) @@ -63,7 +63,7 @@ """Return an instance of type ProvisionSpec given XML text""" doc = xml.dom.minidom.parseString(txt) all = doc.getElementsByTagName("provision") - if len(all) <> 1: + if len(all) != 1: raise "Expected to find exactly one element" ps = ProvisionSpec() disks = all[0].getElementsByTagName("disk") @@ -92,19 +92,19 @@ session.xenapi.VM.add_to_other_config(vm, "disks", txt) if __name__ == "__main__": - print "Unit test of provision XML spec module" - print "--------------------------------------" + print("Unit test of provision XML spec module") + print("--------------------------------------") ps = ProvisionSpec() ps.disks.append(Disk("0", "1024", "0000-0000", True)) ps.disks.append(Disk("1", "2048", "1111-1111", False)) - print "* Pretty-printing spec" + print("* Pretty-printing spec") txt = printProvisionSpec(ps) - print txt - print "* Re-parsing output" + print(txt) + print("* Re-parsing output") ps2 = parseProvisionSpec(txt) - print "* Pretty-printing spec" + print("* Pretty-printing spec") txt2 = printProvisionSpec(ps) - print txt2 - if txt <> txt2: + print(txt2) + if txt != txt2: raise "Sanity-check failed: print(parse(print(x))) <> print(x)" - print "* OK: print(parse(print(x))) == print(x)" + print("* OK: print(parse(print(x))) == print(x)") --- ./examples/monitor-unwanted-domains.py (original) +++ ./examples/monitor-unwanted-domains.py (refactored) @@ -13,7 +13,7 @@ lines = all.split("\n") for domain in lines[1:]: bits = domain.split() - if bits <> []: + if bits != []: domid = bits[0] uuid = bits[2] state = bits[4] @@ -23,7 +23,8 @@ # Given localhost's uuid and a (domid, uuid) tuple, return True if the domain # be somewhere else i.e. we think it may have leaked here -def should_domain_be_somewhere_else(localhost_uuid, (domid, uuid)): +def should_domain_be_someRefactoringTool: Refactored ./examples/mini-xenrt.py where_else(localhost_uuid, xxx_todo_changeme): + (domid, uuid) = xxx_todo_changeme try: x = XenAPI.xapi_local() x.xenapi.login_with_password("root", "", "1.0", "xen-api-scripts-monitor-unwanted-domains.py") @@ -32,11 +33,11 @@ vm = x.xenapi.VM.get_by_uuid(uuid) resident_on = x.xenapi.VM.get_resident_on(vm) current_operations = x.xenapi.VM.get_current_operations(vm) - result = current_operations == {} and resident_on <> localhost_uuid + result = current_operations == {} and resident_on != localhost_uuid if result: log("domid %s uuid %s: is not being operated on and is not resident here" % (domid, uuid)) return result - except XenAPI.Failure, e: + except XenAPI.Failure as e: if e.details[0] == "UUID_INVALID": # VM is totally bogus log("domid %s uuid %s: is not in the xapi database" % (domid, uuid)) @@ -49,10 +50,11 @@ return False def log(str): - print str + print(str) # Destroy the given domain -def destroy_domain((domid, uuid)): +def destroy_domain(xxx_todo_changeme1): + (domid, uuid) = xxx_todo_changeme1 log("destroying domid %s uuid %s" % (domid, uuid)) all = subprocess.Popen(["@OPTDIR@/debug/destroy_domain", "-domid", domid], stdout=subprocess.PIPE).communicate()[0] @@ -68,7 +70,7 @@ time.sleep(1) paused = list_paused_domains () # GC the domain_first_noticed map - for d in domain_first_noticed.keys(): + for d in list(domain_first_noticed.keys()): if d not in paused: log("domid %s uuid %s: looks ok now, forgetting about it" % d) del domain_first_noticed[d] --- ./examples/mini-xenrt.py (original) +++ ./examples/mini-xenrt.py (refactored) @@ -3,7 +3,7 @@ # Receive multiple VMs # Issue parallel loops of: reboot, suspend/resume, migrate -import xmlrpclib +import xmlrpc.client from threading import Thread import time, sys @@ -35,7 +35,7 @@ x = server.VM.suspend(session_id, self.vm) if "ErrorDescription" in x: time.sleep(1) - if x["Status"] <> "Success": + if x["Status"] != "Success": return x return server.VM.resume(session_id, self.vm, False, False) def __str__(self): @@ -46,7 +46,7 @@ self.vm = vm def execute(self, server, session_id): x = server.VM.clean_shutdown(session_id, self.vm) - if x["Status"] <> "Success": + if x["Status"] != "Success": return x return server.VM.start(session_id, self.vm, False, False) #return { "Status": "bad", "ErrorDescription": "foo" } @@ -89,11 +89,11 @@ end = time.strftime(iso8601, time.gmtime(time.time ())) if result["Status"] == "Success": - print "SUCCESS %d %s %s %s" % (self.id, start, end, description) + print("SUCCESS %d %s %s %s" % (self.id, start, end, description)) self.num_successes = self.num_successes + 1 else: error_descr = result["ErrorDescription"] - print "FAILURE %d %s %s %s %s" % (self.id, start, end, error_descr[0], description) + print("FAILURE %d %s %s %s %s" % (self.id, start, end, error_descr[0], description)) self.num_failures = self.num_failures + 1 if stop_on_first_failure: stop = True @@ -102,20 +102,20 @@ return [ Reboot(vm), SuspendResume(vm), LocalhostMigrate(vm) ] * 100 if __name__ == "__main__": - if len(sys.argv) <> 3: - print "Usage:" - print " %s " % (sys.argv[0]) - print " -- performs parallel operations on VMs with the specified other-config key" + if len(sys.argv) != 3: + print("Usage:") + print(" %s " % (sys.argv[0])) + print(" -- performsRefactoringTool: Refactored ./examples/lvhd-api-test.py RefactoringTool: Refactored ./examples/exportimport.py parallel operations on VMs with the specified other-config key") sys.exit(1) - x = xmlrpclib.Server(sys.argv[1]) + x = xmlrpc.client.Server(sys.argv[1]) key = sys.argv[2] session = x.session.login_with_password("root", "xenroot", "1.0", "xen-api-scripts-minixenrt.py")["Value"] vms = x.VM.get_all_records(session)["Value"] workers = [] - for vm in vms.keys(): - if vms[vm]["other_config"].has_key(key): + for vm in list(vms.keys()): + if key in vms[vm]["other_config"]: allowed_ops = vms[vm]["allowed_operations"] for op in [ "clean_reboot", "suspend", "pool_migrate" ]: if op not in allowed_ops: @@ -130,12 +130,12 @@ for w in workers: successes = successes + w.num_successes failures = failures + w.num_failures - print "Total successes = %d" % successes - print "Total failures = %d" % failures + print("Total successes = %d" % successes) + print("Total failures = %d" % failures) if failures == 0: - print "PASS" + print("PASS") sys.exit(0) else: - print "FAIL" + print("FAIL") sys.exit(1) --- ./examples/lvhd-api-test.py (original) +++ ./examples/lvhd-api-test.py (refactored) @@ -5,19 +5,19 @@ def go(x, name): vm = x.xenapi.VM.get_by_name_label(name)[0] vbds = x.xenapi.VM.get_VBDs(vm) - non_empty = filter(lambda y:not(x.xenapi.VBD.get_empty(y)), vbds) - vdis = map(lambda y:x.xenapi.VBD.get_VDI(y), non_empty) + non_empty = [y for y in vbds if not(x.xenapi.VBD.get_empty(y))] + vdis = [x.xenapi.VBD.get_VDI(y) for y in non_empty] - print "Calling API call on %s" % (repr(vdis)) + print("Calling API call on %s" % (repr(vdis))) result = x.xenapi.SR.lvhd_stop_using_these_vdis_and_call_script(vdis, "echo", "main", { "hello": "there", "sleep": "10" }) - print repr(result) + print(repr(result)) if __name__ == "__main__": - if len(sys.argv) <> 2: - print >>sys.stderr, "Usage:" - print >>sys.stderr, " %s " % (sys.argv[0]) - print >>sys.stderr, " -- Call SR.lvhd_stop_using_these_vdis_and_call_script with all VDIs with VBDs (attached or not) linking to specified VM" + if len(sys.argv) != 2: + print("Usage:", file=sys.stderr) + print(" %s " % (sys.argv[0]), file=sys.stderr) + print(" -- Call SR.lvhd_stop_using_these_vdis_and_call_script with all VDIs with VBDs (attached or not) linking to specified VM", file=sys.stderr) sys.exit(1) name = sys.argv[1] x = XenAPI.xapi_local() --- ./examples/exportimport.py (original) +++ ./examples/exportimport.py (refactored) @@ -19,7 +19,7 @@ # - import raw disk images # - connect an export to an import to copy a raw disk image -import sys, os, socket, urllib2, urlparse, traceback, ssl, time +import sys, os, socket, urllib.request, urllib.error, urllib.parse, urllib.parse, traceback, ssl, time import XenAPI @@ -36,18 +36,18 @@ put_url = "/import_raw_vdi?session_id=%s&vdi=%s&task_id=%s" % (session, dst_vdi, import_task) # 'data' is the stream of raw data: - data = urllib2.urlopen(url + get_url) + data = urllib.request.urlopen(url + get_url) # python's builtin library doesn't support HTTP PUT very well # so we do it manually. Note xapi doesn't support Transfer-encoding: # chunked so we must send the data raw. - url = urlparse.urlparse(url) + url = urllib.parse.urlparse(url) host = url.netloc.split(":")[0] # assume port 443 - if url.scheme <> "https": - print >>sys.stderr, "Sorry, this example only supports HTTPS (not HTTP)" - print >>sys.stderr, "Plaintext HTTP has the following problems:" - print >>sys.stderr, " - the data can be captured by other programs on the network" - print >>sys.stderr, " - some network middleboxes will mangle the data" + if url.scheme != "https": + print("Sorry, this example only supports HTTPS (not HTTP)", file=sys.stderr) + print("PlainteRefactoringTool: Refactored ./examples/echo.py xt HTTP has the following problems:", file=sys.stderr) + print(" - the data can be captured by other programs on the network", file=sys.stderr) + print(" - some network middleboxes will mangle the data", file=sys.stderr) # time wasted debugging a problem caused by a middlebox: 3hrs # Just use HTTPS! return @@ -62,22 +62,22 @@ "Connection:close", "" ] - print "Sending HTTP request:" + print("Sending HTTP request:") for h in headers: output.send("%s\r\n" % h) - print "%s\r\n" % h, + print("%s\r\n" % h, end=' ') result = output.recv(1024) - print "Received HTTP response:" - print result + print("Received HTTP response:") + print(result) if "200 OK" not in result: - print >>sys.stderr, "Expected an HTTP 200, got %s" % result + print("Expected an HTTP 200, got %s" % result, file=sys.stderr) return # Copy the raw bytes, signal completion by closing the socket - virtual_size = long(xapi.xenapi.VDI.get_virtual_size(src_vdi)) - print "Copying %Ld bytes" % virtual_size + virtual_size = int(xapi.xenapi.VDI.get_virtual_size(src_vdi)) + print("Copying %Ld bytes" % virtual_size) left = virtual_size - while left > 0L: + while left > 0: block = data.read(min(65536, left)) if block is None: break @@ -91,16 +91,16 @@ while not finished: import_status = xapi.xenapi.task.get_status(import_task) export_status = xapi.xenapi.task.get_status(export_task) - finished = import_status <> "pending" and export_task <> "pending" + finished = import_status != "pending" and export_task != "pending" time.sleep(1) if import_status == "success" and export_status == "success": - print "OK" + print("OK") else: - print "FAILED" - if import_status <> "success": - print "The import task failed with: ", " ".join(xapi.xenapi.task.get_error_info(import_task)) - if export_status <> "success": - print "The export task failed with: ", " ".join(xapi.xenapi.task.get_error_info(export_task)) + print("FAILED") + if import_status != "success": + print("The import task failed with: ", " ".join(xapi.xenapi.task.get_error_info(import_task))) + if export_status != "success": + print("The export task failed with: ", " ".join(xapi.xenapi.task.get_error_info(export_task))) finally: # The task creator has to destroy them at the end: @@ -108,15 +108,15 @@ xapi.xenapi.task.destroy(export_task) if __name__ == "__main__": - if len(sys.argv) <> 5: - print "Usage:" - print sys.argv[0], " " - print " -- creates a fresh VDI and streams the contents of into it." - print - print "Example:" - print "SR=$(xe pool-list params=default-SR --minimal)" - print "VDI=$(xe vdi-create sr-uuid=$SR name-label=test virtual-size=128MiB type=user)" - print sys.argv[0], "https://localhost password $VDI" + if len(sys.argv) != 5: + print("Usage:") + print(sys.argv[0], " ") + print(" -- creates a fresh VDI and streams the contents of into it.") + print() + print("Example:") + print("SR=$(xe pool-list params=default-SR --minimal)") + print("VDI=$(xe vdi-create sr-uuid=$SR name-label=test virtual-size=128MiB type=user)") + print(sys.argv[0], "https://localhost password $VDI") sys.exit(1) url = sys.argv[1] username = sys.argv[2] @@ -134,8 +134,8 @@ vdi_args = xapi.xenapi.VDI.get_record(src_vdi) dst_vdi = xapi.xenapi.VDI.create(vdi_args) exportimport(url, xapi, xapi._session, src_vdi, dst_vdi) - except Exception, e: - print "Caught %s: trying to clean up" % str(e) + except Exception as e: + print("Caught %s: trying to clean up" % str(e)) traceback.print_exc() if dst_vdi: xapi.xenapi.VDI.destroy(dst_vdi) --- ./examples/echo.py (original) +++ ./examples/echo.py (refactored) @@ -6,7 +6,7 @@ import XenAPIPlugin def mainRefactoringTool: Refactored ./XenAPI.py (session, args): - if args.has_key("sleep"): + if "sleep" in args: secs = int(args["sleep"]) time.sleep(secs) return "args were: %s" % (repr(args)) --- ./XenAPI.py (original) +++ ./XenAPI.py (refactored) @@ -45,8 +45,8 @@ # -------------------------------------------------------------------- import gettext -import xmlrpclib -import httplib +import xmlrpc.client +import http.client import socket translation = gettext.translation('xen-xm', fallback = True) @@ -61,9 +61,9 @@ def __str__(self): try: return str(self.details) - except Exception, exn: + except Exception as exn: import sys - print >>sys.stderr, exn + print(exn, file=sys.stderr) return "Xen-API failure: %s" % str(self.details) def _details_map(self): @@ -73,17 +73,17 @@ _RECONNECT_AND_RETRY = (lambda _ : ()) -class UDSHTTPConnection(httplib.HTTPConnection): +class UDSHTTPConnection(http.client.HTTPConnection): """HTTPConnection subclass to allow HTTP over Unix domain sockets. """ def connect(self): path = self.host.replace("_", "/") self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.sock.connect(path) -class UDSHTTP(httplib.HTTP): +class UDSHTTP(http.client.HTTP): _connection_class = UDSHTTPConnection -class UDSTransport(xmlrpclib.Transport): +class UDSTransport(xmlrpc.client.Transport): def __init__(self, use_datetime=0): self._use_datetime = use_datetime self._extra_headers=[] @@ -96,7 +96,7 @@ for key, value in self._extra_headers: connection.putheader(key, value) -class Session(xmlrpclib.ServerProxy): +class Session(xmlrpc.client.ServerProxy): """A server proxy and session manager for communicating with xapi using the Xen-API. @@ -110,7 +110,7 @@ def __init__(self, uri, transport=None, encoding=None, verbose=0, allow_none=1): - xmlrpclib.ServerProxy.__init__(self, uri, transport, encoding, + xmlrpc.client.ServerProxy.__init__(self, uri, transport, encoding, verbose, allow_none) self.transport = transport self._session = None @@ -137,17 +137,17 @@ self._login(self.last_login_method, self.last_login_params) else: - raise xmlrpclib.Fault(401, 'You must log in') + raise xmlrpc.client.Fault(401, 'You must log in') else: return result - raise xmlrpclib.Fault( + raise xmlrpc.client.Fault( 500, 'Tried 3 times to get a valid session, but failed') def _login(self, method, params): result = _parse_result(getattr(self, 'session.%s' % method)(*params)) if result == _RECONNECT_AND_RETRY: - raise xmlrpclib.Fault( + raise xmlrpc.client.Fault( 500, 'Received SESSION_INVALID when logging in') self._session = result self.last_login_method = method @@ -181,19 +181,19 @@ elif name.startswith('login') or name.startswith('slave_local'): return lambda *params: self._login(name, params) else: - return xmlrpclib.ServerProxy.__getattr__(self, name) + return xmlrpc.client.ServerProxy.__getattr__(self, name) def xapi_local(): return Session("http://_var_xapi_xapi/", transport=UDSTransport()) def _parse_result(result): if type(result) != dict or 'Status' not in result: - raise xmlrpclib.Fault(500, 'Missing Status in response from server' + result) + raise xmlrpc.client.Fault(500, 'Missing Status in response from server' + result) if result['Status'] == 'Success': if 'Value' in result: return result['Value'] else: - raise xmlrpclib.Fault(500, + raise xmlrpc.client.Fault(500, RefactoringTool: Files that were modified: RefactoringTool: ./xenapi/XenAPIPlugin.py RefactoringTool: ./xenapi/inventory.py RefactoringTool: ./xenapi/XenAPI.py RefactoringTool: ./setup.py RefactoringTool: ./examples/xva.py RefactoringTool: ./examples/wake-on-lan.py RefactoringTool: ./examples/shell.py RefactoringTool: ./examples/renameif.py RefactoringTool: ./examples/provision.py RefactoringTool: ./examples/monitor-unwanted-domains.py RefactoringTool: ./examples/mini-xenrt.py RefactoringTool: ./examples/lvhd-api-test.py RefactoringTool: ./examples/exportimport.py RefactoringTool: ./examples/echo.py RefactoringTool: ./XenAPI.py RefactoringTool: Warnings/messages while refactoring: RefactoringTool: ### In file ./xenapi/XenAPIPlugin.py ### RefactoringTool: Line 27: could not convert: raise "Incorrect number of commandline arguments" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./examples/provision.py ### RefactoringTool: Line 67: could not convert: raise "Expected to find exactly one element" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 109: could not convert: raise "Sanity-check failed: print(parse(print(x))) <> print(x)" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file ./examples/mini-xenrt.py ### RefactoringTool: Line 17: could not convert: raise "this is supposed to be abstract, dummy" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 19: could not convert: raise "this is supposed to be abstract, dummy" RefactoringTool: Python 3 does not support string exceptions 'Missing Value in response from server') else: if 'ErrorDescription' in result: @@ -202,7 +202,7 @@ else: raise Failure(result['ErrorDescription']) else: - raise xmlrpclib.Fault( + raise xmlrpc.client.Fault( 500, 'Missing ErrorDescription in response from server') + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.65085 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-XenAPI-1.127.1 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py build running build running build_py file xenapi.py (for module xenapi) not found creating build creating build/lib creating build/lib/xenapi copying xenapi/XenAPIPlugin.py -> build/lib/xenapi copying xenapi/inventory.py -> build/lib/xenapi copying xenapi/__init__.py -> build/lib/xenapi copying xenapi/XenAPI.py -> build/lib/xenapi file xenapi.py (for module xenapi) not found + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.64990 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-XenAPI-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-XenAPI-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + cd python3-module-XenAPI-1.127.1 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-XenAPI-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-XenAPI-buildroot creating /usr/src/tmp/python3-module-XenAPI-buildroot/usr creating /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib creating /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi copying build/lib/xenapi/XenAPI.py -> /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi copying build/lib/xenapi/__init__.py -> /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi copying build/lib/xenapi/inventory.py -> /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi copying build/lib/xenapi/XenAPIPlugin.py -> /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi byte-compiling /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPI.py to XenAPI.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__init__.py to __init__.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/inventory.py to inventory.cpython-39.pyc byte-compiling /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPIPlugin.py to XenAPIPlugin.cpython-39.pyc running install_egg_info running egg_info creating xenapi_python.egg-info writing xenapi_python.egg-info/PKG-INFO writing dependency_links to xenapi_python.egg-info/dependency_links.txt writing requirements to xenapi_python.egg-info/requires.txt writing top-level names to xenapi_python.egg-info/top_level.txt writing manifest file 'xenapi_python.egg-info/SOURCES.txt' file xenapi.py (for module xenapi) not found reading manifest file 'xenapi_python.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'xenapi_python.egg-info/SOURCES.txt' Copying xenapi_python.egg-info to /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info running install_scripts + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-XenAPI-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-XenAPI-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python3-module-XenAPI-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-XenAPI-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-XenAPI-buildroot ./usr/lib: (from :0) Verifying ELF objects in /usr/src/tmp/python3-module-XenAPI-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python3 modules in /usr/src/tmp/python3-module-XenAPI-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.pyc unlink /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.pyc unlink /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.pyc unlink /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.pyc compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPI.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPIPlugin.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__init__.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/inventory.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-XenAPI-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPI.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPIPlugin.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__init__.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/inventory.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-XenAPI-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPI.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPIPlugin.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/__init__.py compile /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/inventory.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.opt-1.pyc' => './usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.pyc' './usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.opt-1.pyc' => './usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.pyc' './usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.opt-1.pyc' => './usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.pyc' './usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.opt-2.pyc' => './usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.opt-1.pyc' './usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.opt-1.pyc' => './usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.pyc' Processing files: python3-module-XenAPI-1.127.1-alt1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.54029 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-XenAPI-1.127.1 + DOCDIR=/usr/src/tmp/python3-module-XenAPI-buildroot/usr/share/doc/python3-module-XenAPI-1.127.1 + export DOCDIR + rm -rf /usr/src/tmp/python3-module-XenAPI-buildroot/usr/share/doc/python3-module-XenAPI-1.127.1 + /bin/mkdir -p /usr/src/tmp/python3-module-XenAPI-buildroot/usr/share/doc/python3-module-XenAPI-1.127.1 + cp -prL README /usr/src/tmp/python3-module-XenAPI-buildroot/usr/share/doc/python3-module-XenAPI-1.127.1 + chmod -R go-w /usr/src/tmp/python3-module-XenAPI-buildroot/usr/share/doc/python3-module-XenAPI-1.127.1 + chmod -R a+rX /usr/src/tmp/python3-module-XenAPI-buildroot/usr/share/doc/python3-module-XenAPI-1.127.1 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.AkwcaI find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.36CF8K find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) /usr/lib/rpm/python3.req.py:6: DeprecationWarning: The parser module is deprecated and will be removed in future versions of Python import parser, symbol, token, types /usr/lib/rpm/python3.req.py:6: DeprecationWarning: The symbol module is deprecated and will be removed in future versions of Python import parser, symbol, token, types python3.req: /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPI.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPI.py: line=135 IGNORE (for REQ=slight and deep=15) module=ssl python3.req: /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPIPlugin.py: skipping sys shebang.req.files: executable script /usr/src/tmp/python3-module-XenAPI-buildroot/usr/lib/python3/site-packages/xenapi/XenAPIPlugin.py is not executable Provides: python3(xenapi), python3(xenapi.XenAPI), python3(xenapi.XenAPIPlugin), python3(xenapi.inventory) Requires: /usr/lib/python3/site-packages, python3(gettext) < 0, python3(six.moves.http_client) < 0, python3(six.moves.xmlrpc_client) < 0, python3(socket) < 0, python3(xmlrpc.client) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python3-module-XenAPI-1.127.1-alt1.noarch.rpm (w2.lzdio) 5.12user 0.44system 0:07.04elapsed 79%CPU (0avgtext+0avgdata 19380maxresident)k 0inputs+0outputs (0major+129545minor)pagefaults 0swaps /.out/python3-module-XenAPI-1.127.1-alt1.noarch.rpm: The use of such a license name is ambiguous: LGPL /.out/python3-module-XenAPI-1.127.1-alt1.noarch.rpm: license not found in '/usr/share/license' directory: 2.1 11.66user 3.68system 0:16.66elapsed 92%CPU (0avgtext+0avgdata 101300maxresident)k 0inputs+0outputs (0major+542147minor)pagefaults 0swaps --- python3-module-XenAPI-1.127.1-alt1.noarch.rpm.repo 2020-01-16 08:10:58.011186106 +0000 +++ python3-module-XenAPI-1.127.1-alt1.noarch.rpm.hasher 2021-09-14 11:58:49.643783693 +0000 @@ -5,21 +5,21 @@ /usr/lib/python3/site-packages/xenapi/__pycache__ 40755 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-37.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-37.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-37.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-37.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-37.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-37.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-37.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-37.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-37.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-37.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-37.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.pyc 100644 root:root /usr/lib/python3/site-packages/xenapi/inventory.py 100644 root:root -/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info 40755 root:root -/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/PKG-INFO 100644 root:root -/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/SOURCES.txt 100644 root:root -/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/dependency_links.txt 100644 root:root -/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/requires.txt 100644 root:root -/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/top_level.txt 100644 root:root +/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info 40755 root:root +/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/PKG-INFO 100644 root:root +/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/SOURCES.txt 100644 root:root +/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/dependency_links.txt 100644 root:root +/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/requires.txt 100644 root:root +/usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/top_level.txt 100644 root:root /usr/share/doc/python3-module-XenAPI-1.127.1 40755 root:root @@ -43,23 +43,23 @@ File: /usr/lib/python3/site-packages/xenapi/__pycache__ 40755 root:root -File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-37.opt-1.pyc 100644 root:root 7ba72afa4ce8109439518207d6967eda -File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-37.opt-2.pyc 100644 root:root 2ecaa7a73852effe8534bdb738602d65 -File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-37.pyc 100644 root:root 7ba72afa4ce8109439518207d6967eda -File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-37.opt-1.pyc 100644 root:root 0ab12a2f6e0111c8c4794d873b22cbcf -File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-37.opt-2.pyc 100644 root:root 03687c0281c915e09c965c957293da37 -File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-37.pyc 100644 root:root 0ab12a2f6e0111c8c4794d873b22cbcf -File: /usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-37.opt-1.pyc 100644 root:root fb82f9bef9d6e700d1ec7ed7e3e197ab -File: /usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-37.opt-2.pyc 100644 root:root fb82f9bef9d6e700d1ec7ed7e3e197ab -File: /usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-37.pyc 100644 root:root fb82f9bef9d6e700d1ec7ed7e3e197ab -File: /usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-37.opt-1.pyc 100644 root:root 5fb69d11bbcb5d69b9f4e7b545aa83ac -File: /usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-37.opt-2.pyc 100644 root:root 68641eff3c60303c7f34e00b27bc6b3f -File: /usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-37.pyc 100644 root:root 5fb69d11bbcb5d69b9f4e7b545aa83ac +File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.opt-1.pyc 100644 root:root 40cc4eaa0c247e83b3025ed359e5b689 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.opt-2.pyc 100644 root:root 0b81663a6a356075a653068109835c77 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPI.cpython-39.pyc 100644 root:root 40cc4eaa0c247e83b3025ed359e5b689 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.opt-1.pyc 100644 root:root 8f85b1ce5a0b088b4972e7b561e5d636 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.opt-2.pyc 100644 root:root 0213bc5a06a03e4de73aa8daa1606329 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/XenAPIPlugin.cpython-39.pyc 100644 root:root 8f85b1ce5a0b088b4972e7b561e5d636 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.opt-1.pyc 100644 root:root d7c182fd6280112423f2099578905a22 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.opt-2.pyc 100644 root:root d7c182fd6280112423f2099578905a22 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/__init__.cpython-39.pyc 100644 root:root d7c182fd6280112423f2099578905a22 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.opt-1.pyc 100644 root:root 61b0395d8bc719fce397a54396854dd2 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.opt-2.pyc 100644 root:root c742576a4ef90193525aaea08fece352 +File: /usr/lib/python3/site-packages/xenapi/__pycache__/inventory.cpython-39.pyc 100644 root:root 61b0395d8bc719fce397a54396854dd2 File: /usr/lib/python3/site-packages/xenapi/inventory.py 100644 root:root 4c14fe4fce0f71518bc518365d126202 -File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info 40755 root:root -File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/PKG-INFO 100644 root:root 1b600c03e0fbb07864df98cfc8706fa7 -File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/SOURCES.txt 100644 root:root 2a7d042580a76336a6d46cd364726593 -File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/dependency_links.txt 100644 root:root 68b329da9893e34099c7d8ad5cb9c940 -File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/requires.txt 100644 root:root 5d2dfbea120f23e84e689374aa2ba84f -File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.7.egg-info/top_level.txt 100644 root:root 48b7daefea531f9b1ecaed7ad2555637 +File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info 40755 root:root +File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/PKG-INFO 100644 root:root bc4745178709d479f913c738695810d2 +File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/SOURCES.txt 100644 root:root f8ece2108db74ce2580764105218ac79 +File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/dependency_links.txt 100644 root:root 68b329da9893e34099c7d8ad5cb9c940 +File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/requires.txt 100644 root:root 5d2dfbea120f23e84e689374aa2ba84f +File: /usr/lib/python3/site-packages/xenapi_python-1.127.1-py3.9.egg-info/top_level.txt 100644 root:root 48b7daefea531f9b1ecaed7ad2555637 File: /usr/share/doc/python3-module-XenAPI-1.127.1 40755 root:root File: /usr/share/doc/python3-module-XenAPI-1.127.1/README 100644 root:root ba588215ae7a6f3cff66f7edcc4d644d -RPMIdentity: 07dffcfe80856d08b6e291a39f57b7c7b9f4b8d3d81cc355e7e77c3c8ac21dd07712b0edda5c5c9ad6fcffe2aae3d80ea2e49b2bd7e4b834fa16cdc6f0b3385c +RPMIdentity: 0f49dd7138d01fd779b22294b1ebdeb63a2b141572a6e17da8a884b66d08d1f35cf318528c34785fb4b9bab5934738c1126c48fbb7a7fdd4bc66f81171f3057e