Table of Contents

1  Preface

1.1  Legal Statements

1.2  Additional Resources

1.2.1  WEB Sites

1.2.2  Mailing Lists

1.3  Conventions Used in this Document

2  YumaPro API Overview

2.1  API Overview

2.2  Terminology

3  YANG Data Examples

3.1  Object Tree Ordering

3.2  YANG Object Tree Handling Examples

3.2.1  Find Top-Level Object

3.2.2  Access Module Pointer

3.2.3  Match Any Object

3.2.4  Check For Child Nodes

3.2.5  Find a Specific Child Node

3.2.6  Find Choice or Case Child Node

3.2.7  Get First Child

3.2.8  Get Next Child

3.2.9  Process All Child Nodes

3.2.10  Process Ancestor Nodes

3.3  YANG Data Tree Handling Examples

3.3.1  Leaf Examples

3.3.2  Leaf-list Examples

3.3.3  Container Examples

3.3.4  List Examples

4  Database Access

4.1  Common CLI Parameters

4.1.1  Startup Options

4.2  Database Deployment Variants

4.2.1  Local internal database

4.2.2  Local internal database + NV-store Hook

4.2.3  Local internal database + no-NV-store

4.2.4  Local internal database + External Edits

4.3  DB-API Example

5  Database Transaction Callbacks

5.1  EDIT1 and EDIT2 Callbacks

5.1.1  Error Handling for Edit Transactions

5.1.2  EDIT1 Callback Initialization and Cleanup

5.1.3  EDIT1 Callback Function Example

5.1.4  EDIT2 Callback Initialization and Cleanup

5.1.5  EDIT2 Callback Function Example

5.1.6 SIL-SA EDIT2 Callback Function Example

5.1.7  EDIT2 Utility Functions

5.1.8  SIL-SA EDIT2 Utility Functions

5.2  GET1 Callback

5.2.1  GET1 Callback Examples. Virtual data

5.2.2  GET1 Callback Examples for Static Data

5.3  GET2 Callback

5.3.1  GET2 Callback Initialization and Cleanup

5.3.2  GET2 Callback Function Examples

5.3.3  GET2 Access Macros

5.3.4  GET2 Access Functions

5.4  All In One GET2 callback

5.4.1  All In One List Example

5.4.2  All In One Container Example

5.4.3  All In One GET2 Callbacks with XML/JSON buffers

5.5  User Defined Data Types

5.5.1  Callback Registration

5.5.2  typ_validate_fn_t

5.5.3  typ_canonical_fn_t

5.5.4  typ_compare_fn_t

6  In-Transaction Callbacks

6.1  Callback Invocation Order

6.2  Set Hook Callback

6.2.1  Set Hook Callback Initialization and Cleanup

6.2.2  Set Hook Callback and Add Edit API Function Examples

6.2.3  Set Hook Callback and Add Edit Extended API Function Examples

6.3  SIL-SA Set Hook Callback

6.3.1  SIL-SA Set Hook Callback Initialization and Cleanup

6.3.2  Important differences SIL vs SIL-SA

6.3.3  SIL-SA Set Hook Callback and Add Edit API Function Examples

6.4  Post Set Hook Callback

6.4.1  Post Set Hook Callback Initialization and Cleanup

6.5  SIL-SA Post Set Hook Callback

6.5.1  SIL-SA Post Set Hook Callback Initialization and Cleanup

6.6  Hooks callback interaction with EDIT2 callbacks (target=candidate)

6.7  Hooks callback interaction with EDIT2 callbacks (target=running)

6.8  Transaction Hook Callback

6.8.1  Transaction Hook Callback Initialization and Cleanup

6.8.2  Transaction Hook Callback Function Example

6.9  SIL-SA Transaction Hook Callback

6.9.1  SIL-SA Transaction Hook Callback Initialization and Cleanup

6.9.2  SIL-SA Transaction Hook Callback Function Example

6.10  Transaction Start Callback

6.10.1  Transaction Start Callback Initialization and Cleanup

6.10.2  Transaction Start Callback Function Examples

6.11  SIL-SA Transaction Start Callback

6.11.1  SIL-SA Transaction Start Callback Initialization and Cleanup

6.11.2  SIL-SA Transaction Start Callback Function Examples

6.12  Transaction Complete Callback

6.12.1  Transaction Complete Callback Initialization and Cleanup

6.12.2  Transaction Complete Callback Function Example

6.13  SIL-SA Transaction Complete Callback

6.13.1  SIL-SA Transaction Complete Callback Initialization and Cleanup

6.13.2  SIL-SA Transaction Complete Callback Function Example

6.14  Set Order Hook Callback

6.14.1  Set Order Hook Callback Initialization and Cleanup

6.14.2  Set Order Hook Callback Function Examples

6.15  Add Edit API

6.16  Add Edit Extended API

6.17  Add Edit Maximum API

6.18  SIL-SA Add Edit API

6.19  Get Data API

6.20  SIL-SA Get Data API

6.21  Startup Hook Callback

6.21.1  Startup Hook Callback Initialization and Cleanup

6.21.2  Startup Hook Callback Examples

6.22  Validate Complete Callback

6.22.1  Validate Complete Callback Initialization and Cleanup

6.23  Apply Complete Callback

6.23.1  Apply Complete Callback Initialization and Cleanup

6.24  Commit Complete Callback

6.24.1  Commit Complete Callback Initialization and Cleanup

6.25  Rollback Complete Callback

6.25.1  Rollback Complete Callback Initialization and Cleanup

6.26  Commit Completeness Callback Function Example

6.27  Dynamic Default Hook Callback

6.27.1  Dynamic Default Hook Callback Initialization and Cleanup

6.27.2  Dynamic Default Hook Callback Function Examples

7  System Callbacks

7.1  Candidate Reload Callback

7.1.1  Candidate Reload Callback Example

7.2  Module Load Callback

7.2.1  Module Load Callback Initialization and Cleanup

7.2.2  Module Load Callback Function Example

7.3  Module Unload Callback

7.3.1  Module Unload Callback Initialization and Cleanup

7.3.2  Module Unload Callback Function Example

7.4  NV-Load Callback

7.4.1  NV-Load Callback Initialization and Cleanup

7.4.2  NV-Load Callback Function Example

7.5  NV-Save Callback

7.5.1  NV-Save Callback Initialization and Cleanup

7.5.2  NV-Save Callback Function Example

7.6  Session Hook Callback

7.6.1  Session Hook Callback Initialization and Cleanup

7.6.2  Session Hook Callback Function Example

7.7  Shutdown Callback

7.7.1  Shutdown Callback Initialization and Cleanup

7.7.2  Shutdown Callback Function Example

7.8  Command Complete Callback

7.8.1  Command Complete Callback Initialization and Cleanup

7.8.2  Command Complete Callback Function Example

7.9  NACM External Groups Callback

7.9.1  NACM External Groups Callback Initialization and Cleanup

7.9.2  NACM External Groups Callback Function Example

7.10  Config Replay Callback

7.11  Periodic Timer Service

7.11.1  Timed Config Replay Example

8  RPC Operation Callbacks

8.1  RPC Callback Initialization and Cleanup

8.2  RPC Callback Function Examples

8.2.1  RPC Validate Callback Function

8.2.2  RPC Invoke Callback Function