backend/server
by Justin Sherrill
backend/server/wsgi/wsgiRequest.py | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 68d57e4b0aa3fc94727fe03dfbd3e47a30d2f87e
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Mar 18 16:18:20 2010 -0400
removing log debug
diff --git a/backend/server/wsgi/wsgiRequest.py b/backend/server/wsgi/wsgiRequest.py
index 929f47f..e0106f9 100644
--- a/backend/server/wsgi/wsgiRequest.py
+++ b/backend/server/wsgi/wsgiRequest.py
@@ -64,7 +64,6 @@ class WsgiRequest:
if len(self.status) == 0 or self.status == None:
self.status = "200"
elif self.status.startswith("500"):
- log_debug(1, self.status)
for i in self.err_headers_out.items():
self.headers_out.add(i[0], i[1])
14 years, 3 months
backend/server
by Justin Sherrill
backend/server/wsgi/wsgiRequest.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 59e6f95f4f2f2fa43a86bf6ace7dbe4ff1795304
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Mar 18 16:11:09 2010 -0400
fixing some wsgi error handling, so it is more graceful when handling errors and other status codes
diff --git a/backend/server/wsgi/wsgiRequest.py b/backend/server/wsgi/wsgiRequest.py
index 50c4aee..929f47f 100644
--- a/backend/server/wsgi/wsgiRequest.py
+++ b/backend/server/wsgi/wsgiRequest.py
@@ -18,6 +18,8 @@
import socket
from common import log_debug
+import httplib
+
class WsgiRequest:
@@ -57,10 +59,16 @@ class WsgiRequest:
def send_http_header(self, status=None):
self.sent_header = 1
- if len(self.status) == 0 or self.status == None:
- self.status = "200 OK"
if status is not None:
self.status = str(status)
+ if len(self.status) == 0 or self.status == None:
+ self.status = "200"
+ elif self.status.startswith("500"):
+ log_debug(1, self.status)
+ for i in self.err_headers_out.items():
+ self.headers_out.add(i[0], i[1])
+
+ self.status = self.status + " " + httplib.responses[int(self.status)]
if len(self.content_type) > 0:
self.headers_out['Content-Type'] = self.content_type
14 years, 3 months
schema/spacewalk
by Michael Mraka
schema/spacewalk/common/tables/rhnPackageKey.sql | 4 ----
schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/004-rhnPackageKey-drop-index.sql | 1 +
2 files changed, 1 insertion(+), 4 deletions(-)
New commits:
commit c4e80df4f48129c68316a8c655be735db2214e47
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 18 16:17:45 2010 +0100
id is already primary key so drop this useless index
diff --git a/schema/spacewalk/common/tables/rhnPackageKey.sql b/schema/spacewalk/common/tables/rhnPackageKey.sql
index f820761..31938d9 100644
--- a/schema/spacewalk/common/tables/rhnPackageKey.sql
+++ b/schema/spacewalk/common/tables/rhnPackageKey.sql
@@ -31,10 +31,6 @@ CREATE TABLE rhnPackageKey
)
;
-CREATE INDEX rhn_pkey_id_k_pid_idx
- ON rhnPackageKey (id, key_id, provider_id, key_type_id)
- TABLESPACE [[2m_tbs]];
-
CREATE SEQUENCE rhn_pkey_id_seq START WITH 100;
ALTER TABLE rhnPackageKey
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/004-rhnPackageKey-drop-index.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/004-rhnPackageKey-drop-index.sql
new file mode 100644
index 0000000..fed1abb
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.8-to-spacewalk-schema-0.9/004-rhnPackageKey-drop-index.sql
@@ -0,0 +1 @@
+DROP INDEX rhn_pkey_id_k_pid_idx;
14 years, 3 months
Changes to 'refs/tags/spacewalk-backend-0.9.11-1'
by Michael Mraka
Tag 'spacewalk-backend-0.9.11-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-18 15:02 +0000
Tagging package [spacewalk-backend] version [0.9.11-1] in directory [backend/].
Changes since spacewalk-web-0.9.5-1:
Joshua Roys (1):
Fix a memory leak in rhnsd
Michael Mraka (2):
561553 - commit what we've done
Automatic commit of package [spacewalk-backend] release [0.9.11-1].
Miroslav Suchý (5):
564352 - send information about scsi
564352 - send details about pci ids
564352 - pci class are in hexa, "80" <> 80
564352 - initial binding to hwdata database (only pci.ids for now)
564352 - use python interface to hwdata instead of lspci
---
backend/spacewalk-backend.spec | 6
backend/upload_server/handlers/package_push/package_push.py | 1
client/rhel/rhn-client-tools/rhn-client-tools.spec | 2
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py | 131 +++++-----
client/rhel/rhn-client-tools/src/up2date_client/hwdata.py | 93 +++++++
client/rhel/rhnsd/rhnsd.c | 1
rel-eng/packages/spacewalk-backend | 2
7 files changed, 177 insertions(+), 59 deletions(-)
---
14 years, 3 months
2 commits - backend/spacewalk-backend.spec backend/upload_server rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 6 +++++-
backend/upload_server/handlers/package_push/package_push.py | 1 +
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 48aba04e3b84bc49d716ea9890db8960f20147e0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 18 16:02:17 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.9.11-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 72830b0..6d332ed 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.9.10
+Version: 0.9.11
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -623,6 +623,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Mar 18 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.11-1
+- 561553 - fixed missing commit
+- 564278 - fixed satellite-sync call from rhn-satellite-activate
+
* Wed Mar 17 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.10-1
- 568958 - package removal and verify
- 573140 - solaris packages with duplicate requires
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index e078437..48cce6b 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.9.10-1 backend/
+0.9.11-1 backend/
commit 827121aba919cde72989992947d202c1df898eea
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 18 12:20:22 2010 +0100
561553 - commit what we've done
there are pending inserts into rhnPackageKeyAssociation which were
originally commited inside processPackageKeyAssociations()
unfortunately this commit was removed in
58f5b315e06d1057f306f7f258a1f3a3d3d1baf7 with a hope that thing are
being commited in some upper function
diff --git a/backend/upload_server/handlers/package_push/package_push.py b/backend/upload_server/handlers/package_push/package_push.py
index e9b8269..e1b1052 100644
--- a/backend/upload_server/handlers/package_push/package_push.py
+++ b/backend/upload_server/handlers/package_push/package_push.py
@@ -139,6 +139,7 @@ class PackagePush(basePackageUpload.BasePackageUpload):
return self._send_package_diff(req, diff_level, package_dict)
# Everything went fine
+ rhnSQL.commit()
reply = "All OK"
req.headers_out['Content-Length'] = str(len(reply))
req.send_http_header()
14 years, 3 months
Branch 'SPACEWALK-0.8' - rel-eng/packages
by Jan Pazdziora
rel-eng/packages/oracle-selinux | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 776dd257d43fcd792a9a6e07a1d00157edcb5983
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 18 15:44:11 2010 +0100
We have tagged oracle-selinux-0.1-23.15 to Spacewalk 0.8 tags as well, to avoid the need to rebuild the same package twice.
diff --git a/rel-eng/packages/oracle-selinux b/rel-eng/packages/oracle-selinux
index 4d6fa88..f2b02a7 100644
--- a/rel-eng/packages/oracle-selinux
+++ b/rel-eng/packages/oracle-selinux
@@ -1 +1 @@
-0.1-23.14 selinux/oracle-selinux/
+0.1-23.15 selinux/oracle-selinux/
14 years, 3 months
client/rhel
by Joshua Roys
client/rhel/rhnsd/rhnsd.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit f987184526fb2cecf47b9dce8bf69c1c66a86d88
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Thu Mar 18 14:00:07 2010 +0000
Fix a memory leak in rhnsd
diff --git a/client/rhel/rhnsd/rhnsd.c b/client/rhel/rhnsd/rhnsd.c
index 357c59d..1e8fe21 100644
--- a/client/rhel/rhnsd/rhnsd.c
+++ b/client/rhel/rhnsd/rhnsd.c
@@ -604,6 +604,7 @@ static int parse_systemid_path(char* systemid_path, int systemid_path_length)
}
fclose(config_file);
}
+ regfree(&re_systemIdPath);
return ret;
}
14 years, 3 months
Changes to 'refs/tags/spacewalk-backend-0.8.49-1'
by Jan Pazdziora
Tag 'spacewalk-backend-0.8.49-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2010-03-18 12:49 +0000
Tagging package [spacewalk-backend] version [0.8.49-1] in directory [backend/].
Changes since spacewalk-backend-0.8.48-1:
Jan Pazdziora (1):
Automatic commit of package [spacewalk-backend] release [0.8.49-1].
Joshua Roys (1):
568371 - fix an ORA-00918 on config file import
---
backend/server/configFilesHandler.py | 10 +++++-----
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
---
14 years, 3 months
Branch 'SPACEWALK-0.8' - 2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by Jan Pazdziora
backend/server/configFilesHandler.py | 10 +++++-----
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit e1db45b59accad5efd8a907aa96c7cdd5ccc76fe
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Mar 18 13:49:13 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.8.49-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 428398b..90e4e5a 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.8.48
+Version: 0.8.49
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -621,6 +621,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Mar 18 2010 Jan Pazdziora 0.8.49-1
+- 568371 - fix an ORA-00918 on config file import (joshua.roys)
+
* Fri Mar 12 2010 Justin Sherrill <jsherril(a)redhat.com> 0.8.48-1
- let mpm_checksum_type be a constant for now (michael.mraka(a)redhat.com)
- fixing cfg issue with rhn_mpm.py (jsherril(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 40e4c3e..e657b47 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.8.48-1 backend/
+0.8.49-1 backend/
commit 0e22abd45acda937efe0f632871ff59efa85eb32
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Thu Mar 4 16:11:48 2010 +0000
568371 - fix an ORA-00918 on config file import
(cherry picked from commit 25dd5837f6352c24d150adac680f12e2fa2709fd)
diff --git a/backend/server/configFilesHandler.py b/backend/server/configFilesHandler.py
index fca9484..3882a70 100644
--- a/backend/server/configFilesHandler.py
+++ b/backend/server/configFilesHandler.py
@@ -222,12 +222,12 @@ class ConfigFilesHandler(rhnHandler):
return result
_query_content_lookup = rhnSQL.Statement("""
- select id, c.checksum_type, c.checksum, file_size, contents, is_binary
- from rhnConfigContent, rhnChecksumView c
- where c.checksum = :checksum
- and c.checksum_type = :checksum_type
+ select cc.id, cv.checksum_type, cv.checksum, file_size, contents, is_binary
+ from rhnConfigContent cc, rhnChecksumView cv
+ where cv.checksum = :checksum
+ and cv.checksum_type = :checksum_type
and file_size = :file_size
- and checksum_id = c.id
+ and checksum_id = cv.id
""")
_query_insert_content = rhnSQL.Statement("""
14 years, 3 months
5 commits - client/rhel
by Miroslav Suchý
client/rhel/rhn-client-tools/rhn-client-tools.spec | 2
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py | 131 +++++-----
client/rhel/rhn-client-tools/src/up2date_client/hwdata.py | 93 +++++++
3 files changed, 169 insertions(+), 57 deletions(-)
New commits:
commit f77fa2adb53be726e8856c92c3c498caf502ac09
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 18 13:30:08 2010 +0100
564352 - use python interface to hwdata instead of lspci
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 90b7e9c..ee86f42 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -22,7 +22,7 @@ Requires: dbus-python
%if 0%{?fedora} > 12 || 0%{?rhel} > 5
Requires: python-gudev
Requires: usbutils
-Requires: pciutils
+Requires: hwdata
%else
Requires: hal >= 0.5.8.1-52
%endif
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index dbd2d1f..5ffa5cb 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -16,6 +16,7 @@ import gudev
import glib
import os
import re
+import hwdata
def get_devices():
""" Returns list of dictionaries with keys for every device in system
@@ -248,7 +249,10 @@ def _get_device_desc(device):
subsystem = device.get_subsystem()
command = None
if subsystem == 'pci':
- command = "lspci -d %s" % device.get_property('PCI_ID')
+ (vendor_id, device_id) = device.get_property('PCI_ID').split(':')
+ pci = PCI()
+ return pci.get_device(vendor_id, device_id)
+ #command = "lspci -d %s" % device.get_property('PCI_ID')
elif subsystem == 'usb':
command = "lsusb -d %s:%s" % ( device.get_property('ID_VENDOR_ID'),
device.get_property('ID_MODEL_ID') )
commit 9b90811986d5841318167ca3eb27eacb9ff3e79b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 18 13:21:51 2010 +0100
564352 - initial binding to hwdata database (only pci.ids for now)
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hwdata.py b/client/rhel/rhn-client-tools/src/up2date_client/hwdata.py
new file mode 100644
index 0000000..6612ab8
--- /dev/null
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hwdata.py
@@ -0,0 +1,93 @@
+#
+# Copyright (c) 1999--2010 Red Hat Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+
+""" Query hwdata database and return decription of vendor and/or device. """
+
+class PCI:
+ """ Interace to pci.ids from hwdata package """
+ filename = '/usr/share/hwdata/pci.ids'
+
+ def __init__(self, filename=None):
+ """ Load pci.ids from file to internal data structure.
+ parameter 'filename' can specify location of this file
+ """
+ if filename:
+ self.filename = filename
+ else:
+ self.filename = PCI.filename
+ self.cache = 1
+
+ if self.cache:
+ # parse pci.ids
+ pcirec = {}
+ self.devices = {}
+ for line in open(self.filename).readlines():
+ l = line.split()
+ if line.startswith('#'):
+ continue
+ elif len(l) == 0:
+ continue
+ elif line.startswith('\t\t'):
+ subvendor = l[0].lower()
+ if len(l) > 2:
+ subdevice = l[1].lower()
+ else:
+ subdevice = ''
+ if len(l) > 3:
+ subsystem_name = ' '.join(l[2:])
+ else:
+ subsystem_name = ''
+ if not self.devices.has_key(subvendor):
+ self.devices[subvendor] = [vendor_name, {subdevice: subsystem_name}]
+ else: # this should not happen
+ self.devices[subvendor][1][subdevice] = subsystem_name
+ elif line.startswith('\t'):
+ device = l[0].lower()
+ device_name = ' '.join(l[1:])
+ self.devices[vendor][1][device] = device_name
+ else:
+ vendor = l[0].lower()
+ vendor_name = ' '.join(l[1:])
+ if not self.devices.has_key(vendor):
+ self.devices[vendor] = [vendor_name, {}]
+ else: # this should not happen
+ self.devices[vendor][0] = vendor_name
+
+ def get_vendor(self, vendor):
+ """ Return description of vendor. Parameter is two byte code in hexa.
+ If vendor is unknown None is returned.
+ """
+ if self.cache:
+ if self.devices.has_key(vendor):
+ return self.devices[vendor][0]
+ else:
+ return None
+ else:
+ raise # not implemented yet
+
+ def get_device(self, vendor, device):
+ """ Return description of device. Parameters are two byte code variables in hexa.
+ If device is unknown None is returned.
+ """
+ if self.cache:
+ if self.devices.has_key(vendor):
+ if self.devices[vendor][1].has_key(device):
+ return self.devices[vendor][1][device]
+ else:
+ return None
+ else:
+ return None
+ else:
+ raise # not implemented yet
commit 0b3d1cf0c5774bf2b4c7ddb44ca29f373fd3dbfb
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 18 12:07:10 2010 +0100
564352 - pci class are in hexa, "80" <> 80
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 769ab3b..dbd2d1f 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -99,67 +99,67 @@ def get_computer_info():
#PCI DEVICE DEFINES
# These are taken from pci_ids.h in the linux kernel source and used to
# properly identify the hardware
-PCI_BASE_CLASS_STORAGE = 1
-PCI_CLASS_STORAGE_SCSI = 0
-PCI_CLASS_STORAGE_IDE = 1
-PCI_CLASS_STORAGE_FLOPPY = 2
-PCI_CLASS_STORAGE_IPI = 3
-PCI_CLASS_STORAGE_RAID = 4
-PCI_CLASS_STORAGE_OTHER = 80
+PCI_BASE_CLASS_STORAGE = '1'
+PCI_CLASS_STORAGE_SCSI = '0'
+PCI_CLASS_STORAGE_IDE = '1'
+PCI_CLASS_STORAGE_FLOPPY = '2'
+PCI_CLASS_STORAGE_IPI = '3'
+PCI_CLASS_STORAGE_RAID = '4'
+PCI_CLASS_STORAGE_OTHER = '80'
-PCI_BASE_CLASS_NETWORK = 2
-PCI_CLASS_NETWORK_ETHERNET = 0
-PCI_CLASS_NETWORK_TOKEN_RING = 1
-PCI_CLASS_NETWORK_FDDI = 2
-PCI_CLASS_NETWORK_ATM = 3
-PCI_CLASS_NETWORK_OTHER = 80
+PCI_BASE_CLASS_NETWORK = '2'
+PCI_CLASS_NETWORK_ETHERNET = '0'
+PCI_CLASS_NETWORK_TOKEN_RING = '1'
+PCI_CLASS_NETWORK_FDDI = '2'
+PCI_CLASS_NETWORK_ATM = '3'
+PCI_CLASS_NETWORK_OTHER = '80'
-PCI_BASE_CLASS_DISPLAY = 3
-PCI_CLASS_DISPLAY_VGA = 0
-PCI_CLASS_DISPLAY_XGA = 1
-PCI_CLASS_DISPLAY_3D = 2
-PCI_CLASS_DISPLAY_OTHER = 80
+PCI_BASE_CLASS_DISPLAY = '3'
+PCI_CLASS_DISPLAY_VGA = '0'
+PCI_CLASS_DISPLAY_XGA = '1'
+PCI_CLASS_DISPLAY_3D = '2'
+PCI_CLASS_DISPLAY_OTHER = '80'
-PCI_BASE_CLASS_MULTIMEDIA = 4
-PCI_CLASS_MULTIMEDIA_VIDEO = 0
-PCI_CLASS_MULTIMEDIA_AUDIO = 1
-PCI_CLASS_MULTIMEDIA_PHONE = 2
-PCI_CLASS_MULTIMEDIA_OTHER = 80
+PCI_BASE_CLASS_MULTIMEDIA = '4'
+PCI_CLASS_MULTIMEDIA_VIDEO = '0'
+PCI_CLASS_MULTIMEDIA_AUDIO = '1'
+PCI_CLASS_MULTIMEDIA_PHONE = '2'
+PCI_CLASS_MULTIMEDIA_OTHER = '80'
-PCI_BASE_CLASS_BRIDGE = 6
-PCI_CLASS_BRIDGE_HOST = 0
-PCI_CLASS_BRIDGE_ISA = 1
-PCI_CLASS_BRIDGE_EISA = 2
-PCI_CLASS_BRIDGE_MC = 3
-PCI_CLASS_BRIDGE_PCI = 4
-PCI_CLASS_BRIDGE_PCMCIA = 5
-PCI_CLASS_BRIDGE_NUBUS = 6
-PCI_CLASS_BRIDGE_CARDBUS = 7
-PCI_CLASS_BRIDGE_RACEWAY = 8
-PCI_CLASS_BRIDGE_OTHER = 80
+PCI_BASE_CLASS_BRIDGE = '6'
+PCI_CLASS_BRIDGE_HOST = '0'
+PCI_CLASS_BRIDGE_ISA = '1'
+PCI_CLASS_BRIDGE_EISA = '2'
+PCI_CLASS_BRIDGE_MC = '3'
+PCI_CLASS_BRIDGE_PCI = '4'
+PCI_CLASS_BRIDGE_PCMCIA = '5'
+PCI_CLASS_BRIDGE_NUBUS = '6'
+PCI_CLASS_BRIDGE_CARDBUS = '7'
+PCI_CLASS_BRIDGE_RACEWAY = '8'
+PCI_CLASS_BRIDGE_OTHER = '80'
-PCI_BASE_CLASS_COMMUNICATION = 7
-PCI_CLASS_COMMUNICATION_SERIAL = 0
-PCI_CLASS_COMMUNICATION_PARALLEL = 1
-PCI_CLASS_COMMUNICATION_MULTISERIAL = 2
-PCI_CLASS_COMMUNICATION_MODEM = 3
-PCI_CLASS_COMMUNICATION_OTHER = 80
+PCI_BASE_CLASS_COMMUNICATION = '7'
+PCI_CLASS_COMMUNICATION_SERIAL = '0'
+PCI_CLASS_COMMUNICATION_PARALLEL = '1'
+PCI_CLASS_COMMUNICATION_MULTISERIAL = '2'
+PCI_CLASS_COMMUNICATION_MODEM = '3'
+PCI_CLASS_COMMUNICATION_OTHER = '80'
-PCI_BASE_CLASS_INPUT = 9
-PCI_CLASS_INPUT_KEYBOARD = 0
-PCI_CLASS_INPUT_PEN = 1
-PCI_CLASS_INPUT_MOUSE = 2
-PCI_CLASS_INPUT_SCANNER = 3
-PCI_CLASS_INPUT_GAMEPORT = 4
-PCI_CLASS_INPUT_OTHER = 80
+PCI_BASE_CLASS_INPUT = '9'
+PCI_CLASS_INPUT_KEYBOARD = '0'
+PCI_CLASS_INPUT_PEN = '1'
+PCI_CLASS_INPUT_MOUSE = '2'
+PCI_CLASS_INPUT_SCANNER = '3'
+PCI_CLASS_INPUT_GAMEPORT = '4'
+PCI_CLASS_INPUT_OTHER = '80'
-PCI_BASE_CLASS_SERIAL = 12
-PCI_CLASS_SERIAL_FIREWIRE = 0
-PCI_CLASS_SERIAL_ACCESS = 1
-PCI_CLASS_SERIAL_SSA = 2
-PCI_CLASS_SERIAL_USB = 3
-PCI_CLASS_SERIAL_FIBER = 4
-PCI_CLASS_SERIAL_SMBUS = 5
+PCI_BASE_CLASS_SERIAL = '0C'
+PCI_CLASS_SERIAL_FIREWIRE = '0'
+PCI_CLASS_SERIAL_ACCESS = '1'
+PCI_CLASS_SERIAL_SSA = '2'
+PCI_CLASS_SERIAL_USB = '3'
+PCI_CLASS_SERIAL_FIBER = '4'
+PCI_CLASS_SERIAL_SMBUS = '5'
def _clasify_pci_type(subsystem):
""" return 1 if device is PCI, otherwise -1 """
@@ -200,7 +200,7 @@ def _clasify_class(device):
return 'MOUSE'
if base_class: # PCI Devices
- if base_class == PCI_BASE_CLASS_INPUT:
+ if base_class == PCI_BASE_CLASS_DISPLAY:
return 'VIDEO'
elif base_class == PCI_BASE_CLASS_SERIAL:
if sub_class == PCI_CLASS_SERIAL_USB:
commit 6ec1aaacf6e903860c745e3a3f975ad9edbcf189
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 18 11:33:49 2010 +0100
564352 - send details about pci ids
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 4c1d7ab..769ab3b 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -63,6 +63,13 @@ def get_devices():
# result_item['prop2'] = ''
if result_item['driver'] is None:
result_item['driver'] = 'unknown'
+ if subsystem == 'pci':
+ pci_class = device.get_property('PCI_ID')
+ if pci_class:
+ (result_item['prop1'], result_item['prop2']) = pci_class.split(':')
+ pci_subsys = device.get_property('PCI_SUBSYS_ID')
+ if pci_subsys:
+ (result_item['prop3'], result_item['prop4']) = pci_subsys.split(':')
if device.has_property('ID_BUS') and device.get_property('ID_BUS') == 'scsi':
path = device.get_property('ID_PATH')
m = re.search('.*-scsi-(\d+):(\d+):(\d+):(\d+)', path)
commit 2c2cc694b58845e06bac00fe90eb9ee55704dd42
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 18 10:50:02 2010 +0100
564352 - send information about scsi
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index cd28b36..4c1d7ab 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -15,6 +15,7 @@
import gudev
import glib
import os
+import re
def get_devices():
""" Returns list of dictionaries with keys for every device in system
@@ -62,6 +63,13 @@ def get_devices():
# result_item['prop2'] = ''
if result_item['driver'] is None:
result_item['driver'] = 'unknown'
+ if device.has_property('ID_BUS') and device.get_property('ID_BUS') == 'scsi':
+ path = device.get_property('ID_PATH')
+ m = re.search('.*-scsi-(\d+):(\d+):(\d+):(\d+)', path)
+ result_item['prop1'] = m.group(1) # DEV_HOST
+ result_item['prop2'] = m.group(2) # DEV_ID
+ result_item['prop3'] = m.group(3) # DEV_CHANNEL
+ result_item['prop4'] = m.group(4) # DEV_LUN
result.append(result_item)
return result
14 years, 3 months