[Hawkular-dev] execute op

Lukas Krejci lkrejci at redhat.com
Mon Jul 27 20:00:47 EDT 2015


I'm currently working HWKINVENT-62 - aka resource configuration.

I imagine this could be done by a listener on a bus that would listen to (as
of now imaginary -  https://issues.jboss.org/browse/HWKINVENT-104)
"config changed" events and react accordingly - connecting to the agent and
let it do its magic.

Once the agent is done, a "config applied" could be emitted so that interested
parties could react on that (UI, inventory once it supports history, ...).

----- Original Message -----
> From: "John Mazzitelli" <mazz at redhat.com>
> To: "Discussions around Hawkular development" <hawkular-dev at lists.jboss.org>
> Sent: Friday, 24 July, 2015 10:45:12 PM
> Subject: [Hawkular-dev] execute op
> 
> As part of the new UI-server-feed comm work, the following now works.
> 
> In our agent config, if a resource-type has an operation defined, you can
> execute that operation from end-to-end. I don't have the UI coded up - I
> mock out the UI with a simulated websocket client.
> 
> These are the log messages I got in the logs to show it working:
> 
> 1) The UI sends in the request over websocket - the content of the request
> looks like this:
> 
>     ExecuteOperationRequest={"resourceId":"mazztower~Local~/subsystem=hawkular-monitor",
>     "operationName":"Status"}
> 
> 2) The server receives it over the websocket. Log message:
> 
>    Received message from UI client [AjEP4Q3X0ViCalHvAsodkve92mshxsCxJTy9PQ9r]
> 
> 3) And then puts it on the bus. Whatever server is currently connected to
> that feed will have a bus listener for this particular command for that
> particular feed and picks it up. Log message from the bus listener:
> 
>    Asking feed [mazztower] to execute operation [Status] on resource ID
>    [mazztower~Local~/subsystem=hawkular-monitor]
> 
> 4) That bus listener does what it needs to do - in this case, forwards the
> message to the appropriate feed/agent. Log message:
> 
>     Attempting to send async message to [1] clients:
>     [ExecuteOperationRequest={"resourceId":"mazztower~Local~/subsystem=hawkular-monitor","operationName":"Status"}]
> 
> 5) The agent gets the message from its websocket. Log messages:
> 
>     Received message from server
>     Received request to execute operation [Status] on resource
>     [mazztower~Local~/subsystem=hawkular-monitor]
> 
> 6) Once the operation is executed, the results are sent back to the server -
> these are logs back on the server again:
> 
>     Received message from feed [mazztower]
>     Operation execution completed.
>     Resource=[mazztower~Local~/subsystem=hawkular-monitor],
>     Operation=[Status], Status=[OK], Message=["STOPPED"]
> 
> So you can see the server was told that the operation succeeded and what the
> results were in Message.
> 
> Lots more to do. But the end-to-end is working. Need to support parameters,
> next. Then have to figure out how to do resource configuration using this
> same comm mechanism.
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
> 


More information about the hawkular-dev mailing list