Add yang model unit test for check_up_status field type (#11243)

#### Why I did it
To address https://github.com/Azure/sonic-buildimage/issues/11110 - Add yang model unit test for check_up_status field type

#### How I did it
Add check_up_status with different values in sample_config_db.json and
the field with correct and incorrect values in feature.json

#### How to verify it
Build sonic_yang_models-1.0-py3-none-any.whl
This commit is contained in:
Senthil Kumar Guruswamy 2022-06-30 03:46:57 +05:30 committed by GitHub
parent 05f1c6f27f
commit dbc6681dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 16 deletions

View File

@ -1465,7 +1465,8 @@
"has_timer": "False",
"high_mem_alert": "disabled",
"state": "enabled",
"set_owner": "local"
"set_owner": "local",
"check_up_status": "False"
},
"database": {
"auto_restart": "always_enabled",
@ -1474,7 +1475,8 @@
"has_timer": "false",
"high_mem_alert": "disabled",
"state": "always_enabled",
"set_owner": "local"
"set_owner": "local",
"check_up_status": "false"
},
"snmp": {
"auto_restart": "enabled",
@ -1483,7 +1485,8 @@
"has_timer": "true",
"high_mem_alert": "disabled",
"state": "enabled",
"set_owner": "kube"
"set_owner": "kube",
"check_up_status": "true"
},
"swss": {
"auto_restart": "enabled",
@ -1492,7 +1495,8 @@
"has_timer": "false",
"high_mem_alert": "disabled",
"state": "enabled",
"set_owner": "local"
"set_owner": "local",
"check_up_status": "false"
},
"syncd": {
"auto_restart": "enabled",
@ -1501,7 +1505,8 @@
"has_timer": "false",
"high_mem_alert": "disabled",
"state": "enabled",
"set_owner": "local"
"set_owner": "local",
"check_up_status": "false"
},
"lldp": {
"auto_restart": "enabled",
@ -1510,7 +1515,8 @@
"has_timer": "false",
"high_mem_alert": "disabled",
"state": "enabled",
"set_owner": "kube"
"set_owner": "kube",
"check_up_status": "false"
},
"dhcp_relay": {
"auto_restart": "enabled",
@ -1519,7 +1525,8 @@
"has_timer": "false",
"high_mem_alert": "disabled",
"state": "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != 'ToRRouter') %}enabled{% else %}disabled{% endif %}",
"set_owner": "kube"
"set_owner": "kube",
"check_up_status": "true"
}
},
"DHCP_RELAY": {

View File

@ -10,7 +10,8 @@
"has_timer": "False",
"has_global_scope": "True",
"has_per_asic_scope": "True",
"set_owner": "local"
"set_owner": "local",
"check_up_status": "False"
},
{
"name": "swss",
@ -19,7 +20,8 @@
"has_timer": "false",
"has_global_scope": "false",
"has_per_asic_scope": "true",
"set_owner": "local"
"set_owner": "local",
"check_up_status": "false"
},
{
"name": "syncd",
@ -28,7 +30,8 @@
"has_timer": "false",
"has_global_scope": "false",
"has_per_asic_scope": "true",
"set_owner": "local"
"set_owner": "local",
"check_up_status": "false"
},
{
"name": "snmp",
@ -37,7 +40,8 @@
"has_timer": "false",
"has_global_scope": "true",
"has_per_asic_scope": "false",
"set_owner": "kube"
"set_owner": "kube",
"check_up_status": "false"
},
{
"name": "lldp",
@ -46,7 +50,8 @@
"has_timer": "false",
"has_global_scope": "false",
"has_per_asic_scope": "true",
"set_owner": "kube"
"set_owner": "kube",
"check_up_status": "false"
},
{
"name": "dhcp_relay",
@ -55,7 +60,8 @@
"has_timer": "false",
"has_global_scope": "false",
"has_per_asic_scope": "true",
"set_owner": "kube"
"set_owner": "kube",
"check_up_status": "false"
}
]
}
@ -72,7 +78,8 @@
"has_timer": "false",
"has_global_scope": "false",
"has_per_asic_scope": "true",
"set_owner": "invalid"
"set_owner": "invalid",
"check_up_status": "false"
}
]
}
@ -88,7 +95,8 @@
"auto_restart": "disabled",
"has_timer": "false",
"has_global_scope": "false",
"has_per_asic_scope": "true"
"has_per_asic_scope": "true",
"check_up_status": "false"
}
]
}
@ -104,7 +112,8 @@
"auto_restart": "always_enabled",
"has_timer": "FALSE",
"has_global_scope": "TRUE",
"has_per_asic_scope": "TRUE"
"has_per_asic_scope": "TRUE",
"check_up_status": "FALSE"
}
]
}