Chapter 2 Automate APIs and protocols Flashcards

Automate APIs and protocols

1
Q

What is YANG?

A

YANG is a data modelling language used to send information over NETCONF or RESTCONF protocols. It can be converted to XML or JSON.

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

What are the building blocks of YANG models?

A
  • Containers → group related elements together
  • Lists → ordered or unordered collection of entries (each entry can contain multiple elements)
  • Leafs → represent a single piece of data (integer, string…)
  • Leaf-lists → similar to a leaf but contain multiple simple values (integer, strings…)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you identify a JSON instance based on a YANG model?

A

Use the following rules:
- Container: A key-value pair in a dictionary, where the value is another dictionary.
- List: A key-value pair in a dictionary, where the value is a list of dictionaries.
- Leaf: A key-value pair in a dictionary, where the value is a scalar value.
- Leaf-list: A key-value pair in a dictionary, where the value is a list of scalar values.

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

How do you identify an XML instance based on a YANG model?

A

Use the following rules:
- Container: Represents a top-level XML element.
- List: Repeated XML elements under the container.
- Leaf: Individual tags with values inside them.
- Leaf-list: Multiple equal tags with different values.

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

What does the YANG module tree indicate?

A

The YANG module tree shows the hierarchical structure of a YANG module, indicating read/write capabilities and the relationships between elements.

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

What are the symbols used in a YANG module tree?

A

+— indicates a child element,
rw means the element can be read and written,
ro means it can only be read,
* marks a list or leaf list,
? indicates an optional element, and
[key] represents the key of a list.

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

What are the three main types of YANG models?

A

The three main types of YANG models are OpenConfig, IETF, and Native models.

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

What is OpenConfig?

A

OpenConfig modules are vendor-neutral and can be implemented in infrastructures with multiple vendor devices.

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

What is IETF?

A

IETF models are created and maintained by the IETF, making them widely accepted standards.

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

What are Native models?

A

Native models are vendor-specific and offer the most control over vendor-specific configurations.

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

What is NETCONF?

A

NETCONF is an IETF standard network management protocol designed for network device configuration and state retrieval.

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

What are the initial messages in a NETCONF session?

A

The initial messages are rpc (request) and rpc-reply (response).

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

What functions does NETCONF support?

A

NETCONF supports functions like get, get-config, and edit-config.

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

What is RESTCONF?

A

RESTCONF operates with HTTP CRUD operations and allows specifying methods and resources via URLs.

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