const createHostInventory = (id: number, memory: number, diskSpace: number = 0) => {
  const hostSeqId = id * 10; // To differentiate disks of each hosts
  return {
    bmc_address: '0.0.0.0',
    bmc_v6address: '::/0',
    boot: {
      current_boot_mode: 'bios',
    },
    cpu: {
      architecture: 'x86_64',
      count: 4,
      flags: [
        'fpu',
        'vme',
        'de',
        'pse',
        'tsc',
        'msr',
        'pae',
        'mce',
        'cx8',
        'apic',
        'sep',
        'mtrr',
        'pge',
        'mca',
        'cmov',
        'pat',
        'pse36',
        'clflush',
        'mmx',
        'fxsr',
        'sse',
        'sse2',
        'ss',
        'syscall',
        'nx',
        'pdpe1gb',
        'rdtscp',
        'lm',
        'constant_tsc',
        'rep_good',
        'nopl',
        'xtopology',
        'cpuid',
        'tsc_known_freq',
        'pni',
        'pclmulqdq',
        'vmx',
        'ssse3',
        'fma',
        'cx16',
        'pcid',
        'sse4_1',
        'sse4_2',
        'x2apic',
        'movbe',
        'popcnt',
        'tsc_deadline_timer',
        'aes',
        'xsave',
        'avx',
        'f16c',
        'rdrand',
        'hypervisor',
        'lahf_lm',
        'abm',
        '3dnowprefetch',
        'cpuid_fault',
        'invpcid_single',
        'pti',
        'ssbd',
        'ibrs',
        'ibpb',
        'stibp',
        'tpr_shadow',
        'vnmi',
        'flexpriority',
        'ept',
        'vpid',
        'ept_ad',
        'fsgsbase',
        'tsc_adjust',
        'bmi1',
        'hle',
        'avx2',
        'smep',
        'bmi2',
        'erms',
        'invpcid',
        'rtm',
        'rdseed',
        'adx',
        'smap',
        'clflushopt',
        'xsaveopt',
        'xsavec',
        'xgetbv1',
        'xsaves',
        'arat',
        'umip',
        'md_clear',
        'arch_capabilities',
      ],
      frequency: 3792,
      model_name: 'Intel Core Processor (Skylake, IBRS)',
    },
    disks: [
      {
        by_path: `/dev/disk/by-path/pci-0000:00:1f.2-ata-${hostSeqId}`,
        drive_type: 'HDD',
        has_uuid: true,
        hctl: '0:0:0:0',
        id: `/dev/disk/by-path/pci-0000:00:1f.2-ata-${hostSeqId}`,
        installation_eligibility: {
          eligible: true,
          not_eligible_reasons: null,
        },
        model: 'QEMU_HARDDISK',
        name: 'sda',
        path: `/dev/sda-${hostSeqId}`,
        serial: 'QM00001',
        size_bytes: diskSpace,
        vendor: 'ATA',
      },
      {
        bootable: true,
        by_path: `/dev/disk/by-path/pci-0000:00:1f.2-ata-${hostSeqId + 1}`,
        drive_type: 'ODD',
        has_uuid: true,
        hctl: '1:0:0:0',
        id: `/dev/disk/by-path/pci-0000:00:1f.2-ata-${hostSeqId + 1}`,
        installation_eligibility: {
          not_eligible_reasons: [
            'Disk is removable',
            'Disk is too small (disk only has 1.0 GB, but 10 GB are required)',
            'Drive type is ODD, it must be one of HDD, SSD, Multipath.',
          ],
        },
        is_installation_media: true,
        model: 'QEMU_DVD-ROM',
        name: 'sr0',
        path: `/dev/sr-${hostSeqId + 1}`,
        removable: true,
        serial: 'QM00003',
        size_bytes: 1047527424,
        smart: 'SMART support is:     Unavailable - device lacks SMART capability.\n',
        vendor: 'QEMU',
      },
      {
        by_path: `/dev/disk/by-path/pci-0000:00:1f.2-ata-${hostSeqId + 2}`,
        drive_type: 'HDD',
        has_uuid: true,
        hctl: '0:0:0:0',
        id: `/dev/disk/by-path/pci-0000:00:1f.2-ata-${hostSeqId + 2}`,
        installation_eligibility: {
          eligible: true,
          not_eligible_reasons: null,
        },
        model: 'QEMU_HARDDISK',
        name: 'sda',
        path: `/dev/sda-${hostSeqId + 2}`,
        serial: 'QM00001',
        size_bytes: diskSpace,
        vendor: 'ATA',
      },
    ],
    gpus: [
      {
        address: '0000:00:01.0',
      },
    ],
    hostname: 'localhost',
    interfaces: [
      {
        flags: ['up', 'broadcast', 'multicast'],
        has_carrier: true,
        ipv4_addresses: ['192.168.122.230/24'],
        ipv6_addresses: [],
        mac_address: '52:54:00:4b:cb:49',
        mtu: 1500,
        name: 'enp1s0',
        product: '0x0001',
        speed_mbps: -1,
        type: 'physical',
        vendor: '0x1af4',
      },
    ],
    memory: {
      physical_bytes: memory,
      physical_bytes_method: 'dmidecode',
      usable_bytes: 16803160064,
    },
    routes: [
      {
        destination: '0.0.0.0',
        family: 2,
        gateway: '192.168.122.1',
        interface: 'enp1s0',
        metric: 100,
      },
      {
        destination: '10.88.0.0',
        family: 2,
        interface: 'cni-podman0',
      },
      {
        destination: '192.168.122.0',
        family: 2,
        interface: 'enp1s0',
        metric: 100,
      },
      {
        destination: '::1',
        family: 10,
        interface: 'lo',
        metric: 256,
      },
      {
        destination: 'fe80::',
        family: 10,
        interface: 'enp1s0',
        metric: 100,
      },
      {
        destination: 'fe80::',
        family: 10,
        interface: 'cni-podman0',
        metric: 256,
      },
    ],
    system_vendor: {
      manufacturer: 'Red Hat',
      product_name: 'KVM',
      virtual: true,
    },
    tpm_version: 'none',
  };
};

const disksWithHolders = [
  {
    drive_type: 'RAID',
    id: '/dev/md0',
    installation_eligibility: { eligible: true },
    name: 'md0',
    path: '/dev/md0',
    size_bytes: 21455962112,
  },
  {
    drive_type: 'LVM',
    id: '/dev/dm-0',
    installation_eligibility: { eligible: true },
    name: 'dm-0',
    path: '/dev/dm-0',
    size_bytes: 15032385536,
  },
  {
    by_id: '/dev/disk/by-id/wwn-0x60000000000000000e00000000010001',
    drive_type: 'Multipath',
    has_uuid: true,
    id: '/dev/disk/by-id/wwn-0x60000000000000000e00000000010001',
    installation_eligibility: { eligible: true },
    name: 'dm-1',
    path: '/dev/dm-1',
    size_bytes: 10737418240,
  },
  {
    drive_type: 'LVM',
    id: '/dev/dm-2',
    installation_eligibility: { eligible: true },
    name: 'dm-2',
    path: '/dev/dm-2',
    size_bytes: 4294967296,
  },
  {
    by_path:
      '/dev/disk/by-path/ip-192.168.122.41:3260-iscsi-iqn.2015-06.com.example.test:target1-lun-1',
    drive_type: 'iSCSI',
    has_uuid: true,
    hctl: '8:0:0:1',
    holders: 'dm-1',
    id: '/dev/disk/by-path/ip-192.168.122.41:3260-iscsi-iqn.2015-06.com.example.test:target1-lun-1',
    installation_eligibility: { eligible: true },
    model: 'VIRTUAL-DISK',
    name: 'sda',
    path: '/dev/sda',
    serial: '60000000000000000e00000000010001',
    size_bytes: 10737418240,
    vendor: 'IET',
    wwn: '0x60000000000000000e00000000010001',
  },
  {
    by_path: '/dev/disk/by-path/ip-192.168.123.49:3260',
    drive_type: 'iSCSI',
    has_uuid: true,
    hctl: '9:0:0:1',
    holders: 'dm-1',
    id: '/dev/disk/by-path/ip-192.168.123.49:3260',
    installation_eligibility: { eligible: true },
    model: 'VIRTUAL-DISK',
    name: 'sdb',
    path: '/dev/sdb',
    serial: '60000000000000000e00000000010001',
    size_bytes: 10737418240,
    vendor: 'IET',
    wwn: '0x60000000000000000e00000000010001',
  },
  {
    bootable: true,
    by_path: '/dev/disk/by-path/pci-0000:00:05.0-ata-3',
    drive_type: 'ODD',
    has_uuid: true,
    hctl: '4:0:0:0',
    id: '/dev/disk/by-path/pci-0000:00:05.0-ata-3',
    installation_eligibility: { eligible: true },
    is_installation_media: true,
    model: 'QEMU_DVD-ROM',
    name: 'sr0',
    path: '/dev/sr0',
    removable: true,
    serial: 'QM00009',
    size_bytes: 1135607808,
    smart: 'SMART support is:     Unavailable - device lacks SMART capability.\n',
    vendor: 'QEMU',
  },
  {
    by_path: '/dev/disk/by-path/pci-0000:00:07.0',
    drive_type: 'HDD',
    holders: 'dm-0,dm-2',
    id: '/dev/disk/by-path/pci-0000:00:07.0',
    installation_eligibility: { eligible: true },
    name: 'vda',
    path: '/dev/vda',
    size_bytes: 10737418240,
    vendor: '0x1af4',
  },
  {
    by_path: '/dev/disk/by-path/pci-0000:00:08.0',
    drive_type: 'HDD',
    holders: 'dm-0,dm-2',
    id: '/dev/disk/by-path/pci-0000:00:08.0',
    installation_eligibility: { eligible: true },
    name: 'vdb',
    path: '/dev/vdb',
    size_bytes: 10737418240,
    vendor: '0x1af4',
  },
  {
    by_path: '/dev/disk/by-path/pci-0000:00:09.0',
    drive_type: 'HDD',
    holders: 'md0',
    id: '/dev/disk/by-path/pci-0000:00:09.0',
    installation_eligibility: { eligible: true },
    name: 'vdc',
    path: '/dev/vdc',
    size_bytes: 10737418240,
    vendor: '0x1af4',
  },
  {
    by_path: '/dev/disk/by-path/pci-0000:00:0a.0',
    drive_type: 'HDD',
    holders: 'md0',
    id: '/dev/disk/by-path/pci-0000:00:0a.0',
    installation_eligibility: { eligible: true },
    name: 'vdd',
    path: '/dev/vdd',
    size_bytes: 10737418240,
    vendor: '0x1af4',
  },
];

const createHostInventoryWithDiskHolders = (id: number, memory: number) => ({
  ...createHostInventory(id, memory),
  disks: disksWithHolders,
});

export { createHostInventory, createHostInventoryWithDiskHolders };
