facts_db_data = {'--- !ruby/sym _timestamp': '2012-10-11 15:36:38',
                 'architecture': 'x86_64',
                 'clientcert': 'test.dc3',
                 'clientversion': '2.7.18',
                 'concat_basedir': '/var/lib/puppet/concat',
                 'domain': 'dc3',
                 'environment': 'production',
                 'facterversion': '1.6.10',
                 'fqdn': 'test.dc3',
                 'hardwareisa': 'x86_64',
                 'hardwaremodel': 'x86_64',
                 'hostname': 'test',
                 'id': 'root',
                 'interfaces': 'eth0,lo',
                 'ipaddress': '10.10.10.10',
                 'ipaddress_eth0': '10.10.10.10',
                 'ipaddress_lo': '127.0.0.1',
                 'is_virtual': 'true',
                 'kernel': 'Linux',
                 'kernelmajversion': '2.6',
                 'kernelrelease': '2.6.36.2',
                 'kernelversion': '2.6.36.2',
                 'kvm': 'true',
                 'lsbdistcodename': 'Final',
                 'lsbdistdescription': 'CentOS release 5.6 (Final)',
                 'lsbdistid': 'CentOS',
                 'lsbdistrelease': '5.6',
                 'lsbmajdistrelease': '5',
                 'lsbrelease': ':core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch',
                 'lshw': '[encoded data, 4200 characters]',
                 'macaddress': '1E:61:F3:9D:39:95',
                 'macaddress_eth0': '1E:21:a3:9D:39:95',
                 'manufacturer': 'Bochs',
                 'memoryfree': '727.41 MB',
                 'memorysize': '1000.29 MB',
                 'memorytotal': '1000.29 MB',
                 'netmask': '255.255.255.0',
                 'netmask_eth0': '255.255.255.0',
                 'netmask_lo': '255.0.0.0',
                 'network_eth0': '10.10.10.0',
                 'network_lo': '127.0.0.0',
                 'nisdomain': 'qxltech',
                 'nsswitch_sss': 'false',
                 'ntpsync': 'insync',
                 'operatingsystem': 'CentOS',
                 'operatingsystemrelease': '5.6',
                 'osfamily': 'RedHat',
                 'path': '/sbin:/usr/sbin:/bin:/usr/bin',
                 'physicalprocessorcount': '1',
                 'processor0': 'QEMU Virtual CPU version 0.12.4',
                 'processorcount': '1',
                 'productname': 'Bochs',
                 'ps': 'ps -ef',
                 'puppet_vardir': '/var/lib/puppet',
                 'puppetversion': '2.7.18',
                 'root_home': '/root',
                 'rubysitedir': '/usr/lib/ruby/site_ruby/1.8',
                 'rubyversion': '1.8.5',
                 'selinux': 'false',
                 'serialnumber': 'Not Specified',
                 'smartctl_sg0__user_capacity': '   10,737,418,240 bytes [10.7 GB]',
                 'smartctl_sg1__device_type': '         CD/DVD',
                 'smartctl_sg1__product': '             QEMU DVD-ROM   ',
                 'smartctl_sg1__revision': '            0.12',
                 'smartctl_sg1__serial_number': '       \x1f',
                 'smartctl_sg1__vendor': '              QEMU   ',
                 'swapfree': '1.94 GB',
                 'swapsize': '1.95 GB',
                 'timezone': 'CEST',
                 'totalmemory': '0',
                 'type': 'Other',
                 'uniqueid': '070a151d',
                 'uptime': '61 days',
                 'uptime_days': '61',
                 'uptime_hours': '1485',
                 'uptime_seconds': '5348942',
                 'virtual': 'kvm',
                 'writecache': 'disabled',
                 'packages': 'eJyNz0sOAiEMBuCrsB9oaAEfc5sRG8cEmZGHyWw8uyTiysSY7tovbf9pnfzMJAhakcJ6qrFUlLct34Py4cqxCAcO6PDU76EGJNAWqKPM6cGpI/UTKQf2r23KL4mbdl0PX3rdyrzE9vcezOcoyYv3wo4Wdq3ZszjpU4MG9BpwQOrWysxnYcEAqqN8AYJQTwM=',
                 'package_manager': 'rpm',
                 'disk_abc_product': 'MBE2147RC       ',
                 'disk_abc_revision': '0103',
                 'disk_abc_size': '147086327808',
                 'disk_abc_serial': 'sn_test_1231231',
                 'disk_abc_vendor': 'FUJITSU ',
                 'disk_cba_product': 'MBE2147RC       ',
                 'disk_cba_revision': '0103',
                 'disk_cba_size': '147086327808',
                 'disk_cba_serial': 'sn_test_1231232',
                 'disk_cba_vendor': 'lsi ',
                 'disk_qwe_product': 'multi-flex       ',
                 'disk_qwe_revision': '0103',
                 'disk_qwe_size': '147086327808',
                 'disk_qwe_serial': 'sn_test_1231233',
                 'disk_qwe_vendor': 'FUKITSU ',
                 'disk_ewq_product': 'MBE2147RC       ',
                 'disk_ewq_revision': '0103',
                 'disk_ewq_size': 'size???',
                 'disk_ewq_serial': 'sn_test_1231234',
                 'disk_ewq_vendor': 'FUJITSU ',
                 }

packages_data = {
    'packages': 'eJyNztEKAiEQheFX8T4dnFmN6m22aWgDU9M12Jt99oIMgiC6Pt+Bf8wjT0IKgYDIYDu2ODfU16XeguFwkTgrDx5ot9rXaAEJrAPqqEq5S+nI/ETmif6DnIp86M2Xzss8pajPzModHGxheMd7zSVFNYDNAVekfnW6ykk5QECz1w/kSEq5',
    'package_manager': 'dpkg',
}

packages_data_not_encoded = {
    'packages': 'x\x9c}\xce\xc1\n\xc20\x10\x04\xd0_\xc9\xddd\xc9n\x13Q\xff\xa6\xae\x8b\x15b\x12\xd3D\xe8\xa5\xdf\xae`\x04A\xe8y\xde\x0c3\xe6\x91\'!\x85@@d\xb0\x9d[\xac\r\xf5}\x99\x1f\xc1p\xb8I\xac\xca\x83\x07:\xec\xec\'\xb4\x80\x04\xd6\x01u4KyJ\xe9\xc8l"\xf3F\x1d\xae\xdb\x90S\x91\x1f\xfd?\x9b\x97:\xa5\xa8\xaf\xcc\xca\x9d\x1c\xeca\xf8\x9e\xf7\x9aK\x8aj\x00\x9b\x03\x1a\xa4^uz\x96\x8br\x80\x80\xebQ\xbf\x00\xc3\xfdJ\xb9',
    'package_manager': 'dpkg',
}

facts_api_data = {
    'name': 's999.dc2',
    'values': {'--- !ruby/sym "_timestamp"': '2013-03-22 11:05:27',
            'agent_environment': 'production',
            'architecture': 'amd64',
            'augeasversion': '0.10.0',
            'boardmanufacturer': 'IBM',
            'boardproductname': 'Server Blade',
            'boardserialnumber': 'Not Specified',
            'clientcert': 's999.dc2',
            'clientversion': '3.1.1',
            'concat_basedir': '/var/lib/puppet/concat',
            'dc': 'dc2',
            'deployed': 'Thu Oct 25 16:45:38 CEST 2012',
            'directory_u01_exist': 'false',
            'domain': 'dc2',
            'facterversion': '1.6.17',
            'fqdn': 's999.dc2',
            'hardwareisa': 'x86_64',
            'hardwaremodel': 'x86_64',
            'hostname': 's10212',
            'id': 'root',
            'interfaces': 'bond0,eth0,eth1,lo',
            'ip6tables_version': '1.4.12',
            'ipaddress': '10.202.123.25',
            'ipaddress_bond0': '10.202.123.25',
            'ipaddress_lo': '127.0.0.1',
            'ipamajorversion': '2',
            'ipaversion': '2.1.4',
            'iptables_version': '1.4.12',
            'is_pe': 'false',
            'is_virtual': 'false',
            'kernel': 'Linux',
            'kernelmajversion': '3.2',
            'kernelrelease': '3.2.0-33-generic',
            'kernelversion': '3.2.0',
            'lsbdistcodename': 'precise',
            'lsbdistdescription': 'Ubuntu 12.04.1 LTS',
            'lsbdistid': 'Ubuntu',
            'lsbdistrelease': '12.04',
            'lsbmajdistrelease': '12',
            'lshw': '[encoded data, 4200 characters]',
            'macaddress': 'ee:ee:ee:ee:ee:ee',
            'macaddress_bond0': 'ee:ee:ee:ee:ee:ee',
            'macaddress_eth0': 'ee:ee:ee:ee:ee:ee',
            'macaddress_eth1': 'ee:ee:ee:33:05:9E',
            'manufacturer': 'IBM',
            'memoryfree': '6.63 GB',
            'memorysize': '7.80 GB',
            'memorytotal': '7.80 GB',
            'mtu_bond0': '1500',
            'mtu_eth0': '1500',
            'mtu_eth1': '1500',
            'mtu_lo': '16436',
            'netmask': '255.255.0.0',
            'netmask_bond0': '255.255.0.0',
            'netmask_lo': '255.0.0.0',
            'network_bond0': '10.202.0.0',
            'network_lo': '127.0.0.0',
            'nisdomain': 'qxltech',
            'nsswitch_sss': 'true',
            'ntpsync': 'insync',
            'operatingsystem': 'Ubuntu',
            'operatingsystemrelease': '12.04',
            'osfamily': 'Debian',
            'packages': '',
            'path': '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin',
            'physicalprocessorcorecount': '8',
            'physicalprocessorcount': '2',
            'processor0': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processor1': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processor2': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processor3': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processor4': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processor5': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processor6': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processor7': 'Intel(R) Xeon(R) CPU           E5320  @ 1.86GHz',
            'processorcount': '8',
            'productname': 'IBM eServer BladeCenter HS21 -[8853ZP7]-',
            'ps': 'ps -ef',
            'ptr_ipaddress': 's999.dc2',
            'puppet_vardir': '/var/lib/puppet',
            'puppetversion': '3.1.1',
            'root_home': '/root',
            'rubysitedir': '/usr/local/lib/site_ruby/1.8',
            'rubyversion': '1.8.7',
            'selinux': 'false',
            'serialnumber': '99N0257',
            'smartctl_sg1__device_type': 'disk',
            'smartctl_sg1__product': 'MAY2073RC',
            'smartctl_sg1__revision': 'T107',
            'smartctl_sg1__serial_number': 'B9999990D999',
            'smartctl_sg1__transport_protocol': 'SAS',
            'smartctl_sg1__user_capacity': '73,407,488,000 bytes [73.4 GB]',
            'smartctl_sg1__vendor': 'IBM-ESXS',
            'sshdsakey': '',
            'sshecdsakey': '',
            'sshrsakey': '',
            'swapfree': '1.91 GB',
            'swapsize': '1.91 GB',
            'timezone': 'CET',
            'totalmemory': '7',
            'type': 'Main Server Chassis',
            'uniqueid': 'ca0a197b',
            'uptime': '114 days',
            'uptime_days': '114',
            'uptime_hours': '2757',
            'uptime_seconds': '9925516',
            'virtual': 'physical',
            'writecache': 'disabled',
            'wwn_host2': '0x2100001b321f3550',
            'wwn_host4': '0x2101001b323f3550',
            'wwns': 'host2,host4'}}
