<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [Python] Accessing methods of ncclient manager in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4397195#M1095</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just found my answer.&lt;/P&gt;&lt;P&gt;All the operations (get,get_config, etc...) are spicified as a dictionary in the method manager.&lt;/P&gt;&lt;P&gt;With the use of 'help' function of python.&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; help (manager)
Help on module ncclient.manager in ncclient:

NAME
    ncclient.manager

DESCRIPTION
    This module is a thin layer of abstraction around the library.
    It exposes all core functionality.

&amp;lt;ommited&amp;gt;

DATA
  
    OPERATIONS = {'cancel_commit': &amp;lt;class 'ncclient.operations.edit.Cancel...
    &lt;/PRE&gt;&lt;P&gt;Then, when we call 'manager.operations' we have them all, it is kind silly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; dir(manager.operations)
['CancelCommit', 'CloseSession', 'Commit', 'CopyConfig', 'CreateSubscription', 'DeleteConfig', 'DiscardChanges', 'Dispatch', 'EditConfig', 'GenericRPC', 'Get', 'GetConfig', 'GetReply', 'GetSchema', 'KillSession', 'Lock', 'LockContext', 'MissingCapabilityError', 'OperationError', 'PoweroffMachine', 'RPC', 'RPCError', 'RPCReply', 'RaiseMode', 'RebootMachine', 'TimeoutExpiredError', 'Unlock', 'Validate', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'edit', 'errors', 'flowmon', 'lock', 'retrieve', 'rpc', 'session', 'subscribe', 'util']&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 May 2021 18:01:36 GMT</pubDate>
    <dc:creator>Guilherme Gianotto Bratfisch</dc:creator>
    <dc:date>2021-05-03T18:01:36Z</dc:date>
    <item>
      <title>[Python] Accessing methods of ncclient manager</title>
      <link>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4314547#M1092</link>
      <description>&lt;P&gt;Hello folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody tell me why when I use the manager of ncclient I cant check the method of it using the dot notation.&lt;BR /&gt;Here a print screen to illustrate, for example, the methods like "get_config", ""edit_config" exists but it doesn't shows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other way to check the methods available inside ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 22:14:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4314547#M1092</guid>
      <dc:creator>Guilherme Gianotto Bratfisch</dc:creator>
      <dc:date>2021-03-26T22:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Accessing methods of ncclient manager</title>
      <link>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4386993#M1093</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Guilherme,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see you are writing about the auto-complete function of an IDE. I wonder which one you're using. I recreated the core of your code in VS Code and I basically got the same auto-suggestions as you. Well, the 'get_config' and 'edit_config' are missing (see attached image)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried it in the Atom ID also and the 'get_config' and 'edit_config' are not auto-completion options there either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something is keeping these two methods from being suggested. I'm not sure why.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 18:01:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4386993#M1093</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2021-04-14T18:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Accessing methods of ncclient manager</title>
      <link>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4386995#M1094</link>
      <description>&lt;P&gt;Here's the GitHub repo and source code for ncclient / manager with all the available operations / methods:&lt;BR /&gt;&lt;A href="https://github.com/ncclient/ncclient/blob/master/ncclient/manager.py" target="_blank"&gt;https://github.com/ncclient/ncclient/blob/master/ncclient/manager.py&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 18:09:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4386995#M1094</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2021-04-14T18:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Accessing methods of ncclient manager</title>
      <link>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4397195#M1095</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just found my answer.&lt;/P&gt;&lt;P&gt;All the operations (get,get_config, etc...) are spicified as a dictionary in the method manager.&lt;/P&gt;&lt;P&gt;With the use of 'help' function of python.&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; help (manager)
Help on module ncclient.manager in ncclient:

NAME
    ncclient.manager

DESCRIPTION
    This module is a thin layer of abstraction around the library.
    It exposes all core functionality.

&amp;lt;ommited&amp;gt;

DATA
  
    OPERATIONS = {'cancel_commit': &amp;lt;class 'ncclient.operations.edit.Cancel...
    &lt;/PRE&gt;&lt;P&gt;Then, when we call 'manager.operations' we have them all, it is kind silly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; dir(manager.operations)
['CancelCommit', 'CloseSession', 'Commit', 'CopyConfig', 'CreateSubscription', 'DeleteConfig', 'DiscardChanges', 'Dispatch', 'EditConfig', 'GenericRPC', 'Get', 'GetConfig', 'GetReply', 'GetSchema', 'KillSession', 'Lock', 'LockContext', 'MissingCapabilityError', 'OperationError', 'PoweroffMachine', 'RPC', 'RPCError', 'RPCReply', 'RaiseMode', 'RebootMachine', 'TimeoutExpiredError', 'Unlock', 'Validate', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'edit', 'errors', 'flowmon', 'lock', 'retrieve', 'rpc', 'session', 'subscribe', 'util']&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 May 2021 18:01:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4397195#M1095</guid>
      <dc:creator>Guilherme Gianotto Bratfisch</dc:creator>
      <dc:date>2021-05-03T18:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Accessing methods of ncclient manager</title>
      <link>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4652567#M1096</link>
      <description>&lt;P&gt;Hello Guiherme,&lt;/P&gt;&lt;P&gt;I still have the same problem than you with&amp;nbsp;&lt;SPAN&gt;'get_config' and 'edit_config' - I cannot see them from connect.manager().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using ncclient 0.9.13 on my windows Pycharm machine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The only time i was able to use those method was from a Ubuntu machine with a&lt;EM&gt; different package version&amp;nbsp;0.6.0-2.1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Did you get a chance to find the right command to get_config and edit_config&amp;nbsp;? I am stuggling since days now...&lt;/P&gt;&lt;P&gt;If you can share some example, it would be great!&lt;/P&gt;&lt;P&gt;Unfortunately, i am unable to find any information on Internet with this new method.&lt;/P&gt;&lt;P&gt;Thanks, if you can help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;y = ncclient.operations.GetConfig.request(source="running")&lt;BR /&gt;&lt;STRONG&gt;TypeError&lt;/STRONG&gt;: GetConfig.request() missing 1 required positional argument: 'self'&lt;BR /&gt;&lt;BR /&gt; Z = ncclient.operations.EditConfig.request(target="running", config=netconf_hostname)&lt;BR /&gt;&lt;STRONG&gt;TypeError&lt;/STRONG&gt;: EditConfig.request() missing 1 required positional argument: 'self'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 22:53:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/python-accessing-methods-of-ncclient-manager/m-p/4652567#M1096</guid>
      <dc:creator>hnavi77</dc:creator>
      <dc:date>2022-07-18T22:53:49Z</dc:date>
    </item>
  </channel>
</rss>

