Introduction to Network APIs and Protocols Flashcards

1
Q

what is the issue with CLI when it comes to programmability

A

it was built for humans

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

why APIs are implemented

A

to allow machine to machine communication

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

what is SNMP is issue

A

frequent polling causes problems

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

what is SNMP agent

A

a network device

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

what are SNMPs main weaknesses

A
  • lack of SNMP libraries for programming languages

- major players like Google are kicking it out

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

what are the two main encoding types

A

xml and json

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

what are the main APIs

A

REST, RESTCONF, NETCONF, gRPC

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

what are the main transport protocols

A

SSH, TLS, HTTPS, HTTP/2

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

what is a data model

A

defines syntax and semantics when working with API

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

what encoding provides

A

a structured data formatting to exchange data between systems

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

JSON sends data using

A

key(or name)-value pairs

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

JSON natively maps to

A

Python dictionaries

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

.dumps() and .loads() are used

A

with JSON strings

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

to translate JSON string to dictionary

A

.loads()

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

APIs often return

A

JSON strings

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

to translate dictionary to JSON string

A

.dumps()

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

what is the difference between HTML and XML

A

HTML tags are standard, XML are user-defined

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

explain XML namespace

A

handles element name conflicts and using default namespace instead of defining attribute for each tag

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

python library used working with XML

A

lxml, XML is not a native Python object

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

what is a data model

A
  • constrained set of data in form of schemas
  • well-defined and standardized parameters so that outcome is the same amongts different platforms
  • relies protocols such as RESTCONF and NETCONF
  • supports configuration validation before commit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what data models are used for

A

input validation, collecting statistics, defining operational data, defining configuration data,

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

how data models are used

A

data model sets the boundaries for NETCONF/RESTCONF to send XML and JSON encoded data as an example

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

YANG can be used by

A

NETCONF, gRPC and RESTCONF

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

what are the three types of YANG models

A

industry standard, Cisco common and Cisco platform specific

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
who are developing industry standard models
IETF and OpenConfig promote platform independent models
26
what is Cisco common model
models for configuration and state data shared by most Cisco platforms
27
which platforms have their own data models
ACI, Nexus 3k/9k NX-API
28
instead of using YANG, how does ACI implement constraints
Management Information Model
29
what is model drive programmability
decouples transport, protocol and encoding from the model used
30
what is CRUD
create, retrieve, update, delete
31
what is GET
retrieves a resource
32
what is POST
creates a new resource
33
what is PUT
update or replace a resource
34
what is PATCH
update or modify a resource
35
what is DELETE
removes a resource
36
to make a REST call what do you need
a HTTP verb, URL, body (if changing), headers, authentication
37
what are two common headers
accept and content-type which declare what you want back and what kind of data is sent to the server
38
success response codes are
- 200: request succeeded - 201: request fulfilled, new resource created - 202 - 204: server completed the request but doesn't return a body
39
server error codes are
- 500: internal error | - 501: not implemented
40
client error codes are
- 400: bad request, malformed syntax - 401: unauthorized - 403: request understood, but server won't fulfill - 404: resource not found
41
tools to send REST calls
curl, Postman, requests (Python)
42
who designed NETCONF
IETF
43
NETCONF makes a distinction between
state and configuration data
44
which configuration databases NETCONF utilizes
candidate, running, startup
45
on which side NETCONF validates configuration
client side
46
which transport NETCONF uses
SSH
47
what NETCONF does if one configuration object fails
it cancels the entire transaction
48
which protocols are stateful and which are stateless
- NETCONF: stateful | - REST and RESTCONF: stateless
49
which encoding NETCONF uses
XML
50
what is NETCONF content
it is XML objects that represent YANG models or XML Schema Definitions (XSD)
51
Retrieve running configuration and device state information
52
Retrieve all or part of a configuration datastore
53
Loads all or part of a configuration to the specified datastore
54
Delete a configuration datastore
55
Replace and entire configuration datastore with another
56
/
Lock or unlock the entire configuration datastore system
57
Graceful termination of NETCONF session
58
Forced termination of NETCONF session
59
name NETCONF datastores
candidate, running, startup
60
what NETCONF server replies first time
hello message explaining the capabilities of the server
61
which port NETCONF uses on IOX-XE
SSH subsystem port 830
62
how do you mark the ending of NETCONF message
]]>]]>
63
explain four layers of NETCONF
- content (everything inside an operation) - operations (config-copy, get etc.) - messages (RPCs) - transport protocols
64
Python's NETCONF client / library is
ncclient
65
what is RESTCONF
YANG models via REST API
66
what transport RESTCONF uses
HTTPS
67
what encoding RESTCONF uses
XML or JSON
68
what tools can be used with RESTCONF
Python's requests, Firefox RESTclient, Postman
69
what is gRPC
Googles' open source remote procedure call framework
70
what are the main subsets of NETCONF
gRPC and RESTCONF
71
what devices support gRPC
IOS-XR based devices
72
what are the key differencies of gRPC
- utilizes HTTP/2 transport - improved security - bi-directional streaming of data