DevNet Flashcards

1
Q

What are the three main parts of the yang model?

A

modular router {
namespace “https://devnet-academy.com/router”;
prefix “router”;

    container router {
          // TODO Create leaf ID and hostname
          //  TODO Create a list interface with leaf name, address, netmask, and description 
          //TODO Make sure to add a key
                list interface {
                }
            }    }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Create a leaf list ID and Host name for router.yang

A

module router {
namespace “https://devnet-academy.com/router”;
prefix “router”;

container router {
leaf id {
type string;
}
leaf hostname {
type string;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Create a list interface with leaf name, IP address, netmask, and description for router.yang. Make sure to add a key.

A

module router {
namespace “https://devnet-academy.com/router”;
prefix “router”;
container router {
// TODO Create leaf id and hostname
leaf id {
type string;
}
leaf hostname {
type string;
}
// TODO Create list interface with leaf name, ip-address, netmask and description
// TODO Make sure to add a key
list interface {
key “name”;
leaf name {
type string;
}
leaf ip-address {
type string;
}
leaf netmask {
type string;
}
leaf description {
type string;
}
}
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the header for the corresponding router.xml?

A

<?xml version=”1.0” encoding=”UTF-8”?>

<data>

</data>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Start a Vault server in development mode (dev server).

A

vault server -dev

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

steps to create vault on Docker

A

$ docker pull hashicorp/vault
$ docker images
$ docker run –name vault -p 8200:8200 hashicorp/vault:latest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

You might have to set these two environment variables. Otherwise yang2dsdl will not work.

A

$ export PYANG_XSLT_DIR=$HOME/venvs/main/share/yang/xslt
$ export PYANG_RNG_LIBDIR=$HOME/venvs/main/share/yang/schema

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Command to convert .yang file to XML format (with annotations)

A

payang -f sample-xml-skeleton –sample-xml-skeleton-annotaitons router.yang

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Yang RFC-#

A

7950

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Providing Privilege Access to Use NETCONF

A

enable
configure terminal
username name privilege level(must be 15 for NETCONF) password password
aaa new-model
aaa authentication login default local
aaa authorization exec default local
end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Configuring NETCONF-YANG

A

enable
configure terminal
netconf-yang
netconf-yang feature candidate-datastore
exit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Import the ncclient manager

A

Import the ncclient manager
from ncclient import manager

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

using ncclient Connect to the device you want to configure

A

Connect to the device you want to configure
router = manager.connect(
host=”1.1.1.1”,
username=”developer”,
password=”C1sco12345”,
hostkey_verify=False
)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

pyang tree command

A

pyang -f tree router.yang

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

validate xml file

A

yang2dsdl -v router.xml router.yang

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

steps to create and validate yang model

A
  1. validate shema - payng -f tree ——
  2. convert .yang to xml format
  3. validate .xml
17
Q
A