Revision 19e7c7f6 ncclient/capabilities.py
b/ncclient/capabilities.py | ||
---|---|---|
23 | 23 |
return [] |
24 | 24 |
|
25 | 25 |
def schemes(url_uri): |
26 |
"""Given a URI that has a *scheme* query string (i.e. *:url* capability URI), will return a list |
|
27 |
of supported schemes. |
|
28 |
""" |
|
26 |
"Given a URI that has a *scheme* query string (i.e. `:url` capability URI), will return a list of supported schemes." |
|
29 | 27 |
return url_uri.partition("?scheme=")[2].split(",") |
30 | 28 |
|
31 | 29 |
class Capabilities: |
32 | 30 |
|
33 |
"""Represents the set of capabilities available to a NETCONF client or server. It is initialized |
|
34 |
with a list of capability URI's. These can be iterated over. |
|
35 |
|
|
36 |
Presence of a capability can be checked with the *in* operation. In addition to the URI, for |
|
37 |
capabilities of the form *urn:ietf:params:netconf:capability:$name:$version* their shorthand can |
|
38 |
be used as a key. For example, for *urn:ietf:params:netconf:capability:candidate:1.0* the |
|
39 |
shorthand would be *:candidate*. If version is significant, use *:candidate:1.0* as key. |
|
40 |
""" |
|
31 |
"Represents the set of capabilities available to a NETCONF client or server. It is initialized with a list of capability URI's." |
|
41 | 32 |
|
42 | 33 |
def __init__(self, capabilities): |
43 | 34 |
self._dict = {} |
Also available in: Unified diff