Technology profiles that are utilized by VOLTHA are stored in a prescribed structure in VOLTHA's key/value store, which is currently etcd The key structure used to access technology profiles is
TID is the numeric ID of the technology profile and
TECHNOLOGY specifies the technology being utilized by the adapter, e.g.
xgspon. While the
TID key is a directory, the
TECHNOLOGY key should be set to the JSON data that represents the technology profile values.
NOTE: The content of a technology profile represents a contract between the technology profile definition and all adapters that consume that technology profile. The structure and content of the profiles are outside the scope of Technology Profile Management. Technology profile management only specifies the key/value structure in which profiles are stored.
Creating Technology Profiles
Technology profiles are a simple JSON object. This JSON object can be created using a variety of tools such as
Emacs, or various IDEs.
JQ can be a useful tool for validating a JSON object. Once a file is created with the JSON object it can be stored in VOLTHA key/value store using the standard etcd command line tool etcdctl or using an
HTTP POST operation using
Assuming you are in a standard VOLTHA deployment within a Kubernetes cluster you can access the etcd key/value store using kubectl via the PODs named etcd
-cluster-0001, or etcd
-cluster-0002. For the examples in this document etcd
-cluster-0000 will be used, but it really shouldn't matter which is used.
Assuming the Technology template is stored in a local file
4QueueHybridProfileMap1.json the following commands could be used to store or update the technical template into the proper location in the etcd key/value store:
In the examples above, the command jq is used. This command can be installed using standard package management tools on most Linux systems. In the examples the "
-c" option is used to compress the JSON. Using this tool is not necessary, and if you choose not to use the tool, you can replace "jq
-c ," in the above examples with the "
cat" command. More on jq can be found at https://stedolan.github.io/jq/.
If Consul is being used as the KV store, use the below curl command. Assuming the Technology template is stored in a local file
4QueueHybridProfileMap1.json the following commands could be used to store or update the technical template.
Listing Technical Profiles for a given Technology
kubectl) can be used to list or view the available Technology profiles,
etcdctl is easier, and thus will be used in the examples. For listing Technology profiles
etcdctl ls is used. In can be used in conjunction with the
-r option to recursively list profiles.
A specified Technology profile can be viewed with the
etcdctl get command. (Again,
jq is used for presentation purposes, and is not required)
Deleting Technology Profiles
A technology profile or a technology profile tree can be removed using etcdctl
Below are additional recommendations that should be utilized when managing technical profiles
Technology Profile Prefix
It is recommended that all technical profiles be placed as a subtree in the key/value store under the prefix
/voltha/technical-profiles. Using a prefix allows for isolation of the technology profile graph which allows easy operations on all technology profiles, such as a recursive listing.
Technology Profile Versioning
At some point in the future, it may be beneficial to be able to version technology profiles, such that a given version of an adapter works with a given version of a technology profile. If this becomes the case, then this could be accommodated, but adding an additional key level to a technology profile lookup, e.g.,
/xgspon/64/18.01. Other variation/diversity of technology profiles could be accommodated in a similar fashion.