How do I do the following from console-cli.sh or console-cli.py

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I do the following from console-cli.sh or console-cli.py

linux168
1st of all, nice job on console-cli.sh. Super cool :)
I am wondering how do I do the following tasks from console-cli.sh|py:

1) It can be done by Web UI, but what is the command option (or Rest API)
    to select an existing  model and deploy it?

2) Click on 'Deployments' and one can see the completed (or archived) deployment logs.
    How do I do that from the console-cli.sh or any command?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: How do I do the following from console-cli.sh or console-cli.py

frenchyan
Administrator
The REST api is thoroughly explained here: http://pongasoft.github.io/glu/docs/latest/html/orchestration-engine.html#rest-api (most have curl examples to reproduce).

Hope this helps
Yan
Reply | Threaded
Open this post in threaded view
|

Re: How do I do the following from console-cli.sh or console-cli.py

linux168

We have two models. When certain condition is met, Model_A is loaded and executed,
otherwise load and execute Model_B.
If we keep using "console-cli.sh -m Model_x ... bounce ", then
the model list is getting bigger and bigger. But we only have two models.
From Web UI, one can select one of the model from model list and execute it.
Is it possible to do that from console-cli.sh or Rest API?
Do not see an API can retrieve/load existing (loaded) model for execution.
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: How do I do the following from console-cli.sh or console-cli.py

frenchyan
Administrator
This is quite odd. The console computes the sha-1 of the model loaded and does not create a new one if the sha-1 matches. Are you sure there is absolutely no difference between 2 uploads of the exact same model? Are you sure that your model does not include an id? If it does it may be the problem.

Is is possible for you to post what your model look like (from the console: go to the model and copy/paste what is in the textarea).

Thanks
Yan
Reply | Threaded
Open this post in threaded view
|

Re: How do I do the following from console-cli.sh or console-cli.py

linux168
You are right.
It does not create another model in the database as far as no change in the mode.json file.
Thanks for all the help.
Reply | Threaded
Open this post in threaded view
|

Re: How do I do the following from console-cli.sh or console-cli.py

frenchyan
Administrator
But you said that the list keep getting bigger and bigger. If that is the case then it is creating new entries in the database. Let me know.

Yan
Reply | Threaded
Open this post in threaded view
|

Re: How do I do the following from console-cli.sh or console-cli.py

linux168
Sorry about the mistake.
There is a timestamp in the mode.json file and it keeps changing.
That's why new entries got created.
Totally our fault.
 
Reply | Threaded
Open this post in threaded view
|

Re: How do I do the following from console-cli.sh or console-cli.py

linux168
In reply to this post by frenchyan
BTW, I am using 5.3.0 and the web UI is fine with the safari (of mountain lion) on my Mac.
Thanks