#!/usr/bin/perl

use strict;
use Carp;

use lib ("/opt/rt3/lib", "/opt/rt3/local/lib");

use RTLoad;

my @Types = qw( Unix Windows Network Storage Telecom Printers Mainframe Misc );

my %CFs = (
       physmem => { Description => "Physical Memory",
                       Types => [ qw( Unix Windows Network Telecom ) ],
                       Type => 'FreeformSingle',
                       },
       procs => { Description => "Processors",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       mhz => { Description => "Processor Speed (MHz)",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       nics => { Description => "NIC Info.",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       nic_load_type => { Description => "NIC Load Type",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ qw( none N/A TLB NFT SA ) ],
                       },
       disk => { Description => "Disk",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       lease_end => { Description => "Lease End",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
       os => { Description => "OS",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
       serial_num => { Description => "Serial Number",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformMultiple',
                       },
       asset_tags => { Description => "Asset Tags",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformMultiple',
                       },
       size => { Description => "Size",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ qw( none small medium large virtual ) ],
                       },
       warranty_end => { Description => "Warranty End",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
       patch_panel_port => { Description => "Patch Panel Port",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
       service_pack => { Description => "Service Pack",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       clustered => { Description => "Clustered",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ ( '', 'yes', 'no' ) ],
                       },
       hba_cards => { Description => "HBA Card Info.",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       controller_type => { Description => "Controller Type",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       rack_location => { Description => "Rack Location",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       delivery_date => { Description => "System Delivery Date",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       service_contract_num => { Description => "Service Contract Number",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       service_level => { Description => "Service Level",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       service_exp_date => { Description => "Service Expiration Date",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       disk_management => { Description => "Disk Management",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'FreeformSingle',
                       },
       dr_recovery => { Description => "DR Recovery Time",
                       Types => [ qw( Unix Windows Network ) ],
                       Type => 'SelectSingle',
                       Values => [ ( 'not covered by DR', 'less than 48 hours', 'more than 48 hours' ) ],
                       },
       dr_steps => { Description => "DR Recovery Steps",
                       Types => [ qw( Unix Windows Network) ],
                       Type => 'TextSingle',
                       },
       vendor => { Description => "Vendor",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
       supported_by_project => { Description => "Supported By Project",
                       Types => [ qw( Unix Windows Network ) ],
                       Type => 'FreeformSingle',
                       },
       san => { Description => "SAN",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ ( '', 'none', 'EMC', 'Clarion', 'Symmetrix' ) ],
                       },
       company => { Description => "Company",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'SelectSingle',
                       Values => [ ( '', 'VW', 'Audi', 'gedas', 'Inacomp', 'enterprise', 'Cosworth' ) ],
                       },
       tape_library => { Description => "Tape Library",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ ( '', 'no', 'yes' ) ],
                       },
       virtual => { Description => "Virtual",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ ( '', 'none', 'host', 'session' ) ],
                       },
       tsm => { Description => "TSM",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ ( '', 'none', 'Yes', 'No' ) ],
                       },
       tivoli => { Description => "Tivoli Monitoring",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'SelectSingle',
                       Values => [ ( '', 'none', 'yes', 'no' ) ],
                       },
       location => { Description => "Location",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
       model => { Description => "Model",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
       applications => { Description => "Applications",
                       Types => [ qw( Unix Windows ) ],
                       Type => 'TextSingle',
                       },
       notes => { Description => "Notes",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'TextSingle',
                       },
       owner => { Description => "Owner",
                       Types => [ qw( Unix Windows Network Storage Telecom Printers Mainframe Misc ) ],
                       Type => 'FreeformSingle',
                       },
);

my $priv = RT::Group->new( $RT::SystemUser );
$priv->LoadSystemInternalGroup('Privileged'); 

RTLoad::LoadTypes(\@Types, [$priv]);
RTLoad::LoadCFs(\%CFs, [$priv]);
