Module econfd_schema

Support for using schema information in the Erlang API.

Version: 6.5.4

Behaviours: gen_server.

Description

Support for using schema information in the Erlang API.

Keeps schema info in a set of ets tables named by the toplevel namespace.

Data Types

confd_cs_choice()

confd_cs_choice() = #confd_cs_choice{}

confd_cs_node()

confd_cs_node() = #confd_cs_node{}

confd_nsinfo()

confd_nsinfo() = #confd_nsinfo{}

confd_type_cbs()

confd_type_cbs() = #confd_type_cbs{}

Function Index

choice_children/1Get a flat list of children for a confd_cs_node(), with any choice/case structure(s) removed.
get_cs/2Find schema node by namespace and tagpath.
get_nslist/0Get a list of loaded namespaces with info.
get_type/1Get schema type definition identifier for built-in type.
get_type/2Get schema type definition identifier for type defined in namespace.
ikeypath2cs/1Find schema node by ikeypath.
load/1Load schema info from ConfD.
load/2
register_type_cbs/1Register callbacks for a user-defined type.
str2val/2Convert string to value based on schema type.
val2str/2Convert value to string based on schema type.

Function Details

choice_children/1

choice_children(Node) -> Children

Get a flat list of children for a confd_cs_node(), with any choice/case structure(s) removed.

get_cs/2

get_cs(Ns, Tagpath) -> Result

Find schema node by namespace and tagpath.

get_nslist/0

get_nslist() -> [confd_nsinfo()]

Get a list of loaded namespaces with info.

get_type/1

get_type(TypeName) -> Result

Get schema type definition identifier for built-in type.

get_type/2

get_type(Ns, TypeName) -> econfd:type()

Get schema type definition identifier for type defined in namespace.

ikeypath2cs/1

ikeypath2cs(IKeypath) -> Result

Find schema node by ikeypath.

load/1

load(Path) -> Result

Load schema info from ConfD.

load/2

load(Address, Port) -> Result

register_type_cbs/1

register_type_cbs(TypeCbs) -> ok

Register callbacks for a user-defined type. For an application running in its own Erlang VM, this function registers the callbacks in the loaded schema information, similar to confd_register_node_type() in the C API. For an application running inside ConfD, this function registers the callbacks in ConfD's internal schema information, similar to using a shared object with confd_type_cb_init() in the C API.

str2val/2

str2val(TypeId, Lexical) -> Result

Convert string to value based on schema type.

Note: For type identityref below a mount point (device data in NSO), TypeId must be confd_cs_node().

val2str/2

val2str(TypeId, Value) -> Result

Convert value to string based on schema type.


Generated by EDoc