\set ON_ERROR_STOP true
-- OOTB inventory variables 3.6.0
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Architecture', 'Hardware', '1', 'string', NULL),
('BIOS vendor', 'Hardware', '1', 'string', NULL),
('BIOS version', 'Hardware', '1', 'string', NULL),
('CPU logical cores', 'Hardware', '1', 'int', NULL),
('CPU model', 'Hardware', '1', 'string', NULL),
('Memory size (MB)', 'Hardware', '1', 'real', NULL),
('System serial number', 'Hardware', '1', 'string', NULL),
('System manufacturer', 'Hardware', '1', 'string', NULL),
('System version', 'Hardware', '1', 'string', NULL),

('Disk free (%)', 'Software', '1', 'real', NULL),
('OS type', 'Software', '1', 'string', NULL),
('OS', 'Software', '1', 'string', NULL),
('OS kernel', 'Software', '1', 'string', NULL),
('CFEngine ID', 'Software', '1', 'string', NULL),
('CFEngine roles', 'Software', '1', 'string', NULL),
('CFEngine version', 'Software', '1', 'string', NULL),
('Uptime minutes', 'Software', '1', 'int', NULL),

('Interfaces', 'Network', '1', 'slist', 'cf_clearSlist'),
('IPv4 addresses', 'Network', '1', 'slist', 'cf_clearSlist'),
('MAC addresses', 'Network', '1', 'slist', 'cf_clearSlist'),
('Ports listening', 'Network', '1', 'slist', 'cf_clearSlist')
 ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.6.2
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Solaris zone', 'Software', '1', 'string', NULL),
('Windows roles', 'Software', '1', 'string', NULL)
 ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.7.0
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('CPU physical cores', 'Hardware', '1', 'int', NULL),
('CPU sockets', 'Hardware', '1', 'int', NULL)
 ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.7.4
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('System product name', 'Hardware', '1', 'string', NULL)
 ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.10.1
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Virtual host', 'Hardware', '1', 'string', NULL)
 ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.11.0
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Highest Service Pack', 'Software', '1', 'string', NULL),
('Highest Technology Level', 'Software', '1', 'string', NULL),
('Host name', 'Network', '1', 'string', NULL)
 ON CONFLICT DO NOTHING;

--- OOTB inventory attributes for 3.12.0
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Policy Release Id', 'Software', '1', 'string', NULL)
ON CONFLICT DO NOTHING;

--- OOTB inventory attributes for 3.12.1, 3.10.5
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('HA master IP', 'Network', '1', 'slist', 'cf_clearSlist'),
('HA node state', 'Network', '1', 'string', NULL),
('HA node state extended', 'Network', '1', 'string', NULL)
ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.13.0, 3.12.1, 3.10.5
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Physical memory (MB)', 'Hardware', '1', 'int', NULL),
('System UUID', 'Hardware', '1', 'string', NULL),
('EC2 Region', 'Hardware', '1', 'string', NULL),
('EC2 Instance Type', 'Hardware', '1', 'string', NULL),
('EC2 Instance ID', 'Hardware', '1', 'string', NULL),
('EC2 Image ID', 'Hardware', '1', 'string', NULL),
('EC2 Availability Zone', 'Hardware', '1', 'string', NULL)
ON CONFLICT DO NOTHING;

  -- OOTB inventory variables 3.13.0
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Setuid files', 'Security', '1', 'string', NULL),
('Root owned setuid files', 'Security', '1', 'string', NULL)
ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.16.0, 3.15.1
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('CFEngine Enterprise license file', 'Software', '1', 'string', NULL),
('CFEngine Enterprise license utilization', 'Software', '1', 'int', NULL),
('CFEngine Enterprise license expiration date', 'Software', '1', 'string', NULL),
('CFEngine Enterprise licenses allocated', 'Software', '1', 'int', NULL),
('CFEngine Enterprise license status', 'Software', '1', 'string', NULL),
('CFEngine Enterprise license owner', 'Software', '1', 'string', NULL)
ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.17.0
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Policy Servers', 'Software', '1', 'slist', NULL),
('Primary Policy Server', 'Software', '1', 'string', NULL),
('Timezone', 'Software', '1', 'string', NULL),
('Timezone GMT Offset', 'Software', '1', 'string', NULL)
ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.18.0
-- New inventory attributes
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('Allowed users for cf-runagent', 'Software', '1', 'slist', 'cf_clearSlist'),
('Allowed hosts for cf-runagent', 'Software', '1', 'slist', 'cf_clearSlist'),
  -- 'Kernel' was previously referred to as 'OS type'
('Kernel', 'Software', '1', 'string', NULL),
  -- 'Kernel Release' was previously referred to as 'OS kernel'
('Kernel Release', 'Software', '1', 'string', NULL),
  -- ENT-6793 Setgid files
('Setgid files', 'Security', '1', 'string', NULL),
('Root owned setgid files', 'Security', '1', 'string', NULL)
ON CONFLICT DO NOTHING;

-- OOTB inventory variables 3.22.0, 3.21.2, 3.18.5
-- New inventory attributes
INSERT INTO "variables_dictionary" ("attribute_name", "category", "readonly", "type", "convert_function") VALUES
('CFEngine policy version', 'Software', '1', 'string', NULL),
('Mount point', 'Software', '1', 'slist', 'cf_clearSlist'),
('File system', 'Software', '1', 'slist', 'cf_clearSlist')
ON CONFLICT DO NOTHING;
