Comments (11)
from yang.
This seems to be related to what I've opened yesterday: freeconf/restconf#4
The inputs of RPC calls should be formatted differently too: freeconf/restconf#5
from yang.
from yang.
from yang.
Thanks for the quick reply. That was my reading of the specification, yes.
However I have only been reading through the spec today. I can look further into this and post back on this issue. I'm interested in using gconf to learn more about RestCONF and YANG, so would be happy to work on a pull request if it does turn out to be a bug :)
from yang.
According to RFC 7950 Section 7-.15:
The difference between an action and an rpc is that an action is tied
to a node in the datastore, whereas an rpc is not. When an action is
invoked, the node in the datastore is specified along with the name
of the action and the input parameters.
So an action could be thought of as a method on an object, which explains why it is attached to a URI with the format {+restconf}/data/<data-resource-identifier>/<action>
.
Looking at the ABNF grammar defined in RFC 7950 Section 14: rpc
statements have to be in the "module" level, whereas an action
has to be within a list
, container
or grouping
node (they can also be used in uses-augment
or augment
it seems, though I think this may be for overriding the action
statement?).
From my understanding, say you have server farm that models a list of running servers:
module server-farm {
container servers {
list servers {
key name;
leaf name {
type string;
}
action reset {
...
}
}
}
rpc powerdown {
...
}
}
The reset action is tied to a single server POST http://localhost:8080/restconf/data/server-farm:servers/server=server0/reset
, whereas shutting down the server farm itself is an RPC operation that acts on the module level POST http://localhost:8080/restconf/operation/server-farm:powerdown
.
from yang.
from yang.
Point 3 only seems to be referenced as a "might" in the specification, so could be separated into a nice-to-have ticket.
from yang.
from yang.
Maybe this could be adapted to add more testcases for freeconf... two years ago I started helping a different restconf project. For this I assembled a list of Restconf testcases derived from the IETF RFCs in machine readable form.
https://github.com/fkie/ietf-restconf-testcases
from yang.
This issue has been resolved in the "compliance" branch which will soon merge into master
from yang.
Related Issues (20)
- Yang loader gets blocked for for an invalid yang file. HOT 1
- Panic in freeconf/yang library when import is missing HOT 1
- No support for mutiple bases for identityref type. HOT 1
- Derived bases of identities are not as expected when muti-level imports are done HOT 4
- [Question] Is Default() method syntax changed intentionally? Is this correct if leaf has value other than string. HOT 3
- Panic in freeconf/yang library if two leaf nodes has the same name. HOT 1
- Panic when 'config:true' is added in yang HOT 3
- Config substatment is not supported under choice statement HOT 1
- Augmenting is failing if target node is any substatment under a choice HOT 7
- Failing to augment if taget node is choice and data to be augmented also is choice HOT 3
- No error thrown is when a duplicate node is added to container using augment. HOT 1
- No error is thrown if cases inside a choice contains child nodes with same name. HOT 2
- Leaf of type union wrongly inherits default and units from typedef HOT 3
- Fraction-digits is not inherited through typedef HOT 2
- Panic when 'config:true' is added inside a choicecase in yang HOT 2
- bit information for 'bits' datatype is not found if a typedef is used. HOT 3
- 'Config'=false setting from parent/grand-parents not getting inherited to data nodes under a choice HOT 4
- Issue with setting default value for list and leaf-list using refine HOT 4
- Setting default value through typedef for leaf-list generates panic HOT 7
- UnionLists overwrite list/leaf type of subtypes HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yang.