There is no specific object in the library for nodes.
But you can use client.list("Node") and cast each of the returned item to
KubernetesResource where you can access the returned JSON through
getModel() method.
Or provide a PR that implements Node resources
Or open an issueOn Wed, May 8, 2019 at 2:01 AM Tony Herstell <[email protected]> wrote: > I am sorry, > I probably didnt explain it very well. > > I was after how I use the openshift-restclient-java library to do what the > "oc" command does. > > I have managed to use this awesome library to get all the information I > require from openshift so far (e.g. for project, pods etc.). > > Tony > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > Virus-free. > www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > <#m_2670761611954343496_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > On Wed, 8 May 2019 at 11:44, Ben Parees <[email protected]> wrote: > >> if you run oc with "--loglevel=8" you can see all the api calls it is >> making and the responses. >> >> >> On Tue, May 7, 2019 at 7:06 PM Tony Herstell <[email protected]> >> wrote: >> >>> I dont know Openshift too well but I am trying to get the details that >>> would be returned from this command: >>> >>> oc describe node -l app=sc-app >>> >>> ... (towards the bottom)... >>> >>> *Allocated resources:* >>> >>> *(Total limits may be over 100 percent, i.e., overcommitted.)* >>> >>> *CPU Requests CPU Limits Memory Requests Memory Limits* >>> >>> *------------ ---------- --------------- -------------* >>> >>> *804m (50%) 1600m (100%) 1557Mi (6%) 3160Mi (12%)* >>> >>> >>> I take all the %ages for all the nodes and then average them for the >>> whole instance.... thereby getting a "utilization"... >>> >>> Please advise... >>> >>> >>> >>> >>> I then disregard any nodes that are not ready.. >>> >>> oc get node -l app=sc-app --no-headers >>> >>> >>> and this bit seems to be available as *client.getServerReadyStatus();* >>> >>> >>> >>> >>> >>> >>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >>> Virus-free. >>> www.avast.com >>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >>> <#m_2670761611954343496_m_407355907336110635_m_-6057222202793579341_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >>> _______________________________________________ >>> dev mailing list >>> [email protected] >>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev >>> >> >> >> -- >> Ben Parees | OpenShift >> >> > > -- > *Enterprise I.T. Consultant* > *PM, Technical BA, Architect, **Tech Lead, **Developer, Testing* > *Tony Herstell**, BSc (honours) (Microelectronics and Computing)* > *email:* [email protected] > *phone: *+64 3 595 0215 > *mobile:* +64 21 302 302 > *mail: 646 Grange Road, * > * RD 7, * > * Christchurch 7677, * > * New Zealand* > > It is not the critic who counts; not the man who points out how the strong > man stumbles, or where the doer of deeds could have done them better. The > credit belongs to the man who is actually in the arena, whose face is > marred by dust and sweat and blood; who strives valiantly; who errs, who > comes short again and again, because there is no effort without error and > shortcoming; but who does actually strive to do the deeds; who knows great > enthusiasms, the great devotions; who spends himself in a worthy cause; who > at the best knows in the end the triumph of high achievement, and who at > the worst, if he fails, at least fails while daring greatly, so that his > place shall never be with those cold and timid souls who neither know > victory nor defeat. - Theodore Roosevelt > <https://www.goodreads.com/author/show/44567.Theodore_Roosevelt> > > > > > _______________________________________________ > dev mailing list > [email protected] > http://lists.openshift.redhat.com/openshiftmm/listinfo/dev > -- Jeff Maury Associate Manager, DevTools Red Hat EMEA <https://www.redhat.com> [email protected] @RedHat <https://twitter.com/redhat> Red Hat <https://www.linkedin.com/company/red-hat> Red Hat <https://www.facebook.com/RedHatInc> <https://www.redhat.com> <https://redhat.com/summit>
_______________________________________________ dev mailing list [email protected] http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
