second try
[vsorcdistro/.git] / ryu / ryu / services / protocols / bgp / constants.py
1 # Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 """
16  Module that holds various constants.
17
18  This module helps in breaking circular dependencies too.
19 """
20
21 # Various states of bgp state machine.
22 BGP_FSM_IDLE = 'Idle'
23 BGP_FSM_CONNECT = 'Connect'
24 BGP_FSM_ACTIVE = 'Active'
25 BGP_FSM_OPEN_SENT = 'OpenSent'
26 BGP_FSM_OPEN_CONFIRM = 'OpenConfirm'
27 BGP_FSM_ESTABLISHED = 'Established'
28
29 # All valid BGP finite state machine states.
30 BGP_FSM_VALID_STATES = (BGP_FSM_IDLE, BGP_FSM_CONNECT, BGP_FSM_ACTIVE,
31                         BGP_FSM_OPEN_SENT, BGP_FSM_OPEN_CONFIRM,
32                         BGP_FSM_ESTABLISHED)
33
34 # Supported bgp protocol version number.
35 BGP_VERSION_NUM = 4
36
37 # Standard BGP server port number.
38 STD_BGP_SERVER_PORT_NUM = 179
39
40 #
41 # Constants used to indicate VRF prefix source.
42 #
43 # It indicates prefix inside VRF table came from bgp peer to VPN table and then
44 # to VRF table..
45 VPN_TABLE = 'vpn_table'
46 VRF_TABLE = 'vrf_table'
47
48 # RTC EOR timer default value
49 # Time to wait for RTC-EOR, before we can send initial UPDATE as per RFC
50 RTC_EOR_DEFAULT_TIME = 60
51
52 # Constants for AttributeMaps
53 ATTR_MAPS_ORG_KEY = '__orig'
54 ATTR_MAPS_LABEL_KEY = 'at_maps_key'
55 ATTR_MAPS_LABEL_DEFAULT = 'default'
56 ATTR_MAPS_VALUE = 'at_maps'