Experimental project
This is a sandbox project, which contains experimental code for developer use only.
yaml_views is a query plugin for views to query live YAML files.
This is my first views module; It was possible by learning from xml_views and most of the code is the same.
It works with yaml files with a homogenous structure, like listing of items with similar attributes. The advanced yaml features like inheriting attributes are not yet supported (but should be soon).
See below for an excerpt of an example file.
It treats the list of items as a virtual table and simply displays it via the views api. All desired fields to display in the view have to be added in the UI. Currently supported is just adding a sort order.
Bug reports, suggestions and contributions are welcome.
Requirements
Install PEAR (on debian/ubuntu: apt-get install php5-pear
)
install the parser via pecl: pecl install yaml-beta
Example file
!group win:
stbakxp1:
ip: 10.10.77.15
mac: 00-02-a5-96-53-9b
osname: WinXP
username: "Crystal-Rechner"
comment: "Compaq"
stbakxp2:
ip: 10.10.77.16
mac: 00-26-18-f1-91-e6
osname: WinXP
hostseq: true
inventar: 55910
username: "Win-IT"
comment: "AMD AthlonII X2 250"
stltgxp1:
ip: 10.10.77.12
mac: 00-24-8c-0a-49-d5
osname: WinXP
username: "Fr.Mueller"
comment: "AMD Athlon Dual Core 2,6GHz"
stltgxp2:
ip: 10.10.77.13
mac: 00-40-ca-61-51-72
osname: WinXP
username: "Fr.Thomas"
comment: "Maxdata Athlon XP 2600+"
stscanxp1:
ip: 10.10.77.101
mac: 00-1d-7d-07-65-bf
osname: WinXP
hostseq: true
inventar: 54962
comment: "AB&M Host"
!group xtlab:
stxterm2:
ip: 10.10.77.5
mac: 00-0b-2b-00-68-5d
osname: RH-7.2
hostseq: true
rpmdist: X11
stxterm3:
ip: 10.10.77.3
mac: 00-0b-2b-00-d5-a5
osname: RH-7.2
hostseq: true
rpmdist: X11
stxterm4:
ip: 10.10.77.9
mac: 00-50-da-2c-23-53
osname: RH-7.2
hostseq: true
rpmdist: X11
!group xtlab:
stxterm2:
ip: 10.10.77.5
mac: 00-0b-2b-00-68-5d
osname: RH-7.2
hostseq: true
rpmdist: X11
stxterm3:
ip: 10.10.77.3
mac: 00-0b-2b-00-d5-a5
osname: RH-7.2
hostseq: true
rpmdist: X11
stxterm4:
ip: 10.10.77.9
mac: 00-50-da-2c-23-53
osname: RH-7.2
hostseq: true
rpmdist: X11
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Created by groovehunter on , updated