-
Notifications
You must be signed in to change notification settings - Fork 6
1.2 pfdcm set get internal vars
janakitti edited this page Jan 26, 2021
·
4 revisions
This page describes how to directly set/get internal variables in pfcon
. These variables are typically settings such as host service names, IP addresses, etc.
- Make sure that
pfcon
has been started (see here for more info)
pfcon --forever --httpResponse
The msg
payload of the REST interaction with pfcon
is:
'{ "action": "internalctl",
"meta": {
"var": "storeAddress",
"get": "value"
}
}'
Assuming satisfied preconditions, let's get some data in the internal tree dictionary of the process
pfurl --verb POST \
--raw \
--http ${HOST_IP}:4055/api/v1/cmd \
--jsonwrapper 'payload' \
--msg '{
"action": "internalctl",
"meta": {
"var": "/service",
"get": "value"
}
}'
Assuming satisfied preconditions, we can set an entire dictionary of values
pfurl --verb POST \
--raw \
--http ${HOST_IP}:4055/api/v1/cmd \
--jsonwrapper 'payload' \
--msg '{
"action": "internalctl",
"meta": {
"var": "/service,
"set": {
"test2": {
"IP": "192.168.1.2",
"aetitle": "aetitle",
"callaetitle": "callaetitle",
"port": "104"
}
}
}
}'
--30--