yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches
NETCONF Operations

Partial lock can only be used if –target=running It does not allow multiple threads to edit at once. More...

Collaboration diagram for NETCONF Operations:

Data Structures

struct  op_filter_t
 NETCONF protocol operation filter spec. More...
 
struct  plock_cb_t
 struct representing 1 configuration database More...
 

Typedefs

typedef uint32 plock_id_t
 matches lock-id-type in YANG module
 

Enumerations

enum  op_method_t {
  OP_NO_METHOD ,
  OP_GET_CONFIG ,
  OP_EDIT_CONFIG ,
  OP_COPY_CONFIG ,
  OP_DELETE_CONFIG ,
  OP_LOCK ,
  OP_UNLOCK ,
  OP_GET ,
  OP_CLOSE_SESSION ,
  OP_KILL_SESSION ,
  OP_COMMIT ,
  OP_DISCARD_CHANGES ,
  OP_VALIDATE ,
  OP_CANCEL_COMMIT
}
 NETCONF protocol operation enumeration is actually an RPC method in the NECONF namespace This is not really used anymore! More...
 
enum  op_srctyp_t {
  OP_SOURCE_NONE ,
  OP_SOURCE_CONFIG ,
  OP_SOURCE_INLINE ,
  OP_SOURCE_URL
}
 NETCONF protocol operation PDU source types. More...
 
enum  op_targtyp_t {
  OP_TARGET_NONE ,
  OP_TARGET_CONFIG ,
  OP_TARGET_URL
}
 NETCONF protocol operation PDU target types. More...
 
enum  op_defop_t {
  OP_DEFOP_NOT_SET ,
  OP_DEFOP_NONE ,
  OP_DEFOP_MERGE ,
  OP_DEFOP_REPLACE ,
  OP_DEFOP_NOT_USED
}
 NETCONF protocol default edit-config operation types. More...
 
enum  op_filtertyp_t {
  OP_FILTER_NONE ,
  OP_FILTER_SUBTREE ,
  OP_FILTER_XPATH
}
 NETCONF protocol operation PDU filter types. More...
 
enum  op_editop_t {
  OP_EDITOP_NONE ,
  OP_EDITOP_MERGE ,
  OP_EDITOP_REPLACE ,
  OP_EDITOP_CREATE ,
  OP_EDITOP_DELETE ,
  OP_EDITOP_LOAD ,
  OP_EDITOP_COMMIT ,
  OP_EDITOP_REMOVE ,
  OP_EDITOP_DELETE_ALL ,
  OP_EDITOP_REMOVE_ALL
}
 NETCONF edit-config operation types. More...
 
enum  op_insertop_t {
  OP_INSOP_NONE ,
  OP_INSOP_FIRST ,
  OP_INSOP_LAST ,
  OP_INSOP_BEFORE ,
  OP_INSOP_AFTER
}
 YANG insert operation types. More...
 
enum  op_t {
  OP_NONE ,
  OP_MERGE ,
  OP_REPLACE ,
  OP_CREATE ,
  OP_DELETE ,
  OP_LOAD ,
  OP_NOTIFY ,
  OP_READ
}
 NETCONF full operation list for access control. More...
 
enum  op_testop_t {
  OP_TESTOP_NONE ,
  OP_TESTOP_TESTTHENSET ,
  OP_TESTOP_SET ,
  OP_TESTOP_TESTONLY
}
 NETCONF edit-config test-option types. More...
 
enum  op_errop_t {
  OP_ERROP_NONE ,
  OP_ERROP_STOP ,
  OP_ERROP_CONTINUE ,
  OP_ERROP_ROLLBACK
}
 NETCONF edit-config error-option types. More...
 

Functions

const xmlChar * op_method_name (op_method_t op_id)
 Get the keyword for the specified STD RPC method. More...
 
const xmlChar * op_editop_name (op_editop_t ed_id)
 Get the keyword for the specified op_editop_t enumeration. More...
 
op_editop_t op_editop_id (const xmlChar *opstr)
 Get the ID for the editop from its keyword. More...
 
const xmlChar * op_insertop_name (op_insertop_t ins_id)
 Get the keyword for the specified op_insertop_t enumeration. More...
 
op_insertop_t op_insertop_id (const xmlChar *opstr)
 Get the ID for the insert operation from its keyword. More...
 
op_filtertyp_t op_filtertyp_id (const xmlChar *filstr)
 Get the ID for the filter type from its keyword. More...
 
const xmlChar * op_defop_name (op_defop_t def_id)
 Get the keyword for the specified op_defop_t enumeration. More...
 
op_editop_t op_defop_id (const xmlChar *defstr)
 Get the ID for the default-operation from its keyword. More...
 
const xmlChar * op_testop_name (op_testop_t test_id)
 Get the keyword for the specified op_testop_t enumeration. More...
 
op_testop_t op_testop_enum (const xmlChar *teststr)
 Get the enum for the specified op_testop_t string. More...
 
const xmlChar * op_errop_name (op_errop_t err_id)
 Get the keyword for the specified op_errop_t enumeration. More...
 
op_errop_t op_errop_id (const xmlChar *errstr)
 Get the ID for the error-option from its keyword. More...
 
op_defop_t op_defop_id2 (const xmlChar *defstr)
 Get the ID for the default-operation from its keyword Return the op_defop_t, not the op_editop_t conversion. More...
 
boolean op_editop_is_delete (op_editop_t ed_id)
 Check if the editop is some sort of delete. More...
 
plock_id_t plock_get_id (plock_cb_t *plcb)
 Get the lock ID for this partial lock. More...
 
uint32 plock_get_sid (plock_cb_t *plcb)
 Get the session ID holding this partial lock. More...
 
const xmlChar * plock_get_timestamp (plock_cb_t *plcb)
 Get the timestamp of the lock start time. More...
 
xpath_result_tplock_get_final_result (plock_cb_t *plcb)
 Get the session ID holding this partial lock. More...
 
xpath_pcb_tplock_get_first_select (plock_cb_t *plcb)
 Get the first select XPath control block for the partial lock. More...
 
xpath_pcb_tplock_get_next_select (xpath_pcb_t *xpathpcb)
 Get the next select XPath control block for the partial lock. More...
 
void plock_add_select (plock_cb_t *plcb, xpath_pcb_t *xpathpcb, xpath_result_t *result)
 Add a select XPath control block to the partial lock. More...
 
status_t plock_make_final_result (plock_cb_t *plcb)
 Create a final XPath result for all the partial results. More...
 
plock_cb_tplock_cb_new (uint32 sid, status_t *res)
 Create a new partial lock control block. More...
 
void plock_cb_free (plock_cb_t *plcb)
 Free a partial lock control block. More...
 
void plock_cb_reset_id (void)
 Set the next ID number back to the start. More...
 

Detailed Description

Partial lock can only be used if –target=running It does not allow multiple threads to edit at once.

Threads still access the datastore 1 at a time

Enumeration Type Documentation

◆ op_defop_t

enum op_defop_t

NETCONF protocol default edit-config operation types.

Enumerator
OP_DEFOP_NOT_SET 

not set

OP_DEFOP_NONE 

defaul op is none

OP_DEFOP_MERGE 

defaul op is merge

OP_DEFOP_REPLACE 

defaul op is replace

OP_DEFOP_NOT_USED 

defaul op not used

◆ op_editop_t

NETCONF edit-config operation types.

Enumerator
OP_EDITOP_NONE 

not set

OP_EDITOP_MERGE 

edit op is merge

OP_EDITOP_REPLACE 

edit op is replace

OP_EDITOP_CREATE 

edit op is create

OP_EDITOP_DELETE 

edit op is delete

OP_EDITOP_LOAD 

load, internal enum

OP_EDITOP_COMMIT 

commit, internal enum

OP_EDITOP_REMOVE 

remove, base:1.1 only

OP_EDITOP_DELETE_ALL 

delete-all, yumapro only

OP_EDITOP_REMOVE_ALL 

remove-all, yumapro only

◆ op_errop_t

enum op_errop_t

NETCONF edit-config error-option types.

No matter what is selected the server will perform rollback on error so an edit is all-or-none

Enumerator
OP_ERROP_NONE 

not set

OP_ERROP_STOP 

stop-on-error

OP_ERROP_CONTINUE 

continue-on-error

OP_ERROP_ROLLBACK 

rollback-on-error

◆ op_filtertyp_t

NETCONF protocol operation PDU filter types.

Enumerator
OP_FILTER_NONE 

not set

OP_FILTER_SUBTREE 

subtree filter

OP_FILTER_XPATH 

XPath filter.

◆ op_insertop_t

YANG insert operation types.

Enumerator
OP_INSOP_NONE 

not set

OP_INSOP_FIRST 

insert first

OP_INSOP_LAST 

insert last (default)

OP_INSOP_BEFORE 

insert before foo

OP_INSOP_AFTER 

insert after foo

◆ op_method_t

NETCONF protocol operation enumeration is actually an RPC method in the NECONF namespace This is not really used anymore!

Enumerator
OP_NO_METHOD 

not set

OP_GET_CONFIG 

get-config

OP_EDIT_CONFIG 

edit-config

OP_COPY_CONFIG 

copy-config

OP_DELETE_CONFIG 

delete-config

OP_LOCK 

lock

OP_UNLOCK 

unlock

OP_GET 

get

OP_CLOSE_SESSION 

close-session

OP_KILL_SESSION 

kill-session

OP_COMMIT 

commit, #candidate capability

OP_DISCARD_CHANGES 

discard-changes, #candidate capability

OP_VALIDATE 

validate, #validate capability

OP_CANCEL_COMMIT 

cancel-commit, base:1.1 + conf-commit

◆ op_srctyp_t

NETCONF protocol operation PDU source types.

Enumerator
OP_SOURCE_NONE 

not set

OP_SOURCE_CONFIG 

source is a datastore

OP_SOURCE_INLINE 

source is inline config

OP_SOURCE_URL 

source is URL

◆ op_t

enum op_t

NETCONF full operation list for access control.

Enumerator
OP_NONE 

not set

OP_MERGE 

merge

OP_REPLACE 

replace

OP_CREATE 

create

OP_DELETE 

delete

OP_LOAD 

load

OP_NOTIFY 

notify

OP_READ 

read

◆ op_targtyp_t

NETCONF protocol operation PDU target types.

Enumerator
OP_TARGET_NONE 

not set

OP_TARGET_CONFIG 

target is a datastore

OP_TARGET_URL 

target is a URL

◆ op_testop_t

NETCONF edit-config test-option types.

Enumerator
OP_TESTOP_NONE 

not set

OP_TESTOP_TESTTHENSET 

test-then-set (default)

OP_TESTOP_SET 

set

OP_TESTOP_TESTONLY 

test-only

Function Documentation

◆ op_defop_id()

op_editop_t op_defop_id ( const xmlChar *  defstr)

Get the ID for the default-operation from its keyword.

Parameters
defstrstring for the default operation
Returns
the op_editop_t enumeration value for the string
Here is the call graph for this function:

◆ op_defop_id2()

op_defop_t op_defop_id2 ( const xmlChar *  defstr)

Get the ID for the default-operation from its keyword Return the op_defop_t, not the op_editop_t conversion.

Parameters
defstrstring for the default operation
Returns
the op_defop_t enumeration value for the string
Here is the call graph for this function:

◆ op_defop_name()

const xmlChar * op_defop_name ( op_defop_t  def_id)

Get the keyword for the specified op_defop_t enumeration.

Parameters
def_iddefault operation ID
Returns
string for the default operation type, or "none" or "illegal"

◆ op_editop_id()

op_editop_t op_editop_id ( const xmlChar *  opstr)

Get the ID for the editop from its keyword.

Parameters
opstrstring for the edit operation type
Returns
the op_editop_t enumeration value for the string
Here is the call graph for this function:

◆ op_editop_is_delete()

boolean op_editop_is_delete ( op_editop_t  ed_id)

Check if the editop is some sort of delete.

Check for:

  • OP_EDITOP_DELETE
  • OP_EDITOP_REMOVE
  • OP_EDITOP_DELETE_ALL
  • OP_EDITOP_REMOVE_ALL
Parameters
ed_idedit operation ID
Returns
TRUE if a delete; FALSE if not
Here is the caller graph for this function:

◆ op_editop_name()

const xmlChar * op_editop_name ( op_editop_t  ed_id)

Get the keyword for the specified op_editop_t enumeration.

Parameters
ed_idedit operation ID
Returns
string for the edit operation type, or "none" or "illegal"
Here is the caller graph for this function:

◆ op_errop_id()

op_errop_t op_errop_id ( const xmlChar *  errstr)

Get the ID for the error-option from its keyword.

Parameters
errstrstring for the error option
Returns
the op_errop_t enumeration value for the string
Here is the call graph for this function:

◆ op_errop_name()

const xmlChar * op_errop_name ( op_errop_t  err_id)

Get the keyword for the specified op_errop_t enumeration.

Parameters
err_iderror operation ID
Returns
string for the error operation type, or "none" or "illegal"

◆ op_filtertyp_id()

op_filtertyp_t op_filtertyp_id ( const xmlChar *  filstr)

Get the ID for the filter type from its keyword.

Parameters
filstrstring for the filter type
Returns
the op_filtertyp_t enumeration value for the string
Here is the call graph for this function:

◆ op_insertop_id()

op_insertop_t op_insertop_id ( const xmlChar *  opstr)

Get the ID for the insert operation from its keyword.

Parameters
opstrstring for the insert operation type
Returns
the op_insertop_t enumeration value for the string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ op_insertop_name()

const xmlChar * op_insertop_name ( op_insertop_t  ins_id)

Get the keyword for the specified op_insertop_t enumeration.

Parameters
ins_idinsert operation ID
Returns
string for the insert operation type, or "none" or "illegal"

◆ op_method_name()

const xmlChar * op_method_name ( op_method_t  op_id)

Get the keyword for the specified STD RPC method.

Parameters
op_idproto op ID
Returns
string for the operation, or "none" or "illegal"

◆ op_testop_enum()

op_testop_t op_testop_enum ( const xmlChar *  teststr)

Get the enum for the specified op_testop_t string.

Parameters
teststrstring for the test operation type
Returns
test_id == test operation ID
Here is the call graph for this function:

◆ op_testop_name()

const xmlChar * op_testop_name ( op_testop_t  test_id)

Get the keyword for the specified op_testop_t enumeration.

Parameters
test_idtest operation ID
Returns
string for the test operation type, or "none" or "illegal"

◆ plock_add_select()

void plock_add_select ( plock_cb_t plcb,
xpath_pcb_t xpathpcb,
xpath_result_t result 
)

Add a select XPath control block to the partial lock.

Parameters
plcbpartial lock control block to use
xpathpcbxpath select block to add
resultresult struct to add
Here is the call graph for this function:

◆ plock_cb_free()

void plock_cb_free ( plock_cb_t plcb)

Free a partial lock control block.

Parameters
plcbpartial lock control block to free
Here is the call graph for this function:
Here is the caller graph for this function:

◆ plock_cb_new()

plock_cb_t * plock_cb_new ( uint32  sid,
status_t res 
)

Create a new partial lock control block.

Parameters
sidsession ID reqauesting this partial lock
[out]resaddress of return status
  • *res return status
Returns
pointer to initialized PLCB, or NULL if some error this struct must be freed by the caller
Here is the call graph for this function:

◆ plock_cb_reset_id()

void plock_cb_reset_id ( void  )

Set the next ID number back to the start.

Only the caller maintaining a queue of plcb can decide if the ID should rollover

◆ plock_get_final_result()

xpath_result_t * plock_get_final_result ( plock_cb_t plcb)

Get the session ID holding this partial lock.

Parameters
plcbpartial lock control block to use
Returns
session ID that owns this lock
Here is the caller graph for this function:

◆ plock_get_first_select()

xpath_pcb_t * plock_get_first_select ( plock_cb_t plcb)

Get the first select XPath control block for the partial lock.

Parameters
plcbpartial lock control block to use
Returns
pointer to first xpath_pcb_t for the lock

◆ plock_get_id()

plock_id_t plock_get_id ( plock_cb_t plcb)

Get the lock ID for this partial lock.

Parameters
plcbpartial lock control block to use
Returns
the lock ID for this lock
Here is the caller graph for this function:

◆ plock_get_next_select()

xpath_pcb_t * plock_get_next_select ( xpath_pcb_t xpathpcb)

Get the next select XPath control block for the partial lock.

Parameters
xpathpcbcurrent select block to use
Returns
pointer to first xpath_pcb_t for the lock

◆ plock_get_sid()

uint32 plock_get_sid ( plock_cb_t plcb)

Get the session ID holding this partial lock.

Parameters
plcbpartial lock control block to use
Returns
session ID that owns this lock
Here is the caller graph for this function:

◆ plock_get_timestamp()

const xmlChar * plock_get_timestamp ( plock_cb_t plcb)

Get the timestamp of the lock start time.

Parameters
plcbpartial lock control block to use
Returns
timestamp in date-time format

◆ plock_make_final_result()

status_t plock_make_final_result ( plock_cb_t plcb)

Create a final XPath result for all the partial results.

This does not add the partial lock to the target config! This is an intermediate step!

Parameters
plcbpartial lock control block to use
Returns
status; NCX_ERR_INVALID_VALUE if the final nodeset is empty
Here is the call graph for this function: