[Flex Counters] Reset flex counters delay flag on config DB when enable_counters script is called (#8500)
#### Why I did it Reset flex counters delay flag on config DB when enable_counters script is called to allow enablement of flex counters in orchagent. #### How I did it Push to config DB 'false' value for delay indication when enable_counters script is called before enabling the counters. #### How to verify it Observe counters are created when enable_counters script is called.
This commit is contained in:
parent
b7cad1c569
commit
112fda7877
@ -17,6 +17,9 @@ def enable_counter_group(db, name):
|
|||||||
info = {}
|
info = {}
|
||||||
info['FLEX_COUNTER_STATUS'] = 'enable'
|
info['FLEX_COUNTER_STATUS'] = 'enable'
|
||||||
db.mod_entry("FLEX_COUNTER_TABLE", name, info)
|
db.mod_entry("FLEX_COUNTER_TABLE", name, info)
|
||||||
|
else:
|
||||||
|
entry_info.update({"FLEX_COUNTER_DELAY_STATUS":"false"})
|
||||||
|
db.mod_entry("FLEX_COUNTER_TABLE", name, entry_info)
|
||||||
|
|
||||||
def enable_rates():
|
def enable_rates():
|
||||||
# set the default interval for rates
|
# set the default interval for rates
|
||||||
|
@ -23,6 +23,10 @@ module sonic-flex_counter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef flex_delay_status {
|
||||||
|
type boolean;
|
||||||
|
}
|
||||||
|
|
||||||
description "FLEX_COUNTER_TABLE part of config_db.json";
|
description "FLEX_COUNTER_TABLE part of config_db.json";
|
||||||
|
|
||||||
/* below are in alphabetical order */
|
/* below are in alphabetical order */
|
||||||
@ -32,6 +36,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container DEBUG_COUNTER {
|
container DEBUG_COUNTER {
|
||||||
@ -39,6 +46,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container PFCWD {
|
container PFCWD {
|
||||||
@ -46,6 +56,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container PG_DROP {
|
container PG_DROP {
|
||||||
@ -53,6 +66,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container PG_WATERMARK {
|
container PG_WATERMARK {
|
||||||
@ -60,6 +76,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container PORT {
|
container PORT {
|
||||||
@ -67,6 +86,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container PORT_RATES {
|
container PORT_RATES {
|
||||||
@ -74,6 +96,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container PORT_BUFFER_DROP {
|
container PORT_BUFFER_DROP {
|
||||||
@ -81,6 +106,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container QUEUE {
|
container QUEUE {
|
||||||
@ -88,6 +116,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container QUEUE_WATERMARK {
|
container QUEUE_WATERMARK {
|
||||||
@ -95,6 +126,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container RIF {
|
container RIF {
|
||||||
@ -102,6 +136,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container RIF_RATES {
|
container RIF_RATES {
|
||||||
@ -109,6 +146,9 @@ module sonic-flex_counter {
|
|||||||
leaf FLEX_COUNTER_STATUS {
|
leaf FLEX_COUNTER_STATUS {
|
||||||
type flex_status;
|
type flex_status;
|
||||||
}
|
}
|
||||||
|
leaf FLEX_COUNTER_DELAY_STATUS {
|
||||||
|
type flex_delay_status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user