yumapro  20.10-14
YumaPro SDK
Load and Unload YANG

Load and unload SIL libraries at run-time. More...

Collaboration diagram for Load and Unload YANG:

Typedefs

typedef status_t(* agt_ncx_load_cbfn_t) (const xmlChar *name, void *cookie)
 callback function used by agt_ncx_load_for_all_bundles More...
 

Functions

status_t agt_ncx_load_init (void)
 Initialize the NCX Load module. More...
 
void agt_ncx_load_cleanup (void)
 Cleanup the NCX Load module. More...
 
status_t agt_ncx_load_module_ha (ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *name, const xmlChar *revision, boolean is_module, boolean is_load, val_value_t *dev_parent)
 Handle a <module-update> event in YP-HA standby mode. More...
 
void agt_ncx_load_dump_bundles (ses_cb_t *scb, xml_msg_hdr_t *mhdr, xmlns_id_t parent_nsid, int32 indent, int32 startindent)
 Generate XML <bundle> records for the support-save output. More...
 
status_t agt_ncx_load_boot_bundle (const xmlChar *bundle)
 Load a bundle at boot-time. More...
 
status_t agt_ncx_load_for_all_bundles (agt_ncx_load_cbfn_t cbfn, void *cookie)
 Invoke a callback for all the bundles. More...
 
status_t agt_ncx_load_for_all_modules (agt_ncx_load_cbfn_t cbfn, void *cookie)
 Invoke a callback for all the modules loaded dynamically. More...
 
boolean agt_ncx_load_any_waiting (void)
 Check if any bundles are waiting to be loaded from a SIL-SA subsystem. More...
 
void agt_ncx_load_stop_waiting (const xmlChar *bundle_name)
 Signal that a SIL-SA loaded a bundle and that bundle is no longer waiting and blocking load_running_config. More...
 
status_t agt_ncx_load_for_modules_in_bundles (agt_ncx_load_cbfn_t cbfn, void *cookie)
 Invoke a callback for all modules in all the bundles. More...
 

Detailed Description

Load and unload SIL libraries at run-time.

Uses NETCONF operations to handle all validation verification and maintenance of adding or removing a YANG module or YANG bundle.

Typedef Documentation

◆ agt_ncx_load_cbfn_t

typedef status_t(* agt_ncx_load_cbfn_t) (const xmlChar *name, void *cookie)

callback function used by agt_ncx_load_for_all_bundles

Walk all bundle names

Parameters
namethe bundle or module name
cookiecookie passed to agt_ncx_load_for_all_bundles or agt_ncx_load_for_all_modules
Returns
status; will stop on error exit

Function Documentation

◆ agt_ncx_load_any_waiting()

boolean agt_ncx_load_any_waiting ( void  )

Check if any bundles are waiting to be loaded from a SIL-SA subsystem.

Returns
TRUE if any bundles waiting; FALSE if no bundles waiting
Here is the caller graph for this function:

◆ agt_ncx_load_boot_bundle()

status_t agt_ncx_load_boot_bundle ( const xmlChar *  bundle)

Load a bundle at boot-time.

Do not use the same code at runtime when user sessions can be active Do not add to modules-state, etc since that will be done after all the modules and bundles from the the CLI/conf file

–bundle=foo : CLI or netconfd-pro.conf

Parameters
bundlebundle name
Returns
status
Here is the call graph for this function:

◆ agt_ncx_load_cleanup()

void agt_ncx_load_cleanup ( void  )

Cleanup the NCX Load module.

Called by the server during shutdown.

Here is the call graph for this function:

◆ agt_ncx_load_dump_bundles()

void agt_ncx_load_dump_bundles ( ses_cb_t scb,
xml_msg_hdr_t mhdr,
xmlns_id_t  parent_nsid,
int32  indent,
int32  startindent 
)

Generate XML <bundle> records for the support-save output.

Parameters
scbsession for output
mhdrXML message header to use
parent_nsidanamespace ID for parent object
indentindent increment (-1 for no increment)
startindentcurrent indent amount to use
Here is the call graph for this function:

◆ agt_ncx_load_for_all_bundles()

status_t agt_ncx_load_for_all_bundles ( agt_ncx_load_cbfn_t  cbfn,
void *  cookie 
)

Invoke a callback for all the bundles.

Parameters
cbfncallback function
cookiepointer to pass to callback (may be NULL)
Returns
status

◆ agt_ncx_load_for_all_modules()

status_t agt_ncx_load_for_all_modules ( agt_ncx_load_cbfn_t  cbfn,
void *  cookie 
)

Invoke a callback for all the modules loaded dynamically.

Parameters
cbfncallback function
cookiepointer to pass to callback (may be NULL)
Returns
status
Here is the call graph for this function:

◆ agt_ncx_load_for_modules_in_bundles()

status_t agt_ncx_load_for_modules_in_bundles ( agt_ncx_load_cbfn_t  cbfn,
void *  cookie 
)

Invoke a callback for all modules in all the bundles.

Parameters
cbfncallback function
cookiepointer to pass to callback (may be NULL)
Returns
status
Here is the call graph for this function:

◆ agt_ncx_load_init()

status_t agt_ncx_load_init ( void  )

Initialize the NCX Load module.

Returns
status of the initialization procedure
Here is the call graph for this function:

◆ agt_ncx_load_module_ha()

status_t agt_ncx_load_module_ha ( ses_cb_t scb,
rpc_msg_t msg,
const xmlChar *  name,
const xmlChar *  revision,
boolean  is_module,
boolean  is_load,
val_value_t dev_parent 
)

Handle a <module-update> event in YP-HA standby mode.

Parameters
scbsession making the module update request
msgdummy RPC message for errors
namename of module or bundle
revisionrevision of module or bundle
is_moduleTRUE for module; FALSE for bundle
is_loadTRUE for load, FALSE for unload
dev_parentparent object of any deviation parameters
Returns
status
Here is the call graph for this function:

◆ agt_ncx_load_stop_waiting()

void agt_ncx_load_stop_waiting ( const xmlChar *  bundle_name)

Signal that a SIL-SA loaded a bundle and that bundle is no longer waiting and blocking load_running_config.

Parameters
bundle_namethe bundle that was registered
Here is the call graph for this function: