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

Add option for new AAA backend #89

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .travis-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ RUN yum -y update && \
libffi-devel \
libyaml-devel \
openssl-devel \
python27 \
python-devel \
python-pip \
python3-devel \
python3-pip \
redhat-rpm-config \
swig \
zeromq-devel \
rpm-devel \
python2-koji \
python3-koji \
libmodulemd && \
yum clean all

Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $script = <<SCRIPT
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.

😱

config.vm.box = "fedora/31-cloud-base"
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 2048]
end
Expand Down
13 changes: 11 additions & 2 deletions pdcupdater/services.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import logging
import operator
import os

import bs4
import requests

from fasjson_client import Client

import pdcupdater.handlers.compose
import pdcupdater.utils

Expand Down Expand Up @@ -72,13 +75,19 @@ def old_composes(base_url):


@pdcupdater.utils.with_ridiculous_timeout
def fas_persons(base_url, username, password):
def fas_persons(base_url, username, password, fasjson):
""" Return the list of users in the Fedora Account System. """

log.info("Connecting to Account System at %r" % base_url)
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.

return people
abompard marked this conversation as resolved.
Show resolved Hide resolved

import fedora.client
import fedora.client.fas2

log.info("Connecting to FAS at %r" % base_url)
fasclient = fedora.client.fas2.AccountSystem(
base_url=base_url, username=username, password=password)

Expand Down
Binary file removed pdcupdater/tests/vcr-request-data.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'pdc-client',
'six',
'modulemd',
'fasjson-client',
]


Expand Down