Make machine presentable for outside world.

    !!!Modifies the input machine!!!

    @param machine:
    @type machine: dict
    @return: the modified input machine
    @rtype: dict

def treat_machine_dict(machine):
    '''
    Make machine presentable for outside world.

    !!!Modifies the input machine!!!

    @param machine:
    @type machine: dict
    @return: the modified input machine
    @rtype: dict
    '''
    machine.update({
        'id': machine.get('id', ''),
        'image': machine.get('image', ''),
        'size': '{0} MB'.format(machine.get('memorySize', 0)),
        'state': machine_get_machinestate_str(machine),
        'private_ips': [],
        'public_ips': [],
    })

    # Replaced keys
    if 'memorySize' in machine:
        del machine['memorySize']
    return machine