slapproxy: Add minimal hateoas support for cli
Add the minimum hateoas support required to let slapproxy
answer the cli commands:
slapos service list
slapos service info <reference>
slapos computer list
slapos computer info <reference>
To enable hateoas, complete the slapos.cfg
configuration with:
[slapos]
master_rest_url = <proxyaddr>/hateoas
Also: fix a few small bugs and python3 incompatibilities in slap/hateoas
.
Here are some test results for python2 and python3
- Resolved by Jérome Perrin
- Resolved by Xavier Thompson
added 1 commit
- f2dedf53 - slapproxy: Add minimal hatoeas support for cli
added 1 commit
- ef2d9d13 - slapproxy: Add minimal hatoeas support for cli
- Resolved by Xavier Thompson
ALERT: you should replace everywhere
hatoeas
(bad) byhateoas
(good) - Last reply by Xavier Thompson
added 1 commit
- 5230137c - slapproxy: Add minimal hateoas support for cli
- Resolved by Xavier Thompson
Thanks @xavier_thompson seems good.
added 1 commit
- fb197781 - slapproxy: Add minimal hateoas support for cli
Here are some tests results for python2 and python3 after the latest changes.
/cc @rafael
added 1 commit
- bb37ab55 - slapproxy: Add minimal hateoas support for cli
- Resolved by Xavier Thompson
As is, there is a difference in behaviour with slapos service list and service info as it shows all instances in the proxy. When working with slapos master, it only shows hosting subscription / root instances: i.e. what has been requested by the user.
Hosting subscriptions are partially implemented in slapproxy by the hackish "requested_by" column. It is used for garbage collect when destroying an instance and is very useful for this. I'm in favor of extending this behaviour to requests and services list. For request this is needed when wanting to have two erp5 instances on a single proxy. For service list, to provide clarity and consistent behaviour with existing slapos service list.
slapos proxy show
could be extended in order to actually list all instances and the parameters given to them. - Last reply by Xavier Thompson
added 1 commit
- 3ddb52b6 - slapproxy: Add minimal hateoas support for cli
added 12 commits
-
3ddb52b6...740021b4 - 11 commits from branch
nexedi:master
- 0631dc9f - slapproxy: Add minimal hateoas support for cli
-
3ddb52b6...740021b4 - 11 commits from branch
mentioned in commit xavier_thompson/slapos.core@655fb891
added 1 commit
- 655fb891 - slapproxy: Add minimal hateoas support for cli
mentioned in commit fee2ab1e