test interface — VMware Salt for VCF Components API

test interface — VMware Salt for VCF Components API

test interface

The test interface provides basic utility methods to validate API connectivity and routing. It allows you to ping the VCFMS RPC endpoint or echo back text strings to confirm successful authentication and network communication.

echo(text: str | None)
Returns: <class 'str'>

Echo back the provided text string.

Parameters

text:String to echo.
Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "test",
    "method": "echo",
    "kwarg": {
      "text": "API Connection Successful"
    }
  }'
ping()
Returns: <class 'bool'>

Return True to verify API connectivity.

Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "test",
    "method": "ping"
  }'