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
Q

who are developing industry standard models

A

IETF and OpenConfig promote platform independent models

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

what is Cisco common model

A

models for configuration and state data shared by most Cisco platforms

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

which platforms have their own data models

A

ACI, Nexus 3k/9k NX-API

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

instead of using YANG, how does ACI implement constraints

A

Management Information Model

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

what is model drive programmability

A

decouples transport, protocol and encoding from the model used

30
Q

what is CRUD

A

create, retrieve, update, delete

31
Q

what is GET

A

retrieves a resource

32
Q

what is POST

A

creates a new resource

33
Q

what is PUT

A

update or replace a resource

34
Q

what is PATCH

A

update or modify a resource

35
Q

what is DELETE

A

removes a resource

36
Q

to make a REST call what do you need

A

a HTTP verb, URL, body (if changing), headers, authentication

37
Q

what are two common headers

A

accept and content-type which declare what you want back and what kind of data is sent to the server

38
Q

success response codes are

A
  • 200: request succeeded
  • 201: request fulfilled, new resource created
  • 202
  • 204: server completed the request but doesn’t return a body
39
Q

server error codes are

A
  • 500: internal error

- 501: not implemented

40
Q

client error codes are

A
  • 400: bad request, malformed syntax
  • 401: unauthorized
  • 403: request understood, but server won’t fulfill
  • 404: resource not found
41
Q

tools to send REST calls

A

curl, Postman, requests (Python)

42
Q

who designed NETCONF

A

IETF

43
Q

NETCONF makes a distinction between

A

state and configuration data

44
Q

which configuration databases NETCONF utilizes

A

candidate, running, startup

45
Q

on which side NETCONF validates configuration

A

client side

46
Q

which transport NETCONF uses

A

SSH

47
Q

what NETCONF does if one configuration object fails

A

it cancels the entire transaction

48
Q

which protocols are stateful and which are stateless

A
  • NETCONF: stateful

- REST and RESTCONF: stateless

49
Q

which encoding NETCONF uses

A

XML

50
Q

what is NETCONF content

A

it is XML objects that represent YANG models or XML Schema Definitions (XSD)

51
Q
A

Retrieve running configuration and device state information

52
Q
A

Retrieve all or part of a configuration datastore

53
Q
A

Loads all or part of a configuration to the specified datastore

54
Q
A

Delete a configuration datastore

55
Q
A

Replace and entire configuration datastore with another

56
Q

/

A

Lock or unlock the entire configuration datastore system

57
Q
A

Graceful termination of NETCONF session

58
Q
A

Forced termination of NETCONF session

59
Q

name NETCONF datastores

A

candidate, running, startup

60
Q

what NETCONF server replies first time

A

hello message explaining the capabilities of the server

61
Q

which port NETCONF uses on IOX-XE

A

SSH subsystem port 830

62
Q

how do you mark the ending of NETCONF message

A

]]>]]>

63
Q

explain four layers of NETCONF

A
  • content (everything inside an operation)
  • operations (config-copy, get etc.)
  • messages (RPCs)
  • transport protocols
64
Q

Python’s NETCONF client / library is

A

ncclient

65
Q

what is RESTCONF

A

YANG models via REST API

66
Q

what transport RESTCONF uses

A

HTTPS

67
Q

what encoding RESTCONF uses

A

XML or JSON

68
Q

what tools can be used with RESTCONF

A

Python’s requests, Firefox RESTclient, Postman

69
Q

what is gRPC

A

Googles’ open source remote procedure call framework

70
Q

what are the main subsets of NETCONF

A

gRPC and RESTCONF

71
Q

what devices support gRPC

A

IOS-XR based devices

72
Q

what are the key differencies of gRPC

A
  • utilizes HTTP/2 transport
  • improved security
  • bi-directional streaming of data