Hi,
This will fix our openshift key sync issues, allowing all -noc people to again update status. Can I get +1s?
Patrick
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 --- roles/batcave/files/oshift_mod.py | 2 +- roles/batcave/files/sync-openshift-keys.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/roles/batcave/files/oshift_mod.py b/roles/batcave/files/oshift_mod.py index 592908b..b3057e4 100644 --- a/roles/batcave/files/oshift_mod.py +++ b/roles/batcave/files/oshift_mod.py @@ -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} """ diff --git a/roles/batcave/files/sync-openshift-keys.py b/roles/batcave/files/sync-openshift-keys.py index 182ce94..47c0141 100755 --- a/roles/batcave/files/sync-openshift-keys.py +++ b/roles/batcave/files/sync-openshift-keys.py @@ -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)
On Mon, Jun 06, 2016 at 09:29:36AM +0000, Patrick Uiterwijk wrote:
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
roles/batcave/files/oshift_mod.py | 2 +- roles/batcave/files/sync-openshift-keys.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/roles/batcave/files/oshift_mod.py b/roles/batcave/files/oshift_mod.py index 592908b..b3057e4 100644 --- a/roles/batcave/files/oshift_mod.py +++ b/roles/batcave/files/oshift_mod.py @@ -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} """
diff --git a/roles/batcave/files/sync-openshift-keys.py b/roles/batcave/files/sync-openshift-keys.py index 182ce94..47c0141 100755 --- a/roles/batcave/files/sync-openshift-keys.py +++ b/roles/batcave/files/sync-openshift-keys.py @@ -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)
+1 for me
Pierre
On 06/06/2016 05:32 AM, Pierre-Yves Chibon wrote:
On Mon, Jun 06, 2016 at 09:29:36AM +0000, Patrick Uiterwijk wrote:
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.
+1
Ricky
+1
On 6 June 2016 at 05:29, Patrick Uiterwijk puiterwijk@redhat.com wrote:
Hi,
This will fix our openshift key sync issues, allowing all -noc people to again update status. Can I get +1s?
Patrick _______________________________________________ infrastructure mailing list infrastructure@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/infrastructure@lists.fedoraproje...
infrastructure@lists.fedoraproject.org