-
Notifications
You must be signed in to change notification settings - Fork 0
Add bios and operatingsystem sections to ComputerBuilderMapping #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d09f1c7
Add bios and operatingsystem sections to ComputerBuilderMapping
f2cmb e59dd9e
fix rector
f2cmb 1d6cb6c
Add all inventory schema fields to bios and operatingsystem templates
f2cmb f11a772
Fix empty sections falling back to default template when DB columns a…
f2cmb 1f1a7c1
fix rector
f2cmb e405edb
enrich computer nodes
f2cmb c517e7d
get rid of multiple scrollbars on edition
f2cmb 06a37cc
add missing assets on tests
f2cmb f150aa5
fix phpstan
f2cmb da8ed1d
log edit
f2cmb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Computer Builder Data Templates | ||
|
|
||
| These JSON files are the default templates used when creating a `ComputerBuilderMapping`. | ||
| Each file corresponds to a section of the GLPI Inventory Format schema. | ||
|
|
||
| Fields containing `{{ ldap.attributeName }}` are replaced at sync time with the value | ||
| of the corresponding LDAP attribute. Empty fields (`""`) are stripped from the final | ||
| inventory payload and can be filled in with an LDAP placeholder or a static value. | ||
|
|
||
| ## bios.json | ||
|
|
||
| Reference: [inventory.schema.json — bios](https://github.com/glpi-project/inventory_format/blob/89f177aa93595bdff01c3f670e32edd11ace0524/inventory.schema.json#L166-L247) | ||
|
|
||
| | Field | Description | Notes | | ||
| |-------|-------------|-------| | ||
| | `ssn` | System serial number | | | ||
| | `smanufacturer` | System manufacturer | | | ||
| | `smodel` | System model | | | ||
| | `assettag` | Asset tag | | | ||
| | `bdate` | BIOS release date | Format: `dateordatetime` (e.g. `2023-10-15`) | | ||
| | `bmanufacturer` | BIOS manufacturer | | | ||
| | `bversion` | BIOS version | | | ||
| | `mmanufacturer` | Motherboard manufacturer | | | ||
| | `mmodel` | Motherboard model | | | ||
| | `msn` | Motherboard serial number | | | ||
| | `skunumber` | SKU number | | | ||
| | `biosserial` | BIOS serial number | | | ||
| | `enclosureserial` | Chassis serial number | | | ||
| | `secure_boot` | Secure boot status | Accepted values: `enabled`, `disabled`, `unsupported` | | ||
|
|
||
| ## operatingsystem.json | ||
|
|
||
| Reference: [inventory.schema.json — operatingsystem](https://github.com/glpi-project/inventory_format/blob/89f177aa93595bdff01c3f670e32edd11ace0524/inventory.schema.json#L1312-L1436) | ||
|
|
||
| | Field | Description | Notes | | ||
| |-------|-------------|-------| | ||
| | `name` | OS distributor name | | | ||
| | `version` | OS release version | | | ||
| | `arch` | Processor architecture | e.g. `x86_64` | | ||
| | `boot_time` | Last boot timestamp | Format: `datetime` | | ||
| | `dns_domain` | DNS domain | | | ||
| | `fqdn` | Fully qualified domain name | | | ||
| | `full_name` | Full OS description | e.g. `Fedora release 25 (Twenty Five)` | | ||
| | `hostid` | Unique host identifier | | | ||
| | `install_date` | OS installation date | Format: `dateordatetime` | | ||
| | `kernel_name` | Kernel type | e.g. `linux` | | ||
| | `kernel_version` | Kernel version | e.g. `4.11.3-200.fc25.x86_64` | | ||
| | `ssh_key` | SSH public key | | | ||
| | `service_pack` | Service pack version | | | ||
|
|
||
| > **Note:** The `timezone` field (object with `name` and `offset`) is intentionally | ||
| > omitted from the default template. It can be added manually in the mapping if needed, | ||
| > but both `name` and `offset` must be set — a partial timezone object is invalid. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "ssn": "{{ ldap.serialNumber }}", | ||
| "smanufacturer": "", | ||
| "smodel": "", | ||
| "assettag": "", | ||
| "bdate": "", | ||
| "bmanufacturer": "", | ||
| "bversion": "", | ||
| "mmanufacturer": "", | ||
| "mmodel": "", | ||
| "msn": "", | ||
| "skunumber": "", | ||
| "biosserial": "", | ||
| "enclosureserial": "", | ||
| "secure_boot": "" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| [ | ||
| { | ||
| "core": "", | ||
| "description": "", | ||
| "familynumber": "", | ||
| "id": "", | ||
| "manufacturer": "", | ||
| "model": "", | ||
| "name": "", | ||
| "serial": "", | ||
| "speed": "", | ||
| "stepping": "", | ||
| "thread": "" | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| [ | ||
| { | ||
| "description": "", | ||
| "filesystem": "", | ||
| "free": "", | ||
| "label": "", | ||
| "letter": "", | ||
| "serial": "", | ||
| "systemdrive": "", | ||
| "total": "", | ||
| "type": "", | ||
| "volumn": "" | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| [ | ||
| { | ||
| "capacity": "", | ||
| "caption": "", | ||
| "description": "", | ||
| "manufacturer": "", | ||
| "memorycorrection": "", | ||
| "model": "", | ||
| "numslots": "", | ||
| "serialnumber": "", | ||
| "speed": "", | ||
| "type": "" | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [ | ||
| { | ||
| "description": "", | ||
| "mac": "{{ ldap.macAddress }}", | ||
| "pciid": "", | ||
| "pnpdeviceid": "", | ||
| "status": "", | ||
| "type": "", | ||
| "virtualdev": "" | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "name": "{{ ldap.operatingSystem }}", | ||
| "version": "{{ ldap.operatingSystemVersion }}", | ||
| "arch": "", | ||
| "boot_time": "", | ||
| "dns_domain": "", | ||
| "fqdn": "", | ||
| "full_name": "", | ||
| "hostid": "", | ||
| "install_date": "", | ||
| "kernel_name": "", | ||
| "kernel_version": "", | ||
| "ssh_key": "", | ||
| "service_pack": "" | ||
| } | ||
|
f2cmb marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| [ | ||
| { | ||
| "description": "", | ||
| "disksize": "", | ||
| "firmware": "", | ||
| "interface": "", | ||
| "manufacturer": "", | ||
| "model": "", | ||
| "name": "", | ||
| "serial": "", | ||
| "type": "" | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.