I'm learning charm development and confused about state vs. hook.

I used @when_not("state.0") to mark the very first function that gets executed. In document it also says "install" hook will be the first to execute. Tried @hooks.hook("install") but it just failed at charm installation.

So what is the right way to determine the "entry" point in a charm? I mean the first function block that will be executed. I'm thinking to use chained state from that point on to guide execution process. Is this the right approach?

--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com
        
Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to