Plugin configuration management

Hi ,

    I want to know if foreman plugin (ansible or chef )   communicate 

with the configuration management server or platform (chef or ansible )
using theirs rest Api ?

Thanks

Hello,

ansible plugin does not contact any external service to my knowledge except
for smart proxy, chef plugin uses REST API to talk to smart proxy which then
uses REST API to talk to chef server.

Hope this helps

··· -- Marek

On středa 12. července 2017 17:21:49 CEST Fairouz el ouazi wrote:

Hi ,

    I want to know if foreman plugin (ansible or chef )   communicate

with the configuration management server or platform (chef or ansible )
using theirs rest Api ?

Thanks

HI,
PLease howa can make GET or Post request on my new plugin ?

··· Le mercredi 12 juillet 2017 17:21:49 UTC+2, Fairouz el ouazi a écrit : > > Hi , > > I want to know if foreman plugin (ansible or chef ) communicate > with the configuration management server or platform (chef or ansible ) > using theirs rest Api ? > > Thanks >

You can use any Ruby library but I would recommend using Rest client as it's
used elsewhere already. See rest-client documentation [1] for more details.
Alternatively you can use Net::HTTP library which is built-in Ruby stdlib [2].

However this is not Foreman related so I suggest you consult generic Ruby
related queries at Ruby support channels.

[1] https://github.com/rest-client/rest-client
[2] http://ruby-doc.org/stdlib-2.4.1/libdoc/net/http/rdoc/Net/HTTP.html

Hope this helps

··· On úterý 18. července 2017 12:15:37 CEST Fairouz el ouazi wrote: > HI, > PLease howa can make GET or Post request on my new plugin ? > > Le mercredi 12 juillet 2017 17:21:49 UTC+2, Fairouz el ouazi a écrit : > > Hi , > > > > I want to know if foreman plugin (ansible or chef ) communicate > > > > with the configuration management server or platform (chef or ansible ) > > using theirs rest Api ? > > > > Thanks


Marek

HI,
I already use NET::HTTP library but i want to know where to add my
request on my new plugin wich file do i have to add require Net::https …

··· Le mardi 18 juillet 2017 13:07:01 UTC+2, Marek Hulán a écrit : > > On úterý 18. července 2017 12:15:37 CEST Fairouz el ouazi wrote: > > HI, > > PLease howa can make GET or Post request on my new plugin ? > > > > Le mercredi 12 juillet 2017 17:21:49 UTC+2, Fairouz el ouazi a écrit : > > > Hi , > > > > > > I want to know if foreman plugin (ansible or chef ) > communicate > > > > > > with the configuration management server or platform (chef or ansible > ) > > > using theirs rest Api ? > > > > > > Thanks > > You can use any Ruby library but I would recommend using Rest client as > it's > used elsewhere already. See rest-client documentation [1] for more > details. > Alternatively you can use Net::HTTP library which is built-in Ruby stdlib > [2]. > > However this is not Foreman related so I suggest you consult generic Ruby > related queries at Ruby support channels. > > [1] https://github.com/rest-client/rest-client > [2] http://ruby-doc.org/stdlib-2.4.1/libdoc/net/http/rdoc/Net/HTTP.html > > Hope this helps > > -- > Marek > >