yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
Get YANG Module Properties

Get module properties and access fields within the ncx_module_t_ data structure. More...

Collaboration diagram for Get YANG Module Properties:

Functions

boolean ncx_any_dependency_errors (const ncx_module_t *mod)
 Check if any of the imports that this module relies on were loadeds are loaded with non-fatal errors. More...
 
boolean ncx_is_duplicate (ncx_module_t *mod, const xmlChar *defname)
 Check if a module definition name is a duplicate. More...
 
const xmlChar * ncx_get_modname (const ncx_module_t *mod)
 Get the main module name. More...
 
xmlns_id_t ncx_get_mod_nsid (const ncx_module_t *mod)
 Get the main module namespace ID. More...
 
const xmlChar * ncx_get_modversion (const ncx_module_t *mod)
 Get the [sub]module version. More...
 
const xmlChar * ncx_get_modnamespace (const ncx_module_t *mod)
 Get the module namespace URI. More...
 
const xmlChar * ncx_get_modsource (const ncx_module_t *mod)
 Get the module filespec source string. More...
 
ncx_module_tncx_get_mainmod (ncx_module_t *mod)
 Get the main module. More...
 
const xmlChar * ncx_get_mod_prefix (const ncx_module_t *mod)
 Get the module prefix for the specified module. More...
 
const xmlChar * ncx_get_mod_xmlprefix (const ncx_module_t *mod)
 Get the module XML prefix for the specified module. More...
 
const xmlChar * ncx_get_mod_source (const ncx_module_t *mod)
 Get the module file source string for the specified module. More...
 
const xmlChar * ncx_get_mod_revision (const ncx_module_t *mod)
 Get the module revision string for the specified module. More...
 
const xmlChar * ncx_get_mod_ocversion (const ncx_module_t *mod)
 Get the module openconfig-version string for the specified module. More...
 
status_t ncx_set_mod_ocversion (ncx_module_t *mod, const xmlChar *ocversion)
 Set the module openconfig-version string for the specified module. More...
 
dlq_hdr_t * ncx_get_allincQ (ncx_module_t *mod)
 Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value. More...
 
const dlq_hdr_t * ncx_get_const_allincQ (const ncx_module_t *mod)
 Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value (const version) More...
 
ncx_module_tncx_get_parent_mod (ncx_module_t *mod)
 Find the correct module by checking mod->parent nodes. More...
 
boolean ncx_mod_has_rpcs (ncx_module_t *mod)
 Check if the module has any RPC operation definitions. More...
 
boolean ncx_mod_has_data_nodes (ncx_module_t *mod, boolean check_config, boolean check_operational)
 Check if the module has any datastore definitions. More...
 
boolean ncx_mod_has_augment_data_nodes (ncx_module_t *mod, boolean check_config, boolean check_operational)
 Check if the module has any augment datastore definitions. More...
 
boolean ncx_mod_unloadable (ncx_module_t *mod)
 Check if this module can be unloaded. More...
 
void ncx_set_mod_unloadable (ncx_module_t *mod)
 Set this module so it can be unloaded. More...
 
ncx_module_tncx_first_submodule (ncx_module_t *mod)
 Get the first submodule in the specified main module. More...
 
ncx_module_tncx_next_submodule (ncx_module_t *mod, ncx_module_t *submod)
 Get the next submodule in the specified main module. More...
 
void ncx_set_module_supported (ncx_module_t *mod, boolean supported)
 Set the module supported field. More...
 
ncx_yang_version_t ncx_get_yang_version (const ncx_module_t *mod)
 Get the yang-version used in the module. More...
 
void ncx_number_all_objects (ncx_module_t *mod)
 Number all objects for internal ordering comparisons. More...
 
boolean ncx_mod_is_hidden (const ncx_module_t *mod)
 Check if the module is forced no advertise (e.g. More...
 
void ncx_set_mod_hidden (ncx_module_t *mod)
 Force the module to be hidden from advertisement. More...
 
status_t ncx_check_yang_identity (ncx_module_t *impmod, const xmlChar *idstr)
 Check if an identity string is available in the module. More...
 
void ncx_set_ocpattern_mode (ncx_module_t *mod, boolean mode)
 Set the openconfig pattern mode. More...
 
void ncx_force_ocpattern_mode (ncx_module_t *mod)
 Force the openconfig pattern mode to TRUE. More...
 
boolean ncx_get_ocpattern_mode (const ncx_module_t *mod)
 Get the openconfig pattern mode. More...
 
boolean ncx_modname_is_ocpattern (const xmlChar *modname)
 Check if the module name is an openconfig file. More...
 
boolean ncx_skip_child_node_warn (const xmlChar *modname)
 Internal compiler check to suppress warnings. More...
 
void ncx_clr_enable_chk (ncx_module_t *mod)
 Clear the enable check test done flag in all objects in the specified module. More...
 
void ncx_set_yangmap_type (ncx_module_t *mod, boolean is_src)
 Set the yangmap type flags. More...
 
boolean ncx_is_yangmap_type (ncx_module_t *mod, boolean is_src)
 Check the yangmap type flags. More...
 
boolean ncx_mod_has_submodules (const ncx_module_t *mod)
 Check if this is a main module with submodules. More...
 

Detailed Description

Get module properties and access fields within the ncx_module_t_ data structure.

Read YANG statement properties.

Function Documentation

◆ ncx_any_dependency_errors()

boolean ncx_any_dependency_errors ( const ncx_module_t mod)

Check if any of the imports that this module relies on were loadeds are loaded with non-fatal errors.

Returns
TRUE if any modules are loaded with non-fatal errors; FALSE if all modules present have a status of NO_ERR
Here is the call graph for this function:

◆ ncx_check_yang_identity()

status_t ncx_check_yang_identity ( ncx_module_t impmod,
const xmlChar *  idstr 
)

Check if an identity string is available in the module.

Parameters
impmodmodule that should be checked
idstridentity string value to find in impmod
Returns
status NO_ERR if idstr found in impmod
Here is the call graph for this function:

◆ ncx_clr_enable_chk()

void ncx_clr_enable_chk ( ncx_module_t mod)

Clear the enable check test done flag in all objects in the specified module.

Parameters
modmodule to clear
Here is the call graph for this function:

◆ ncx_first_submodule()

ncx_module_t * ncx_first_submodule ( ncx_module_t mod)

Get the first submodule in the specified main module.

Parameters
modmodule to search for the first submodule
Returns
pointer to the first submodule or NULL if none
Here is the caller graph for this function:

◆ ncx_force_ocpattern_mode()

void ncx_force_ocpattern_mode ( ncx_module_t mod)

Force the openconfig pattern mode to TRUE.

Parameters
modmodule struct getting set

◆ ncx_get_allincQ()

dlq_hdr_t * ncx_get_allincQ ( ncx_module_t mod)

Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value.

Parameters
modmodule to check
Returns
pointer to Q of all include nodes
Here is the caller graph for this function:

◆ ncx_get_const_allincQ()

const dlq_hdr_t * ncx_get_const_allincQ ( const ncx_module_t mod)

Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value (const version)

Parameters
modmodule to check
Returns
pointer to Q of all include nodes
Here is the caller graph for this function:

◆ ncx_get_mainmod()

ncx_module_t * ncx_get_mainmod ( ncx_module_t mod)

Get the main module.

Parameters
modsubmodule to get main module
Returns
main module NULL if error
Here is the call graph for this function:

◆ ncx_get_mod_nsid()

xmlns_id_t ncx_get_mod_nsid ( const ncx_module_t mod)

Get the main module namespace ID.

Parameters
modmodule or submodule to get main module namespace ID
Returns
namespace id number
Here is the caller graph for this function:

◆ ncx_get_mod_ocversion()

const xmlChar * ncx_get_mod_ocversion ( const ncx_module_t mod)

Get the module openconfig-version string for the specified module.

Parameters
modmodule to check
Returns
pointer to module openconfig-version string if any (not mandatory)
Here is the caller graph for this function:

◆ ncx_get_mod_prefix()

const xmlChar * ncx_get_mod_prefix ( const ncx_module_t mod)

Get the module prefix for the specified module.

Parameters
modmodule to check
Returns
pointer to module YANG prefix
Here is the caller graph for this function:

◆ ncx_get_mod_revision()

const xmlChar * ncx_get_mod_revision ( const ncx_module_t mod)

Get the module revision string for the specified module.

Parameters
modmodule to check
Returns
pointer to module revision string if any (not mandatory)
Here is the caller graph for this function:

◆ ncx_get_mod_source()

const xmlChar * ncx_get_mod_source ( const ncx_module_t mod)

Get the module file source string for the specified module.

Parameters
modmodule to check
Returns
pointer to module source filespec string

◆ ncx_get_mod_xmlprefix()

const xmlChar * ncx_get_mod_xmlprefix ( const ncx_module_t mod)

Get the module XML prefix for the specified module.

This will be set by the xmlns module when the module is registered. The prefix is allocated first-one-wins. If a later module tries to register the same prefix, the xmlprefix will be different than the prefix. Otherwise they will be the same.

Parameters
modmodule to check
Returns
pointer to module XML prefix
Here is the caller graph for this function:

◆ ncx_get_modname()

const xmlChar * ncx_get_modname ( const ncx_module_t mod)

Get the main module name.

Parameters
modmodule or submodule to get main module name
Returns
main module name or NULL if error
Here is the caller graph for this function:

◆ ncx_get_modnamespace()

const xmlChar * ncx_get_modnamespace ( const ncx_module_t mod)

Get the module namespace URI.

Parameters
modmodule or submodule to get module namespace
Returns
module namespace or NULL if error

◆ ncx_get_modsource()

const xmlChar * ncx_get_modsource ( const ncx_module_t mod)

Get the module filespec source string.

Parameters
modmodule or submodule to use
Returns
module filespec source string

◆ ncx_get_modversion()

const xmlChar * ncx_get_modversion ( const ncx_module_t mod)

Get the [sub]module version.

Parameters
modmodule or submodule to get module version
Returns
module version or NULL if error

◆ ncx_get_ocpattern_mode()

boolean ncx_get_ocpattern_mode ( const ncx_module_t mod)

Get the openconfig pattern mode.

Parameters
modmodule the module to check
Returns
T: openconfig mode; F: IETF mode

◆ ncx_get_parent_mod()

ncx_module_t * ncx_get_parent_mod ( ncx_module_t mod)

Find the correct module by checking mod->parent nodes.

Parameters
modmodule to check
Returns
pointer to parent module (!! not submodule !!); NULL if none found
Here is the caller graph for this function:

◆ ncx_get_yang_version()

ncx_yang_version_t ncx_get_yang_version ( const ncx_module_t mod)

Get the yang-version used in the module.

Parameters
modmodule to check
Returns
YANG language version enum used in this module
Here is the caller graph for this function:

◆ ncx_is_duplicate()

boolean ncx_is_duplicate ( ncx_module_t mod,
const xmlChar *  defname 
)

Check if a module definition name is a duplicate.

This function is for modules in progress which have not been added to the registry yet.

Parameters
modncx_module_t to check
defnamename of definition to find
Returns
TRUE if found, FALSE otherwise
Here is the call graph for this function:

◆ ncx_is_yangmap_type()

boolean ncx_is_yangmap_type ( ncx_module_t mod,
boolean  is_src 
)

Check the yangmap type flags.

Parameters
modmodule to check
is_srcTRUE to check source-module; FALSE to check target module
Returns
TRUE is module is flagged this yangmap type; FALSE if not

◆ ncx_mod_has_augment_data_nodes()

boolean ncx_mod_has_augment_data_nodes ( ncx_module_t mod,
boolean  check_config,
boolean  check_operational 
)

Check if the module has any augment datastore definitions.

Parameters
modmodule to check
check_configTRUE if config=true nodes should be checked
check_operationalTRUE if config=false nodes should be checked
Returns
TRUE if any top-level augments to external data modules in this module; FALSE if not
Here is the call graph for this function:

◆ ncx_mod_has_data_nodes()

boolean ncx_mod_has_data_nodes ( ncx_module_t mod,
boolean  check_config,
boolean  check_operational 
)

Check if the module has any datastore definitions.

Parameters
modmodule to check
check_configTRUE to check config=true
check_operationalTRUE to check config=false
Returns
TRUE if any datastore objects selected are in this module; FALSE if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_mod_has_rpcs()

boolean ncx_mod_has_rpcs ( ncx_module_t mod)

Check if the module has any RPC operation definitions.

Parameters
modmodule to check
Returns
TRUE if any RPC operations in this module; FALSE if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_mod_has_submodules()

boolean ncx_mod_has_submodules ( const ncx_module_t mod)

Check if this is a main module with submodules.

Only call after parsing is completed

Parameters
modmodule to check
Returns
TRUE if this module has submodules; FALSE otherwise

◆ ncx_mod_is_hidden()

boolean ncx_mod_is_hidden ( const ncx_module_t mod)

Check if the module is forced no advertise (e.g.

annotation)

This only hides the module from NETCONF and YANG library advertisement It will generally mess up the client if a module that is used and data is returned from that module, is actually hidden

Returns
TRUE if module is forced to be hidden from advertisement FALSE otherwise
See also
ncx_sen_mod_hidden
Here is the caller graph for this function:

◆ ncx_mod_unloadable()

boolean ncx_mod_unloadable ( ncx_module_t mod)

Check if this module can be unloaded.

Parameters
modmodule to check
Returns
TRUE if module can be removed from system with 'unload' operation; FALSE if module cannot be unloaded at run-time
See also
ncx_set_mod_unloadable

◆ ncx_modname_is_ocpattern()

boolean ncx_modname_is_ocpattern ( const xmlChar *  modname)

Check if the module name is an openconfig file.

Parameters
modnamethe module name to check
Returns
T: openconfig module name; F: other name
Here is the call graph for this function:

◆ ncx_next_submodule()

ncx_module_t * ncx_next_submodule ( ncx_module_t mod,
ncx_module_t submod 
)

Get the next submodule in the specified main module.

Parameters
modmodule to search for the next submodule
submodcurrent submodule
Returns
pointer to the next submodule or NULL if none
Here is the caller graph for this function:

◆ ncx_number_all_objects()

void ncx_number_all_objects ( ncx_module_t mod)

Number all objects for internal ordering comparisons.

Parameters
modmodule to go through and number all objects in this module
Here is the call graph for this function:

◆ ncx_set_mod_hidden()

void ncx_set_mod_hidden ( ncx_module_t mod)

Force the module to be hidden from advertisement.

Parameters
modmodule to force to be a hidden module
See also
ncx_mod_is_hidden

◆ ncx_set_mod_ocversion()

status_t ncx_set_mod_ocversion ( ncx_module_t mod,
const xmlChar *  ocversion 
)

Set the module openconfig-version string for the specified module.

Set by the YANG compiler; Not for external use

Parameters
modmodule to check
ocversionstring to set (mandatory, will overite any existing value)
Returns
status
Here is the call graph for this function:

◆ ncx_set_mod_unloadable()

void ncx_set_mod_unloadable ( ncx_module_t mod)

Set this module so it can be unloaded.

Parameters
modmodule to check
See also
ncx_mod_unloadable
Here is the caller graph for this function:

◆ ncx_set_module_supported()

void ncx_set_module_supported ( ncx_module_t mod,
boolean  supported 
)

Set the module supported field.

Parameters
modmodule to set
supportedTRUE if supported for conformance; FALSE if not
Here is the caller graph for this function:

◆ ncx_set_ocpattern_mode()

void ncx_set_ocpattern_mode ( ncx_module_t mod,
boolean  mode 
)

Set the openconfig pattern mode.

Parameters
modmodule to set
modeT: for openconfig mode [POSIX] F: IETF mode [XSD]

◆ ncx_set_yangmap_type()

void ncx_set_yangmap_type ( ncx_module_t mod,
boolean  is_src 
)

Set the yangmap type flags.

Parameters
modmodule to set
is_srcTRUE if source-module; FALSE if target module

◆ ncx_skip_child_node_warn()

boolean ncx_skip_child_node_warn ( const xmlChar *  modname)

Internal compiler check to suppress warnings.

Hack: hardwire module names that have corner-case YANG XPath that tests for child nodes that can only be added from external augments. The XPath checker gets fooled when parsing the base module

Parameters
modnamemodule name to check
Returns
TRUE to skip warning for this module; FALSE otherwise
Here is the call graph for this function: