Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Add option for new AAA backend#89

Open
StephenCoady wants to merge 5 commits intofedora-infra:developfrom
StephenCoady:add-freeipa-backend
Open

Add option for new AAA backend#89
StephenCoady wants to merge 5 commits intofedora-infra:developfrom
StephenCoady:add-freeipa-backend

Conversation

@StephenCoady
Copy link

this commit adds the ability to query users from the freeipa
backend instead of fas. the freeipa_backend config variable
will be added to the ansible repo and turned to False by default.

Signed-off-by: Stephen Coady scoady@redhat.com

this commit adds the ability to query users from the freeipa
backend instead of fas. the freeipa_backend config variable
will be added to the ansible repo and turned to False by default.

Signed-off-by: Stephen Coady <scoady@redhat.com>
Signed-off-by: Stephen Coady <scoady@redhat.com>
log.info("Connecting to Account System at %r" % base_url)
if freeipa_backend:
client = Client(url=base_url)
response = client.users.list_users().response().result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the old API, it should now be client.list_users()

Signed-off-by: Stephen Coady <scoady@redhat.com>
Signed-off-by: Stephen Coady <scoady@redhat.com>
SCRIPT

Vagrant.configure("2") do |config|
config.vm.box = "fedora/24-cloud-base"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

if fasjson:
client = Client(url=base_url)
response = client.list_users().result
people = response.get('result', [])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm no you don't need that I think. The data is directly available in the .result property.

Signed-off-by: Stephen Coady <scoady@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants