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 all 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
8 changes: 3 additions & 5 deletions .travis-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ RUN yum -y update && \
gcc-c++ \
krb5-devel \
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
5 changes: 2 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ $script = <<SCRIPT
zeromq-devel \
koji \
swig \
fedmsg \
libyaml-devel
fedmsg
cd /opt/pdc-updater/src
python setup.py develop
pip install -r test-requirements.txt
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
12 changes: 10 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,18 @@ 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)
people = client.list_users().result
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