Enable tf-api-cli¶
The tf-api-cli
container provides access to the Tungsten Fabric (TF)
API through a command-line interface (CLI). See the
contrail-api-cli documentation
for details.
Note
The tf-api-cli
tool was initially called contrail-api-cli
.
To enable the TF API CLI Deployment using the TF Operator custom resource (CR):
Enable the
tf-cli
Deployment in the TF Operator CR to start the Pod with utilities to access the TF API CLI:spec: controllers: tf-tool: tf-cli: enabled: true
Wait for the
tf-tool-cli
Pod to start running in thetf
namespace.
Once the tf-tool-cli
Pod is running, use the interactive shell to
access the TF API CLI:
kubectl -n tf exec tf-tool-cli -it -- bash
The following example illustrates the use of the tf-api-cli
command inside
a container:
tf-api-cli ls virtual-network
To disable the TF API CLI Deployment:
Update the TF Operator CR and disable the
tf-cli
Deployment:kubectl -n tf patch tfoperator <TFOperator CR name> --type='json' -p='[{"op": "replace", "path": "/spec/controllers/tf-tool/tf-cli/enabled", "value": false}]'
Manually remove the Pod with
tf-cli
:kubectl -n tf delete pod tf-tool-cli