[yast-devel] modelling a non trivial REST API
Hi, I have noticed that ALL existing plugins have a single REST path, a single model, a single controller. How to code the network model? It will have /interfaces/ /routes/ /dns /hostname In particular: - what about routes - how to connect to it in the client, using YaST::ServiceResource Should I create multiple configs in config/resources? I would like them all to share the same YaPI module. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thursday 20 August 2009 14:40:20 Martin Vidner wrote:
Hi,
I have noticed that ALL existing plugins have a single REST path, a single model, a single controller.
How to code the network model? It will have /interfaces/ /routes/ /dns /hostname
In particular: - what about routes - how to connect to it in the client, using YaST::ServiceResource
Should I create multiple configs in config/resources? I would like them all to share the same YaPI module.
Right now the resource definition does not support nested resources on the server side. What resources do you have nested right now? Duncan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Duncan Mac-Vicar Prett
On Thursday 20 August 2009 14:40:20 Martin Vidner wrote:
Hi,
I have noticed that ALL existing plugins have a single REST path, a single model, a single controller.
How to code the network model? It will have /interfaces/ /routes/ /dns /hostname
In particular: - what about routes - how to connect to it in the client, using YaST::ServiceResource
Should I create multiple configs in config/resources? I would like them all to share the same YaPI module.
Right now the resource definition does not support nested resources on the server side.
Oh, it does. See webservice/test/resource_fixtures/nested/config/resources and webservice/test/resource_fixtures/nested_singular/config/resources Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Martin Vidner
Hi,
I have noticed that ALL existing plugins have a single REST path, a single model, a single controller.
It doesn't have to be this way. A service plugin can have any number of .yml files below config/resources.
How to code the network model? It will have /interfaces/ /routes/ /dns /hostname
In particular: - what about routes - how to connect to it in the client, using YaST::ServiceResource
Can you share more details about your thoughts on the network model ? What (real world) 'thingie' is 'routes' going to model ? This is important knowledge and should be documented with/in your implementation.
Should I create multiple configs in config/resources?
Yes, please.
I would like them all to share the same YaPI module.
YaPI is 'behind' the D-Bus and shouldn't influence how you construct the service plugin. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Duncan Mac-Vicar Prett
-
Klaus Kaempf
-
Martin Vidner