<div dir="ltr">Hi guys,<div><br></div><div>I'm Bodie Solomon, an outsider on contract -- I've spoken to a few of you in IRC.  Gustavo suggested I email this list to clear up some difficulties with our progress on implementing Actions.<div>
<br></div><div>Our job is to implement some new functionality to trigger execution of "actions" on units and services.  For example, "juju do mysql snapshot".</div></div><div><br></div><div>James Harshaw and I have spent a few days documenting and understanding the command-line code, so we're looking to get a good foothold and crank out some code.  However, I'm getting some conflicting pointers.</div>
<div><br></div><div>Gustavo said we should start with charm/config.go, but as I'm looking through /cmd/juju/run.go, it looks almost like Actions should be implemented there.  I asked about this in freenode #juju-dev and dimitern confirmed what I was thinking (but again, I'm new to the project) -- this almost seems like it should be an API feature.</div>
<div><br></div><div><bodie_> OK, I think that makes sense :) we had talked about doing it via hooks but I'm not positive that's the right way<br></div><div><dimitern> bodie_, things hooks can do are very limited compared to the api</div>
<div><dimitern> sounds like you could use a plugin that calls juju run internally<br></div><div><dimitern> juju run allows you to run scripts remotely on a unit or all machines inside the same context (env vars etc.) that a hook runs</div>
<div><br></div><div>I'm not certain it's the right way, and again I'm quite new to the codebase so I'm not aware of the intricacies and all of what's out there; to my brain it's mostly still a jungle.  I'm not sure how to begin approaching the hooks problem in the code (I assume through charm/config.go, but this has so far not been a productive direction to investigate.  Perhaps I just need to spend more time looking at that.)</div>
<div><br></div><div>Gustavo's indication was that we should be implementing this through hooks, so I'm at a loss here.  I agree with him that this is probably the best place to start.  Any input is welcome.  :)</div>
<div><br></div><div>Bodie</div></div>