SatelliteQE / satellite-populate

This new module adds tools and commands to populate and validate entities in the system based in YAML file.
Other
8 stars 10 forks source link

[nailgun] AuthSourceLDAP entities aren't searchable #68

Closed chbrown13 closed 7 years ago

chbrown13 commented 7 years ago

Description

Unable to create AuthSourceLDAP entities because they are not searchable

What I Did

test_authsourceLDAP.yaml

# satellite-populate test_authsourceLDAP.yaml -h hp-sl4545g7-01.khw.lab.eng.bos.redhat.com -v

2017-07-19 09:02:14 - satellite_populate.base - INFO - Starting in populate mode
2017-07-19 09:02:15 - satellite_populate.base - INFO - CREATE: test_auth
2017-07-19 09:02:15 - satellite_populate.base - DEBUG - {'data': {'host': u'satellite.populate.test.com', 'name': u'Authentication Source'}, 'options': {'query': {'search': 'host="satellite.populate.test.com",name="Authentication Source"'}}, 'searchable': False}
2017-07-19 09:02:15 - satellite_populate.base - ERROR - search: AuthSourceLDAP not searchable
2017-07-19 09:02:15 - satellite_populate.base - ERROR - populate: AuthSourceLDAP not searchable {'log_message': u'test_auth', 'model': 'AuthSourceLDAP', 'register': 'test_auth', 'data': {'host': '{{ host_name }}', 'name': '{{ auth_name }}'}}
Traceback (most recent call last):
  File "/opt/virtual_env/satellite-populate/bin/satellite-populate", line 11, in <module>
    load_entry_point('satellite-populate', 'console_scripts', 'satellite-populate')()
  File "/opt/virtual_env/satellite-populate/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/virtual_env/satellite-populate/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/virtual_env/satellite-populate/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/virtual_env/satellite-populate/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/chris/Documents/satellite-populate/satellite_populate/commands.py", line 161, in main
    hostname, username, password, report, enable_output)
  File "/home/chris/Documents/satellite-populate/satellite_populate/commands.py", line 47, in execute_populate
    enable_output=enable_output
  File "/home/chris/Documents/satellite-populate/satellite_populate/main.py", line 62, in populate
    populator.execute()
  File "/home/chris/Documents/satellite-populate/satellite_populate/base.py", line 180, in execute
    entity_data, action_data, search, action
  File "/home/chris/Documents/satellite-populate/satellite_populate/api.py", line 39, in populate
    rendered_action_data, action_data, search, model, silent_errors
  File "/home/chris/Documents/satellite-populate/satellite_populate/api.py", line 58, in action_create
    model, search, unique=True, silent_errors=silent_errors
  File "/home/chris/Documents/satellite-populate/satellite_populate/base.py", line 595, in get_search_result
    raise TypeError("{0} not searchable".format(model.__name__))
TypeError: AuthSourceLDAP not searchable
chbrown13 commented 7 years ago

See #74