Fixed: [if-feature always negative if imported from another module](https://github.com/clicon/clixon/issues/429)
Apply styleguide to snmp patch
This commit is contained in:
parent
fc967171f9
commit
a0df12134a
4 changed files with 14 additions and 7 deletions
|
|
@ -45,12 +45,14 @@ Expected: July 2023
|
|||
|
||||
### Minor features
|
||||
|
||||
* [Support yang type union with are same subtypes with SNMP](https://github.com/clicon/clixon/pull/427)
|
||||
* Removed obsolete compile options introduced in 6.1:
|
||||
* `NETCONF_DEFAULT_RETRIEVAL_REPORT_ALL`
|
||||
* `AUTOCLI_DEPRECATED_HIDE`
|
||||
|
||||
### Corrected Bugs
|
||||
|
||||
* Fixed: [if-feature always negative if imported from another module](https://github.com/clicon/clixon/issues/429)
|
||||
* Fixed autocli edit modes for schema mounts
|
||||
|
||||
## 6.2.0
|
||||
|
|
|
|||
|
|
@ -162,18 +162,19 @@ static const map_str2str yang_snmp_types[] = {
|
|||
* @retval 1 - true(All subtypes are the same)
|
||||
* @retval 0 - false
|
||||
*/
|
||||
int is_same_subtypes_union(yang_stmt *ytype, cbuf *cb)
|
||||
int
|
||||
is_same_subtypes_union(yang_stmt *ytype,
|
||||
cbuf *cb)
|
||||
{
|
||||
int retval = 0;
|
||||
yang_stmt *y_sub_type = NULL;
|
||||
yang_stmt *y_resolved_type = NULL; /* resolved type */
|
||||
char *resolved_type_str; /* resolved type */
|
||||
char *type_str = NULL;
|
||||
|
||||
int options = 0;
|
||||
cvec *cvv = NULL;
|
||||
cvec *patterns = NULL;
|
||||
uint8_t fraction_digits = 0;
|
||||
int options = 0;
|
||||
cvec *cvv = NULL;
|
||||
cvec *patterns = NULL;
|
||||
uint8_t fraction_digits = 0;
|
||||
|
||||
/* Loop over all sub-types in the resolved union type, note these are
|
||||
* not resolved types (unless they are built-in, but the resolve call is
|
||||
|
|
@ -200,7 +201,10 @@ int is_same_subtypes_union(yang_stmt *ytype, cbuf *cb)
|
|||
}
|
||||
return retval;
|
||||
}
|
||||
char* yang_type_to_snmp(yang_stmt *ytype, char* yang_type_str)
|
||||
|
||||
char*
|
||||
yang_type_to_snmp(yang_stmt *ytype,
|
||||
char* yang_type_str)
|
||||
{
|
||||
char* type_str = yang_type_str;
|
||||
if (yang_type_str && strcmp(yang_type_str, "union") == 0){
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@
|
|||
|
||||
/* Name of xml top object created by xml parse functions
|
||||
* This is a "neutral" symbol without any meaning as opposed to the previous symbols ^
|
||||
* @see DATASTORE_TOP_SYMBOL which should be used for clixon top-level config trees
|
||||
*/
|
||||
#define XML_TOP_SYMBOL "top"
|
||||
|
||||
|
|
|
|||
0
test/test_snmp_union.sh
Normal file → Executable file
0
test/test_snmp_union.sh
Normal file → Executable file
Loading…
Add table
Add a link
Reference in a new issue