diff options
author | rod.smith <rod.smith@canonical.com> | 2014-07-17 22:36:47 +0000 |
---|---|---|
committer | Daniel Manrique <> | 2014-07-17 22:36:47 +0000 |
commit | deb9880a80f2cbd75f5b8f269736eb2e0f23353b (patch) | |
tree | da154c3552149669ddd6b3e93bdbdfa32deca24d | |
parent | bdc207ba438e4a16efb2c7168ea69882ea400366 (diff) | |
parent | 0fe1d9d035aa70ed3ae3ab5e9f955c4aecbabae1 (diff) |
"automatic merge by tarmac [r=zkrynicki][bug=][author=rodsmith]"
-rwxr-xr-x | bin/get_make_and_model | 18 | ||||
-rw-r--r-- | jobs/miscellanea.txt.in | 8 |
2 files changed, 26 insertions, 0 deletions
diff --git a/bin/get_make_and_model b/bin/get_make_and_model new file mode 100755 index 0000000..f21e6eb --- /dev/null +++ b/bin/get_make_and_model @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import os.path + +def print_file_contents(heading, filename): + with open(filename) as f: + text = f.read().strip() + print("{}: {}".format(heading, text)) + f.close() + +def main(): + print_file_contents('Manufacturer', '/sys/class/dmi/id/sys_vendor') + print_file_contents('Model', '/sys/class/dmi/id/product_name') + print_file_contents('Version', '/sys/class/dmi/id/product_version') + +if __name__ == "__main__": + raise SystemExit(main()) + diff --git a/jobs/miscellanea.txt.in b/jobs/miscellanea.txt.in index 1112926..02394c1 100644 --- a/jobs/miscellanea.txt.in +++ b/jobs/miscellanea.txt.in @@ -173,3 +173,11 @@ command: fi _description: If system was installed via MAAS from a cert server, the MAAS version used should be contained in /etc/installed-by-maas _summary: Gets the version of MAAS used to deploy the SUT + +plugin: shell +estimated_duration: 0.1 +id: miscellanea/get_make_and_model +user: root +command: get_make_and_model +_description: Retrieve the computer's make and model for easier access than digging through the dmidecode output. +_summary: Retrieve the computer's make and model |