Feature #1978
Feature #44: Implement basic introspection support
Include machine and (operating system) software types and versions in host information
Status: | Resolved | Start date: | 09/03/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Introspection | |||
Target version: | rsb-0.11 |
Associated revisions
{machine,software}-{type-version} in proto/rsb/protocol/operatingsystem/Host.proto
refs #1978
- proto/rsb/protocol/operatingsystem/Host.proto (Host::machine_type):
new field; CPU architecture of the host
(Host::machine_version): new field; CPU version string of the host
(Host::software_type): new field; operating system type of the host
(Host::software_version): new field; operating system version of the
host
Support {machine,software}-{type,version} in src/introspection/*.lisp
refs #1978
- src/introspection/conversion.lisp
(define-introspection-converter): (de)serialize {machine,software}-{type,version} - src/introspection/model.lisp (host-info::machine-type): new slot;
stores machine type
(host-info::machine-version): new slot; store machine version
(host-info::software-type): new slot; stores software type
(host-info::software-version): new slot; stores software version
(print-items append host-info): print machine type and software type
if available
(current-host-info): add {machine,software}-{type,version} to
constructed `host-info' - src/introspection/platform-common.lisp (current-machine-type): new
function; return slightly adapted return value of `machine-type'
(current-machine-version): similar for `machine-version'
(current-software-type): similar for `software-type'
(current-software-version): similar for `software-version' - src/introspection/remote-introspection.lisp
(ensure-host string remote-introspection-database host-info): handle {machine,software}-{type,version} slots - src/introspection/package.lisp (package rsb.introspection): added
exported symbols host-info-machine-type, host-info-machine-version,
host-info-software-type and host-info-software-version - test/introspection/model.lisp
(define-simple-model-class-tests host-info): added cases involving {machine,software}-{type,version}
Added {machine,software}{Type,Version} in rsb/introspection/__init__.py
refs #1978
- rsb/introspection/__init__.py (HostInfo.__init__): accept machineType,
machineVersion, softwareType, softwareVersion parameters; add
corresponding attributes
(HostInfo.getMachineType): new method; return machine type
(HostInfo.machineType): corresponding property
(HostInfo.getMachineVersion): new method; return machine version
(HostInfo.machineVersion): corresponding property
(HostInfo.getSoftwareType): new method; return software type
(HostInfo.softwareType): corresponding property
(HostInfo.getSoftwareVersion): new method; return software version
(HostInfo.softwareVersion): corresponding property
(HostInfo.__str__): include machine type and software type
(IntrospectionSender.sendHello): if available, include machine type
machine version, software type and software version in event - test/introspectiontest.py (HostInfoTest.testConstructionDefaults):
check machine type, software type and software version
Added missing generic functions host-info-* in src/introspection/protocol.lisp
refs #1978
Had been omitted in initial commit.
- src/introspection/model.lisp (host-info::software-type): fixed typo in
documentation string - src/introspection/protocol.lisp (host-info-machine-type): new generic
function; return type of the machine
(host-info-machine-version): similar
(host-info-software-type): similar
(host-info-software-version): similar
Added machineType helper in rsb/introspection/__init__.py
refs #1978
- rsb/introspection/__init__.py (machineType): new function; translate
i686 -> x86
(HostInfo.__init__): call machineType for machineType keyword
parameter default value
Use the platform module in rsb/introspection/__init__.py
refs #1978
Use the Python platform module to access host and platform details for
introspection more easily and also in a more portable fashion compared
to the uname parsing.
- rsb/introspection/__init__.py (machineType): use platform module;
normalize more machine types
(HostInfo.__init__): use platform instead of os module
Signed-off-by: Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
Determine script being executed in rsb/introspection/__init__.py
refs #1978
- rsb/introspection/__init__.py (programName): new file; determine name
of "entry point script" being executed, if there is one
(ProcessInfo.__init__): use programName
Signed-off-by: Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
Added machine version support in rsb/introspection/__init__.py
refs #1978
- rsb/introspection/__init__.py (machineVersion): new function; on
Linux, extract machine version from /proc/cpuinfo
(HostInfo): use machineVersion
{machine,software}-{type,version} in src/rsb/intospection/*.{h,cpp}
refs #1978
- src/rsb/introspection/Model.{h,cpp} (tryCurrentMachineType): new
function; try calling RSC function for determining the machine type,
fall back to empty string
(tryCurrentMachineVersion): similar
(tryCurrentSoftwareType): similar
(tryCurrentSoftwareVersion): similar
(HostInfo::getMachineType): new method; return the machine type
(HostInfo::getMachineVersion): similar
(HostInfo::getSoftwareType): similar
(HostInfo::getSoftwareVersion): similar - src/rsb/introspection/IntrospectionSender.cpp
(IntrospectionSender::sendHello): if available, include {machine,software}-{type,version} in Hello message
Normalization in OsUtilities.deriveOsFamilyName in src/rsb/util/os/OsUtilities.java
refs #1978
- src/rsb/util/os/OsUtilities.java (OsUtilities.deriveOsFamilyName): new
method; convert value to lower-case for more robust comparison;
normalize designators of common operating systems as mandated by RSB
introspection specification
(OsUtilities.deriveOsFamily): call deriveOsFamilyName; adapted to
changed return values of getOsName
Signed-off-by: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
Normalization in OsUtilities.deriveMachineTypeName in src/rsb/util/os/OsUtilities.java
refs #1978
- src/rsb/util/os/OsUtilities.java (OsUtilities.deriveMachineTypeName):
convert value to lower-case for more robust comparison; normalize
designators of common machine types as mandated by RSB introspection
specification
(OsUtilities.deriveMachineType): call deriveMachineTypeName; adapted
to changed return values of deriveMachineTypeName
Signed-off-by: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
Strip domain part in current-host-info in src/introspection/model.lisp
refs #1978
- src/introspection/model.lisp (current-host-info): remove domain part
of potentially fully qualified hostname by truncating at first
#\. character
Strip domain part in current-host-info in src/introspection/model.lisp
refs #1978
- src/introspection/model.lisp (current-host-info): remove domain part
of potentially fully qualified hostname by truncating at first
#\. character
{machine,software}-{type,version} printing in introspect/print.lisp
refs #1978
- introspect/print.lisp (print-host-info-details-markup): print actual {machine,software}-{type,version} instead of mockup values
Backport: {machine,software}-{type,version} printing in introspect/print.lisp
refs #1978
- introspect/print.lisp (print-host-info-details-markup): print actual {machine,software}-{type,version} instead of mockup values
History
#1 Updated by J. Moringen over 9 years ago
- Category set to Introspection
- Status changed from New to In Progress
- Assignee set to J. Moringen
- Target version set to rsb-0.11
- % Done changed from 0 to 10
#2 Updated by J. Moringen over 9 years ago
- Description updated (diff)
- % Done changed from 10 to 30
#3 Updated by J. Moringen over 9 years ago
- Description updated (diff)
#4 Updated by J. Moringen over 9 years ago
- Description updated (diff)
- % Done changed from 30 to 70
#5 Updated by J. Moringen over 9 years ago
- Description updated (diff)
- % Done changed from 70 to 80
#6 Updated by S. Wrede over 9 years ago
- Description updated (diff)
- % Done changed from 80 to 90
Partially done for Java. Reported values are machine and software type.
#7 Updated by J. Moringen over 9 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100