yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
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_boot_bundle_savedevQ (const xmlChar *bundle, dlq_hdr_t *savedevQ)
 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_add_to_bundle (const xmlChar *bundle_name, const xmlChar *module_name, const xmlChar *revision)
 Add the specified module name to the bundle. 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...
 
boolean agt_ncx_load_bundle_loaded (const xmlChar *bundle)
 Verify is the bundle was already loaded. More...
 
status_t agt_ncx_load_bundle_module (ses_cb_t *scb, const xmlChar *module, const xmlChar *revision, boolean *loaded)
 Load the bundle module in all required locations. 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_add_to_bundle()

status_t agt_ncx_load_add_to_bundle ( const xmlChar *  bundle_name,
const xmlChar *  module_name,
const xmlChar *  revision 
)

Add the specified module name to the bundle.

Processing a <bundle-load-event> from a subsystem. Do not know any of the modules in the SIL-SA bundle when the <load-bundle> operation is invoked so need to fill in the list as the event is processed.

Parameters
bundle_namethe bundle that was previously loaded
module_namemodule to add to the bundle
revisionrevision date string (may be NULL)
Here is the call graph for this function:

◆ 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_boot_bundle_savedevQ()

status_t agt_ncx_load_boot_bundle_savedevQ ( const xmlChar *  bundle,
dlq_hdr_t *  savedevQ 
)

Load a bundle at boot-time.

Load it into specified Queue Load a bundle at boot-time for Mount Point

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
savedevQQ of ncx_save_deviations_t to use, if any
Returns
status

◆ agt_ncx_load_bundle_loaded()

boolean agt_ncx_load_bundle_loaded ( const xmlChar *  bundle)

Verify is the bundle was already loaded.

Verify is the bundle was already loaded

Parameters
bundlebundle name to find
Returns
TRUE if bundle is alerady loaded

◆ agt_ncx_load_bundle_module()

status_t agt_ncx_load_bundle_module ( ses_cb_t scb,
const xmlChar *  module,
const xmlChar *  revision,
boolean *  loaded 
)

Load the bundle module in all required locations.

Called for a subsystem only The running datastore has already been locked with a transaction in progress. This function will load the module in the locations for the bundles that have this module

Parameters
scbsession control block invoking the operation
modulemodule name to find
revisionrevision date to find (may be NULL)
[out]loadedaddress of return flag
*loaded = TRUE if module is loaded
Returns
status

◆ 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

◆ 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:
Here is the caller 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: