<commit_before># Step 3 Seeing What Else You Can Do

One the key concepts in [Netconf](https://tools.ietf.org/html/rfc6241) is ["capabilities"](https://tools.ietf.org/html/rfc6241#section-1.3). These capabilities are implemented by the network elements that the controller manages, and the controller acts as an agent for the network elements, passing through what it discovers on the network elements. What this means overall, then, is that the main factor determining what you can do next is what the network elements support.

To what the network elements mounted in your controller supports, use the "*capability*" scripts, which will show you what is possible.

* 02_capability.py - Prints the capabilities supported by each device.

```bash
./02_capability.py 
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
   ...
por (http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg?revision=2013-07-22)Cisco-IOS-XR-shellutil-cfg
por (http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper?revision=2013-07-22)Cisco-IOS-XR-ifmgr-oper
por (http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg?revision=2013-07-22)Cisco-IOS-XR-infra-infra-cfg
...
```

* 02_capability_discovery.py - Checks which devices have specific, advanced, capabilities such as ACLs and static routes.

```bash
 ./02_capability_discovery.py 
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
  ...

capability_discovery(Cisco-IOS-XR-ipv4-acl-cfg, http://cisco.com/ns/yang/):
	 None

capability_discovery(Cisco-IOS-XR-ip-static-cfg, http://cisco.com/ns/yang/):
	 None
...
```
For each section of scripts for a given feature, there is also a script that will test which devices have the required capability to work with the feature, e.g.:
		
* 04_static_route_capability.py - Iterate through connected devices looking for the capability to add static routes.

```bash
./04_static_route_capability.py
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
  ...
Python Library Documentation: function capability_discovery in module basics.inventory

capability_discovery(capability_name=None, capability_ns=None, capability_revision=None, device_name=None)
    Discover the revision of the specified capability for a set of devices.
    
    The entire inventory will be examined unless a single device is specified.
    Function output is a list of tuples. 
    Each tuple consists of (device_name, (capability_name, capability_ns, capability_revision).

capability_discovery(device_name=sjc, capability_name=Cisco-IOS-XR-ip-static-cfg, capability_ns=http://cisco.com/ns/yang/)
None
...
```

* 05_acl_capability.py - Iterate through the connected devices looking for the capability to configure ACLs.

```bash
./05_acl_capability.py
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
..
Python Library Documentation: function capability_discovery in module basics.inventory

capability_discovery(capability_name=None, capability_ns=None, capability_revision=None, device_name=None)
    Discover the revision of the specified capability for a set of devices.
    
    The entire inventory will be examined unless a single device is specified.
    Function output is a list of tuples. 
    Each tuple consists of (device_name, (capability_name, capability_ns, capability_revision).

capability_discovery(device_name=sjc, capability_name=Cisco-IOS-XR-ipv4-acl-cfg, capability_ns=http://cisco.com/ns/yang/)
None
...
```

As this is a growing body of code, to see which scripts there are, use the `ls` command as shown below (note that this is a just an elided example of what you will see, as the contents will change over time): 

```bash
$ ls
00_controller.py 01_inventory_unreachable.py 04_static_route_json_all.py
00_devices.py	 02_capability.py 04_static_route_list.py
00_settings.py 02_capability_compare.py	04_story.py
01_device_connect.py 02_capability_discovery.py 04_topology.py
01_device_connected.py 02_capability_matrix.py	05_acl_apply_packet_filter.py
01_device_control.py 03_interface_configuration.py 05_acl_capability.py
…
```

Some of what these scripts cover includes the topics below. Note that not all of these scripts will be able to work in all deployments. It entirely depends on the capabilities of the network devices in the lab topology.

* Inventory
* Interfaces
* Routes
* Topology
* ACLs

This is a living body of code, and so can vary each time you use this lab.<commit_msg>Updated links.<commit_after># Step 3 Seeing What Else You Can Do

One the key concepts in [Netconf](https://tools.ietf.org/html/rfc6241) is ["capabilities"](https://tools.ietf.org/html/rfc6241#section-1.3). These capabilities are implemented by the network elements that the controller manages, and the controller acts as an agent for the network elements, passing through what it discovers on the network elements. What this means overall, then, is that the main factor determining what you can do next is what the network elements support.

To what the network elements mounted in your controller supports, use the "*capability*" scripts, which will show you what is possible.

* 02_capability.py - Prints the capabilities supported by each device.

```bash
./02_capability.py 
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
   ...
por (http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg?revision=2013-07-22)Cisco-IOS-XR-shellutil-cfg
por (http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper?revision=2013-07-22)Cisco-IOS-XR-ifmgr-oper
por (http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg?revision=2013-07-22)Cisco-IOS-XR-infra-infra-cfg
...
```

* 02_capability_discovery.py - Checks which devices have specific, advanced, capabilities such as ACLs and static routes.

```bash
 ./02_capability_discovery.py 
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
  ...

capability_discovery(Cisco-IOS-XR-ipv4-acl-cfg, http://cisco.com/ns/yang/):
	 None

capability_discovery(Cisco-IOS-XR-ip-static-cfg, http://cisco.com/ns/yang/):
	 None
...
```
For each section of scripts for a given feature, there is also a script that will test which devices have the required capability to work with the feature, e.g.:
		
* 04_static_route_capability.py - Iterate through connected devices looking for the capability to add static routes.

```bash
./04_static_route_capability.py
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
  ...
Python Library Documentation: function capability_discovery in module basics.inventory

capability_discovery(capability_name=None, capability_ns=None, capability_revision=None, device_name=None)
    Discover the revision of the specified capability for a set of devices.
    
    The entire inventory will be examined unless a single device is specified.
    Function output is a list of tuples. 
    Each tuple consists of (device_name, (capability_name, capability_ns, capability_revision).

capability_discovery(device_name=sjc, capability_name=Cisco-IOS-XR-ip-static-cfg, capability_ns=http://cisco.com/ns/yang/)
None
...
```

* 05_acl_capability.py - Iterate through the connected devices looking for the capability to configure ACLs.

```bash
./05_acl_capability.py
cosc authentication url: https://198.18.1.25/controller-auth
cosc authentication parameters:
..
Python Library Documentation: function capability_discovery in module basics.inventory

capability_discovery(capability_name=None, capability_ns=None, capability_revision=None, device_name=None)
    Discover the revision of the specified capability for a set of devices.
    
    The entire inventory will be examined unless a single device is specified.
    Function output is a list of tuples. 
    Each tuple consists of (device_name, (capability_name, capability_ns, capability_revision).

capability_discovery(device_name=sjc, capability_name=Cisco-IOS-XR-ipv4-acl-cfg, capability_ns=http://cisco.com/ns/yang/)
None
...
```

As this is a growing body of code, to see which scripts there are, use the `ls` command as shown below (note that this is a just an elided example of what you will see, as the contents will change over time): 

```bash
$ ls
00_controller.py 01_inventory_unreachable.py 04_static_route_json_all.py
00_devices.py	 02_capability.py 04_static_route_list.py
00_settings.py 02_capability_compare.py	04_story.py
01_device_connect.py 02_capability_discovery.py 04_topology.py
01_device_connected.py 02_capability_matrix.py	05_acl_apply_packet_filter.py
01_device_control.py 03_interface_configuration.py 05_acl_capability.py
…
```

Some of what these scripts cover includes the topics below. Note that not all of these scripts will be able to work in all deployments. It entirely depends on the capabilities of the network devices in the lab topology.

* Inventory
* Interfaces
* Routes
* Topology
* ACLs

This is a living body of code, and so can vary each time you use this lab.

## Step 4 - [Interfaces](4.md)
{'fraction_non_alphanumeric': 0.08636813730883486, 'fraction_numerical': 0.026845637583892617, 'mean_word_length': 4.778766687857597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1249011', 'n_tokens_mistral': 2948, 'n_tokens_neox': 2682, 'n_words': 905}