yumapro
24.10-2
YumaPro SDK
|
Common function for RESTCONF and YANG-API protocols. More...
#include "ses.h"
#include "status.h"
#include "yangapi.h"
#include "yang_patch.h"
#include "getcb.h"
Go to the source code of this file.
Data Structures | |
struct | agt_yangapi_context_t |
module context node with cached schema tree and API template for retrieval (root) More... | |
struct | agt_restconf_data_t |
RESTCONF structure for data. More... | |
Functions | |
const xmlChar * | get_launchpoint_name (yangapi_launchpt_t launchpt) |
Get the keyword for the specified launchpt. More... | |
status_t | agt_restcmn_parse_fragment (yangapi_cb_t *rcb, xmlChar *uri, uint32 *retlen) |
parse the request URI fragment More... | |
status_t | agt_restcmn_parse_query_string (ses_cb_t *scb, rpc_msg_t *msg, yangapi_cb_t *rcb, xmlChar *uri, uint32 *retlen) |
parse the request URI query string More... | |
xmlChar * | agt_restcmn_get_param (yangapi_cb_t *rcb, const xmlChar *name, boolean *found) |
Find a query parameter and return its value. More... | |
yangapi_param_t * | agt_restcmn_get_first_param (yangapi_cb_t *rcb) |
Get the first query parameter entry from the parameter queue. More... | |
yangapi_param_t * | agt_restcmn_get_next_param (yangapi_param_t *param) |
Get the next query parameter entry from the parameter queue. More... | |
status_t | agt_restcmn_validate_query_string (ses_cb_t *scb, rpc_msg_t *msg, yangapi_cb_t *rcb) |
Validate the parameters in the request URI query string. More... | |
status_t | agt_restcmn_parse_path (ses_cb_t *scb, rpc_msg_t *msg, yangapi_cb_t *rcb, val_value_t *root, const xmlChar *path) |
parse the request URI path More... | |
status_t | agt_restcmn_get_http_input (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, int content_len) |
Get the input from the session input buffers and parse it as the specified target object type. More... | |
status_t | agt_restcmn_set_content_encoding (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg) |
Get the content encoding used. More... | |
boolean | agt_restcmn_check_unmodified_return (yangapi_cb_t *rcb) |
Check if the context node(s) will match the filters (if any) More... | |
status_t | agt_restcmn_setup_notifications (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg) |
setup the notification delivery on this GET request More... | |
status_t | agt_restcmn_setup_read_params (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg) |
Setup the message parameters from the yangapi_cb values. More... | |
boolean | agt_restcmn_operation_supports_json (obj_template_t *rpcobj) |
Check if the NETCONF operation supports JSON output. More... | |
status_t | agt_restcmn_get_operations (ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval) |
GET1 operation handler for the /operations container. More... | |
int | agt_restcmn_get_content_len (yangapi_cb_t *rcb) |
Get the content length for the input request message body. More... | |
status_t | agt_restcmn_validate_method (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg) |
validate that the method is supported for the URI given. More... | |
status_t | agt_restcmn_check_metpar_error (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, const xmlChar *parmname) |
validate that the URI parameters given are supported for the method More... | |
yangapi_method_t | agt_restcmn_get_method (const xmlChar *method) |
Get the HTTP method enum from the string. More... | |
boolean | agt_restcmn_method_is_read (yangapi_method_t method) |
Check if this is a read method. More... | |
boolean | agt_restcmn_validate_accept_header (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, boolean error_recorded, status_t *res) |
Validate the client Accept header. More... | |
xmlns_id_t | agt_restcmn_get_nsid (ncx_protocol_t proto) |
Get the XML namespace ID for specific proto. More... | |
void | agt_restcmn_free_msg (rpc_msg_t *msg) |
Free an rpc_msg_t. More... | |
void | agt_restcmn_print_debug_line (ses_cb_t *scb, yangapi_cb_t *rcb) |
Print the message received debug line. More... | |
boolean | agt_restcmn_get_config_parm (yangapi_cb_t *rcb, val_value_t *context_node) |
Get the value of the config parm to use. More... | |
val_value_t * | agt_restcmn_new_config_wrapper (void) |
Create a <config> wrapper val and return it. More... | |
xmlChar * | agt_restcmn_make_uri (ses_cb_t *scb, const xmlChar *target, const xmlChar *edit_target) |
Make a URI string. More... | |
xmlChar * | agt_restcmn_decode_url (const xmlChar *url, status_t *res) |
Decode URL encoded string value into string. More... | |
void | agt_restcmn_record_obj_error (ses_cb_t *scb, rpc_msg_t *msg, status_t res, obj_template_t *errobj, const xmlChar *badval) |
Record an rpc-error for YANG-API/RESTCONF response translation the error node is an object, not a value node. More... | |
void | agt_restcmn_record_error (ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, val_value_t *errnode, const xmlChar *badval) |
Record an rpc-error for YANG-API/RESTCONF response translation. More... | |
void | agt_restcmn_record_error_errinfo (ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, val_value_t *errnode, const xmlChar *badval, const ncx_errinfo_t *errinfo) |
Record an rpc-error for YANG-API/RESTCONF response translation. More... | |
void | agt_restcmn_obj_error (ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, obj_template_t *errobj, const xmlChar *badval) |
Record an rpc-error for YANG-API/RESTCONF response translation. More... | |
void | agt_restcmn_val_error (ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, val_value_t *errval, const xmlChar *badval) |
Record an rpc-error for YANG-API/RESTCONF response translation. More... | |
const xmlChar * | agt_restcmn_entry_point (void) |
Get the RESTCONF entry point name. More... | |
void | agt_restcmn_setup_launch_point (yangapi_cb_t *rcb) |
check the parseed request URI path set the API launch point data More... | |
status_t | agt_rescmn_setup_action_request (ses_cb_t *scb, rpc_msg_t *msg, yangapi_cb_t *rcb) |
Setup the data needed to invoke a YANG action. More... | |
val_value_t * | agt_restcmn_get_active_root (yangapi_cb_t *rcb) |
Select the active CFG and return its root val. More... | |
Common function for RESTCONF and YANG-API protocols.