Revision 35ad9d81 ncclient/capability.py
b/ncclient/capability.py | ||
---|---|---|
34 | 34 |
shorthand = Capabilities.guess_shorthand(uri) |
35 | 35 |
self._dict[uri] = shorthand |
36 | 36 |
|
37 |
set = add |
|
38 |
|
|
37 | 39 |
def remove(self, key): |
38 | 40 |
if key in self._dict: |
39 | 41 |
del self._dict[key] |
... | ... | |
42 | 44 |
if self._dict[uri] == key: |
43 | 45 |
del self._dict[uri] |
44 | 46 |
break |
45 |
|
|
47 |
|
|
46 | 48 |
@staticmethod |
47 | 49 |
def guess_shorthand(uri): |
48 | 50 |
if uri.startswith('urn:ietf:params:netconf:capability:'): |
49 | 51 |
return (':' + uri.split(':')[5]) |
52 |
|
|
50 | 53 |
|
51 | 54 |
CAPABILITIES = Capabilities([ |
52 | 55 |
'urn:ietf:params:netconf:base:1.0', |
Also available in: Unified diff