saltext.vcf.utils.vcfops

VCF Operations (suite-api) REST connection helpers.

VCF Operations exposes a token-authenticated REST API at /suite-api/api/.... A token is acquired with:

POST /suite-api/api/auth/token/acquire
{ "username": "...", "password": "...", "authSource": "LOCAL" }

The response field is literally token (not accessToken). Subsequent requests use Authorization: vRealizeOpsToken <token>.

Config is read from Salt opts/pillar under saltext.vcf.vcf_ops:

saltext.vcf:
  vcf_ops:
    host: ops.vcf.nimbus.internal
    username: admin
    password: VMware123!
    auth_source: LOCAL          # optional; default LOCAL
    verify_ssl: false
saltext.vcf.utils.vcfops.get_config(opts, profile=None)[source]

Extract VCF Operations connection config.

saltext.vcf.utils.vcfops.get_token(opts, profile=None)[source]

Acquire and cache a VCF Operations auth token. Returns the raw token string.