This file is indexed.

/usr/share/doc/python-ncclient/html/operations.html is in python-ncclient-doc 0.5.3-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>operations – Everything RPC &#8212; ncclient 0.4.4 documentation</title>
    
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.4.4',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="transport – Transport / Session layer" href="transport.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="transport.html" title="transport – Transport / Session layer"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">ncclient 0.4.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="api.html" accesskey="U">Complete API documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-ncclient.operations">
<span id="operations-everything-rpc"></span><h1><a class="reference internal" href="#module-ncclient.operations" title="ncclient.operations: Everything RPC"><code class="xref py py-mod docutils literal"><span class="pre">operations</span></code></a> &#8211; Everything RPC<a class="headerlink" href="#module-ncclient.operations" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="ncclient.operations.RaiseMode">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">RaiseMode</code><a class="headerlink" href="#ncclient.operations.RaiseMode" title="Permalink to this definition"></a></dt>
<dd><p>Define how errors indicated by RPC should be handled.</p>
<p>Note that any error_filters defined in the device handler will still be
applied, even if ERRORS or ALL is defined: If the filter matches, an exception
will NOT be raised.</p>
<dl class="attribute">
<dt id="ncclient.operations.RaiseMode.ALL">
<code class="descname">ALL</code><em class="property"> = 2</em><a class="headerlink" href="#ncclient.operations.RaiseMode.ALL" title="Permalink to this definition"></a></dt>
<dd><p>Don&#8217;t look at the <cite>error-type</cite>, always raise.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RaiseMode.ERRORS">
<code class="descname">ERRORS</code><em class="property"> = 1</em><a class="headerlink" href="#ncclient.operations.RaiseMode.ERRORS" title="Permalink to this definition"></a></dt>
<dd><p>Raise only when the <cite>error-type</cite> indicates it is an honest-to-god error.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RaiseMode.NONE">
<code class="descname">NONE</code><em class="property"> = 0</em><a class="headerlink" href="#ncclient.operations.RaiseMode.NONE" title="Permalink to this definition"></a></dt>
<dd><p>Don&#8217;t attempt to raise any type of <cite>rpc-error</cite> as <a class="reference internal" href="#ncclient.operations.RPCError" title="ncclient.operations.RPCError"><code class="xref py py-exc docutils literal"><span class="pre">RPCError</span></code></a>.</p>
</dd></dl>

</dd></dl>

<div class="section" id="base-classes">
<h2>Base classes<a class="headerlink" href="#base-classes" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="ncclient.operations.RPC">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">RPC</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.RPC" title="Permalink to this definition"></a></dt>
<dd><p>Base class for all operations, directly corresponding to <em>rpc</em> requests. Handles making the request, and taking delivery of the reply.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <a class="reference internal" href="#ncclient.operations.RPC.is_async" title="ncclient.operations.RPC.is_async"><code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></a></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <a class="reference internal" href="#ncclient.operations.RPC.timeout" title="ncclient.operations.RPC.timeout"><code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></a></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <a class="reference internal" href="#ncclient.operations.RPC.raise_mode" title="ncclient.operations.RPC.raise_mode"><code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></a></p>
<dl class="attribute">
<dt id="ncclient.operations.RPC.DEPENDS">
<code class="descname">DEPENDS</code><em class="property"> = []</em><a class="headerlink" href="#ncclient.operations.RPC.DEPENDS" title="Permalink to this definition"></a></dt>
<dd><p>Subclasses can specify their dependencies on capabilities as a list of URI&#8217;s or abbreviated names, e.g. &#8216;:writable-running&#8217;. These are verified at the time of instantiation. If the capability is not available, <a class="reference internal" href="#ncclient.operations.MissingCapabilityError" title="ncclient.operations.MissingCapabilityError"><code class="xref py py-exc docutils literal"><span class="pre">MissingCapabilityError</span></code></a> is raised.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPC.REPLY_CLS">
<code class="descname">REPLY_CLS</code><a class="headerlink" href="#ncclient.operations.RPC.REPLY_CLS" title="Permalink to this definition"></a></dt>
<dd><p>By default <a class="reference internal" href="#ncclient.operations.RPCReply" title="ncclient.operations.RPCReply"><code class="xref py py-class docutils literal"><span class="pre">RPCReply</span></code></a>. Subclasses can specify a <a class="reference internal" href="#ncclient.operations.RPCReply" title="ncclient.operations.RPCReply"><code class="xref py py-class docutils literal"><span class="pre">RPCReply</span></code></a> subclass.</p>
<p>alias of <a class="reference internal" href="#ncclient.operations.RPCReply" title="ncclient.operations.RPCReply"><code class="xref py py-class docutils literal"><span class="pre">RPCReply</span></code></a></p>
</dd></dl>

<dl class="method">
<dt id="ncclient.operations.RPC._assert">
<code class="descname">_assert</code><span class="sig-paren">(</span><em>capability</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.RPC._assert" title="Permalink to this definition"></a></dt>
<dd><p>Subclasses can use this method to verify that a capability is available with the NETCONF
server, before making a request that requires it. A <a class="reference internal" href="#ncclient.operations.MissingCapabilityError" title="ncclient.operations.MissingCapabilityError"><code class="xref py py-exc docutils literal"><span class="pre">MissingCapabilityError</span></code></a> will be
raised if the capability is not available.</p>
</dd></dl>

<dl class="method">
<dt id="ncclient.operations.RPC._request">
<code class="descname">_request</code><span class="sig-paren">(</span><em>op</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.RPC._request" title="Permalink to this definition"></a></dt>
<dd><p>Implementations of <a class="reference internal" href="#ncclient.operations.RPC.request" title="ncclient.operations.RPC.request"><code class="xref py py-meth docutils literal"><span class="pre">request()</span></code></a> call this method to send the request and process the reply.</p>
<p>In synchronous mode, blocks until the reply is received and returns <a class="reference internal" href="#ncclient.operations.RPCReply" title="ncclient.operations.RPCReply"><code class="xref py py-class docutils literal"><span class="pre">RPCReply</span></code></a>. Depending on the <a class="reference internal" href="#ncclient.operations.RPC.raise_mode" title="ncclient.operations.RPC.raise_mode"><code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></a> a <cite>rpc-error</cite> element in the reply may lead to an <a class="reference internal" href="#ncclient.operations.RPCError" title="ncclient.operations.RPCError"><code class="xref py py-exc docutils literal"><span class="pre">RPCError</span></code></a> exception.</p>
<p>In asynchronous mode, returns immediately, returning <cite>self</cite>. The <a class="reference internal" href="#ncclient.operations.RPC.event" title="ncclient.operations.RPC.event"><code class="xref py py-attr docutils literal"><span class="pre">event</span></code></a> attribute will be set when the reply has been received (see <a class="reference internal" href="#ncclient.operations.RPC.reply" title="ncclient.operations.RPC.reply"><code class="xref py py-attr docutils literal"><span class="pre">reply</span></code></a>) or an error occured (see <a class="reference internal" href="#ncclient.operations.RPC.error" title="ncclient.operations.RPC.error"><code class="xref py py-attr docutils literal"><span class="pre">error</span></code></a>).</p>
<p><em>op</em> is the operation to be requested as an <code class="xref py py-class docutils literal"><span class="pre">Element</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPC.error">
<code class="descname">error</code><a class="headerlink" href="#ncclient.operations.RPC.error" title="Permalink to this definition"></a></dt>
<dd><p><code class="xref py py-exc docutils literal"><span class="pre">Exception</span></code> type if an error occured or <cite>None</cite>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This represents an error which prevented a reply from being received. An <em>rpc-error</em>
does not fall in that category &#8211; see <cite>RPCReply</cite> for that.</p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPC.event">
<code class="descname">event</code><a class="headerlink" href="#ncclient.operations.RPC.event" title="Permalink to this definition"></a></dt>
<dd><p><code class="xref py py-class docutils literal"><span class="pre">Event</span></code> that is set when reply has been received or when an error preventing
delivery of the reply occurs.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPC.is_async">
<code class="descname">is_async</code><a class="headerlink" href="#ncclient.operations.RPC.is_async" title="Permalink to this definition"></a></dt>
<dd><p>Specifies whether this RPC will be / was requested asynchronously. By default RPC&#8217;s are synchronous.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPC.raise_mode">
<code class="descname">raise_mode</code><a class="headerlink" href="#ncclient.operations.RPC.raise_mode" title="Permalink to this definition"></a></dt>
<dd><p>Depending on this exception raising mode, an <cite>rpc-error</cite> in the reply may be raised as an <a class="reference internal" href="#ncclient.operations.RPCError" title="ncclient.operations.RPCError"><code class="xref py py-exc docutils literal"><span class="pre">RPCError</span></code></a> exception. Valid values are the constants defined in <a class="reference internal" href="#ncclient.operations.RaiseMode" title="ncclient.operations.RaiseMode"><code class="xref py py-class docutils literal"><span class="pre">RaiseMode</span></code></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPC.reply">
<code class="descname">reply</code><a class="headerlink" href="#ncclient.operations.RPC.reply" title="Permalink to this definition"></a></dt>
<dd><p><a class="reference internal" href="#ncclient.operations.RPCReply" title="ncclient.operations.RPCReply"><code class="xref py py-class docutils literal"><span class="pre">RPCReply</span></code></a> element if reply has been received or <cite>None</cite></p>
</dd></dl>

<dl class="method">
<dt id="ncclient.operations.RPC.request">
<code class="descname">request</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.RPC.request" title="Permalink to this definition"></a></dt>
<dd><p>Subclasses must implement this method. Typically only the request needs to be built as an
<code class="xref py py-class docutils literal"><span class="pre">Element</span></code> and everything else can be handed off to
<a class="reference internal" href="#ncclient.operations.RPC._request" title="ncclient.operations.RPC._request"><code class="xref py py-meth docutils literal"><span class="pre">_request()</span></code></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPC.timeout">
<code class="descname">timeout</code><a class="headerlink" href="#ncclient.operations.RPC.timeout" title="Permalink to this definition"></a></dt>
<dd><p>Timeout in seconds for synchronous waiting defining how long the RPC request will block on a reply before raising <a class="reference internal" href="#ncclient.operations.TimeoutExpiredError" title="ncclient.operations.TimeoutExpiredError"><code class="xref py py-exc docutils literal"><span class="pre">TimeoutExpiredError</span></code></a>.</p>
<p>Irrelevant for asynchronous usage.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.RPCReply">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">RPCReply</code><span class="sig-paren">(</span><em>raw</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.RPCReply" title="Permalink to this definition"></a></dt>
<dd><p>Represents an <em>rpc-reply</em>. Only concerns itself with whether the operation was successful.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If the reply has not yet been parsed there is an implicit, one-time parsing overhead to
accessing some of the attributes defined by this class.</p>
</div>
<dl class="method">
<dt id="ncclient.operations.RPCReply._parsing_hook">
<code class="descname">_parsing_hook</code><span class="sig-paren">(</span><em>root</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.RPCReply._parsing_hook" title="Permalink to this definition"></a></dt>
<dd><p>No-op by default. Gets passed the <em>root</em> element for the reply.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCReply.error">
<code class="descname">error</code><a class="headerlink" href="#ncclient.operations.RPCReply.error" title="Permalink to this definition"></a></dt>
<dd><p>Returns the first <a class="reference internal" href="#ncclient.operations.RPCError" title="ncclient.operations.RPCError"><code class="xref py py-class docutils literal"><span class="pre">RPCError</span></code></a> and <cite>None</cite> if there were no errors.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCReply.errors">
<code class="descname">errors</code><a class="headerlink" href="#ncclient.operations.RPCReply.errors" title="Permalink to this definition"></a></dt>
<dd><p>List of <cite>RPCError</cite> objects. Will be empty if there were no <em>rpc-error</em> elements in reply.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCReply.ok">
<code class="descname">ok</code><a class="headerlink" href="#ncclient.operations.RPCReply.ok" title="Permalink to this definition"></a></dt>
<dd><p>Boolean value indicating if there were no errors.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCReply.xml">
<code class="descname">xml</code><a class="headerlink" href="#ncclient.operations.RPCReply.xml" title="Permalink to this definition"></a></dt>
<dd><p><em>rpc-reply</em> element as returned.</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="ncclient.operations.RPCError">
<em class="property">exception </em><code class="descclassname">ncclient.operations.</code><code class="descname">RPCError</code><span class="sig-paren">(</span><em>raw</em>, <em>errs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.RPCError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.errors.OperationError</span></code></p>
<p>Represents an <cite>rpc-error</cite>. It is a type of <a class="reference internal" href="#ncclient.operations.OperationError" title="ncclient.operations.OperationError"><code class="xref py py-exc docutils literal"><span class="pre">OperationError</span></code></a> and can be raised as such.</p>
<dl class="attribute">
<dt id="ncclient.operations.RPCError.info">
<code class="descname">info</code><a class="headerlink" href="#ncclient.operations.RPCError.info" title="Permalink to this definition"></a></dt>
<dd><p>XML string or <cite>None</cite>; representing the <cite>error-info</cite> element.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCError.message">
<code class="descname">message</code><a class="headerlink" href="#ncclient.operations.RPCError.message" title="Permalink to this definition"></a></dt>
<dd><p>The contents of the <cite>error-message</cite> element if present or <cite>None</cite>.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCError.path">
<code class="descname">path</code><a class="headerlink" href="#ncclient.operations.RPCError.path" title="Permalink to this definition"></a></dt>
<dd><p>The contents of the <cite>error-path</cite> element if present or <cite>None</cite>.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCError.severity">
<code class="descname">severity</code><a class="headerlink" href="#ncclient.operations.RPCError.severity" title="Permalink to this definition"></a></dt>
<dd><p>The contents of the <cite>error-severity</cite> element.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCError.tag">
<code class="descname">tag</code><a class="headerlink" href="#ncclient.operations.RPCError.tag" title="Permalink to this definition"></a></dt>
<dd><p>The contents of the <cite>error-tag</cite> element.</p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.RPCError.type">
<code class="descname">type</code><a class="headerlink" href="#ncclient.operations.RPCError.type" title="Permalink to this definition"></a></dt>
<dd><p>The contents of the <cite>error-type</cite> element.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="operations">
<h2>Operations<a class="headerlink" href="#operations" title="Permalink to this headline"></a></h2>
<div class="section" id="retrieval">
<h3>Retrieval<a class="headerlink" href="#retrieval" title="Permalink to this headline"></a></h3>
<dl class="class">
<dt id="ncclient.operations.Get">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">Get</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Get" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p>The <em>get</em> RPC.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="attribute">
<dt id="ncclient.operations.Get.REPLY_CLS">
<code class="descname">REPLY_CLS</code><em class="property"> = &lt;class 'ncclient.operations.retrieve.GetReply'&gt;</em><a class="headerlink" href="#ncclient.operations.Get.REPLY_CLS" title="Permalink to this definition"></a></dt>
<dd><p>See <a class="reference internal" href="#ncclient.operations.GetReply" title="ncclient.operations.GetReply"><code class="xref py py-class docutils literal"><span class="pre">GetReply</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="ncclient.operations.Get.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>filter=None</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Get.request" title="Permalink to this definition"></a></dt>
<dd><p>Retrieve running configuration and device state information.</p>
<p><em>filter</em> specifies the portion of the configuration to retrieve (by default entire configuration is retrieved)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Seealso:</th><td class="field-body"><a class="reference internal" href="manager.html#filter-params"><span class="std std-ref">Filter parameters</span></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.GetConfig">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">GetConfig</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.GetConfig" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p>The <em>get-config</em> RPC.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="attribute">
<dt id="ncclient.operations.GetConfig.REPLY_CLS">
<code class="descname">REPLY_CLS</code><em class="property"> = &lt;class 'ncclient.operations.retrieve.GetReply'&gt;</em><a class="headerlink" href="#ncclient.operations.GetConfig.REPLY_CLS" title="Permalink to this definition"></a></dt>
<dd><p>See <a class="reference internal" href="#ncclient.operations.GetReply" title="ncclient.operations.GetReply"><code class="xref py py-class docutils literal"><span class="pre">GetReply</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="ncclient.operations.GetConfig.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>source</em>, <em>filter=None</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.GetConfig.request" title="Permalink to this definition"></a></dt>
<dd><p>Retrieve all or part of a specified configuration.</p>
<p><em>source</em> name of the configuration datastore being queried</p>
<p><em>filter</em> specifies the portion of the configuration to retrieve (by default entire configuration is retrieved)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Seealso:</th><td class="field-body"><a class="reference internal" href="manager.html#filter-params"><span class="std std-ref">Filter parameters</span></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.GetReply">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">GetReply</code><span class="sig-paren">(</span><em>raw</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.GetReply" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPCReply</span></code></p>
<p>Adds attributes for the <em>data</em> element to <cite>RPCReply</cite>.</p>
<dl class="attribute">
<dt id="ncclient.operations.GetReply.data">
<code class="descname">data</code><a class="headerlink" href="#ncclient.operations.GetReply.data" title="Permalink to this definition"></a></dt>
<dd><p>Same as <a class="reference internal" href="#ncclient.operations.GetReply.data_ele" title="ncclient.operations.GetReply.data_ele"><code class="xref py py-attr docutils literal"><span class="pre">data_ele</span></code></a></p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.GetReply.data_ele">
<code class="descname">data_ele</code><a class="headerlink" href="#ncclient.operations.GetReply.data_ele" title="Permalink to this definition"></a></dt>
<dd><p><em>data</em> element as an <code class="xref py py-class docutils literal"><span class="pre">Element</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="ncclient.operations.GetReply.data_xml">
<code class="descname">data_xml</code><a class="headerlink" href="#ncclient.operations.GetReply.data_xml" title="Permalink to this definition"></a></dt>
<dd><p><em>data</em> element as an XML string</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.Dispatch">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">Dispatch</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Dispatch" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p>Generic retrieving wrapper</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="attribute">
<dt id="ncclient.operations.Dispatch.REPLY_CLS">
<code class="descname">REPLY_CLS</code><em class="property"> = &lt;class 'ncclient.operations.retrieve.GetReply'&gt;</em><a class="headerlink" href="#ncclient.operations.Dispatch.REPLY_CLS" title="Permalink to this definition"></a></dt>
<dd><p>See <a class="reference internal" href="#ncclient.operations.GetReply" title="ncclient.operations.GetReply"><code class="xref py py-class docutils literal"><span class="pre">GetReply</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="ncclient.operations.Dispatch.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>rpc_command</em>, <em>source=None</em>, <em>filter=None</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Dispatch.request" title="Permalink to this definition"></a></dt>
<dd><p><em>rpc_command</em> specifies rpc command to be dispatched either in plain text or in xml element format (depending on command)</p>
<p><em>source</em> name of the configuration datastore being queried</p>
<p><em>filter</em> specifies the portion of the configuration to retrieve (by default entire configuration is retrieved)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Seealso:</th><td class="field-body"><a class="reference internal" href="manager.html#filter-params"><span class="std std-ref">Filter parameters</span></a></td>
</tr>
</tbody>
</table>
<p>Examples of usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dispatch</span><span class="p">(</span><span class="s1">&#39;clear-arp-table&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>or dispatch element like</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">xsd_fetch</span> <span class="o">=</span> <span class="n">new_ele</span><span class="p">(</span><span class="s1">&#39;get-xnm-information&#39;</span><span class="p">)</span>
<span class="n">sub_ele</span><span class="p">(</span><span class="n">xsd_fetch</span><span class="p">,</span> <span class="s1">&#39;type&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">text</span><span class="o">=</span><span class="s2">&quot;xml-schema&quot;</span>
<span class="n">sub_ele</span><span class="p">(</span><span class="n">xsd_fetch</span><span class="p">,</span> <span class="s1">&#39;namespace&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">text</span><span class="o">=</span><span class="s2">&quot;junos-configuration&quot;</span>
<span class="n">dispatch</span><span class="p">(</span><span class="n">xsd_fetch</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="editing">
<h3>Editing<a class="headerlink" href="#editing" title="Permalink to this headline"></a></h3>
<dl class="class">
<dt id="ncclient.operations.EditConfig">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">EditConfig</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.EditConfig" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>edit-config</cite> RPC</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.EditConfig.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>config</em>, <em>format='xml'</em>, <em>target='candidate'</em>, <em>default_operation=None</em>, <em>test_option=None</em>, <em>error_option=None</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.EditConfig.request" title="Permalink to this definition"></a></dt>
<dd><p>Loads all or part of the specified <em>config</em> to the <em>target</em> configuration datastore.</p>
<p><em>target</em> is the name of the configuration datastore being edited</p>
<p><em>config</em> is the configuration, which must be rooted in the <cite>config</cite> element. It can be specified either as a string or an <code class="xref py py-class docutils literal"><span class="pre">Element</span></code>.</p>
<p><em>default_operation</em> if specified must be one of { <cite>&#8220;merge&#8221;</cite>, <cite>&#8220;replace&#8221;</cite>, or <cite>&#8220;none&#8221;</cite> }</p>
<p><em>test_option</em> if specified must be one of { <cite>&#8220;test_then_set&#8221;</cite>, <cite>&#8220;set&#8221;</cite> }</p>
<p><em>error_option</em> if specified must be one of { <cite>&#8220;stop-on-error&#8221;</cite>, <cite>&#8220;continue-on-error&#8221;</cite>, <cite>&#8220;rollback-on-error&#8221;</cite> }</p>
<p>The <cite>&#8220;rollback-on-error&#8221;</cite> <em>error_option</em> depends on the <cite>:rollback-on-error</cite> capability.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.DeleteConfig">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">DeleteConfig</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.DeleteConfig" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>delete-config</cite> RPC</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.DeleteConfig.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>target</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.DeleteConfig.request" title="Permalink to this definition"></a></dt>
<dd><p>Delete a configuration datastore.</p>
<p><em>target</em> specifies the  name or URL of configuration datastore to delete</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Seealso:</th><td class="field-body"><a class="reference internal" href="manager.html#srctarget-params"><span class="std std-ref">Source and target parameters</span></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.CopyConfig">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">CopyConfig</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.CopyConfig" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>copy-config</cite> RPC</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.CopyConfig.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>source</em>, <em>target</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.CopyConfig.request" title="Permalink to this definition"></a></dt>
<dd><p>Create or replace an entire configuration datastore with the contents of another complete
configuration datastore.</p>
<p><em>source</em> is the name of the configuration datastore to use as the source of the copy operation or <cite>config</cite> element containing the configuration subtree to copy</p>
<p><em>target</em> is the name of the configuration datastore to use as the destination of the copy operation</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Seealso:</th><td class="field-body"><a class="reference internal" href="manager.html#srctarget-params"><span class="std std-ref">Source and target parameters</span></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.Validate">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">Validate</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Validate" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>validate</cite> RPC. Depends on the <cite>:validate</cite> capability.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.Validate.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>source='candidate'</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Validate.request" title="Permalink to this definition"></a></dt>
<dd><p>Validate the contents of the specified configuration.</p>
<p><em>source</em> is the name of the configuration datastore being validated or <cite>config</cite> element containing the configuration subtree to be validated</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Seealso:</th><td class="field-body"><a class="reference internal" href="manager.html#srctarget-params"><span class="std std-ref">Source and target parameters</span></a></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.Commit">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">Commit</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Commit" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>commit</cite> RPC. Depends on the <cite>:candidate</cite> capability, and the <cite>:confirmed-commit</cite>.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.Commit.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>confirmed=False</em>, <em>timeout=None</em>, <em>persist=None</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Commit.request" title="Permalink to this definition"></a></dt>
<dd><p>Commit the candidate configuration as the device&#8217;s new current configuration. Depends on the <cite>:candidate</cite> capability.</p>
<p>A confirmed commit (i.e. if <em>confirmed</em> is <cite>True</cite>) is reverted if there is no followup commit within the <em>timeout</em> interval. If no timeout is specified the confirm timeout defaults to 600 seconds (10 minutes). A confirming commit may have the <em>confirmed</em> parameter but this is not required. Depends on the <cite>:confirmed-commit</cite> capability.</p>
<p><em>confirmed</em> whether this is a confirmed commit</p>
<p><em>timeout</em> specifies the confirm timeout in seconds</p>
<p><em>persist</em> make the confirmed commit survive a session termination, and set a token on the ongoing confirmed commit</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.DiscardChanges">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">DiscardChanges</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.DiscardChanges" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>discard-changes</cite> RPC. Depends on the <cite>:candidate</cite> capability.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.DiscardChanges.request">
<code class="descname">request</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.DiscardChanges.request" title="Permalink to this definition"></a></dt>
<dd><p>Revert the candidate configuration to the currently running configuration. Any uncommitted changes are discarded.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="locking">
<h3>Locking<a class="headerlink" href="#locking" title="Permalink to this headline"></a></h3>
<dl class="class">
<dt id="ncclient.operations.Lock">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">Lock</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Lock" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>lock</cite> RPC</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.Lock.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>target='candidate'</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Lock.request" title="Permalink to this definition"></a></dt>
<dd><p>Allows the client to lock the configuration system of a device.</p>
<p><em>target</em> is the name of the configuration datastore to lock</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.Unlock">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">Unlock</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Unlock" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>unlock</cite> RPC</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.Unlock.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>target='candidate'</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.Unlock.request" title="Permalink to this definition"></a></dt>
<dd><p>Release a configuration lock, previously obtained with the lock operation.</p>
<p><em>target</em> is the name of the configuration datastore to unlock</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="session">
<h3>Session<a class="headerlink" href="#session" title="Permalink to this headline"></a></h3>
<dl class="class">
<dt id="ncclient.operations.CloseSession">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">CloseSession</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.CloseSession" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>close-session</cite> RPC. The connection to NETCONF server is also closed.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.CloseSession.request">
<code class="descname">request</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.CloseSession.request" title="Permalink to this definition"></a></dt>
<dd><p>Request graceful termination of the NETCONF session, and also close the transport.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ncclient.operations.KillSession">
<em class="property">class </em><code class="descclassname">ncclient.operations.</code><code class="descname">KillSession</code><span class="sig-paren">(</span><em>session</em>, <em>device_handler</em>, <em>async=False</em>, <em>timeout=30</em>, <em>raise_mode=0</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.KillSession" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.operations.rpc.RPC</span></code></p>
<p><cite>kill-session</cite> RPC.</p>
<p><em>session</em> is the <a class="reference internal" href="transport.html#ncclient.transport.Session" title="ncclient.transport.Session"><code class="xref py py-class docutils literal"><span class="pre">Session</span></code></a> instance</p>
<p><em>device_handler&#8221; is the :class:`~ncclient.devices.</em>.*DeviceHandler` instance</p>
<p><em>async</em> specifies whether the request is to be made asynchronously, see <code class="xref py py-attr docutils literal"><span class="pre">is_async</span></code></p>
<p><em>timeout</em> is the timeout for a synchronous request, see <code class="xref py py-attr docutils literal"><span class="pre">timeout</span></code></p>
<p><em>raise_mode</em> specifies the exception raising mode, see <code class="xref py py-attr docutils literal"><span class="pre">raise_mode</span></code></p>
<dl class="method">
<dt id="ncclient.operations.KillSession.request">
<code class="descname">request</code><span class="sig-paren">(</span><em>session_id</em><span class="sig-paren">)</span><a class="headerlink" href="#ncclient.operations.KillSession.request" title="Permalink to this definition"></a></dt>
<dd><p>Force the termination of a NETCONF session (not the current one!)</p>
<p><em>session_id</em> is the session identifier of the NETCONF session to be terminated as a string</p>
</dd></dl>

</dd></dl>

</div>
</div>
<div class="section" id="exceptions">
<h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline"></a></h2>
<dl class="exception">
<dt id="ncclient.operations.OperationError">
<em class="property">exception </em><code class="descclassname">ncclient.operations.</code><code class="descname">OperationError</code><a class="headerlink" href="#ncclient.operations.OperationError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.NCClientError</span></code></p>
</dd></dl>

<dl class="exception">
<dt id="ncclient.operations.MissingCapabilityError">
<em class="property">exception </em><code class="descclassname">ncclient.operations.</code><code class="descname">MissingCapabilityError</code><a class="headerlink" href="#ncclient.operations.MissingCapabilityError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.NCClientError</span></code></p>
</dd></dl>

<dl class="exception">
<dt id="ncclient.operations.TimeoutExpiredError">
<em class="property">exception </em><code class="descclassname">ncclient.operations.</code><code class="descname">TimeoutExpiredError</code><a class="headerlink" href="#ncclient.operations.TimeoutExpiredError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">ncclient.NCClientError</span></code></p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<p align="center">
  <a href="http://oss.schmizz.net/ncclient">
    <img src="_static/logo.png" width="125" height="125"/>
  </a>
</p>

  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#"><code class="docutils literal"><span class="pre">operations</span></code> &#8211; Everything RPC</a><ul>
<li><a class="reference internal" href="#base-classes">Base classes</a></li>
<li><a class="reference internal" href="#operations">Operations</a><ul>
<li><a class="reference internal" href="#retrieval">Retrieval</a></li>
<li><a class="reference internal" href="#editing">Editing</a></li>
<li><a class="reference internal" href="#locking">Locking</a></li>
<li><a class="reference internal" href="#session">Session</a></li>
</ul>
</li>
<li><a class="reference internal" href="#exceptions">Exceptions</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="transport.html"
                        title="previous chapter"><code class="docutils literal"><span class="pre">transport</span></code> &#8211; Transport / Session layer</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/operations.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="transport.html" title="transport – Transport / Session layer"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">ncclient 0.4.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="api.html" >Complete API documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2017, Shikhar Bhushan; 2011-2014, Leonidas Poulopoulos.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
    </div>
  </body>
</html>