Fix OpenShift key sync
Turns out the used library only works with a specific API version but it didn't specify that unless the user tells it to. This pins us on openshift API 1.5 until support for that is dropped. This also fixes the issue where we pass the key arguments as keyword arguments but the key_add function did not expect them as such. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
14cfa49039
commit
4387e0530a
2 changed files with 4 additions and 1 deletions
|
@ -282,7 +282,7 @@ class Openshift(object):
|
|||
return (status, raw_response)
|
||||
|
||||
@conditional_decorator(timeit, DOING_PERFORMANCE_ANALYSIS)
|
||||
def key_add(self, kwargs):
|
||||
def key_add(self, **kwargs):
|
||||
"""
|
||||
params: {name, type, key_path}
|
||||
"""
|
||||
|
|
|
@ -8,6 +8,9 @@ from argparse import ArgumentParser
|
|||
from fedora.client import AccountSystem
|
||||
from oshift_mod import Openshift
|
||||
from getpass import getpass
|
||||
import os
|
||||
|
||||
os.environ['OPENSHIFT_REST_API'] = '1.5'
|
||||
|
||||
def get_keys(host,user,passwd):
|
||||
os = Openshift(host=host,user=user,passwd=passwd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue