Re: How to identify OpenShift v4?

2019-10-03 Thread Gabe Montero
Cool glad it helped.

On Thu, Oct 3, 2019 at 4:31 PM Andre Dietisheim  wrote:

> Hi Gabe
>
> great pointers, exactly what I needed, thanks a lot!
>
> Cheers
> Andre
> Am 03.10.19 um 18:44 schrieb Gabe Montero:
>
>
>
> On Thu, Oct 3, 2019 at 11:47 AM Andre Dietisheim 
> wrote:
>
>> Hi
>>
>> Since the endpoint "/version/openshift" is gone, how can a client
>> library identify the OpenShift version it deals with?
>>
>
> I believe "/version" still exists, just not "/version/openshift".
>
> Here is how the openshift jenkins login plugin does it:
>
>
> https://github.com/openshift/jenkins-openshift-login-plugin/blob/master/src/main/java/org/openshift/jenkins/plugins/openshiftlogin/OpenShiftOAuth2SecurityRealm.java#L640-L678
>
> Here is how `oc` does it:
>
>
> https://github.com/openshift/oc/blob/master/pkg/cli/version/version.go#L109-L172
> and
>
> https://github.com/openshift/oc/blob/master/vendor/k8s.io/client-go/discovery/discovery_client.go#L407-L418
>
> where you can see it going after /version
>
>>
>> Thanks for your pointers!
>>
>> Cheers
>> André
>>
>>
>> ___
>> dev mailing list
>> dev@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: How to identify OpenShift v4?

2019-10-03 Thread Andre Dietisheim

Hi Gabe

great pointers, exactly what I needed, thanks a lot!

Cheers
Andre

Am 03.10.19 um 18:44 schrieb Gabe Montero:



On Thu, Oct 3, 2019 at 11:47 AM Andre Dietisheim > wrote:


Hi

Since the endpoint "/version/openshift" is gone, how can a client
library identify the OpenShift version it deals with?


I believe "/version" still exists, just not "/version/openshift".

Here is how the openshift jenkins login plugin does it:

https://github.com/openshift/jenkins-openshift-login-plugin/blob/master/src/main/java/org/openshift/jenkins/plugins/openshiftlogin/OpenShiftOAuth2SecurityRealm.java#L640-L678

Here is how `oc` does it:

https://github.com/openshift/oc/blob/master/pkg/cli/version/version.go#L109-L172
and
https://github.com/openshift/oc/blob/master/vendor/k8s.io/client-go/discovery/discovery_client.go#L407-L418

where you can see it going after /version


Thanks for your pointers!

Cheers
André


___
dev mailing list
dev@lists.openshift.redhat.com 
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev

___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: How to identify OpenShift v4?

2019-10-03 Thread Gabe Montero
On Thu, Oct 3, 2019 at 11:47 AM Andre Dietisheim 
wrote:

> Hi
>
> Since the endpoint "/version/openshift" is gone, how can a client
> library identify the OpenShift version it deals with?
>

I believe "/version" still exists, just not "/version/openshift".

Here is how the openshift jenkins login plugin does it:

https://github.com/openshift/jenkins-openshift-login-plugin/blob/master/src/main/java/org/openshift/jenkins/plugins/openshiftlogin/OpenShiftOAuth2SecurityRealm.java#L640-L678

Here is how `oc` does it:

https://github.com/openshift/oc/blob/master/pkg/cli/version/version.go#L109-L172
and
https://github.com/openshift/oc/blob/master/vendor/k8s.io/client-go/discovery/discovery_client.go#L407-L418

where you can see it going after /version

>
> Thanks for your pointers!
>
> Cheers
> André
>
>
> ___
> dev mailing list
> dev@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


How to identify OpenShift v4?

2019-10-03 Thread Andre Dietisheim

Hi

Since the endpoint "/version/openshift" is gone, how can a client 
library identify the OpenShift version it deals with?


Thanks for your pointers!

Cheers
André


___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev