Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for 'ztp run' command #59

Open
wants to merge 214 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
214 commits
Select commit Hold shift + click to select a range
ac4ea94
Add gnmi doc
seiferteric Jul 30, 2019
81a3d92
Fix formatting, change target
seiferteric Jul 30, 2019
66c43bb
BRCM+Dell initial contribution of Mgmt-framework doc
Jul 30, 2019
4c351cf
Merge pull request #1 from project-arlo/eric-wip
seiferteric Jul 30, 2019
7337b14
Push latest changes from brcm
Aug 5, 2019
7fcdcac
Merge branch 'mgmt-framework' of https://github.com/project-arlo/SONi…
Aug 5, 2019
702f9af
Added Transformer section to HLD
jeff-yin Aug 5, 2019
308a985
Revert "Added Transformer section to HLD"
jeff-yin Aug 5, 2019
21e97a1
Un-revert "Added Transformer section to HLD"
jeff-yin Aug 5, 2019
4779f96
Updated GNMI information
skg-net Aug 6, 2019
1bc3f63
Added the GNMI Server Design
skg-net Aug 6, 2019
0c398b8
Merge pull request #2 from project-arlo/gnmi_upd
PrabhuSreenivasan Aug 6, 2019
5db33a7
few cosmetic changes
Aug 6, 2019
9256725
Update Mgmt_Frmk_Arch.jpg
jeff-yin Aug 6, 2019
412d2f5
Merge branch 'mgmt-framework' of https://github.com/project-arlo/SONi…
jeff-yin Aug 6, 2019
006daf6
Update management framework HLD
jeff-yin Aug 6, 2019
ed7c378
updated gnmi and cli section with some minor changes, and removal of …
jghalam Aug 7, 2019
80a5f03
BRCM changes
Aug 7, 2019
7e5b24a
fixed hyper link for Appendix
Aug 7, 2019
45add3b
removed section 11
Aug 7, 2019
a62dcbd
Management Framework HLD: Updated for
a-barboza Aug 7, 2019
442283d
HLD Management Framework:
a-barboza Aug 7, 2019
23871d1
HLD Management Framework: Fixed indents on last commit
a-barboza Aug 7, 2019
5a3ad84
Update Management Framework.md
kwangsuk Aug 8, 2019
27c7da5
update the transformer components diagram
kwangsuk Aug 8, 2019
9e71314
update the components diagram
kwangsuk Aug 8, 2019
3fff54a
updated developer work flow
Aug 8, 2019
41d3bed
fixed hyper links
Aug 8, 2019
48712dd
fixed hyper links
Aug 8, 2019
7fc4a13
replaced CISCO Style CLI with IS CLI
Aug 8, 2019
ea0cfbe
replaced the components diagram w/ larger version
kwangsuk Aug 8, 2019
680310a
Delete obsolete diagram
kwangsuk Aug 8, 2019
2ba87f9
Update management Framework HLD
jeff-yin Aug 9, 2019
201ee15
Updated Management Framework.md
dutta-partha Aug 9, 2019
01fb105
Merge pull request #3 from dutta-partha/patch-1
sachin-brm Aug 9, 2019
95123d2
Merge pull request #4 from project-arlo/mgmt-framework
a-barboza Aug 9, 2019
9db3778
Review comments incorporated.
Aug 22, 2019
469866b
Merge pull request #5 from project-arlo/master
PrabhuSreenivasan Aug 22, 2019
ac23706
Merge branch 'mgmt-framework' of https://github.com/project-arlo/SONi…
Aug 22, 2019
e22f70c
Merge pull request #6 from project-arlo/mgmt-framework
PrabhuSreenivasan Aug 22, 2019
16ceb13
Changes by broadcom team
Aug 27, 2019
5798ee9
Merge pull request #7 from project-arlo/mgmt-framework
PrabhuSreenivasan Aug 29, 2019
efcf7f4
Add files via upload
kwangsuk Sep 5, 2019
2f8ea6b
Delete transformer spec diagram.vsdx
kwangsuk Sep 5, 2019
2d7c87b
Add files via upload
kwangsuk Sep 5, 2019
ae5d8f2
Delete transformer_components.png
kwangsuk Sep 5, 2019
c5ab609
Delete transformer components.png
kwangsuk Sep 5, 2019
09858f0
Add files via upload
kwangsuk Sep 5, 2019
7b763ed
Add files via upload
kwangsuk Sep 5, 2019
8fbc809
Add files via upload
kwangsuk Sep 5, 2019
ff680c0
Update Management Framework.md
kwangsuk Sep 5, 2019
9c9b86b
update the Transformer section
kwangsuk Sep 5, 2019
0d41a24
Draft HLD - Openconfig support for management interface and respectiv…
Sep 13, 2019
8a88de2
Draft HLD - Openconfig support for management interface and respectiv…
Sep 13, 2019
6e9506b
ARP/NDP get support using mgmt framework
venkatmahalingam Sep 16, 2019
17485d7
Added YANG tree
venkatmahalingam Sep 16, 2019
383f46f
OC-VLAN-HLD Doc
Sep 16, 2019
5315008
Draft HLD - Openconfig support for FDB dump using management framewor…
venkatmahalingam Sep 17, 2019
b7b5c19
Delete SONiC_OC_ARP_NDP_get_support_HLD.md
venkatmahalingam Sep 17, 2019
c198ee0
sFlow HLD Document
GarrickHe Sep 17, 2019
c68e02d
Addressed managementt interface HLD review comments.
Sep 19, 2019
b7c251f
Update sFlow HLD
GarrickHe Sep 20, 2019
e1265bc
Update Management Framework.md
kwangsuk Sep 25, 2019
3275f4b
Update Management Framework.md
kwangsuk Sep 26, 2019
b717a74
Update Management Framework.md
kwangsuk Sep 26, 2019
7efcaa7
Update the Transformer section
kwangsuk Sep 26, 2019
4434143
Merge pull request #18 from project-arlo/Update-HLD
kwangsuk Sep 26, 2019
411365e
Resize the sequence diagrams
kwangsuk Sep 26, 2019
c41d9e3
resize the diagrams
kwangsuk Sep 26, 2019
1e596c5
Update Management Framework.md
kwangsuk Sep 28, 2019
535c451
updated images
kwangsuk Sep 29, 2019
6200a7a
update architecture diagram
kwangsuk Sep 29, 2019
e045691
update image
kwangsuk Sep 29, 2019
c23769f
Merge branch 'Update-HLD' of https://github.com/project-arlo/SONiC in…
kwangsuk Sep 29, 2019
38cfdb0
fix conflicts
kwangsuk Sep 29, 2019
60e12f7
Fix merging conflicts
kwangsuk Sep 30, 2019
a451026
Merge pull request #21 from project-arlo/Update-HLD
kwangsuk Sep 30, 2019
8accb18
Update based on SONiC YANG
dutta-partha Sep 30, 2019
ab4be29
Merge pull request #22 from dutta-partha/patch-1
PrabhuSreenivasan Sep 30, 2019
dc11ccf
redo the contents
kwangsuk Oct 2, 2019
2642b18
Update Management Framework.md
kwangsuk Oct 2, 2019
10fe5d9
Merge pull request #24 from project-arlo/Update-HLD
kwangsuk Oct 2, 2019
dc73aae
Update sFlow CLI examples
GarrickHe Oct 2, 2019
d97bff7
Draft HLD - Openconfig support for port channel interface and respect…
Tejaswi-Goel Sep 13, 2019
fd76b4c
Draft HLD - Openconfig support for port channel interface and respect…
Tejaswi-Goel Sep 13, 2019
ba186c5
Add LACP Get support
Oct 4, 2019
211171d
Merge branch 'oc-portchannel-interface' of https://github.com/project…
Oct 4, 2019
2f93e2d
Changes in the VLAN HLD doc with respect to the comments.
Oct 7, 2019
8b9a3bd
Updated the changes for displaying CLI command and its example.
Oct 7, 2019
3724af1
Update sFlow HLD
GarrickHe Oct 8, 2019
0fc5ee3
Update revision #
GarrickHe Oct 8, 2019
26a1066
Address review comments
Tejaswi-Goel Oct 7, 2019
2b04bcd
Changes in HLD wrt guidelines
Oct 8, 2019
fd3eb2f
Updated Openconfig support for managment interface HLD (SONiC_OC_MGMT…
Oct 8, 2019
65a7836
Updated Openconfig support for managment interface HLD (SONiC_OC_MGMT…
Oct 8, 2019
8196d94
Added #show interface Vlan command in HLD.
Oct 9, 2019
a61e5fa
Added the CLI command for MTU/admin-status config
Oct 9, 2019
39dc593
Fixed show output
Oct 9, 2019
8863a88
Addressed review comments
Oct 9, 2019
61174e5
Update commands and address review comments
Tejaswi-Goel Oct 9, 2019
1f1668c
Update commands and address review comments
Tejaswi-Goel Oct 9, 2019
5b328ea
Addressed the changes with respect to comments.
Oct 10, 2019
65c77ad
Update sFlow HLD
GarrickHe Oct 11, 2019
9d77b02
RADIUS Management User HLD 0.6
a-barboza Oct 15, 2019
354e75b
Incorporating review comments from the community
anand-kumar-subramanian Oct 15, 2019
560dc1d
Update sFlow HLD
GarrickHe Oct 15, 2019
5aa95d3
Fix grammar on sFlow HLD
GarrickHe Oct 15, 2019
ab6ac3d
Merge branch 'oc-portchannel-interface' of https://github.com/project…
Tejaswi-Goel Oct 14, 2019
375dae5
Merge branch 'oc-portchannel-interface' of https://github.com/project…
Tejaswi-Goel Oct 14, 2019
c4e2e24
Merge branch 'oc-portchannel-interface' of https://github.com/project…
Tejaswi-Goel Oct 16, 2019
951b8f7
Merge branch 'oc-portchannel-interface' of https://github.com/project…
Tejaswi-Goel Oct 16, 2019
4cb9623
Merge branch 'oc-portchannel-interface' of https://github.com/project…
Tejaswi-Goel Oct 16, 2019
0a59240
HLD for image management
Sep 18, 2019
f9395eb
initial version for Management vrf HLD
Oct 17, 2019
0c1f3e9
Incorporating review comments from the community phase 2
anand-kumar-subramanian Oct 17, 2019
f7962b8
Address review comments
Tejaswi-Goel Oct 17, 2019
0da2621
initial version
Oct 18, 2019
70e9a17
Address Review comment - Libraries used in sonic-telemetry
Oct 20, 2019
5a1a1fd
Merge pull request #30 from project-arlo/mgmtfr_spec_comments
dutta-partha Oct 21, 2019
7c51962
RADIUS Management User HLD 0.6
a-barboza Oct 21, 2019
bbe0af0
Update show PortChannel summary
Tejaswi-Goel Oct 18, 2019
fc2a7ec
Addressed review comments
Oct 23, 2019
9355e92
Minor updates
Tejaswi-Goel Oct 24, 2019
c283aa0
Addressing comments and updating FDB hld.
ViramShah91 Oct 24, 2019
dabd256
Update sFlow admin-state
GarrickHe Oct 28, 2019
0a6da10
Add Docker to Host communication Design document
nirenjan Oct 28, 2019
e2a8168
Updating FDB HLD and addressing comments.
ViramShah91 Oct 29, 2019
87fe4e1
updating FDB HLD and addressing comments
ViramShah91 Oct 30, 2019
bfa5191
Adding table reference
ViramShah91 Oct 30, 2019
0285a3e
Update SONiC_OC_FDB_get_support_HLD.md
ViramShah91 Oct 30, 2019
d3f6871
HLD for Inband Flow Analyzer feature
spenugondaa Oct 30, 2019
4f96c3c
Merge pull request #35 from project-arlo/sonic_host_service
nirenjan Oct 30, 2019
934a9ab
Merge pull request #14 from project-arlo/oc-fdb-get-support
jeff-yin Oct 30, 2019
acf1ed4
add initial version of data VRF HLD in mgmt framework
Oct 31, 2019
58cadd4
address 1 review comment and change vrf to ip vrf in cli cmd
Oct 31, 2019
44177b6
added ptree
spenugondaa Oct 31, 2019
8ecb004
Update sFlow HLD
GarrickHe Nov 1, 2019
2f36814
Fix revision table
GarrickHe Nov 1, 2019
e681827
Fix revision table format
GarrickHe Nov 1, 2019
3c5f361
1. add complete sonic vrf hld requirements. add a table to compare re…
Nov 4, 2019
dffd0c5
fix format
Nov 4, 2019
e7af9d3
fix format
Nov 4, 2019
55964ad
removed status/statistics commands as there is no db schema
spenugondaa Nov 5, 2019
b7f7d5a
Uploading the "Show Techsupport" HLD for review.
kerry-meyer Nov 5, 2019
a55fafa
Merge pull request #15 from project-arlo/sflow-hld
jeff-yin Nov 7, 2019
d10779a
Updated HLD with SONiC yang models info
Nov 7, 2019
3fe837b
Uploading a revised version to address comments from Jeff Yin
kerry-meyer Nov 7, 2019
78139d9
This version addresses follow-up comments from Jeff Yin.
kerry-meyer Nov 9, 2019
b846430
Update create PortChannel REST URI
Tejaswi-Goel Nov 8, 2019
2c8bb46
Updated show command output
Nov 13, 2019
2829dd9
Updated the HLD as per the comments and new commands.
Nov 13, 2019
4cd88f9
Minor bug fix for changing interface-mode
Nov 13, 2019
ceb1786
Merge pull request #10 from project-arlo/oc-mgmt-intf
jeff-yin Nov 13, 2019
da723c9
Merge pull request #11 from project-arlo/oc-portchannel-interface
jeff-yin Nov 13, 2019
ccb9bd7
Added backtick enclosure for the command syntax specification.
kerry-meyer Nov 14, 2019
8a2d5cd
Merge pull request #13 from project-arlo/oc_vlan_hld_br
bhavini-gada Nov 15, 2019
1b5fe0d
Remove redundant 'port' keyword
GarrickHe Nov 15, 2019
6d19fef
Correct a duplicated unit test case to specify the correct test descr…
kerry-meyer Nov 18, 2019
156553d
update HLD based on code review comments and fixes
spenugondaa Nov 21, 2019
0bdc419
Adding show ip arp HLD.
obaidamin Nov 22, 2019
3549887
Fixed command syntax
obaidamin Nov 22, 2019
5cbb88b
Minor edits
obaidamin Nov 22, 2019
738f869
Minor edits
obaidamin Nov 22, 2019
5672065
HLD: Management interface for Sonic Config Management operations (#33)
bhaveshdell Nov 22, 2019
36b8693
Merge pull request #44 from project-arlo/sflow-hld
bhavini-gada Nov 22, 2019
1d492b8
address comments
Nov 23, 2019
a40074d
Adding test unit cases
arunsundark Nov 19, 2019
4a2aa40
Merge pull request #16 from project-arlo/image-mgmt-feature-dev
jeff-yin Nov 25, 2019
0777c43
Merge pull request #28 from project-arlo/mgmt-vrf-framework
bhavini-gada Nov 26, 2019
2bb43d7
Merge pull request #38 from project-arlo/ifa_hld
bhavini-gada Nov 26, 2019
362680e
Merging PortChannel and VLAN HLD
Tejaswi-Goel Nov 26, 2019
5a54ef2
Add/modified the translib APIs for phase 2
anand-kumar-subramanian Nov 27, 2019
d1f576d
Adding clear counters design details
Tejaswi-Goel Nov 27, 2019
8b76edc
RESTCONF yang library and other enhancements
sachinholla Dec 3, 2019
45a2dae
RESTCONF yang library and other enhancements
sachinholla Dec 3, 2019
5941485
Provide changes to address review comments: Add requested additional …
kerry-meyer Dec 3, 2019
69481b9
Added a reference in the Overview section to the document describing …
kerry-meyer Dec 3, 2019
2407369
address comments
Dec 4, 2019
2c76baf
sync
Dec 4, 2019
499305f
Management framework Developer Guide
anand-kumar-subramanian Dec 5, 2019
4ad6c54
Fixed the links
anand-kumar-subramanian Dec 5, 2019
6fce350
Add details about D-Bus architecture (container to host).
mikelazar Dec 7, 2019
3450fdb
Merge pull request #51 from mikelazar/dbus-container--to-host-doc
mikelazar Dec 7, 2019
e09545c
.
Dec 9, 2019
5153492
Update Docker to Host communication.md
mikelazar Dec 10, 2019
68badf7
Merge pull request #43 from project-arlo/show-techsupport-hld
bhavini-gada Dec 11, 2019
896daf8
Added support for loopback interface HLD config
justinejose91 Dec 11, 2019
38b5dcd
Update SONiC_OC_Vlan_PortChannel_HLD.md
justinejose91 Dec 11, 2019
b53d7df
RBAC HLD (#37)
jeff-yin Dec 12, 2019
1e901cc
RESTCONF enity-tag support is moved to next release
sachinholla Dec 13, 2019
61626bf
Merge pull request #49 from project-arlo/rest_server_hld
anand-kumar-subramanian Dec 13, 2019
bb4f60f
Update SONiC_OC_Vlan_PortChannel_HLD.md
Tejaswi-Goel Dec 13, 2019
04f850e
Added details for 'clear ip/ipv6 arp/neighbors' commands.
obaidamin Dec 16, 2019
e3fe0cf
Add information on logging and security requirements.
mikelazar Dec 17, 2019
fdea75d
Merge pull request #1 from mikelazar/dbus-container--to-host-doc
mikelazar Dec 17, 2019
881fc5b
Merge branch 'master' into master
mikelazar Dec 17, 2019
d17d2a4
Merge pull request #54 from mikelazar/master
mikelazar Dec 17, 2019
6adfabb
Adding CVL related enhancement details
dutta-partha Dec 19, 2019
fe397ff
Merge pull request #56 from project-arlo/mgmt_framework_hld_cvl
sachin-brm Dec 20, 2019
84e94b9
Added 'force' option in syntax and in sonic-yang model.
obaidamin Dec 20, 2019
049eefc
Adding description of hamd DBus interface as well as hamctl (#57)
martin-belanger Jan 6, 2020
9605647
added a writeup for RESTCONF API GEN Tool
faraazc Jan 8, 2020
aa570d4
added a writeup for RESTCONF API GEN Tool, edited image
faraazc Jan 8, 2020
a1256a5
Removed USER DB and all the Tables will now be in the CONFIG DB
anand-kumar-subramanian Jan 8, 2020
0a9cf96
renamed: SONiC_OC_Vlan_PortChannel_HLD.md -> SONiC_OC_Interface_HLD.md
Tejaswi-Goel Dec 13, 2019
5679cc9
Updated sonic-yang module name
obaidamin Jan 9, 2020
c1fb760
Delete SONiC_OC_PortChannel_Interface_HLD.md
bhavini-gada Jan 15, 2020
b5a57b4
Delete SONiC_OC_Vlan_HLD.md
bhavini-gada Jan 15, 2020
4740795
Merge pull request #53 from project-arlo/common-hld-vlan-pc-counters
bhavini-gada Jan 15, 2020
88aa73b
Merge pull request #46 from project-arlo/hld-show-ip-arp
bhavini-gada Jan 16, 2020
d046a9c
Merge pull request #41 from project-arlo/bsun_data_vrf2
bhavini-gada Jan 16, 2020
8e07bb8
HLD for ztp support via mgmt-framework (#26)
arunsundark Jan 18, 2020
57f01e0
Added documentation for 'ztp run' command
olivier-singla Jan 24, 2020
5bfd41c
Fixed a typo in section 'ztp-run'
olivier-singla Jan 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions doc/aaa/Persistent HTTP Connections from CLI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Persistent HTTP connections from CLI
====================================

The SONiC CLI provided by the management framework container runs an instance of
klish, which provides a fixed set of commands. The CLI is simply a front-end to
the REST server, and each command is mapped to a corresponding REST endpoint.

# Command Flow

When the user enters a specific command on the CLI, the corresponding `ACTION`
tag in the CLI XML specification shells out to a Python script with any
arguments and an optional template to format the returned values. This script
connects to the REST server on the local machine over HTTPS, retrieves and
formats the JSON response. The Python script then exits, terminating any HTTP
connection that had been set up.

This is the current behavior, even without RBAC support, which means that every
command will need to set up a new HTTPS connection. However, when RBAC is
enabled, it is not likely to cause a noticeable performance impact, since the
system is already incurring the TLS overhead.

As can be seen from the flow above, it is not possible to set up a persistent
HTTP connection, since every command spawns a new connection.

# Alternative Designs

This section describes some alternative designs that will enable the CLI to
create a persistent connection.

## Proxy service

As part of the management framework, we can add a "proxy" service that is
spawned with the CLI. This service will set up a secure HTTP connection for the
authenticated user, and create a local unix socket that is accessible only by
that user. The CLI XML will remain unchanged, but the Python ApiClient class
will be changed to connect to the local socket.

This will still create independent HTTP connections, but they can be insecure
connections, while the proxy service will transfer the connections from the
insecure unix socket to the secure tunnel, which will reduce the TLS connection
time.

**Note:** The security considerations have not been completely mapped out, and
this may open the system up to security holes.

## Klish modification

This approach considers modifying the Klish executable. When Klish is spawned,
it will set up the HTTPS connection and keep it alive as long as the CLI is
active. Each `ACTION` tag will call into klish functions that will connect to
the existing HTTPS connection.

This approach is the most secure option, however, it needs heavy modification to
klish, and there are several unknowns at this time.

## No modification - Buzznik

This approach leaves the design as is for the Buzznik release. Every command
will continue to create a new HTTPS connection, as it does today, and will tear
down the connection on completion of the request.
460 changes: 460 additions & 0 deletions doc/aaa/SONiC RBAC HLD.md

Large diffs are not rendered by default.

284 changes: 284 additions & 0 deletions doc/ifa-hld.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
# Feature Name
Inband Flow Analyzer.
# High Level Design Document
#### Rev 0.1

# Table of Contents
* [List of Tables](#list-of-tables)
* [Revision](#revision)
* [About This Manual](#about-this-manual)
* [Scope](#scope)
* [Definition/Abbreviation](#definitionabbreviation)

# List of Tables
[Table 1: Abbreviations](#table-1-abbreviations)

# Revision
| Rev | Date | Author | Change Description |
|:---:|:-----------:|:------------------:|-----------------------------------|
| 0.1 | 10/30/2019 | Srinadh Penugonda| Initial version |

# About this Manual
This document provides general information about the Inband Flow Analyzer feature implementation in SONiC.
# Scope
This document describes the north bound interface and unit tests for Inband Flow Analyzer feature.

# Definition/Abbreviation

### Table 1: Abbreviations
| **Term** | **Meaning** |
|--------------------------|-------------------------------------|
| IFA | Inband Flow Analyzer |
| TAM | Telemetry and Monitoring |
# 1 Feature Overview

Inband Flow Analyzer is a flexible packet and flow monitoring inband telemtry solution. The feature allows configuration of IFA sessions that provide Inband telemetry over sampled traffic to collectors.

It provides mechanism to monitor and analyze when packets enter/exit the network, the path packets and flows take through the network, the rate at which packets arrive at each hop and how log packets spend at each hop etc., Out of band management technhiques can not measure such details.

## 1.1 Requirements

### 1.1.1 Functional Requirements

Provide management framework support to existing SONiC capabilities with respect to IFA.

1.1 IFA feature is accomplished by configuring IFA session on various nodes that act as ingress,
intermediate and egress devices. Device role is per flow in a node and a single node can act as ingress
device for one flow and intermediate device for another flow.

2.0.0.1 TAM device identifier to uniquely identify a device in network and insert the same in INT header.
2.0.0.2 ACL configuration to identify a flow and sample packets from that flow to insert IFA headers.
2.0.0.3 TAM collector configuration that can be attached to IFA flow on egress device to forward telemetry
data.
3.0 UI commands available to configure TAM device identifier, TAM collector and IFA configuration.
3.1 UI commands available to show TAM device identifier, TAM collector, IFA configuration
3.2 UI commands available to clear IFA configuration
4.0 The maximum number of IFA 􀃖ows are platform dependent.
4.1 Only one collector can be con􀃕gured in a device.
4.5 Some platforms may require provisioning to enable IFA. 'ifa -config -enable' command to be issued to
provision such platforms for IFA functionality. 'ifa -config -disable' command can be issued to disable
provisioning of IFA on such platforms.

### 1.1.2 Configuration and Management Requirements
1. CLI configuration/show support
2. REST API support
3. gNMI support

## 1.2 Design Overview
### 1.2.1 Basic Approach

As there is no opeconfig/ietf yang file exists for this feature, it is decided to go with sonic yang.

### 1.2.2 Container
The changes are in sonic-management-framework container.

There will be additional files added.
1. XML file for the CLI
2. Python script to handle CLI request (actioner)
3. Jinja template to render CLI output (renderer)
4. YANG models
sonic-ifa.yang

### 1.2.3 SAI Overview
N/A

# 2 Functionality
## 2.1 Target Deployment Use Cases
Whenever operator want to track packet latency/congestion metrics.
## 2.2 Functional Description
The management UI provides an user friendly interface to configure Inband Flow Analyzer.
# 3 Design
## 3.1 Overview
The packet action field in acl rule indicates the type of IFA device: ingress and egress. 'int_insert' makes the device as ingress IAF device and 'int_delete' as egress IFA device. Ingress IAF device makes a sample of a flow and tags them for analysis and data collection. Egress device is responsible for terminating IFA flow by summarizing the telemtry data of the entire path and sending it to the collector.

The device identifer uniquely identifies the device in the network and inserts the ID in the IFA header.

Collectors receive the telemetry data from egress devices.

Flow configuration will contain sampling rate at which rate traffic will be sampled.

IFA feature can be enabled or disabled.
## 3.6 User Interface
### 3.6.1 Data Models

https://github.com/project-arlo/sonic-mgmt-framework/blob/master/models/yang/sonic/sonic-ifa.yang

module: sonic-ifa
+--rw sonic-ifa
+--rw TAM_INT_IFA_FEATURE_TABLE
| +--rw TAM_INT_IFA_FEATURE_TABLE_LIST* [name]
| +--rw name enumeration
| +--rw enable? boolean
+--rw TAM_INT_IFA_FLOW_TABLE
+--rw TAM_INT_IFA_FLOW_TABLE_LIST* [name]
+--rw name string
+--rw acl-table-name string
+--rw acl-rule-name string
+--rw sampling-rate? uint16
+--rw collector-name? string

https://github.com/project-arlo/sonic-mgmt-framework/blob/master/models/yang/sonic/sonic-tam.yang

module: sonic-tam
+--rw sonic-tam
+--rw TAM_DEVICE_TABLE
| +--rw TAM_DEVICE_TABLE_LIST* [name]
| +--rw name enumeration
| +--rw deviceid? uint16
+--rw TAM_COLLECTOR_TABLE
+--rw TAM_COLLECTOR_TABLE_LIST* [name]
+--rw name string
+--rw ipaddress-type? enumeration
+--rw ipaddress? inet:ip-address
+--rw port? inet:port-number

### 3.6.2 CLI
#### 3.6.2.1 Configuration Commands
1. Command : confg tam device-id
Attribute : <id>
The command is used to configure TAM device identifier.

2. Command : config tam collector
Attribute(s) : {collector-name} ip-type <ipv4 | ipv6> ip-addr <address> port <port>
The command is used to configure TAM collector and IFA report will be forwarded to the collector.

3. Command : config tam int-ifa feature
Attribute : <enable | disable>
The command is used to enable or disable the IFA feature.

4. Command : config tam int-ifa flow
Attribute(s) : <flow-name> acl-rule <rule-name> acl-table <table-name> { sampling-rate <val> collector <name> }
The command is used to specify flow criteria to match against incoming flow and tag with IFA data. When sampling rate is specified, one packet will be sampled out of its value. When collector is specified, IFA report will be forwarded to it.

5. Command : config-tam no device-id
The command is used to clear user configured device identifier. Default device identifier is used.

6. Command : config-tam no collector
Attribute : <name>
The command is used to delete previously configured collector information.

7. Command : config-tam-int-ifa no flow
Attribute : <name>
The command is used to delete previously configure flow information.

#### 3.6.2.2 Show Commands
1. Command : show tam device
The command is used to show TAM device identifier.

2. Command : show tam collector
Attribute : { <name> | all }
The command is used to show TAM collector information.

3. Command : show tam int-ifa flow
Attribute(s) : { <name> | all }
The command is used to display configured IFA flow information.

4. Command : show tam int-ifa statistics
Attribute(s) : { <name> | all }
The command is used to display statisitcs of IFA flow.

5. Command : show tam int-ifa status
The command is used to display status of TAM.

#### 3.6.2.3 Debug Commands
N/A

### 3.6.3 REST API Support

1. Get Device Information
sonic-tam:sonic-tam/TAM_DEVICE_TABLE

2. Get Collector information
sonic-tam:sonic-tam/TAM_COLLECTOR_TABLE

3. Get particular collector information
sonic-tam:sonic-tam/TAM_COLLECTOR_TABLE/TAM_COLLECTOR_TABLE_LIST={name}

4. Get IFA feature information
sonic-ifa:sonic-ifa/TAM_INT_IFA_FEATURE_TABLE

5. Get IFA flow information
sonic-ifa:sonic-ifa/TAM_INT_IFA_FLOW_TABLE

6. Get particular IFA flow information
sonic-ifa:sonic-ifa/TAM_INT_IFA_FLOW_TABLE/TAM_INT_IFA_FLOW_TABLE_LIST={name}

7. Set device identifier
sonic-tam:sonic-tam/TAM_DEVICE_TABLE/TAM_DEVICE_TABLE_LIST={device}/deviceid
{
"sonic-tam:deviceid": 0
}

8. Set TAM collector
sonic-tam:sonic-tam/TAM_COLLECTOR_TABLE/TAM_COLLECTOR_TABLE_LIST
{
"sonic-tam:TAM_COLLECTOR_TABLE_LIST": [
{
"name": "string",
"ipaddress-type": "ipv4",
"v4addr": "string",
"v6addr": "string",
"port": 0
}
]
}

9. Set TAM INT IFA feature
sonic-ifa:sonic-ifa/TAM_INT_IFA_FEATURE_TABLE/TAM_INT_IFA_FEATURE_TABLE_LIST={feature}/enable
{
"sonic-ifa:enable": true
}

10. Set TAM INT IFA flow
sonic-ifa:sonic-ifa/TAM_INT_IFA_FLOW_TABLE/TAM_INT_IFA_FLOW_TABLE_LIST={name}
{
"sonic-ifa:TAM_INT_IFA_FLOW_TABLE_LIST": [
{
"name": "string",
"acl-table-name": "string",
"acl-rule-name": "string",
"sampling-rate": 0,
"collector": "string"
}
]
}

11. Delete TAM device identifier
sonic-tam:sonic-tam/TAM_DEVICE_TABLE/TAM_DEVICE_TABLE_LIST={device}/deviceid

12. Delete TAM collector
sonic-tam:sonic-tam/TAM_COLLECTOR_TABLE/TAM_COLLECTOR_TABLE_LIST={name}

13. Delete IFA flow
sonic-ifa:sonic-ifa/TAM_INT_IFA_FLOW_TABLE/TAM_INT_IFA_FLOW_TABLE_LIST={name}


# 4 Flow Diagrams
N/A
# 5 Error Handling
N/A
# 6 Serviceability and Debug
TBD

# 7 Warm Boot Support
N/A
# 8 Scalability
N/A
# 9 Unit Test
| Test Name | Test Description |
| :------ | :----- |
| Create TAM DEvice Identifier | Verify device-id is configured. Verify a value with more than five digits will be rejected |
| Delete TAM device Identifier | Verify when device-id is deleted, it defaults to default value of 0 |
| Create TAM collector | Verify TAM collector is configured ( ip address validation is does by application ) |
| Delete TAM collector | Verify TAM collector can be deleted |
| Enable TAM INT IFA Feature | Verify user can enable/disable IFA feature |
| Create IFA Flow | Verify IFA flow is configured. Verify configuration fails when user uses invalid acl table/rule. Verify configuration fails when user uses invalid collector name |
| Delete IFA flow | Verify IFA flow is deleted |
| Show TAM Device | Verify configured device identifier is displayed with the show command |
| Show TAM collector | Verify all collectors are displayed with 'all' keyword. Verify specified collector is displayed with the name. Verify command fails when an invalid flow name is used to display |
| Show TAM INT IFA flow | Verify all flow information is displayed when used with 'all'. Verify particular flow is displayed when name is supplied. Verify command fails when an non-existent flow name is given |
| show tam int ifa supported | Verify feature status is correctly displayed |


# 10 Internal Design Information
N/A
Loading