Re: [slurm-users] Question about slurm source code and libraries

2020-01-27 Thread dean.w.schulze
If you look at the languages supported for server (endpoint) generation there 
isn't an implementation in C or even C++.  The client code generator has a 
cpprest implementation (C++).

They may have included swagger in those slides just to help people understand 
what a REST endpoint is.

For my purposes I've found that libcurl provides a REST client implementation 
in C that should be widely available.


-Original Message-
From: slurm-users  On Behalf Of Chris 
Samuel
Sent: Saturday, January 25, 2020 9:16 AM
To: slurm-users@lists.schedmd.com
Subject: Re: [slurm-users] Question about slurm source code and libraries

On 25/1/20 8:08 am, dean.w.schu...@gmail.com wrote:

> I'm working on the 19.05.4 source code since it is stable, but I would  
> prefer to use the same C REST library that will be used in 20.02.  Does 
> anyone know what C library that is?

They're using OpenAPI (formerly Swagger) for this (see slide 5), and it seems 
that includes a code generator for various languages.

https://swagger.io/tools/swagger-codegen/

Their source code is on Github here:

https://github.com/swagger-api/swagger-codegen

All the best,
Chris
--
  Chris Samuel  :  http://www.csamuel.org/  :  Berkeley, CA, USA





Re: [slurm-users] Question about slurm source code and libraries

2020-01-25 Thread dean.w.schulze
So that would be a top-down approach where they define the API first using 
OpenAPI and then generate the code from that.  I was planning on just writing 
the REST client code manually, but I could try putting the REST API I'll be 
calling into the swagger-codegen page and see what kind of client stubs it 
generates for me.

Thanks.

-Original Message-
From: slurm-users  On Behalf Of Chris 
Samuel
Sent: Saturday, January 25, 2020 9:16 AM
To: slurm-users@lists.schedmd.com
Subject: Re: [slurm-users] Question about slurm source code and libraries

On 25/1/20 8:08 am, dean.w.schu...@gmail.com wrote:

> I'm working on the 19.05.4 source code since it is stable, but I would  
> prefer to use the same C REST library that will be used in 20.02.  Does 
> anyone know what C library that is?

They're using OpenAPI (formerly Swagger) for this (see slide 5), and it seems 
that includes a code generator for various languages.

https://swagger.io/tools/swagger-codegen/

Their source code is on Github here:

https://github.com/swagger-api/swagger-codegen

All the best,
Chris
--
  Chris Samuel  :  http://www.csamuel.org/  :  Berkeley, CA, USA





Re: [slurm-users] Question about slurm source code and libraries

2020-01-25 Thread Chris Samuel

On 25/1/20 8:08 am, dean.w.schu...@gmail.com wrote:


I'm working on the 19.05.4 source code since it is stable, but I would  prefer 
to use the same C REST library that will be used in 20.02.  Does anyone know 
what C library that is?


They're using OpenAPI (formerly Swagger) for this (see slide 5), and it 
seems that includes a code generator for various languages.


https://swagger.io/tools/swagger-codegen/

Their source code is on Github here:

https://github.com/swagger-api/swagger-codegen

All the best,
Chris
--
 Chris Samuel  :  http://www.csamuel.org/  :  Berkeley, CA, USA



Re: [slurm-users] Question about slurm source code and libraries

2020-01-25 Thread dean.w.schulze
Thanks for that.

Slurmrestd will be a REST endpoint.  I need a C library for REST clients that 
will call REST endpoints.  Maybe the library that the slurm team is using for 
slurmrestd will support both endpoints and clients.

I'm working on the 19.05.4 source code since it is stable, but I would  prefer 
to use the same C REST library that will be used in 20.02.  Does anyone know 
what C library that is?

-Original Message-
From: slurm-users  On Behalf Of Ole Holm 
Nielsen
Sent: Saturday, January 25, 2020 2:58 AM
To: slurm-users@lists.schedmd.com
Subject: Re: [slurm-users] Question about slurm source code and libraries

On 24-01-2020 20:22, Dean Schulze wrote:
> Since there isn't a list for slurm development I'll ask here.  Does 
> the slurm code include a library for making REST calls?  I'm writing a 
> plugin that will make REST calls and if slurm already has one I'll use 
> that, otherwise I'll find one with an appropriate open source license 
> for my plugin.

You probably want to take a look at the presentation:
* Technical: REST API, Nathan Rini, SchedMD in 
https://slurm.schedmd.com/publications.html

The REST API should debut in Slurm 20.02.

/Ole





Re: [slurm-users] Question about slurm source code and libraries

2020-01-25 Thread Ole Holm Nielsen

On 24-01-2020 20:22, Dean Schulze wrote:
Since there isn't a list for slurm development I'll ask here.  Does the 
slurm code include a library for making REST calls?  I'm writing a 
plugin that will make REST calls and if slurm already has one I'll use 
that, otherwise I'll find one with an appropriate open source license 
for my plugin.


You probably want to take a look at the presentation:
* Technical: REST API, Nathan Rini, SchedMD
in https://slurm.schedmd.com/publications.html

The REST API should debut in Slurm 20.02.

/Ole



Re: [slurm-users] Question about slurm source code and libraries

2020-01-24 Thread Dean Schulze
That's a different project.  I'm asking if there is a REST client library
for making REST calls in the slurm source code
https://github.com/SchedMD/slurm.

On Fri, Jan 24, 2020 at 12:35 PM Renfro, Michael  wrote:

> The slurm-web project [1] has a REST API [2]. Never used it myself, just
> used the regular web frontend for viewing queue and node state.
>
> [1] https://edf-hpc.github.io/slurm-web/index.html
> [2] https://edf-hpc.github.io/slurm-web/api.html
>
> > On Jan 24, 2020, at 1:22 PM, Dean Schulze 
> wrote:
> >
> > External Email Warning
> > This email originated from outside the university. Please use caution
> when opening attachments, clicking links, or responding to requests.
> > Since there isn't a list for slurm development I'll ask here.  Does the
> slurm code include a library for making REST calls?  I'm writing a plugin
> that will make REST calls and if slurm already has one I'll use that,
> otherwise I'll find one with an appropriate open source license for my
> plugin.
> >
> > Thanks.
>
>
>


Re: [slurm-users] Question about slurm source code and libraries

2020-01-24 Thread Renfro, Michael
The slurm-web project [1] has a REST API [2]. Never used it myself, just used 
the regular web frontend for viewing queue and node state.

[1] https://edf-hpc.github.io/slurm-web/index.html
[2] https://edf-hpc.github.io/slurm-web/api.html

> On Jan 24, 2020, at 1:22 PM, Dean Schulze  wrote:
> 
> External Email Warning
> This email originated from outside the university. Please use caution when 
> opening attachments, clicking links, or responding to requests.
> Since there isn't a list for slurm development I'll ask here.  Does the slurm 
> code include a library for making REST calls?  I'm writing a plugin that will 
> make REST calls and if slurm already has one I'll use that, otherwise I'll 
> find one with an appropriate open source license for my plugin.
> 
> Thanks.




[slurm-users] Question about slurm source code and libraries

2020-01-24 Thread Dean Schulze
Since there isn't a list for slurm development I'll ask here.  Does the
slurm code include a library for making REST calls?  I'm writing a plugin
that will make REST calls and if slurm already has one I'll use that,
otherwise I'll find one with an appropriate open source license for my
plugin.

Thanks.