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

Add route-map config #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
119 changes: 119 additions & 0 deletions sonic_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,116 @@ paths:
schema:
$ref: '#/definitions/Error'
#----------------------------------------------
# Setup route-map
#----------------------------------------------
'/config/route-map/{route_map_name}':
put:
summary: Configure route-map that are applied with the redistribute command of dynamic routing protocols
parameters:
- name: route_map_name
in: path
required: true
type: string
- name: attr
in: body
required: true
description: Route map attributes
schema:
$ref: '#/definitions/RouteMapEntry'
responses:
'204':
description: OK
'400':
description: Malformed arguments for API call
schema:
$ref: '#/definitions/Error'
'401':
description: Invalid authentication credentials
schema:
$ref: '#/definitions/Error'
'403':
description: Capacity insufficient
schema:
$ref: '#/definitions/Error'
'500':
description: Internal service error
schema:
$ref: '#/definitions/Error'
'503':
description: Maintanence mode
schema:
$ref: '#/definitions/Error'
get:
summary: get route-map information
parameters:
- name: route_map_name
in: path
required: true
type: string
responses:
'204':
description: OK
schema:
$ref: '#/definitions/RouteMapEntry'
'400':
description: Malformed arguments for API call
schema:
$ref: '#/definitions/Error'
'401':
description: Invalid authentication credentials
schema:
$ref: '#/definitions/Error'
'403':
description: Capacity insufficient
schema:
$ref: '#/definitions/Error'
'404':
description: Object not found
schema:
$ref: '#/definitions/Error'
'500':
description: Internal service error
schema:
$ref: '#/definitions/Error'
'503':
description: Maintanence mode
schema:
$ref: '#/definitions/Error'
delete:
summary: delete route-map
parameters:
- name: route_map_name
in: path
required: true
type: string
responses:
'204':
description: OK
'400':
description: Malformed arguments for API call
schema:
$ref: '#/definitions/Error'
'401':
description: Invalid authentication credentials
schema:
$ref: '#/definitions/Error'
'403':
description: Capacity insufficient
schema:
$ref: '#/definitions/Error'
'404':
description: Object not found
schema:
$ref: '#/definitions/Error'
'500':
description: Internal service error
schema:
$ref: '#/definitions/Error'
'503':
description: Maintanence mode
schema:
$ref: '#/definitions/Error'
#----------------------------------------------
# Schema definitions
#----------------------------------------------
definitions:
Expand Down Expand Up @@ -1400,3 +1510,12 @@ definitions:
ip_addr:
type: string
description: IP address of directly attached device to the switch
RouteMapEntry:
type: object
properties:
condition:
type: string
description: "condition to match the routes on"
action:
type: string
description: "modify route info"