data-server

command module
v0.0.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

DATA-SERVER

build

make build

run the server

./bin/data-server

run the client

bin/datactl -a clab-distributed-data-server:56000 datastore get --ds srl1


## create a candidate datastore
bin/datactl -a clab-distributed-data-server:56000 datastore create --ds srl1 --candidate default
bin/datactl -a clab-distributed-data-server:56000 datastore create --ds srl1 --candidate temp
bin/datactl -a clab-distributed-data-server:56000 datastore get --ds srl1
# delete candidate "temp" datastore
bin/datactl -a clab-distributed-data-server:56000 datastore delete --ds srl1 --candidate temp
bin/datactl -a clab-distributed-data-server:56000 datastore get --ds srl1

# data
## state
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --path interface[name=*]/subinterface[index=0]/statistics/in-octets
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --path interface[name=*]/subinterface[index=0]/statistics/in-octets --candidate default
## configure
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default --update interface[name=ethernet-1/1]/admin-state:::disable
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default --update interface[name=ethernet-1/1]/description:::desc1
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default --update interface[name=ethernet-1/1]/subinterface[index=0]/admin-state:::enable
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default --update interface[name=ethernet-1/1]/subinterface[index=0]/description:::desc1
### get fom candidate
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --candidate default --path interface[name=ethernet-1/1]/admin-state
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --candidate default --path interface[name=ethernet-1/1]/description
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --candidate default --path interface[name=ethernet-1/1]/subinterface[index=0]/admin-state
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --candidate default --path interface[name=ethernet-1/1]/subinterface[index=0]/description
### get from main
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --path interface[name=ethernet-1/1]/admin-state
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --path interface[name=ethernet-1/1]/description
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --path interface[name=ethernet-1/1]/subinterface[index=0]/admin-state
bin/datactl -a clab-distributed-data-server:56000 data get --ds srl1 --path interface[name=ethernet-1/1]/subinterface[index=0]/description
# diff
bin/datactl -a clab-distributed-data-server:56000 data diff --ds srl1 --candidate default
### commit
bin/datactl -a clab-distributed-data-server:56000 datastore commit --ds srl1 --candidate default
bin/datactl -a clab-distributed-data-server:56000 datastore get --ds srl1
SROS
bin/datactl -a clab-distributed-data-server:56000 datastore create --ds sr1 --candidate default
bin/datactl -a clab-distributed-data-server:56000 datastore get --ds sr1
bin/datactl -a clab-distributed-data-server:56000 data set --ds sr1 --candidate default --update /configure/system/name:::sr123
bin/datactl -a clab-distributed-data-server:56000 data set --ds sr1 --candidate default --update /configure/service/vprn[service-name=vprn1]/customer:::1
bin/datactl -a clab-distributed-data-server:56000 data set --ds sr1 --candidate default --update /configure/service/vprn[service-name=vprn1]/service-id:::100
bin/datactl -a clab-distributed-data-server:56000 data set --ds sr1 --candidate default --update /configure/service/vprn[service-name=vprn1]/admin-state:::enable
##
# bin/datactl -a clab-distributed-data-server:56000 data get --ds sr1 --path /configure/system/name
bin/datactl -a clab-distributed-data-server:56000 data get --ds sr1 --candidate default --path /configure/system/name
bin/datactl -a clab-distributed-data-server:56000 data get --ds sr1 --candidate default --path /configure/service/vprn[service-name=vprn1]
bin/datactl -a clab-distributed-data-server:56000 datastore commit --ds sr1 --candidate default
bin/datactl -a clab-distributed-data-server:56000 datastore create --ds sr1 --candidate default

bin/datactl -a clab-distributed-data-server:56000 data set --ds sr1 --candidate default  \
             --update-path /configure/router[router-name=Base]/interface[interface-name=system] \
             --update-file lab/common/configs/sros_interface_base.json
bin/datactl -a clab-distributed-data-server:56000 data set --ds sr1 --candidate default  \
             --update-path configure/service/vprn[service-name=vprn1] \
             --update-file lab/common/configs/sros_vprn.json
bin/datactl -a clab-distributed-data-server:56000 data set --ds sr1 --candidate default  \
             --update-path /configure/router[router-name=Base]/interface \
             --update-file lab/common/configs/sros_interfaces_base.json
bin/datactl -a clab-distributed-data-server:56000 datastore commit --ds sr1 --candidate default
SRL JSON VALUE
bin/datactl -a clab-distributed-data-server:56000 datastore create --ds srl1 --candidate default

bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default  \
             --update-path / \
             --update-file lab/common/configs/srl_interface.json
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default \
             --update-path / \
             --update-file lab/common/configs/srl_interfaces.json

bin/datactl -a clab-distributed-data-server:56000 datastore commit --ds srl1 --candidate default
leafref exp1: leafref as key
bin/datactl -a clab-distributed-data-server:56000 datastore create --ds srl1 --candidate default
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default  \
             --update /system/gnmi-server/network-instance[name=default]/admin-state:::enable
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default  \
             --update /system/gnmi-server/network-instance[name=default]/tls-profile:::clab-profile
bin/datactl -a clab-distributed-data-server:56000 datastore commit --ds srl1 --candidate default
leafref exp2: leafref as leaf (not key)
# create candidate
bin/datactl -a clab-distributed-data-server:56000 datastore create --ds srl1 --candidate default

bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default  \
             --update /system/gnmi-server/network-instance[name=mgmt]/admin-state:::enable
bin/datactl -a clab-distributed-data-server:56000 data set --ds srl1 --candidate default  \
             --update /system/gnmi-server/network-instance[name=mgmt]/tls-profile:::dummy-profile
# commit
bin/datactl -a clab-distributed-data-server:56000 datastore commit --ds srl1 --candidate default

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
mocks
mockcacheclient
Package mockcacheclient is a generated GoMock package.
Package mockcacheclient is a generated GoMock package.
mocknetconf
Package mocknetconf is a generated GoMock package.
Package mocknetconf is a generated GoMock package.
mockschema
Package mockschema is a generated GoMock package.
Package mockschema is a generated GoMock package.
mockschemaclientbound
Package mockschemaclientbound is a generated GoMock package.
Package mockschemaclientbound is a generated GoMock package.
mocktarget
Package mocktarget is a generated GoMock package.
Package mocktarget is a generated GoMock package.
mockvalidationclient
Package mockvalidationclient is a generated GoMock package.
Package mockvalidationclient is a generated GoMock package.
pkg
tests
sdcioygot
Package sdcio_schema is a generated package which contains definitions of structs which represent a YANG schema.
Package sdcio_schema is a generated package which contains definitions of structs which represent a YANG schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL