Enable tf-api-cli

The tf-api-cli container provides access to the Tungsten Fabric API through the 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 Tungsten Fabric API CLI Deployment:

  1. Enable the tf-cli Deployment in the TFOperator custom resource to start the Pod with utilities to access the Tungsten Fabric API CLI:

    spec:
      features:
        tfTools:
          tfCliEnabled: true
    
    spec:
      controllers:
        tf-tool:
          tf-cli:
            enabled: true
    
  2. Wait for the tf-tool-cli Pod to start running in the tf namespace.

Once the tf-tool-cli Pod is running, use the interactive shell to access the Tungsten Fabric 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 Tungsten Fabric API CLI Deployment:

Update the TFOperator custom resource and disable the tf-cli Deployment:

kubectl -n tf patch tfoperator.tf.mirantis.com <TFOperator CR name> --type='json' -p='[{"op": "replace", "path": "/spec/features/tfTools/tfCliEnabled", "value": false}]'
kubectl -n tf patch tfoperator.operator.tf.mirantis.com <TFOperator CR name> --type='json' -p='[{"op": "replace", "path": "/spec/controllers/tf-tool/tf-cli/enabled", "value": false}]'