nerdexam
Cisco

300-435 · Question #48

Refer to the exhibit. What is the correct ncclient method to use to collect the running configuration of a Cisco IOS XE device that uses NETCONF?

The correct answer is D. config=m.get_config(source='running'). The ncclient method to collect the running configuration from a NETCONF-enabled Cisco IOS XE device is m.get_config(source='running'), which directly maps to the NETCONF <get-config> operation.

Device-Level Network Automation

Question

Refer to the exhibit. What is the correct ncclient method to use to collect the running configuration of a Cisco IOS XE device that uses NETCONF?

Options

  • Aconfig=m.copy_config(source='running')
  • Bconfig=m.get(source='running')
  • Cconfig=m.collect_config(source='running')
  • Dconfig=m.get_config(source='running')

How the community answered

(22 responses)
  • A
    9% (2)
  • B
    5% (1)
  • D
    86% (19)

Why each option

The `ncclient` method to collect the running configuration from a NETCONF-enabled Cisco IOS XE device is `m.get_config(source='running')`, which directly maps to the NETCONF `<get-config>` operation.

Aconfig=m.copy_config(source='running')

The `copy_config()` method is used to copy configuration between datastores (e.g., running to startup), not to retrieve configuration for display or processing.

Bconfig=m.get(source='running')

The `get()` method is used to retrieve operational data (state information) and optionally configuration, but `get_config()` is specifically for configuration data and is more precise when only configuration is needed.

Cconfig=m.collect_config(source='running')

`collect_config()` is not a standard or recognized method within the `ncclient` library for retrieving configuration data.

Dconfig=m.get_config(source='running')Correct

The `ncclient` library's `get_config()` method directly implements the NETCONF `<get-config>` operation, which is the standard mechanism to retrieve configuration data from a device, and the `source='running'` argument specifies the running configuration datastore.

Concept tested: ncclient NETCONF get-config operation

Source: https://ncclient.readthedocs.io/en/latest/api.html#ncclient.manager.Manager.get_config

Topics

#NETCONF#ncclient#Configuration Retrieval#Cisco IOS XE

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice