diff --git a/samples/it_v2/doc.yaml b/samples/it_v2/doc.yaml
new file mode 100644
index 0000000..86a6124
--- /dev/null
+++ b/samples/it_v2/doc.yaml
@@ -0,0 +1,2 @@
+doc: 'doc'
+templates: 'templates'
diff --git a/samples/it_v2/doc/_index.01.pug b/samples/it_v2/doc/_index.01.pug
new file mode 100644
index 0000000..cfdb394
--- /dev/null
+++ b/samples/it_v2/doc/_index.01.pug
@@ -0,0 +1 @@
+h2 Company SA
\ No newline at end of file
diff --git a/samples/it_v2/doc/_index.yaml b/samples/it_v2/doc/_index.yaml
new file mode 100644
index 0000000..1b9a7bc
--- /dev/null
+++ b/samples/it_v2/doc/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../schemas/_index.json
+title: IT Documentation
+templates:
+ node: '@empty'
+headfiles:
+ - 01.pug
diff --git a/samples/it_v2/doc/ad/_index.yaml b/samples/it_v2/doc/ad/_index.yaml
new file mode 100644
index 0000000..aad196a
--- /dev/null
+++ b/samples/it_v2/doc/ad/_index.yaml
@@ -0,0 +1,5 @@
+# yaml-language-server: $schema=../../schemas/_index.json
+index: 4
+title: 'Active Directory'
+templates:
+ node: '@overview'
diff --git a/samples/it_v2/doc/ad/acls/_index.yaml b/samples/it_v2/doc/ad/acls/_index.yaml
new file mode 100644
index 0000000..16d3d03
--- /dev/null
+++ b/samples/it_v2/doc/ad/acls/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 5
+title: 'ACLS'
+toc: false
+book: false
+templates:
+ node: 'acls'
diff --git a/samples/it_v2/doc/ad/acls/fs-01.yaml b/samples/it_v2/doc/ad/acls/fs-01.yaml
new file mode 100644
index 0000000..40b6d2a
--- /dev/null
+++ b/samples/it_v2/doc/ad/acls/fs-01.yaml
@@ -0,0 +1,31 @@
+# yaml-language-server: $schema=../../../schemas/ad_acls.json
+name: 'FS-01'
+folders:
+ - path: 'D:\Shares\Documents'
+ acls:
+ - name: 'Company'
+ access: 'RO'
+ - path: 'D:\Shares\Documents/Direction'
+ acls:
+ - name: 'Company Direction'
+ access: 'RW'
+ - path: 'D:\Shares\Documents/RH'
+ acls:
+ - name: 'Company Direction'
+ access: 'RO'
+ - name: 'Company RH'
+ access: 'RW'
+ - path: 'D:\Shares\Documents/Accounting'
+ acls:
+ - name: 'Company Direction'
+ access: 'RO'
+ - name: 'Company Accounting'
+ access: 'RW'
+ - path: 'D:\Shares\Documents/Secretariat'
+ acls:
+ - name: 'Company Direction'
+ access: 'RO'
+ - name: 'Company RH'
+ access: 'RO'
+ - name: 'Company Secretariat'
+ access: 'RW'
diff --git a/samples/it_v2/doc/ad/dfs/_index.yaml b/samples/it_v2/doc/ad/dfs/_index.yaml
new file mode 100644
index 0000000..116c89b
--- /dev/null
+++ b/samples/it_v2/doc/ad/dfs/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 3
+title: 'DFS'
+toc: false
+book: false
+templates:
+ node: 'dfs'
diff --git a/samples/it_v2/doc/ad/dfs/root@domain.local.yaml b/samples/it_v2/doc/ad/dfs/root@domain.local.yaml
new file mode 100644
index 0000000..fe245ac
--- /dev/null
+++ b/samples/it_v2/doc/ad/dfs/root@domain.local.yaml
@@ -0,0 +1,9 @@
+# yaml-language-server: $schema=../../../schemas/ad_dfs.json
+name: 'ROOT'
+path: '\\DOMAIN.local\ROOT'
+targets:
+ - '\\FS-01\ROOT'
+folders:
+ - name: 'Documents'
+ targets:
+ - '\\FS-01\Documents'
diff --git a/samples/it_v2/doc/ad/domains/_index.yaml b/samples/it_v2/doc/ad/domains/_index.yaml
new file mode 100644
index 0000000..814ffb0
--- /dev/null
+++ b/samples/it_v2/doc/ad/domains/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 1
+title: 'Domains'
+toc: false
+book: false
+templates:
+ node: 'domains'
diff --git a/samples/it_v2/doc/ad/domains/domain.local.yaml b/samples/it_v2/doc/ad/domains/domain.local.yaml
new file mode 100644
index 0000000..f287759
--- /dev/null
+++ b/samples/it_v2/doc/ad/domains/domain.local.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/ad_domain.json
+name: 'DOMAIN.local'
+dc:
+ - name: 'dc-01'
+ fsmo: 'all'
+servers:
+ - name: 'fs-01'
diff --git a/samples/it_v2/doc/ad/shares/_index.yaml b/samples/it_v2/doc/ad/shares/_index.yaml
new file mode 100644
index 0000000..7408786
--- /dev/null
+++ b/samples/it_v2/doc/ad/shares/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 3
+title: 'Shares'
+toc: false
+book: false
+templates:
+ node: 'shares'
diff --git a/samples/it_v2/doc/ad/shares/fs-01.yaml b/samples/it_v2/doc/ad/shares/fs-01.yaml
new file mode 100644
index 0000000..c2521a6
--- /dev/null
+++ b/samples/it_v2/doc/ad/shares/fs-01.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/ad_shares.json
+name: FS-01
+fileshares:
+ - path: '\\FS-01\Documents'
+printshares:
+ - path: '\\FS-01\MFC-01'
+ - path: '\\FS-01\PRINTER-01'
diff --git a/samples/it_v2/doc/ad/usergroups/_index.yaml b/samples/it_v2/doc/ad/usergroups/_index.yaml
new file mode 100644
index 0000000..4864673
--- /dev/null
+++ b/samples/it_v2/doc/ad/usergroups/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 2
+title: 'Usergroups'
+toc: false
+book: false
+templates:
+ node: 'usergroups'
diff --git a/samples/it_v2/doc/ad/usergroups/domain.local.yaml b/samples/it_v2/doc/ad/usergroups/domain.local.yaml
new file mode 100644
index 0000000..0e327a5
--- /dev/null
+++ b/samples/it_v2/doc/ad/usergroups/domain.local.yaml
@@ -0,0 +1,8 @@
+# yaml-language-server: $schema=../../../schemas/ad_usergroups.json
+name: DOMAIN.local
+usergroups:
+ - name: 'Company'
+ - name: 'Company Management'
+ - name: 'Company RH'
+ - name: 'Company Accounting'
+ - name: 'Company Secretariat'
diff --git a/samples/it_v2/doc/devices/_index.yaml b/samples/it_v2/doc/devices/_index.yaml
new file mode 100644
index 0000000..1d8dc89
--- /dev/null
+++ b/samples/it_v2/doc/devices/_index.yaml
@@ -0,0 +1,5 @@
+# yaml-language-server: $schema=../../schemas/_index.json
+index: 3
+title: Devices
+templates:
+ node: '@overview'
\ No newline at end of file
diff --git a/samples/it_v2/doc/devices/computers/_index.yaml b/samples/it_v2/doc/devices/computers/_index.yaml
new file mode 100644
index 0000000..3c72ca1
--- /dev/null
+++ b/samples/it_v2/doc/devices/computers/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 4
+title: Computers
+toc: false
+templates:
+ node: 'computers'
diff --git a/samples/it_v2/doc/devices/computers/computer-01.yaml b/samples/it_v2/doc/devices/computers/computer-01.yaml
new file mode 100644
index 0000000..eceb49d
--- /dev/null
+++ b/samples/it_v2/doc/devices/computers/computer-01.yaml
@@ -0,0 +1,20 @@
+# yaml-language-server: $schema=../../../schemas/computer.json
+name: 'computer-01'
+type: ''
+model: ''
+os: 'Windows 11 Pro'
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.21'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns:
+ - '10.10.10.1'
+updates:
+ - type: 'os'
+ method: 'auto'
+ frequency: 'auto'
+ time: 'auto'
+backups:
+ - type: 'none'
diff --git a/samples/it_v2/doc/devices/computers/computer-02.yaml b/samples/it_v2/doc/devices/computers/computer-02.yaml
new file mode 100644
index 0000000..9dea803
--- /dev/null
+++ b/samples/it_v2/doc/devices/computers/computer-02.yaml
@@ -0,0 +1,23 @@
+# yaml-language-server: $schema=../../../schemas/computer.json
+todo:
+ - msg: 'Replace computer'
+ priority: 20
+name: 'computer-02'
+type: ''
+model: ''
+os: '! Windows 7 Pro'
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.22'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns:
+ - '10.10.10.1'
+updates:
+ - type: 'os'
+ method: 'auto'
+ frequency: 'auto'
+ time: 'auto'
+backups:
+ - type: 'none'
diff --git a/samples/it_v2/doc/devices/netdevs/_index.yaml b/samples/it_v2/doc/devices/netdevs/_index.yaml
new file mode 100644
index 0000000..a48845a
--- /dev/null
+++ b/samples/it_v2/doc/devices/netdevs/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 1
+title: Network
+toc: false
+templates:
+ node: 'netdevs'
\ No newline at end of file
diff --git a/samples/it_v2/doc/devices/netdevs/firewall-01.yaml b/samples/it_v2/doc/devices/netdevs/firewall-01.yaml
new file mode 100644
index 0000000..49bcaf9
--- /dev/null
+++ b/samples/it_v2/doc/devices/netdevs/firewall-01.yaml
@@ -0,0 +1,33 @@
+# yaml-language-server: $schema=../../../schemas/netdev.json
+name: 'firewall-01'
+roles:
+ - Firewall
+ - DHCP
+ - DNS
+ - VPN
+ - VLAN
+model: 'Generic Firewall'
+os: 'Linux'
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.1'
+ mask: '255.255.255.0'
+ - name: 'GUEST'
+ ip: '192.168.5.1'
+ mask: '255.255.255.0'
+ - name: 'VPN'
+ ip: '192.168.9.1'
+ mask: '255.255.255.0'
+ - name: 'WAN'
+ ip: '0.0.0.0'
+ mask: '255.255.255.255'
+updates:
+ - type: 'os'
+ method: 'auto'
+ frequency: 'tuesday'
+ time: '12:30'
+backups:
+ - type: 'manual'
+ content: 'config'
+ frequency: 'On change'
diff --git a/samples/it_v2/doc/devices/netdevs/switch-01.yaml b/samples/it_v2/doc/devices/netdevs/switch-01.yaml
new file mode 100644
index 0000000..9e1e9de
--- /dev/null
+++ b/samples/it_v2/doc/devices/netdevs/switch-01.yaml
@@ -0,0 +1,19 @@
+# yaml-language-server: $schema=../../../schemas/netdev.json
+name: 'switch-01'
+model: ''
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.231'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns: [ '10.10.10.1' ]
+updates:
+ - type: 'os'
+ method: 'manual'
+ frequency: 'yearly'
+ time: '-'
+backups:
+ - type: 'manual'
+ content: 'config'
+ frequency: 'On change'
diff --git a/samples/it_v2/doc/devices/netdevs/wifi-01.yaml b/samples/it_v2/doc/devices/netdevs/wifi-01.yaml
new file mode 100644
index 0000000..43787ca
--- /dev/null
+++ b/samples/it_v2/doc/devices/netdevs/wifi-01.yaml
@@ -0,0 +1,19 @@
+# yaml-language-server: $schema=../../../schemas/netdev.json
+name: 'wifi-01'
+model: ''
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.241'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns: [ '10.10.10.1' ]
+updates:
+ - type: 'os'
+ method: 'manual'
+ frequency: 'yearly'
+ time: '-'
+backups:
+ - type: 'manual'
+ content: 'config'
+ frequency: 'On change'
diff --git a/samples/it_v2/doc/devices/printers/_index.yaml b/samples/it_v2/doc/devices/printers/_index.yaml
new file mode 100644
index 0000000..39f2b8d
--- /dev/null
+++ b/samples/it_v2/doc/devices/printers/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 8
+title: Printers
+toc: false
+templates:
+ node: printers
\ No newline at end of file
diff --git a/samples/it_v2/doc/devices/printers/mfc-01.yaml b/samples/it_v2/doc/devices/printers/mfc-01.yaml
new file mode 100644
index 0000000..4443afe
--- /dev/null
+++ b/samples/it_v2/doc/devices/printers/mfc-01.yaml
@@ -0,0 +1,12 @@
+# yaml-language-server: $schema=../../../schemas/printer.json
+name: 'mfc-01'
+type: mfc
+model: ''
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.211'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns:
+ - '10.10.10.1'
diff --git a/samples/it_v2/doc/devices/printers/printer-01.yaml b/samples/it_v2/doc/devices/printers/printer-01.yaml
new file mode 100644
index 0000000..b250f95
--- /dev/null
+++ b/samples/it_v2/doc/devices/printers/printer-01.yaml
@@ -0,0 +1,12 @@
+# yaml-language-server: $schema=../../../schemas/printer.json
+name: 'printer-01'
+type: printer
+model: ''
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.212'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns:
+ - '10.10.10.1'
diff --git a/samples/it_v2/doc/devices/servers/_index.yaml b/samples/it_v2/doc/devices/servers/_index.yaml
new file mode 100644
index 0000000..a379dbf
--- /dev/null
+++ b/samples/it_v2/doc/devices/servers/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 2
+title: Servers
+toc: false
+templates:
+ node: 'servers'
diff --git a/samples/it_v2/doc/devices/servers/dc-01.yaml b/samples/it_v2/doc/devices/servers/dc-01.yaml
new file mode 100644
index 0000000..bd02514
--- /dev/null
+++ b/samples/it_v2/doc/devices/servers/dc-01.yaml
@@ -0,0 +1,26 @@
+# yaml-language-server: $schema=../../../schemas/server.json
+name: 'dc-01'
+type: ''
+roles: [ 'DC' ]
+model: ''
+os: 'Windows Server 2019 Std'
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.110'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns:
+ - '127.0.0.1'
+updates:
+ - type: 'os'
+ method: 'auto'
+ frequency: 'friday'
+ time: 23:30
+backups:
+ - type: 'Windows Backup'
+ content: 'All'
+ frequency: daily
+ time: 20:30
+ duration: ''
+ target: 'External HDD'
diff --git a/samples/it_v2/doc/devices/servers/fs-01.yaml b/samples/it_v2/doc/devices/servers/fs-01.yaml
new file mode 100644
index 0000000..5fb6aca
--- /dev/null
+++ b/samples/it_v2/doc/devices/servers/fs-01.yaml
@@ -0,0 +1,28 @@
+# yaml-language-server: $schema=../../../schemas/server.json
+name: 'fs-01'
+type: ''
+roles:
+ - 'File server'
+ - 'Print server'
+model: ''
+os: 'Windows Server 2019 Std'
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.111'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns:
+ - '10.10.10.1'
+updates:
+ - type: 'os'
+ method: 'auto'
+ frequency: 'friday'
+ time: 23:30
+backups:
+ - type: 'Windows Backup'
+ content: 'All'
+ frequency: daily
+ time: 20:30
+ duration: ''
+ target: 'External HDD'
diff --git a/samples/it_v2/doc/devices/servers/nas-01.yaml b/samples/it_v2/doc/devices/servers/nas-01.yaml
new file mode 100644
index 0000000..5b72f50
--- /dev/null
+++ b/samples/it_v2/doc/devices/servers/nas-01.yaml
@@ -0,0 +1,30 @@
+# yaml-language-server: $schema=../../../schemas/server.json
+todo:
+ - msg: 'Add a new NAS server for backup'
+ priority: 20
+name: 'nas-01'
+type: ''
+roles:
+ - 'Backup server'
+model: ''
+os: ''
+location: ''
+interfaces:
+ - name: 'LAN'
+ ip: '10.10.10.119'
+ mask: '255.255.255.0'
+ gw: '10.10.10.1'
+ dns:
+ - '10.10.10.1'
+updates:
+ - type: 'os'
+ method: 'auto'
+ frequency: 'friday'
+ time: 23:30
+backups:
+ - type: 'Internal Backup'
+ content: 'All'
+ frequency: daily
+ time: 20:30
+ duration: ''
+ target: 'External HDD'
diff --git a/samples/it_v2/doc/index/_index.yaml b/samples/it_v2/doc/index/_index.yaml
new file mode 100644
index 0000000..cae42ce
--- /dev/null
+++ b/samples/it_v2/doc/index/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../schemas/_index.json
+index: 1
+title: Index
+toc: false
+templates:
+ node: '@index'
\ No newline at end of file
diff --git a/samples/it_v2/doc/maintenance/_index.yaml b/samples/it_v2/doc/maintenance/_index.yaml
new file mode 100644
index 0000000..ec11eec
--- /dev/null
+++ b/samples/it_v2/doc/maintenance/_index.yaml
@@ -0,0 +1,5 @@
+# yaml-language-server: $schema=../../schemas/_index.json
+index: 100
+title: Maintenance
+templates:
+ node: '@overview'
\ No newline at end of file
diff --git a/samples/it_v2/doc/maintenance/backups/_index.yaml b/samples/it_v2/doc/maintenance/backups/_index.yaml
new file mode 100644
index 0000000..3a63807
--- /dev/null
+++ b/samples/it_v2/doc/maintenance/backups/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 3
+title: Backups
+toc: false
+book: false
+templates:
+ node: backups
\ No newline at end of file
diff --git a/samples/it_v2/doc/maintenance/todos/_index.yaml b/samples/it_v2/doc/maintenance/todos/_index.yaml
new file mode 100644
index 0000000..2b89594
--- /dev/null
+++ b/samples/it_v2/doc/maintenance/todos/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 1
+title: TODOS
+book: false
+templates:
+ node: todos
\ No newline at end of file
diff --git a/samples/it_v2/doc/maintenance/updates/_index.yaml b/samples/it_v2/doc/maintenance/updates/_index.yaml
new file mode 100644
index 0000000..c0be36c
--- /dev/null
+++ b/samples/it_v2/doc/maintenance/updates/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 5
+title: Updates
+toc: false
+book: false
+templates:
+ node: updates
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/_index.01.pug b/samples/it_v2/doc/network/_index.01.pug
new file mode 100644
index 0000000..d02e5c2
--- /dev/null
+++ b/samples/it_v2/doc/network/_index.01.pug
@@ -0,0 +1,10 @@
+h2 Overview
+div.section
+ h3 WAN
+ img(class="largeimage", src="/network/subnets?itm=05_wan&res=01.svg")
+div.section
+ h3 GUEST
+ img(class="largeimage", src="/network/subnets?itm=02_guest&res=01.svg")
+div.section
+ h3 LAN
+ img(class="largeimage", src="/network/subnets?itm=01_lan&res=01.svg")
diff --git a/samples/it_v2/doc/network/_index.yaml b/samples/it_v2/doc/network/_index.yaml
new file mode 100644
index 0000000..c89e2d4
--- /dev/null
+++ b/samples/it_v2/doc/network/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../schemas/_index.json
+index: 2
+title: Network
+templates:
+ node: '@overview'
+headfiles:
+ - 01.pug
diff --git a/samples/it_v2/doc/network/ipam/_index.yaml b/samples/it_v2/doc/network/ipam/_index.yaml
new file mode 100644
index 0000000..79a76d0
--- /dev/null
+++ b/samples/it_v2/doc/network/ipam/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 10
+title: IPAM
+toc: false
+book: false
+templates:
+ node: ipam
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/subnets/01_lan.01.drawio b/samples/it_v2/doc/network/subnets/01_lan.01.drawio
new file mode 100644
index 0000000..0c954d5
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/01_lan.01.drawio
@@ -0,0 +1 @@
+7Zpbc5s4FIB/jR/NcBPYj7HjNNvtTjPtzra7Lx4ZBFYCiEryrb++khCYq5NJ7aaeWfAM6EhIQuecT0fCI2ee7t9RmK//IiFKRrYZ7kfO7ci2Ldt3xUVKDoXEA5NCEFMc6kJHwWf8HWmhqaUbHCLWKMgJSTjOm8KAZBkKeEMGKSW7ZrGIJM1WcxijjuBzAJOu9AsO+bqQTmz/KL9HOF6XLVvetMhJYVlYvwlbw5DsaiJnMXLmlBBe3KX7OUrk4JXjUjx3N5BbdYyijL/kgRl7OCzGDh3/8+W/b05m0TTdjj2gO8cP5RujUAyAThLK1yQmGUwWR+mMkk0WIlmtKVLHMh8IyYXQEsJHxPlBaxNuOBGiNU8TnSt6TA9f5fOGOXVLwb+6QpW43TdSh3rqAVGcIo6oFkYk43OSEKpewDHVIeSMQ8pvpBGIjCCBjOGgFN/hpOxNdyD12DKyoYEele+fwLfFPVtCch9R92v08eZPNLZKi4Q0RvzEMOtycmhrLWg9vUNEvA09iAIUJZDjbdP2oDbhuCp31LK40YruV/rJbm9hstFNsR3mwXpsWh1zqKltiyjHwjU+wBVKHgjDHJNM5HGp9ir3JsGxlK4I5ySVBrLhCc7QvPJQpZvSG2QihGxd2ZPIyWXb6T6WSDEoDJ6MdY6WkG5W0Ch6ipjxOJ0ADy5t4JhL242XNovyPNmwZVFC1JS0+hkIBUujmUHdxUowaALypdD+pM50rqO5pjnnaq/fHaFhuXYhW9eBAX5eyadMrqbjU6qNhDvUXGiuDuUrlDyhWo43mVgzR+QI5YQYHR0vIxmqiW8xFcouxj2TiKgqKzFq9+g6Q3xH6BMzVhv2ujZaLIjUIeR5jRkrYVErUVWNI7NSppllmxexCsvrmoUPesyinDTObhZe1wx+LfCFBV0F8PudCvzuwD/Z7QYMvIRL9OKtuI3l7Q5HWM0ARY5oqZbZsZqc4IyrjoKZ+ImZ3BnZc6lfeRkBUWau5NZECZpCUJR1W+KJ3VN26vdVbCmh53cKF1Xra6tJqyUz7YHSrcrF77npjz0hNesoA+2ZNDvTImR5MR1GeC99qzsrqSFGdLFFxUhbPcQMMAuINTV2goUJYmKmDwJ5Uc92we7eyrMDdg3WIb8anEjPQEh7aj43cQKzC0hwKUC63ltHxADUAWkZpu9cFSTt64Sk3YVkGPRFxA1PH/DRgdi2pvF+B2x6KzDlecoBh5hUUaaNnwJWvSF5hz9t1pAowgEyGKKiVmaEJIU4W4qVt3iVJFGPDBndGUABPAM0SNGHChf0oOJSIbbrvzEqrEkjlrKuCxPedWLC62AiYv9jYhgTorNoWSQuCwjr9YTwLmQsvtkxi19LiCvZXesdPMe5SkCU3a4BIo16A4mhkR1cMpxegbx8u6tmK70u/vLdIHVcfDcoIDk+13rDt55db/g96w3/YhsykzdGhOdfMSM8/9y+rx99UOvnympc4BoT159Wh9cwompfr6yxYJaupGUhVa9+wmj8bhAiXGwHk6QPNK/buWhRwJ7IcygkGWRWX+TzbAihdjWWDEYyjAg2FPPDEouFhowmitd8o90K13mWHu7U6AkxnDMsQv52wR+r9+9tsj+ku+mnj5w+OmPrbTZ095gX+AA6VbFD3B/RIRMNcuiwBDijxh7Hq5Yu56RL79j+9iuUU72usSGnygd7Vyna83CqPoSf2rlsfuYbXEoo95vB4ClWVtb3MUY1dlPuf6pFRXszVPfnds25/NJ/I4fEvgvCzDUkCCIs7JeKwCCV29SQQ3FRgBDXYv0x5sJWRApIB7nzhZ9MjDyLzxFBtBhgOxfbshTJ4x8Eisnj+DcLZ/ED
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/subnets/01_lan.01.svg b/samples/it_v2/doc/network/subnets/01_lan.01.svg
new file mode 100644
index 0000000..a424788
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/01_lan.01.svg
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/subnets/01_lan.yaml b/samples/it_v2/doc/network/subnets/01_lan.yaml
new file mode 100644
index 0000000..0b17640
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/01_lan.yaml
@@ -0,0 +1,11 @@
+# yaml-language-server: $schema=../../../schemas/subnet.json
+name: LAN
+subnet: 10.10.10.0/24
+gw: 10.10.10.1
+dns:
+ - 10.10.10.1
+dhcp:
+ server: '10.10.10.1'
+ ranges:
+ - from: '10.10.10.50'
+ to: '10.10.10.169'
diff --git a/samples/it_v2/doc/network/subnets/02_guest.01.drawio b/samples/it_v2/doc/network/subnets/02_guest.01.drawio
new file mode 100644
index 0000000..eb3b9bd
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/02_guest.01.drawio
@@ -0,0 +1 @@
+5VfJbtswEP0aHy1oteNjYqdNNzRoCjQ3gZFGEhtKVEnacvL1JS1Su7MgblGgNmBTb4bUcN7jjDTz1vn+PUNl9oXGQGauHe9n3mbmuo679OWfQh5qZBGc1UDKcKydWuAGP4IGbY1ucQy85ygoJQKXfTCiRQGR6GGIMVr13RJK+nctUarvaLfATYQIjNx+4FhkNXrmLlv8CnCamTs7i1VtyZFx1gvzDMW06kDe5cxbM0pFPcr3ayAqeSYv9bx3R6xNYAwK8ZIJj9+CX5dXPET0KmH+bfL1/BPMHb3MDpGt3jGvsIiyua0tXDyYXGQiJ3LkzLyLHTCBZZY+ozsg15RjgWkhbYKWHes5walC76gQNJcGuhUEF7BuyLIl2CRGXcSIZxC3llLdO9+nSl0WQ9G9lZUQIra9Q1YdKXDr5+osWKDQDTw7dP00dHlSlmTLw9pDrkQGcUYyacCkAekQG2CcVpMiuSnYdyCd5vdAcxDsQbpo68LXlBvN+1ZQA1UrIcd3ayzrykf7Ia3atFm7JVYONLev4NnotcPzTYU5jyQtQ5onSerxcoz9huehAGpZjHLdEdSQalRxz8LKrwARymRfJJiQNSWUHaL0Nu7G23gSl/4xlisaW0ELOA2PAxrNZZdE2x6TuPD/EImeNyJxRB7EsnzpS8pERlNaIHLZoheMbou4obL1+UwVSQcyfoIQD7oWo62gfaoS2iZbEmEfPopCgZg4VzVXcUwQ5zgy8DtMzPSjxHC6ZRG8QMRywRTEU4nSK6pkPEk0A4IE3vVr/RRveuo1lZLsCMTpK2Tp9leod6QnDchvoniDHvyRHnYEFRIxcf0nwjB8PysM5+TCeNuBHnffBDOoECFT/fdYfqer7bNF+uU9scPxZHMYlOb14XNgmNF76Fj8jfoeL9oG3sgsRDqsQimxWcw8hLkTPUN2ioqye25JJZ+smfurQTN3Rl1gOdEEXPftmoEoWUcfv2zmwSdIl/Z6Ht5+n7v/1pk/5dme3O9fKuVLe9Uv5Str8CxWF5dTFPOn9tnhtcIJnioDpQrhEFRwMQvUaUK8rA9jgveKzC5Bo8N8/HEb54eXIfO/wXkqt0LwnfyVJQlDHAogwDGXQCWPqByr4XkUyUF4SE34oYgpZRbfpSd6mF7Z1rJHjeOOH8S8hbUYH8LAN+grjqG8bF/KanbbV1vv8jc=
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/subnets/02_guest.01.svg b/samples/it_v2/doc/network/subnets/02_guest.01.svg
new file mode 100644
index 0000000..87ac2fd
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/02_guest.01.svg
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/subnets/02_guest.yaml b/samples/it_v2/doc/network/subnets/02_guest.yaml
new file mode 100644
index 0000000..ef3be27
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/02_guest.yaml
@@ -0,0 +1,13 @@
+# yaml-language-server: $schema=../../../schemas/subnet.json
+name: GUEST
+subnet: 192.168.5.0/24
+gw: 192.168.5.1
+dns:
+ - 192.168.5.1
+vlans:
+ - 10
+dhcp:
+ server: '192.168.5.1'
+ ranges:
+ - from: '192.168.5.10'
+ to: '192.18.5.199'
diff --git a/samples/it_v2/doc/network/subnets/04_vpn.yaml b/samples/it_v2/doc/network/subnets/04_vpn.yaml
new file mode 100644
index 0000000..fdc558b
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/04_vpn.yaml
@@ -0,0 +1,11 @@
+# yaml-language-server: $schema=../../../schemas/subnet.json
+name: VPN
+subnet: 192.168.9.0/24
+gw: 192.168.9.1
+dns:
+ - 192.168.9.1
+dhcp:
+ server: '192.168.9.1'
+ ranges:
+ - from: '192.168.9.2'
+ to: '192.168.9.254'
diff --git a/samples/it_v2/doc/network/subnets/05_wan.01.drawio b/samples/it_v2/doc/network/subnets/05_wan.01.drawio
new file mode 100644
index 0000000..75f8ac9
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/05_wan.01.drawio
@@ -0,0 +1 @@
+5VbLVtswEP2aLPHxKwksIQnQU3rKKYt25yPssS2QPa4k44SvrxTLr9jhUeiqySLWndFIuvdm5Jm3yrZXnBTpN4yAzVw72s689cx1HXfpqx+N7GpkMT+tgYTTyCR1wB19BgPaBi1pBGKQKBGZpMUQDDHPIZQDjHCO1TAtRjZctSAJjIC7kLAx+pNGMq3RU3fZ4ddAk7RZ2Vmc1ZGMNMnmJCIlEVY9yNvMvBVHlPVTtl0B0+Q1vNTzLo9E241xyOVbJjz/mP/eXIuA4HXM/V/x9/OvcOKYMk+ElebEoqIyTE9sExFy13CRyoypJ2fmXTwBl1SxdEPugd2ioJJirmL3KCVmvYRzRhMdkFgoFEvJaA6rVixbgS0xehARkULURQq9drZNtLssTsJHKy0gILy8J1a9UxDWw9npfEECd+7ZgesngSviomClCOoMVWlMVnNwtU/Y9iBD3hVgBpLvVIqJLnwjZONk35rXQNUZw/HdGkv7pjB5xHgxaWt3cqkHo9g71Gtc2FPvSy6B5yBH4k1SP2D7LzUlZhSCXloBPZscCkgq4VnUbDFQZF/ElLEVMuT7XXprd+2tPYWr/Iiqik0sxxw+R8cDGZthX0TbHou48P+RiJ43EnEkHkSqKZkhcpligjlhmw694FjmUStll3ODWqS9GA8g5c50WFJKHEoVY0e2EsLef7SEknB5rjup1pgRIWjYwJeUNdOPCiOw5CG8wcSqYALyJaJMRU3Gi0JzYETSp2EHn9LNTL1FZcmeQZyhQ5busEJ9IjPpQPx2Fx/wg/9/+6GR+VU/OJ/uh4/9j8dXaUw5VISxqcv0GL/TTfbV3swOAm03fqk9T94JBx15tf/sFeb4CL2Iv9bf4726gdeKhdBsK9dObIs1b1TuxFWhLogK+aOwlJPrjX9G7z87uMOdUfNfTvR+1323Z9Swe7WrW0P3guxt/gA=
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/subnets/05_wan.01.svg b/samples/it_v2/doc/network/subnets/05_wan.01.svg
new file mode 100644
index 0000000..98c2996
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/05_wan.01.svg
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/subnets/05_wan.yaml b/samples/it_v2/doc/network/subnets/05_wan.yaml
new file mode 100644
index 0000000..050e88e
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/05_wan.yaml
@@ -0,0 +1,3 @@
+# yaml-language-server: $schema=../../../schemas/subnet.json
+name: WAN
+subnet: 0.0.0.0/32
diff --git a/samples/it_v2/doc/network/subnets/_index.yaml b/samples/it_v2/doc/network/subnets/_index.yaml
new file mode 100644
index 0000000..9b29001
--- /dev/null
+++ b/samples/it_v2/doc/network/subnets/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 1
+title: Subnets
+toc: false
+book: false
+templates:
+ node: subnets
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/wifi/01_lan.yaml b/samples/it_v2/doc/network/wifi/01_lan.yaml
new file mode 100644
index 0000000..c37ea68
--- /dev/null
+++ b/samples/it_v2/doc/network/wifi/01_lan.yaml
@@ -0,0 +1,4 @@
+# yaml-language-server: $schema=../../../schemas/wifi.json
+name: LAN
+ssid: 'Company-WIFI'
+key: 'feDFw848$435dEWs'
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/wifi/02_guest.yaml b/samples/it_v2/doc/network/wifi/02_guest.yaml
new file mode 100644
index 0000000..f1b67d2
--- /dev/null
+++ b/samples/it_v2/doc/network/wifi/02_guest.yaml
@@ -0,0 +1,4 @@
+# yaml-language-server: $schema=../../../schemas/wifi.json
+name: GUEST
+ssid: 'GUEST-WIFI'
+key: 'Visitors'
\ No newline at end of file
diff --git a/samples/it_v2/doc/network/wifi/_index.yaml b/samples/it_v2/doc/network/wifi/_index.yaml
new file mode 100644
index 0000000..3e2c679
--- /dev/null
+++ b/samples/it_v2/doc/network/wifi/_index.yaml
@@ -0,0 +1,7 @@
+# yaml-language-server: $schema=../../../schemas/_index.json
+index: 2
+title: WIFI
+toc: false
+book: false
+templates:
+ node: wifis
\ No newline at end of file
diff --git a/samples/it_v2/doc/secrets/_index.yaml b/samples/it_v2/doc/secrets/_index.yaml
new file mode 100644
index 0000000..a0ebb65
--- /dev/null
+++ b/samples/it_v2/doc/secrets/_index.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../schemas/_index.json
+index: 1000
+title: Secrets
+templates:
+ node: 'secrets'
+ items: '@none'
\ No newline at end of file
diff --git a/samples/it_v2/doc/secrets/ad.yaml b/samples/it_v2/doc/secrets/ad.yaml
new file mode 100644
index 0000000..7c30bab
--- /dev/null
+++ b/samples/it_v2/doc/secrets/ad.yaml
@@ -0,0 +1,9 @@
+# yaml-language-server: $schema=../../schemas/secrets.json
+name: AD
+secrets:
+ - type: AD
+ user: Administrator
+ password: 'Pa$$w0rd'
+ - type: AD
+ user: LocalAdmin
+ password: 'SimplePass'
diff --git a/samples/it_v2/doc/secrets/ms365.yaml b/samples/it_v2/doc/secrets/ms365.yaml
new file mode 100644
index 0000000..fdd70a1
--- /dev/null
+++ b/samples/it_v2/doc/secrets/ms365.yaml
@@ -0,0 +1,11 @@
+# yaml-language-server: $schema=../../schemas/secrets.json
+name: Microsoft 365
+secrets:
+ - type: https
+ user: admin@companysa.onmicrosoft.com
+ password: 'MySuperPassword'
+ mfa:
+ - type: totp
+ value: 'JEWRF85D23NNMEISL3j'
+ - type: sms
+ value: '+000000000000'
diff --git a/samples/it_v2/doc/secrets/windows.yaml b/samples/it_v2/doc/secrets/windows.yaml
new file mode 100644
index 0000000..552e329
--- /dev/null
+++ b/samples/it_v2/doc/secrets/windows.yaml
@@ -0,0 +1,6 @@
+# yaml-language-server: $schema=../../schemas/secrets.json
+name: Windows
+secrets:
+ - type: USER
+ user: Administrator
+ password: 'Pa$$w0rd'
diff --git a/samples/it_v2/doc/softwares/_index.yaml b/samples/it_v2/doc/softwares/_index.yaml
new file mode 100644
index 0000000..e3219d0
--- /dev/null
+++ b/samples/it_v2/doc/softwares/_index.yaml
@@ -0,0 +1,5 @@
+# yaml-language-server: $schema=../../schemas/_index.json
+index: 10
+title: Softwares
+templates:
+ node: 'softwares'
\ No newline at end of file
diff --git a/samples/it_v2/doc/softwares/software1.notes.md b/samples/it_v2/doc/softwares/software1.notes.md
new file mode 100644
index 0000000..4e25d1c
--- /dev/null
+++ b/samples/it_v2/doc/softwares/software1.notes.md
@@ -0,0 +1,3 @@
+### Additional informations
+
+Before you begin, ....
\ No newline at end of file
diff --git a/samples/it_v2/doc/softwares/software1.yaml b/samples/it_v2/doc/softwares/software1.yaml
new file mode 100644
index 0000000..789d135
--- /dev/null
+++ b/samples/it_v2/doc/softwares/software1.yaml
@@ -0,0 +1,9 @@
+# yaml-language-server: $schema=../../schemas/software.json
+name: 'Software 1'
+publisher: 'Software Inc'
+licenses: '4'
+urls:
+ - website: 'https://soft.home'
+ - download: 'https://soft.download'
+files:
+ - notes.md
diff --git a/samples/it_v2/schemas/_index.json b/samples/it_v2/schemas/_index.json
new file mode 100644
index 0000000..cfb9ee2
--- /dev/null
+++ b/samples/it_v2/schemas/_index.json
@@ -0,0 +1,99 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "index": { "type": "integer" },
+ "title": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "book": { "type": "boolean" },
+ "toc": { "type": "boolean" },
+ "templates": {
+ "type": "object",
+ "properties": {
+ "node": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/ad_acls.json b/samples/it_v2/schemas/ad_acls.json
new file mode 100644
index 0000000..5b835e1
--- /dev/null
+++ b/samples/it_v2/schemas/ad_acls.json
@@ -0,0 +1,118 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "folders": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "acls": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "access": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'RO'",
+ "'RW'",
+ "'traversal'",
+ "'DENY'"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/ad_dfs.json b/samples/it_v2/schemas/ad_dfs.json
new file mode 100644
index 0000000..829e89d
--- /dev/null
+++ b/samples/it_v2/schemas/ad_dfs.json
@@ -0,0 +1,121 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "targets": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "folders": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "targets": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/ad_domain.json b/samples/it_v2/schemas/ad_domain.json
new file mode 100644
index 0000000..17c6f7d
--- /dev/null
+++ b/samples/it_v2/schemas/ad_domain.json
@@ -0,0 +1,116 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "dc": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "fsmo": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'all'"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "servers": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/ad_shares.json b/samples/it_v2/schemas/ad_shares.json
new file mode 100644
index 0000000..9be9512
--- /dev/null
+++ b/samples/it_v2/schemas/ad_shares.json
@@ -0,0 +1,107 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "fileshares": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "printshares": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/ad_usergroups.json b/samples/it_v2/schemas/ad_usergroups.json
new file mode 100644
index 0000000..6a100ea
--- /dev/null
+++ b/samples/it_v2/schemas/ad_usergroups.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "usergroups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/computer.json b/samples/it_v2/schemas/computer.json
new file mode 100644
index 0000000..2613ee4
--- /dev/null
+++ b/samples/it_v2/schemas/computer.json
@@ -0,0 +1,341 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "maintainer": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'notebook'",
+ "'rack'",
+ "'slim'",
+ "'small'",
+ "'tower'",
+ "'vm'"
+ ]}
+ ]
+ },
+ "model": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "os": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ {"enum": [
+ "''",
+ "'Windows XP Home'",
+ "'Windows XP Pro'",
+ "'Windows Vista Home'",
+ "'Windows Vista Pro'",
+ "'Windows 7 Home'",
+ "'Windows 7 Pro'",
+ "'Windows 8 Home'",
+ "'Windows 8 Pro'",
+ "'Windows 10 Home'",
+ "'Windows 10 Pro'",
+ "'Windows 11 Home'",
+ "'Windows 11 Pro'"
+ ]}
+ ]
+ },
+ "location": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "interfaces": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'WIFI'",
+ "'WAN'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "ip": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mask": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'255.255.255.0'",
+ "'255.255.0.0'",
+ "'255.0.0.0'"
+ ]}
+ ]
+ },
+ "gw": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ },
+ "updates": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'os'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "backups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'none'",
+ "'hypervisor'",
+ "'windowsbackup'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "target": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'usb'",
+ "'pbs'",
+ "'share'",
+ "'iscsi'",
+ "'cloud'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/netdev.json b/samples/it_v2/schemas/netdev.json
new file mode 100644
index 0000000..a294829
--- /dev/null
+++ b/samples/it_v2/schemas/netdev.json
@@ -0,0 +1,345 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "maintainer": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'box'",
+ "'rack'",
+ "'wall'",
+ "'ceiling'"
+ ]}
+ ]
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'DHCP'",
+ "'DNS'",
+ "'VPN'",
+ "'Firewall'",
+ "'Router'"
+ ]}
+ ]
+ }
+ },
+ "model": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "os": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ {"enum": [
+ "''",
+ "'Linux'",
+ "'Debian'"
+ ]}
+ ]
+ },
+ "location": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "interfaces": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'WIFI'",
+ "'WAN'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "ip": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mask": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'255.255.255.0'",
+ "'255.255.0.0'",
+ "'255.0.0.0'"
+ ]}
+ ]
+ },
+ "gw": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ },
+ "updates": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'os'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "backups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'none'",
+ "'hypervisor'",
+ "'windowsbackup'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "target": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'usb'",
+ "'pbs'",
+ "'share'",
+ "'iscsi'",
+ "'cloud'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/printer.json b/samples/it_v2/schemas/printer.json
new file mode 100644
index 0000000..b143ef8
--- /dev/null
+++ b/samples/it_v2/schemas/printer.json
@@ -0,0 +1,317 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "maintainer": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'printer'",
+ "'mfc'",
+ "'large printer'"
+ ]}
+ ]
+ },
+ "model": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "location": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "interfaces": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'WIFI'",
+ "'WAN'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "ip": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mask": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'255.255.255.0'",
+ "'255.255.0.0'",
+ "'255.0.0.0'"
+ ]}
+ ]
+ },
+ "gw": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ },
+ "updates": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'os'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "backups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'none'",
+ "'hypervisor'",
+ "'windowsbackup'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "target": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'usb'",
+ "'pbs'",
+ "'share'",
+ "'iscsi'",
+ "'cloud'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/secrets.json b/samples/it_v2/schemas/secrets.json
new file mode 100644
index 0000000..aff9ad9
--- /dev/null
+++ b/samples/it_v2/schemas/secrets.json
@@ -0,0 +1,104 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "secrets": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "'ad'",
+ "'https'",
+ "'ssh'",
+ "'user'"
+ ]}
+ ]
+ },
+ "user": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "password": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mfa": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'totp'",
+ "'sms'",
+ "'e-mail'"
+ ]}
+ ]
+ },
+ "value": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/server.json b/samples/it_v2/schemas/server.json
new file mode 100644
index 0000000..346d1fd
--- /dev/null
+++ b/samples/it_v2/schemas/server.json
@@ -0,0 +1,362 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "maintainer": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'mini'",
+ "'rack'",
+ "'tower'",
+ "'vm'"
+ ]}
+ ]
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'DHCP'",
+ "'DNS'",
+ "'VPN'",
+ "'Firewall'",
+ "'DC'",
+ "'File Server'",
+ "'Print Server'",
+ "'App Server'",
+ "'Backup Server'",
+ "'Hypervisor'"
+ ]}
+ ]
+ }
+ },
+ "model": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "os": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ {"enum": [
+ "''",
+ "'Windows 2000'",
+ "'Windows 2003'",
+ "'Windows 2008'",
+ "'Windows 2008 R2'",
+ "'Windows 2012'",
+ "'Windows 2012 R2'",
+ "'Windows 2016'",
+ "'Windows 2019'",
+ "'Windows 2021'",
+ "'Debian'",
+ "'Debian / Proxmox VE'",
+ "'Debian / Proxmox BS'",
+ "'FreeBSD / OPNSense'",
+ "'FreeBSD / pfSense'"
+ ]}
+ ]
+ },
+ "location": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "interfaces": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'WIFI'",
+ "'WAN'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "ip": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mask": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'255.255.255.0'",
+ "'255.255.0.0'",
+ "'255.0.0.0'"
+ ]}
+ ]
+ },
+ "gw": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ },
+ "updates": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'os'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "backups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'none'",
+ "'hypervisor'",
+ "'windowsbackup'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "target": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'usb'",
+ "'pbs'",
+ "'share'",
+ "'iscsi'",
+ "'cloud'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/software.json b/samples/it_v2/schemas/software.json
new file mode 100644
index 0000000..06322a2
--- /dev/null
+++ b/samples/it_v2/schemas/software.json
@@ -0,0 +1,124 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "maintainer": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "publisher": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "licenses": {
+ "oneOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "urls": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "website": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "download": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/subnet.json b/samples/it_v2/schemas/subnet.json
new file mode 100644
index 0000000..542abf7
--- /dev/null
+++ b/samples/it_v2/schemas/subnet.json
@@ -0,0 +1,172 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'LAN01'",
+ "'LAN02'",
+ "'LAN03'",
+ "'LAN04'",
+ "'LAN06'",
+ "'LAN07'",
+ "'LAN08'",
+ "'LAN09'",
+ "'LAN10'",
+ "'WAN'",
+ "'WIFI'",
+ "'GUEST'",
+ "'DMZ'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "subnet": {
+ "type": "string",
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.0/24'",
+ "'192.168.1.0/24'"
+ ]}
+ ]
+ },
+ "gw": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.1'",
+ "'192.168.1.1'"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.1'",
+ "'192.168.1.1'"
+ ]}
+ ]
+ }
+ },
+ "vlans": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "dhcp": {
+ "type": "object",
+ "properties": {
+ "server": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.1'",
+ "'192.168.1.1'"
+ ]}
+ ]
+ },
+ "ranges": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "from": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.20'",
+ "'192.168.1.20'"
+ ]}
+ ]
+ },
+ "to": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.99'",
+ "'192.168.1.99'"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/voipdev.json b/samples/it_v2/schemas/voipdev.json
new file mode 100644
index 0000000..5a58e5b
--- /dev/null
+++ b/samples/it_v2/schemas/voipdev.json
@@ -0,0 +1,317 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "maintainer": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'phone'",
+ "'antenna'",
+ "'gateway'"
+ ]}
+ ]
+ },
+ "model": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "location": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "interfaces": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'WIFI'",
+ "'WAN'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "ip": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mask": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'255.255.255.0'",
+ "'255.255.0.0'",
+ "'255.0.0.0'"
+ ]}
+ ]
+ },
+ "gw": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ },
+ "updates": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'os'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "backups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'none'",
+ "'hypervisor'",
+ "'windowsbackup'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "target": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'usb'",
+ "'pbs'",
+ "'share'",
+ "'iscsi'",
+ "'cloud'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas/wifi.json b/samples/it_v2/schemas/wifi.json
new file mode 100644
index 0000000..d7c70f0
--- /dev/null
+++ b/samples/it_v2/schemas/wifi.json
@@ -0,0 +1,106 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "YAML Schema for computer",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'LAN01'",
+ "'LAN02'",
+ "'LAN03'",
+ "'LAN04'",
+ "'LAN06'",
+ "'LAN07'",
+ "'LAN08'",
+ "'LAN09'",
+ "'LAN10'",
+ "'WAN'",
+ "'WIFI'",
+ "'GUEST'",
+ "'DMZ'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "ssid": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "key": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/build.sh b/samples/it_v2/schemas_builder/build.sh
new file mode 100644
index 0000000..55a1980
--- /dev/null
+++ b/samples/it_v2/schemas_builder/build.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+declare -r PARTDIR=./parts
+declare -r SCHEMADIR=../schemas
+declare -r OBJECTSDIR=./objects
+
+getSchemaHeader() {
+ local DOC="{\n"
+ DOC+="\t\""'$schema'"\": \"http://json-schema.org/draft-07/schema#\",\n"
+ DOC+="\t\"title\": \"YAML Schema for computer\",\n"
+ DOC+="\t\"type\": \"object\",\n"
+ DOC+="\t\"additionalProperties\": false,\n"
+ DOC+="\t\"properties\": {\n"
+ echo -e "${DOC}"
+}
+getSchemaFooter() {
+ local DOC+="\t}\n"
+ DOC+="}\n"
+ echo -e "${DOC}"
+}
+getPart() {
+ local -r PARTFILE=${PARTDIR}/${1}.json
+ if [ ! -f "${PARTFILE}" ]; then
+ echo "${PARTFILE} not found"
+ exit 1
+ fi
+ tail -n +4 "${PARTFILE}" | head -n -2
+}
+
+buildObject() {
+ local -r OBJECTFILE=${1}
+ local DOC=$(getSchemaHeader)"\n"
+
+ while IFS= read -r LINE; do
+ if [[ ! $LINE =~ ^[[:space:]]*\#.*$ ]]; then
+ if [ -f ${PARTDIR}/"${LINE}".json ]; then
+ DOC+=$(getPart "${LINE}")",\n"
+ else
+ echo "Error: Part not found : ${LINE} in ${OBJECTFILE}"
+ fi
+ fi
+ done < "${OBJECTFILE}"
+ DOC="${DOC::-3}\n"
+
+ DOC+=$(getSchemaFooter)
+ local SCHEMAFILE=${SCHEMADIR}/$(basename "${OBJECTFILE}").json
+ echo -e "${DOC}" > "${SCHEMAFILE}"
+}
+
+for OBJECTFILE in "${OBJECTSDIR}"/*; do
+ buildObject "${OBJECTFILE}"
+done
diff --git a/samples/it_v2/schemas_builder/objects/_index b/samples/it_v2/schemas_builder/objects/_index
new file mode 100644
index 0000000..ba861a3
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/_index
@@ -0,0 +1,7 @@
+todo
+index
+title
+book
+toc
+templates
+files
diff --git a/samples/it_v2/schemas_builder/objects/ad_acls b/samples/it_v2/schemas_builder/objects/ad_acls
new file mode 100644
index 0000000..f6640db
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/ad_acls
@@ -0,0 +1,4 @@
+todo
+name
+ad_acls
+files
diff --git a/samples/it_v2/schemas_builder/objects/ad_dfs b/samples/it_v2/schemas_builder/objects/ad_dfs
new file mode 100644
index 0000000..d368685
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/ad_dfs
@@ -0,0 +1,4 @@
+todo
+name
+ad_dfs
+files
diff --git a/samples/it_v2/schemas_builder/objects/ad_domain b/samples/it_v2/schemas_builder/objects/ad_domain
new file mode 100644
index 0000000..a9dd628
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/ad_domain
@@ -0,0 +1,4 @@
+todo
+name
+ad_domain
+files
diff --git a/samples/it_v2/schemas_builder/objects/ad_shares b/samples/it_v2/schemas_builder/objects/ad_shares
new file mode 100644
index 0000000..6dd6a25
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/ad_shares
@@ -0,0 +1,4 @@
+todo
+name
+ad_shares
+files
diff --git a/samples/it_v2/schemas_builder/objects/ad_usergroups b/samples/it_v2/schemas_builder/objects/ad_usergroups
new file mode 100644
index 0000000..7e36ad0
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/ad_usergroups
@@ -0,0 +1,4 @@
+todo
+name
+ad_usergroups
+files
diff --git a/samples/it_v2/schemas_builder/objects/computer b/samples/it_v2/schemas_builder/objects/computer
new file mode 100644
index 0000000..4260345
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/computer
@@ -0,0 +1,12 @@
+todo
+name
+maintainer
+computer_type
+# computer_roles
+model
+computer_os
+location
+interfaces
+maintenance_updates
+maintenance_backups
+files
diff --git a/samples/it_v2/schemas_builder/objects/netdev b/samples/it_v2/schemas_builder/objects/netdev
new file mode 100644
index 0000000..ace2015
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/netdev
@@ -0,0 +1,12 @@
+todo
+name
+maintainer
+netdev_type
+netdev_roles
+model
+netdev_os
+location
+interfaces
+maintenance_updates
+maintenance_backups
+files
diff --git a/samples/it_v2/schemas_builder/objects/printer b/samples/it_v2/schemas_builder/objects/printer
new file mode 100644
index 0000000..eec5ff7
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/printer
@@ -0,0 +1,10 @@
+todo
+name
+maintainer
+printer_type
+model
+location
+interfaces
+maintenance_updates
+maintenance_backups
+files
diff --git a/samples/it_v2/schemas_builder/objects/secrets b/samples/it_v2/schemas_builder/objects/secrets
new file mode 100644
index 0000000..98c872f
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/secrets
@@ -0,0 +1,3 @@
+todo
+name
+secrets
diff --git a/samples/it_v2/schemas_builder/objects/server b/samples/it_v2/schemas_builder/objects/server
new file mode 100644
index 0000000..c4ae0fd
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/server
@@ -0,0 +1,12 @@
+todo
+name
+maintainer
+server_type
+server_roles
+model
+server_os
+location
+interfaces
+maintenance_updates
+maintenance_backups
+files
diff --git a/samples/it_v2/schemas_builder/objects/software b/samples/it_v2/schemas_builder/objects/software
new file mode 100644
index 0000000..c89544e
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/software
@@ -0,0 +1,6 @@
+todo
+name
+maintainer
+software
+urls
+files
diff --git a/samples/it_v2/schemas_builder/objects/subnet b/samples/it_v2/schemas_builder/objects/subnet
new file mode 100644
index 0000000..2ad454b
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/subnet
@@ -0,0 +1,4 @@
+todo
+subnet_name
+subnet
+files
diff --git a/samples/it_v2/schemas_builder/objects/voipdev b/samples/it_v2/schemas_builder/objects/voipdev
new file mode 100644
index 0000000..ccdd3ee
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/voipdev
@@ -0,0 +1,10 @@
+todo
+name
+maintainer
+voipdev_type
+model
+location
+interfaces
+maintenance_updates
+maintenance_backups
+files
diff --git a/samples/it_v2/schemas_builder/objects/wifi b/samples/it_v2/schemas_builder/objects/wifi
new file mode 100644
index 0000000..34762e0
--- /dev/null
+++ b/samples/it_v2/schemas_builder/objects/wifi
@@ -0,0 +1,4 @@
+todo
+subnet_name
+wifi
+files
diff --git a/samples/it_v2/schemas_builder/parts/ad_acls.json b/samples/it_v2/schemas_builder/parts/ad_acls.json
new file mode 100644
index 0000000..ec9e03d
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/ad_acls.json
@@ -0,0 +1,48 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "folders": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "acls": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "access": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'RO'",
+ "'RW'",
+ "'traversal'",
+ "'DENY'"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/ad_dfs.json b/samples/it_v2/schemas_builder/parts/ad_dfs.json
new file mode 100644
index 0000000..f783b8c
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/ad_dfs.json
@@ -0,0 +1,51 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "targets": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "folders": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "targets": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/ad_domain.json b/samples/it_v2/schemas_builder/parts/ad_domain.json
new file mode 100644
index 0000000..7d13a5f
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/ad_domain.json
@@ -0,0 +1,46 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "dc": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "fsmo": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'all'"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "servers": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/ad_shares.json b/samples/it_v2/schemas_builder/parts/ad_shares.json
new file mode 100644
index 0000000..33c9835
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/ad_shares.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "fileshares": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ },
+ "printshares": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/ad_usergroups.json b/samples/it_v2/schemas_builder/parts/ad_usergroups.json
new file mode 100644
index 0000000..155620a
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/ad_usergroups.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "usergroups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/book.json b/samples/it_v2/schemas_builder/parts/book.json
new file mode 100644
index 0000000..fb3194a
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/book.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "book": { "type": "boolean" }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/computer_os.json b/samples/it_v2/schemas_builder/parts/computer_os.json
new file mode 100644
index 0000000..ed449fa
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/computer_os.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "os": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ {"enum": [
+ "''",
+ "'Windows XP Home'",
+ "'Windows XP Pro'",
+ "'Windows Vista Home'",
+ "'Windows Vista Pro'",
+ "'Windows 7 Home'",
+ "'Windows 7 Pro'",
+ "'Windows 8 Home'",
+ "'Windows 8 Pro'",
+ "'Windows 10 Home'",
+ "'Windows 10 Pro'",
+ "'Windows 11 Home'",
+ "'Windows 11 Pro'"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/computer_type.json b/samples/it_v2/schemas_builder/parts/computer_type.json
new file mode 100644
index 0000000..56736a9
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/computer_type.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'notebook'",
+ "'rack'",
+ "'slim'",
+ "'small'",
+ "'tower'",
+ "'vm'"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/files.json b/samples/it_v2/schemas_builder/parts/files.json
new file mode 100644
index 0000000..0ec1ffa
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/files.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "headfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ },
+ "footfiles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/index.json b/samples/it_v2/schemas_builder/parts/index.json
new file mode 100644
index 0000000..e7f5731
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/index.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "index": { "type": "integer" }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/interfaces.json b/samples/it_v2/schemas_builder/parts/interfaces.json
new file mode 100644
index 0000000..c142b3c
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/interfaces.json
@@ -0,0 +1,63 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "interfaces": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'WIFI'",
+ "'WAN'",
+ "'VPN'"
+ ]}
+ ]
+ },
+ "ip": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mask": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'255.255.255.0'",
+ "'255.255.0.0'",
+ "'255.0.0.0'"
+ ]}
+ ]
+ },
+ "gw": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/location.json b/samples/it_v2/schemas_builder/parts/location.json
new file mode 100644
index 0000000..1aa74bb
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/location.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "location": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/maintainer.json b/samples/it_v2/schemas_builder/parts/maintainer.json
new file mode 100644
index 0000000..97805d4
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/maintainer.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "maintainer": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/maintenance_backups.json b/samples/it_v2/schemas_builder/parts/maintenance_backups.json
new file mode 100644
index 0000000..fd8bb64
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/maintenance_backups.json
@@ -0,0 +1,86 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "backups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'none'",
+ "'hypervisor'",
+ "'windowsbackup'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "target": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'usb'",
+ "'pbs'",
+ "'share'",
+ "'iscsi'",
+ "'cloud'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/maintenance_updates.json b/samples/it_v2/schemas_builder/parts/maintenance_updates.json
new file mode 100644
index 0000000..dea9a0c
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/maintenance_updates.json
@@ -0,0 +1,72 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "updates": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'os'"
+ ]}
+ ]
+ },
+ "method": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'manual'"
+ ]}
+ ]
+ },
+ "frequency": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'auto'",
+ "'daily'",
+ "'weekly'",
+ "'monthly'",
+ "'quarterly'",
+ "'halfyearly'",
+ "'yearly'",
+ "'monday'",
+ "'tuesday'",
+ "'wednesday'",
+ "'thursday'",
+ "'friday'",
+ "'saturday'",
+ "'sonday'"
+ ]}
+ ]
+ },
+ "time": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'auto'"
+ ]}
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/model.json b/samples/it_v2/schemas_builder/parts/model.json
new file mode 100644
index 0000000..b06b1e5
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/model.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "model": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/name.json b/samples/it_v2/schemas_builder/parts/name.json
new file mode 100644
index 0000000..912151b
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/name.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/netdev_os.json b/samples/it_v2/schemas_builder/parts/netdev_os.json
new file mode 100644
index 0000000..768f8b4
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/netdev_os.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "os": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ {"enum": [
+ "''",
+ "'Linux'",
+ "'Debian'"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/netdev_roles.json b/samples/it_v2/schemas_builder/parts/netdev_roles.json
new file mode 100644
index 0000000..bdf3926
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/netdev_roles.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "roles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'DHCP'",
+ "'DNS'",
+ "'VPN'",
+ "'Firewall'",
+ "'Router'"
+ ]}
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/netdev_type.json b/samples/it_v2/schemas_builder/parts/netdev_type.json
new file mode 100644
index 0000000..d62c8d7
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/netdev_type.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'box'",
+ "'rack'",
+ "'wall'",
+ "'ceiling'"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/printer_type.json b/samples/it_v2/schemas_builder/parts/printer_type.json
new file mode 100644
index 0000000..9ef03c2
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/printer_type.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'printer'",
+ "'mfc'",
+ "'large printer'"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/secrets.json b/samples/it_v2/schemas_builder/parts/secrets.json
new file mode 100644
index 0000000..d1190d4
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/secrets.json
@@ -0,0 +1,67 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "secrets": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "'ad'",
+ "'https'",
+ "'ssh'",
+ "'user'"
+ ]}
+ ]
+ },
+ "user": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "password": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "mfa": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'totp'",
+ "'sms'",
+ "'e-mail'"
+ ]}
+ ]
+ },
+ "value": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/server_os.json b/samples/it_v2/schemas_builder/parts/server_os.json
new file mode 100644
index 0000000..e503025
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/server_os.json
@@ -0,0 +1,28 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "os": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ {"enum": [
+ "''",
+ "'Windows 2000'",
+ "'Windows 2003'",
+ "'Windows 2008'",
+ "'Windows 2008 R2'",
+ "'Windows 2012'",
+ "'Windows 2012 R2'",
+ "'Windows 2016'",
+ "'Windows 2019'",
+ "'Windows 2021'",
+ "'Debian'",
+ "'Debian / Proxmox VE'",
+ "'Debian / Proxmox BS'",
+ "'FreeBSD / OPNSense'",
+ "'FreeBSD / pfSense'"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/server_roles.json b/samples/it_v2/schemas_builder/parts/server_roles.json
new file mode 100644
index 0000000..0d7be1b
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/server_roles.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "roles": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'DHCP'",
+ "'DNS'",
+ "'VPN'",
+ "'Firewall'",
+ "'DC'",
+ "'File Server'",
+ "'Print Server'",
+ "'App Server'",
+ "'Backup Server'",
+ "'Hypervisor'"
+ ]}
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/server_type.json b/samples/it_v2/schemas_builder/parts/server_type.json
new file mode 100644
index 0000000..23d0666
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/server_type.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'mini'",
+ "'rack'",
+ "'tower'",
+ "'vm'"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/software.json b/samples/it_v2/schemas_builder/parts/software.json
new file mode 100644
index 0000000..7ffd968
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/software.json
@@ -0,0 +1,22 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "publisher": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "licenses": {
+ "oneOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/subnet.json b/samples/it_v2/schemas_builder/parts/subnet.json
new file mode 100644
index 0000000..f60030b
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/subnet.json
@@ -0,0 +1,87 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "subnet": {
+ "type": "string",
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.0/24'",
+ "'192.168.1.0/24'"
+ ]}
+ ]
+ },
+ "gw": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.1'",
+ "'192.168.1.1'"
+ ]}
+ ]
+ },
+ "dns": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.1'",
+ "'192.168.1.1'"
+ ]}
+ ]
+ }
+ },
+ "vlans": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "dhcp": {
+ "type": "object",
+ "properties": {
+ "server": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.1'",
+ "'192.168.1.1'"
+ ]}
+ ]
+ },
+ "ranges": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "from": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.20'",
+ "'192.168.1.20'"
+ ]}
+ ]
+ },
+ "to": {
+ "oneOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'192.168.0.99'",
+ "'192.168.1.99'"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/subnet_name.json b/samples/it_v2/schemas_builder/parts/subnet_name.json
new file mode 100644
index 0000000..a1732b3
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/subnet_name.json
@@ -0,0 +1,28 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''",
+ "'LAN'",
+ "'LAN01'",
+ "'LAN02'",
+ "'LAN03'",
+ "'LAN04'",
+ "'LAN06'",
+ "'LAN07'",
+ "'LAN08'",
+ "'LAN09'",
+ "'LAN10'",
+ "'WAN'",
+ "'WIFI'",
+ "'GUEST'",
+ "'DMZ'",
+ "'VPN'"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/templates.json b/samples/it_v2/schemas_builder/parts/templates.json
new file mode 100644
index 0000000..34b8504
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/templates.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "templates": {
+ "type": "object",
+ "properties": {
+ "node": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "items": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/title.json b/samples/it_v2/schemas_builder/parts/title.json
new file mode 100644
index 0000000..37edba7
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/title.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "title": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/toc.json b/samples/it_v2/schemas_builder/parts/toc.json
new file mode 100644
index 0000000..ad08ff2
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/toc.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "toc": { "type": "boolean" }
+ }
+}
diff --git a/samples/it_v2/schemas_builder/parts/todo.json b/samples/it_v2/schemas_builder/parts/todo.json
new file mode 100644
index 0000000..435a71f
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/todo.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "todo": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "anyOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "priority": { "type": "integer" },
+ "duration": {
+ "anyOf": [
+ {"type": "integer"},
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/urls.json b/samples/it_v2/schemas_builder/parts/urls.json
new file mode 100644
index 0000000..cc7ea48
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/urls.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "urls": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "website": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "download": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/voipdev_type.json b/samples/it_v2/schemas_builder/parts/voipdev_type.json
new file mode 100644
index 0000000..08645fa
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/voipdev_type.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "type": {
+ "type": "string",
+ "anyOf": [
+ { "type": "string" },
+ { "enum": [
+ "''",
+ "'phone'",
+ "'antenna'",
+ "'gateway'"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/schemas_builder/parts/wifi.json b/samples/it_v2/schemas_builder/parts/wifi.json
new file mode 100644
index 0000000..bda8be8
--- /dev/null
+++ b/samples/it_v2/schemas_builder/parts/wifi.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "ssid": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ },
+ "key": {
+ "oneOf": [
+ {"type": "string"},
+ {"enum": [
+ "''"
+ ]}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/it_v2/templates/acls.pug b/samples/it_v2/templates/acls.pug
new file mode 100644
index 0000000..c3ffc46
--- /dev/null
+++ b/samples/it_v2/templates/acls.pug
@@ -0,0 +1,15 @@
+div#HEADFILES
+
+each srv in node.items
+ h3=srv.data.name
+ each fld in srv.data.folders
+ div.itemvmargin
+ div=fld.path
+ table
+ each acl in fld.acls
+ tr
+ td=acl.name
+ td=acl.access
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/adadmins.pug b/samples/it_v2/templates/adadmins.pug
new file mode 100644
index 0000000..90d90cf
--- /dev/null
+++ b/samples/it_v2/templates/adadmins.pug
@@ -0,0 +1,13 @@
+div#HEADFILES
+
+table
+ thead
+ th Account
+ th Notes
+ each itm in node.items
+ tr
+ td=itm.data.name
+ td=itm.data.notes
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/backups.pug b/samples/it_v2/templates/backups.pug
new file mode 100644
index 0000000..73244ac
--- /dev/null
+++ b/samples/it_v2/templates/backups.pug
@@ -0,0 +1,46 @@
+div#HEADFILES
+-
+ const backups = []
+ const readNode = (curNode) => {
+ if(curNode?.data?.backups?.length > 0) {
+ const nodeItem = {
+ name: curNode.data.name,
+ backups: curNode.data.backups,
+ }
+ backups.push(nodeItem)
+ }
+ curNode.items.forEach((itm) => {
+ if(itm?.data?.backups?.length > 0) {
+ const nodeItem = {
+ name: itm.data.name,
+ url: curNode.url + '?itm=' + itm.name,
+ backups: itm.data.backups,
+ }
+ backups.push(nodeItem)
+ }
+ })
+ curNode.nodes.forEach((childNode) => {
+ readNode(childNode)
+ })
+ }
+ readNode(doc)
+
+table
+ thead
+ th Devices
+ th Types
+ th Content
+ th Frequency
+ th Time
+ th Duration
+ th Target
+ each itm in backups
+ each backup in itm.backups
+ tr
+ td
+ a(href=itm.url)=itm.name
+ each key in Object.keys(backup)
+ td=backup[key]
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/cloudadmins.pug b/samples/it_v2/templates/cloudadmins.pug
new file mode 100644
index 0000000..90d90cf
--- /dev/null
+++ b/samples/it_v2/templates/cloudadmins.pug
@@ -0,0 +1,13 @@
+div#HEADFILES
+
+table
+ thead
+ th Account
+ th Notes
+ each itm in node.items
+ tr
+ td=itm.data.name
+ td=itm.data.notes
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/computers.pug b/samples/it_v2/templates/computers.pug
new file mode 100644
index 0000000..164f900
--- /dev/null
+++ b/samples/it_v2/templates/computers.pug
@@ -0,0 +1,23 @@
+div#HEADFILES
+table
+ thead
+ th Name
+ th OS
+ th IPs
+ th Emplacement
+ each computer in node.items
+ tr
+ td
+ a(href=computer.url)=computer.data.name
+ if (computer.data.os.substr(0,1) == '!')
+ td.alert=computer.data.os
+ else
+ td=computer.data.os
+ td
+ if computer.data.interfaces
+ each interface in computer.data.interfaces
+ if interface.ip
+ div=interface.ip
+ td=computer.data.location
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/dfs.pug b/samples/it_v2/templates/dfs.pug
new file mode 100644
index 0000000..557379a
--- /dev/null
+++ b/samples/it_v2/templates/dfs.pug
@@ -0,0 +1,34 @@
+div#HEADFILES
+
+each itm in node.items
+ table.itemvmargin
+ tr
+ td.bold Name
+ td.bold=itm.data.name
+ tr
+ td Path
+ td=itm.data.path
+ tr
+ td Targets
+ td
+ if (itm.data.targets)
+ each target in itm.data.targets
+ div=target
+ if (itm.data.folders)
+ tr
+ td Folders
+ td
+ table
+ thead
+ th Name
+ th Targets
+ each fld in itm.data.folders
+ tr
+ td=fld.name
+ td
+ if (fld.targets)
+ each target in fld.targets
+ div=target
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/domains.pug b/samples/it_v2/templates/domains.pug
new file mode 100644
index 0000000..0274b21
--- /dev/null
+++ b/samples/it_v2/templates/domains.pug
@@ -0,0 +1,28 @@
+div#HEADFILES
+
+table
+ thead
+ th Name
+ th DC
+ th FSMO
+ th Members
+ each itm in node.items
+ tr
+ td=itm.name
+ td
+ if (itm.data)
+ each dc in itm.data.dc
+ div
+ a(href="/devices/servers?itm="+dc.name)=dc.name
+ td
+ if (itm.data)
+ each dc in itm.data.dc
+ div=dc.fsmo
+ td
+ if (itm.data)
+ each srv in itm.data.servers
+ div
+ a(href="/devices/servers?itm="+srv.name)=srv.name
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/ipam.pug b/samples/it_v2/templates/ipam.pug
new file mode 100644
index 0000000..9abf2b3
--- /dev/null
+++ b/samples/it_v2/templates/ipam.pug
@@ -0,0 +1,72 @@
+div#HEADFILES
+-
+ let dhcpRanges = []
+ node.parent.getNode('subnets').items.forEach((itm) => {
+ itm?.data?.dhcp?.ranges?.forEach((rng) => {
+ dhcpRanges.push({
+ from: rng.from,
+ to: rng.to,
+ server: itm.data.dhcp.server,
+ name: itm.data.name,
+ })
+ })
+ })
+ dhcpRanges = dhcpRanges.sort((a,b)=>{return compareIP(a.from, b.from)})
+ let ipNodes = []
+ node.parent.parent.getNode('devices')?.nodes?.forEach((nd) => {
+ nd.items.forEach((itm) => {
+ if(itm.data.interfaces) {
+ itm.data.interfaces.forEach((nic) => {
+ if(nic.ip) ipNodes.push({
+ ip: nic.ip,
+ node: nd,
+ item: itm,
+ })
+ })
+ }
+ })
+ })
+ ipNodes = ipNodes.sort((a,b)=>{return compareIP(a.ip, b.ip)})
+if dhcpRanges.length > 0
+ h3 DHCP ranges
+ table
+ thead
+ th Subnet
+ th Server
+ th From
+ th To
+ each rng in dhcpRanges
+ tr
+ td=rng.name
+ td=rng.server
+ td=rng.from
+ td=rng.to
+if ipNodes.length > 0
+ h3 Static IPs
+ table
+ thead
+ th IP
+ th Name
+ th Model
+ th OS
+ each nd in ipNodes
+ tr
+ td=nd.ip
+ td
+ a(href=nd.item.url)=nd.item.data.name
+ if (nd.item.data.model)
+ if (nd.item.data.model.substr(0,1) == '!')
+ td.alert=nd.item.data.model
+ else
+ td=nd.item.data.model
+ else
+ td
+ if (nd.item.data.os)
+ if (nd.item.data.os.substr(0,1) == '!')
+ td.alert=nd.item.data.os
+ else
+ td=nd.item.data.os
+ else
+ td
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/maintenances.pug b/samples/it_v2/templates/maintenances.pug
new file mode 100644
index 0000000..a969230
--- /dev/null
+++ b/samples/it_v2/templates/maintenances.pug
@@ -0,0 +1,56 @@
+div#HEADFILES
+-
+ const maintenances = []
+ let fulltime = 0
+ const readNode = (curNode) => {
+ if(curNode?.data?.maintenances?.length > 0) {
+ const nodeItem = {
+ name: curNode.data.name,
+ maintenances: curNode.data.maintenances,
+ }
+ maintenances.push(nodeItem)
+ }
+ curNode.items.forEach((itm) => {
+ if(itm?.data?.maintenances?.length > 0) {
+ const nodeItem = {
+ name: itm.data.name,
+ maintenances: itm.data.maintenances,
+ }
+ nodeItem?.maintenances?.forEach((maintenance) => {
+ if(maintenance.yearlytime) fulltime += maintenance.yearlytime
+ })
+ maintenances.push(nodeItem)
+ }
+ })
+ curNode.nodes.forEach((childNode) => {
+ readNode(childNode)
+ })
+ }
+ readNode(doc)
+table
+ each itm in maintenances
+ tr
+ td=itm.name
+ td
+ table
+ thead
+ th Type
+ th Frequency
+ th Yearly time
+ th Todo
+ each maintenance in itm.maintenances
+ tr
+ td=maintenance.type
+ td=maintenance.frequency
+ if typeof maintenance.yearlytime === 'number'
+ td=maintenance.yearlytime + ' min'
+ else
+ td
+ td=maintenance.action
+table
+ tr
+ td Yearly time :
+ td=((fulltime / 60) + '').split('.')[0] + ' hour'
+ td=((fulltime / 60) + '').split('.')[0] * 130 + ':' + ((fulltime / 60) + '').split('.')[0] * 100 + ' / Years'
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/ms365admins.pug b/samples/it_v2/templates/ms365admins.pug
new file mode 100644
index 0000000..90d90cf
--- /dev/null
+++ b/samples/it_v2/templates/ms365admins.pug
@@ -0,0 +1,13 @@
+div#HEADFILES
+
+table
+ thead
+ th Account
+ th Notes
+ each itm in node.items
+ tr
+ td=itm.data.name
+ td=itm.data.notes
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/ms365sharepoint.pug b/samples/it_v2/templates/ms365sharepoint.pug
new file mode 100644
index 0000000..712b814
--- /dev/null
+++ b/samples/it_v2/templates/ms365sharepoint.pug
@@ -0,0 +1,11 @@
+div#HEADFILES
+
+each itm in node.items
+ table
+ tr
+ td.bold=itm.data.name
+ tr
+ td=itm.data.url
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/ms365users.pug b/samples/it_v2/templates/ms365users.pug
new file mode 100644
index 0000000..1d5f3a3
--- /dev/null
+++ b/samples/it_v2/templates/ms365users.pug
@@ -0,0 +1,17 @@
+div#HEADFILES
+
+table
+ thead
+ th Name
+ th E-Mail
+ th Password
+ th License
+ each itm in node.items
+ tr
+ td=itm.data.name
+ td=itm.data.email
+ td=itm.data.password
+ td=itm.data.license
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/netdevs.pug b/samples/it_v2/templates/netdevs.pug
new file mode 100644
index 0000000..cf72bce
--- /dev/null
+++ b/samples/it_v2/templates/netdevs.pug
@@ -0,0 +1,20 @@
+div#HEADFILES
+table
+ thead
+ th Name
+ th Model
+ th IPs
+ th Location
+ each netdev in node.items
+ tr
+ td
+ a(href=netdev.url)=netdev.data.name
+ td=netdev.data.model
+ td
+ if netdev.data.interfaces
+ each interface in netdev.data.interfaces
+ if interface.ip
+ div=interface.ip
+ td=netdev.data.location
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/printers.pug b/samples/it_v2/templates/printers.pug
new file mode 100644
index 0000000..aca9393
--- /dev/null
+++ b/samples/it_v2/templates/printers.pug
@@ -0,0 +1,22 @@
+div#HEADFILES
+table
+ thead
+ th Name
+ th Type
+ th Model
+ th IPs
+ th Location
+ each printer in node.items
+ tr
+ td
+ a(href=printer.url)=printer.data.name
+ td=printer.data.type
+ td=printer.data.model
+ td
+ if printer.data.interfaces
+ each interface in printer.data.interfaces
+ if interface.ip
+ div=interface.ip
+ td=printer.data.location
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/ran.pug b/samples/it_v2/templates/ran.pug
new file mode 100644
index 0000000..6638f46
--- /dev/null
+++ b/samples/it_v2/templates/ran.pug
@@ -0,0 +1,16 @@
+div#HEADFILES
+table
+ thead
+ th Name
+ th Type
+ th Model
+ th Location
+ each ran in node.items
+ tr
+ td
+ a(href=ran.url)=ran.data.name
+ td=ran.data.type
+ td=ran.data.model
+ td=ran.data.location
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/secrets.pug b/samples/it_v2/templates/secrets.pug
new file mode 100644
index 0000000..1944567
--- /dev/null
+++ b/samples/it_v2/templates/secrets.pug
@@ -0,0 +1,31 @@
+div#HEADFILES
+table
+ tr
+ th
+ th Type
+ th User
+ th Password
+ each item in node.items
+ - var i=0
+ each secret in item.data.secrets
+ tr
+ if i == 0
+ td(style='font-weight:bold')=item.data.name
+ else
+ td
+ if secret.port
+ td=secret.type+' ('+secret.port+')'
+ else
+ td=secret.type
+ td=secret.user
+ td=secret.password
+ if secret.mfa
+ each mfa in secret.mfa
+ tr
+ td
+ td mfa (#{mfa.type})
+ td(colspan=2)=mfa.value
+
+ - i+=1
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/servers.pug b/samples/it_v2/templates/servers.pug
new file mode 100644
index 0000000..9224a61
--- /dev/null
+++ b/samples/it_v2/templates/servers.pug
@@ -0,0 +1,28 @@
+div#HEADFILES
+table
+ thead
+ th Name
+ th Roles
+ th OS
+ th IPs
+ th Location
+ each server in node.items
+ tr
+ td
+ a(href=server.url)=server.data.name
+ td
+ if server.data.roles
+ each role in server.data.roles
+ div=role
+ if (server.data.os.substr(0,1) == '!')
+ td.alert=server.data.os
+ else
+ td=server.data.os
+ td
+ if server.data.interfaces
+ each interface in server.data.interfaces
+ if interface.ip
+ div=interface.ip
+ td=server.data.location
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/shares.pug b/samples/it_v2/templates/shares.pug
new file mode 100644
index 0000000..28d1b6e
--- /dev/null
+++ b/samples/it_v2/templates/shares.pug
@@ -0,0 +1,17 @@
+div#HEADFILES
+
+each srv in node.items
+ h3=srv.data.name
+ h4 Folders
+ table
+ each fileshare in srv.data.fileshares
+ tr
+ td=fileshare.path
+ h4 Printers
+ table
+ each printshare in srv.data.printshares
+ tr
+ td=printshare.path
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/softwares.pug b/samples/it_v2/templates/softwares.pug
new file mode 100644
index 0000000..e60d454
--- /dev/null
+++ b/samples/it_v2/templates/softwares.pug
@@ -0,0 +1,14 @@
+div#HEADFILES
+table
+ thead
+ th Name
+ th Publisher
+ th Licenses
+ each software in node.items
+ tr
+ td
+ a(href=software.url)=software.data.name
+ td=software.data.publisher
+ td=software.data.licenses
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/subnets.pug b/samples/it_v2/templates/subnets.pug
new file mode 100644
index 0000000..b3f22e3
--- /dev/null
+++ b/samples/it_v2/templates/subnets.pug
@@ -0,0 +1,25 @@
+div#HEADFILES
+table
+ thead
+ th Name
+ th Subnet
+ th Gateway
+ th DNS
+ th VLANS
+ each subnet in node.items
+ tr
+ td=subnet.data.name
+ td=subnet.data.subnet
+ td=subnet.data.gw
+ td
+ if subnet.data.dns
+ each dns in subnet.data.dns
+ div=dns
+ td
+ if subnet.data.vlans
+ -var array = []
+ each vlan in subnet.data.vlans
+ -array.push(vlan)
+ div=array
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/todos.pug b/samples/it_v2/templates/todos.pug
new file mode 100644
index 0000000..413cedd
--- /dev/null
+++ b/samples/it_v2/templates/todos.pug
@@ -0,0 +1,59 @@
+div#HEADFILES
+-
+ let todos = []
+ const readNode = (curNode) => {
+ if(curNode?.todo?.length > 0) {
+ curNode.todo.forEach((itm) => {
+ const nodeItem = {
+ name: curNode.name,
+ url: curNode.url,
+ todo: itm,
+ }
+ todos.push(nodeItem)
+ })
+ }
+
+ curNode.items.forEach((itm) => {
+ if(itm?.data?.todo?.length > 0) {
+ itm.data.todo.forEach((todo) => {
+ const nodeItem = {
+ name: itm.data.name,
+ url: curNode.url + '?itm=' + itm.name,
+ todo: todo,
+ }
+ todos.push(nodeItem)
+ })
+ }
+ })
+
+ curNode.nodes.forEach((childNode) => {
+ readNode(childNode)
+ })
+ }
+
+ readNode(doc)
+ todos = todos.sort((x, y) => {
+ return (y.todo.priority - x.todo.priority)
+ })
+
+table
+ thead
+ th Priority
+ th Object
+ th Message
+ each itm in todos
+ if itm.todo.priority >= 10
+ tr.alert
+ td=itm.todo.priority
+ td
+ a.alert(href=itm.url)=itm.name
+ td=itm.todo.msg
+ else
+ tr
+ td=itm.todo.priority
+ td
+ a(href=itm.url)=itm.name
+ td=itm.todo.msg
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/updates.pug b/samples/it_v2/templates/updates.pug
new file mode 100644
index 0000000..0797cc3
--- /dev/null
+++ b/samples/it_v2/templates/updates.pug
@@ -0,0 +1,45 @@
+div#HEADFILES
+-
+ const updates = []
+ const readNode = (curNode) => {
+ if(curNode?.data?.updates?.length > 0) {
+ const nodeItem = {
+ name: curNode.data.name,
+ updates: curNode.data.updates,
+ }
+ updates.push(nodeItem)
+ }
+ curNode.items.forEach((itm) => {
+ if(itm?.data?.updates?.length > 0) {
+ const nodeItem = {
+ name: itm.data.name,
+ url: curNode.url + '?itm=' + itm.name,
+ updates: itm.data.updates,
+ }
+ updates.push(nodeItem)
+ }
+ })
+ curNode.nodes.forEach((childNode) => {
+ readNode(childNode)
+ })
+ }
+ readNode(doc)
+
+table
+ thead
+ th Devices
+ th Types
+ th Method
+ th Frequency
+ th Time
+ th Duration
+ each itm in updates
+ each update in itm.updates
+ tr
+ td
+ a(href=itm.url)=itm.name
+ each key in Object.keys(update)
+ td=update[key]
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/usergroups.pug b/samples/it_v2/templates/usergroups.pug
new file mode 100644
index 0000000..da54ee3
--- /dev/null
+++ b/samples/it_v2/templates/usergroups.pug
@@ -0,0 +1,11 @@
+div#HEADFILES
+
+each dom in node.items
+ h3=dom.data.name
+ table
+ each usergroup in dom.data.usergroups
+ tr
+ td=usergroup.name
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/webdomains.pug b/samples/it_v2/templates/webdomains.pug
new file mode 100644
index 0000000..b4f186b
--- /dev/null
+++ b/samples/it_v2/templates/webdomains.pug
@@ -0,0 +1,18 @@
+div#HEADFILES
+
+table
+ thead
+ th Name
+ th Notes
+ each itm in node.items
+ tr
+ td=itm.data.name
+ td=itm.data.notes
+ if itm.data.aliases
+ each alias in itm.data.aliases
+ tr
+ td=alias.name
+ td=alias.notes
+
+div#FILES
+div#FOOTFILES
diff --git a/samples/it_v2/templates/wifis.pug b/samples/it_v2/templates/wifis.pug
new file mode 100644
index 0000000..6547170
--- /dev/null
+++ b/samples/it_v2/templates/wifis.pug
@@ -0,0 +1,13 @@
+div#HEADFILES
+table
+ thead
+ th Subnet
+ th SSID
+ th Key
+ each wifi in node.items
+ tr
+ td=wifi.data.name
+ td=wifi.data.ssid
+ td=wifi.data.key
+div#FILES
+div#FOOTFILES
diff --git a/src/core/jsondoc.js b/src/core/jsondoc.js
index 2fab9f9..96779a2 100644
--- a/src/core/jsondoc.js
+++ b/src/core/jsondoc.js
@@ -17,6 +17,7 @@ const load = (yamlFile) => {
},
},
root: {
+ todo: [],
name: '',
title: '',
toc: false,
@@ -55,6 +56,7 @@ const load = (yamlFile) => {
const nodePathParts = nodePath.split(path.sep)
const nodeName = (parentNode)?nodePathParts[nodePathParts.length - 1]:'root'
const node = {
+ todo: [],
index: 100,
name: nodeName,
title: nodeName,
@@ -78,6 +80,7 @@ const load = (yamlFile) => {
const yamlNode = YAML.parse(fs.readFileSync(path.join(nodePath, '_index.yaml'), 'utf8'))
if(yamlNode) {
+ if(yamlNode.todo) node.todo = yamlNode.todo
if(yamlNode.index) node.index = yamlNode.index
if(yamlNode.title) node.title = yamlNode.title
if(yamlNode.toc == false) node.toc = yamlNode.toc