/usr/sbin/generate-fusioninventory-schema is in argonaut-fusioninventory 0.9.2-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | #!/usr/bin/perl -w
#######################################################################
#
# generate-fusioninventory-schema
#
# grab data from fusioniventory and create a proper ldap schema
#
# Copyright (C) 2013-2015 FusionDirectory project
#
# Authors: Côme BERNIGAUD
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
#######################################################################
# This is taken from Agent/Inventory.pm
my %fields = (
ANTIVIRUS => [ qw/COMPANY NAME GUID ENABLED UPTODATE VERSION/ ],
BATTERIES => [ qw/CAPACITY CHEMISTRY DATE NAME SERIAL MANUFACTURER
VOLTAGE/ ],
CONTROLLERS => [ qw/CAPTION DRIVER NAME MANUFACTURER PCICLASS VENDORID
PRODUCTID PCISUBSYSTEMID PCISLOT TYPE REV/ ],
CPUS => [ qw/CACHE CORE DESCRIPTION MANUFACTURER NAME THREAD SERIAL
STEPPING FAMILYNAME FAMILYNUMBER MODEL SPEED ID EXTERNAL_CLOCK ARCH/ ],
DRIVES => [ qw/CREATEDATE DESCRIPTION FREE FILESYSTEM LABEL LETTER
SERIAL SYSTEMDRIVE TOTAL TYPE VOLUMN/ ],
ENVS => [ qw/KEY VAL/ ],
INPUTS => [ qw/NAME MANUFACTURER CAPTION DESCRIPTION INTERFACE LAYOUT
POINTINGTYPE TYPE/ ],
MEMORIES => [qw/CAPACITY CAPTION FORMFACTOR REMOVABLE PURPOSE SPEED
SERIALNUMBER TYPE DESCRIPTION NUMSLOTS MEMORYCORRECTION
MANUFACTURER/ ],
MODEMS => [ qw/DESCRIPTION NAME/ ],
MONITORS => [ qw/BASE64 CAPTION DESCRIPTION MANUFACTURER SERIAL
UUENCODE/ ],
NETWORKS => [ qw/BSSID DESCRIPTION DRIVER FIRMWARE IPADDRESS IPADDRESS6
IPDHCP IPGATEWAY IPMASK IPMASK6 IPSUBNET IPSUBNET6
MANAGEMENT MANUFACTURER MACADDR MODEL MTU PCISLOT
PNPDEVICEID STATUS SLAVES SPEED SSID TYPE VIRTUALDEV
WWN/ ],
PORTS => [ qw/CAPTION DESCRIPTION NAME TYPE/ ],
PROCESSES => [ qw/USER PID CPUUSAGE MEM VIRTUALMEMORY TTY STARTED CMD/ ],
REGISTRY => [ qw/NAME REGVALUE HIVE/ ],
RUDDER => [ qw/AGENT UUID HOSTNAME/ ],
SLOTS => [ qw/DESCRIPTION DESIGNATION NAME STATUS/ ],
SOFTWARES => [ qw/COMMENTS FILESIZE FOLDER FROM HELPLINK INSTALLDATE NAME
NO_REMOVE RELEASE_TYPE PUBLISHER UNINSTALL_STRING
URL_INFO_ABOUT VERSION VERSION_MINOR VERSION_MAJOR
GUID ARCH USERNAME USERID/ ],
SOUNDS => [ qw/CAPTION DESCRIPTION MANUFACTURER NAME/ ],
STORAGES => [ qw/DESCRIPTION DISKSIZE INTERFACE MANUFACTURER MODEL NAME
TYPE SERIAL SERIALNUMBER FIRMWARE SCSI_COID SCSI_CHID
SCSI_UNID SCSI_LUN WWN/ ],
VIDEOS => [ qw/CHIPSET MEMORY NAME RESOLUTION PCISLOT/ ],
USBDEVICES => [ qw/VENDORID PRODUCTID MANUFACTURER CAPTION SERIAL CLASS
SUBCLASS NAME/ ],
USERS => [ qw/LOGIN DOMAIN/ ],
LOCAL_USERS => [ qw/LOGIN ID NAME HOME SHELL/ ],
LOCAL_GROUPS => [ qw/NAME ID MEMBER/ ],
PRINTERS => [ qw/COMMENT DESCRIPTION DRIVER NAME NETWORK PORT RESOLUTION
SHARED STATUS ERRSTATUS SERVERNAME SHARENAME
PRINTPROCESSOR SERIAL/ ],
BIOS => [ qw/SMODEL SMANUFACTURER SSN BDATE BVERSION
BMANUFACTURER MMANUFACTURER MSN MMODEL ASSETTAG
ENCLOSURESERIAL BIOSSERIAL
TYPE SKUNUMBER/ ],
HARDWARE => [ qw/USERID OSVERSION PROCESSORN OSCOMMENTS CHECKSUM
PROCESSORT NAME PROCESSORS SWAP ETIME TYPE OSNAME
IPADDR WORKGROUP DESCRIPTION MEMORY UUID VMID DNS
LASTLOGGEDUSER USERDOMAIN DATELASTLOGGEDUSER
DEFAULTGATEWAY VMSYSTEM WINOWNER WINPRODID
WINPRODKEY WINCOMPANY WINLANG CHASSIS_TYPE VMID
VMNAME VMHOSTSERIAL/ ],
OPERATINGSYSTEM => [ qw/KERNEL_NAME KERNEL_VERSION NAME VERSION FULL_NAME
SERVICE_PACK INSTALL_DATE FQDN DNS_DOMAIN
SSH_KEY ARCH BOOT_TIME/ ],
ACCESSLOG => [ qw/USERID LOGDATE/ ],
VIRTUALMACHINES => [ qw/MEMORY NAME UUID STATUS SUBSYSTEM VMTYPE VCPU
VMID MAC COMMENT OWNER SERIAL/ ],
LOGICAL_VOLUMES => [ qw/LV_NAME VGN_AME ATTR SIZE LV_UUID SEG_COUNT
VG_UUID/ ],
PHYSICAL_VOLUMES => [ qw/DEVICE PV_PE_COUNT PV_UUID FORMAT ATTR
SIZE FREE PE_SIZE VG_UUID/ ],
VOLUME_GROUPS => [ qw/VG_NAME PV_COUNT LV_COUNT ATTR SIZE FREE VG_UUID
VG_EXTENT_SIZE/ ],
LICENSEINFOS => [ qw/NAME FULLNAME KEY COMPONENTS TRIAL UPDATE OEM ACTIVATION_DATE PRODUCTID/ ]
);
my %fields2;
while (my ($a, $b) = each(%fields)) {
foreach my $c (@$b) {
$c =~ s/_//g;
}
@fields2{@$b} = ();
}
print "##\n## inventory-fd.schema - Needed by Fusion Directory for managing inventories\n##\n";
print "\n# Attributes\n";
my $i = 1;
for my $f (keys(%fields2)) {
print "attributetype ( 1.3.6.1.4.1.38414.39.1.$i NAME 'fdInventory$f'
DESC 'FusionDirectory - inventory, $f'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )\n\n";
$i++;
}
print "\n# Object classes\n";
print "objectclass ( 1.3.6.1.4.1.38414.39.2.1 NAME 'fdInventoryContent'
DESC 'FusionDirectory inventory information'
MUST ( cn )
MAY ( macAddress ) )\n\n";
$i = 2;
while (my ($a, $b) = each(%fields)) {
$a =~ s/_//g;
print "objectclass ( 1.3.6.1.4.1.38414.39.2.$i NAME 'fdInventory$a'
DESC 'FusionDirectory inventory information - $a'
MUST ( cn )
MAY ( ";
foreach my $c (@$b) {
$c =~ s/_//g;
$c = "fdInventory$c";
}
print join(' $ ',@$b);
print " ) )\n\n";
$i++;
}
|