From Foreman to Iot Platforme

Hi everyone ,

 I m trying to develop a plugin in Foreman so i can manage  all the 

devices that are connected to my IoT platform . I can communicate with my
IoT platform via REST API . In first place with GET request i can get all
the devices on Foreman with their parameters . My problem now is when i
change the parameters in foreman or deleting devices I need to see the
changes on my IoT platform . i really need help because i m trying to
convince my colleague that Foreman can do it .
THANKS

Is the plugin open source and available somewhere? That generally makes
it much easier to help.

For inspiration it might be good to look at foreman_hooks. That has
triggers when an object is changed or deleted. You might even find that
just using foreman_hooks could be enough for your use case.

··· On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote: > I m trying to develop a plugin in Foreman so i can manage all the >devices that are connected to my IoT platform . I can communicate with my >IoT platform via REST API . In first place with GET request i can get all >the devices on Foreman with their parameters . My problem now is when i >change the parameters in foreman or deleting devices I need to see the >changes on my IoT platform . i really need help because i m trying to >convince my colleague that Foreman can do it .

I m a beginner in ruby so that 's why i felt a little bit a shame to put
it in public im trying to make at first the plugin functional . For my
case i know that i want to make a post request to my platform by in the
foreman side how can i do it …

··· Le mercredi 13 septembre 2017 11:31:33 UTC+2, Ewoud Kohl van Wijngaarden a écrit : > > On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote: > > I m trying to develop a plugin in Foreman so i can manage all the > >devices that are connected to my IoT platform . I can communicate with > my > >IoT platform via REST API . In first place with GET request i can get all > >the devices on Foreman with their parameters . My problem now is when i > >change the parameters in foreman or deleting devices I need to see the > >changes on my IoT platform . i really need help because i m trying to > >convince my colleague that Foreman can do it . > > Is the plugin open source and available somewhere? That generally makes > it much easier to help. > > For inspiration it might be good to look at foreman_hooks. That has > triggers when an object is changed or deleted. You might even find that > just using foreman_hooks could be enough for your use case. >

In that case I would start with foreman_hooks and perform the POST
request. You can even do this in bash with curl if you want.

https://github.com/theforeman/foreman_hooks#usage describes how you can
create your own hooks.

··· On Wed, Sep 13, 2017 at 02:39:58AM -0700, Fairouz el ouazi wrote: >I m a beginner in ruby so that 's why i felt a little bit a shame to put >it in public im trying to make at first the plugin functional . For my >case i know that i want to make a post request to my platform by in the >foreman side how can i do it .. > >Le mercredi 13 septembre 2017 11:31:33 UTC+2, Ewoud Kohl van Wijngaarden a >écrit : >> >> On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote: >> > I m trying to develop a plugin in Foreman so i can manage all the >> >devices that are connected to my IoT platform . I can communicate with >> my >> >IoT platform via REST API . In first place with GET request i can get all >> >the devices on Foreman with their parameters . My problem now is when i >> >change the parameters in foreman or deleting devices I need to see the >> >changes on my IoT platform . i really need help because i m trying to >> >convince my colleague that Foreman can do it . >> >> Is the plugin open source and available somewhere? That generally makes >> it much easier to help. >> >> For inspiration it might be good to look at foreman_hooks. That has >> triggers when an object is changed or deleted. You might even find that >> just using foreman_hooks could be enough for your use case.

With this suggestion do i need to make any changes on my platform . Because
it's only reached by REST api /

··· Le mercredi 13 septembre 2017 12:19:47 UTC+2, Ewoud Kohl van Wijngaarden a écrit : > > In that case I would start with foreman_hooks and perform the POST > request. You can even do this in bash with curl if you want. > > https://github.com/theforeman/foreman_hooks#usage describes how you can > create your own hooks. > > On Wed, Sep 13, 2017 at 02:39:58AM -0700, Fairouz el ouazi wrote: > >I m a beginner in ruby so that 's why i felt a little bit a shame to > put > >it in public im trying to make at first the plugin functional . For my > >case i know that i want to make a post request to my platform by in the > >foreman side how can i do it .. > > > >Le mercredi 13 septembre 2017 11:31:33 UTC+2, Ewoud Kohl van Wijngaarden > a > >écrit : > >> > >> On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote: > >> > I m trying to develop a plugin in Foreman so i can manage all > the > >> >devices that are connected to my IoT platform . I can communicate > with > >> my > >> >IoT platform via REST API . In first place with GET request i can get > all > >> >the devices on Foreman with their parameters . My problem now is when > i > >> >change the parameters in foreman or deleting devices I need to see > the > >> >changes on my IoT platform . i really need help because i m trying > to > >> >convince my colleague that Foreman can do it . > >> > >> Is the plugin open source and available somewhere? That generally makes > >> it much easier to help. > >> > >> For inspiration it might be good to look at foreman_hooks. That has > >> triggers when an object is changed or deleted. You might even find that > >> just using foreman_hooks could be enough for your use case. >

So when we run the scripts of hook the changes will be seen on my iot
platform … !!! so it will allow me to see the new created device on
my platform

··· Le mercredi 13 septembre 2017 12:36:23 UTC+2, Fairouz el ouazi a écrit : > > With this suggestion do i need to make any changes on my platform . > Because it's only reached by REST api / > > Le mercredi 13 septembre 2017 12:19:47 UTC+2, Ewoud Kohl van Wijngaarden a > écrit : >> >> In that case I would start with foreman_hooks and perform the POST >> request. You can even do this in bash with curl if you want. >> >> https://github.com/theforeman/foreman_hooks#usage describes how you can >> create your own hooks. >> >> On Wed, Sep 13, 2017 at 02:39:58AM -0700, Fairouz el ouazi wrote: >> >I m a beginner in ruby so that 's why i felt a little bit a shame to >> put >> >it in public im trying to make at first the plugin functional . For my >> >case i know that i want to make a post request to my platform by in the >> >foreman side how can i do it .. >> > >> >Le mercredi 13 septembre 2017 11:31:33 UTC+2, Ewoud Kohl van Wijngaarden >> a >> >écrit : >> >> >> >> On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote: >> >> > I m trying to develop a plugin in Foreman so i can manage all >> the >> >> >devices that are connected to my IoT platform . I can communicate >> with >> >> my >> >> >IoT platform via REST API . In first place with GET request i can get >> all >> >> >the devices on Foreman with their parameters . My problem now is when >> i >> >> >change the parameters in foreman or deleting devices I need to see >> the >> >> >changes on my IoT platform . i really need help because i m trying >> to >> >> >convince my colleague that Foreman can do it . >> >> >> >> Is the plugin open source and available somewhere? That generally >> makes >> >> it much easier to help. >> >> >> >> For inspiration it might be good to look at foreman_hooks. That has >> >> triggers when an object is changed or deleted. You might even find >> that >> >> just using foreman_hooks could be enough for your use case. >> >