Sign Up for the Quarterly Newsletter

Python Utility for VMware Cloud Foundation Management

Python Utility for VMware Cloud Foundation Management is a lightweight python-based command line VCF administration tool. It offers an interactive shell interface to interact with the VMware Cloud Foundation (SDDC Manager) public API.

 

 

After the utility is installed vcfkite binary is available on machine which shall be used to launch interactive shell interface to interact with SDDC Manager(uses SDDC Manager Public API’s)

 

This utility is platform independent (tested on Linux CentOS/Windows W2K12) and would be distributed as a python’s wheel package which can be easily installed using python's native pip3 command (For details information check the Instructions and Requirements sections).

The purpose of this utility is to make VMware Cloud Foundation API's more accessible to users/customers and work towards the adoption of the VMware Cloud Foundation API & VMware Cloud Foundation in general.

  • Python 3.6 or above
  • VMware Cloud Foundation (SDDC) (version VCF 4.0.1 or above)

Python Utility for VMware Cloud Foundation Management is a lightweight python-based command line VCF administration tool. It offers an interactive shell interface to interact with the VMware Cloud Foundation (SDDC Manager) public API.

Note: Current utility version only supports GET operations with SDDC Manager API’s.

Installation Instructions:

  • Make sure the requirements are met.
  • Download the fling python package from flings.vmware.com .
  • Its recommended to use Python virtual environment for the wheel package installation. (Learn more about python venv here https://docs.python.org/3.7/library/venv.html?highlight=pyvenv)
    • Create python virtual environment using ‘venv’ module (Use python3.6 or above)
    • Activate python virtual environment
# Create virtual environment
$ python3.6 -m venv flings-env
$ ls flings-env/
bin include lib lib64 pyvenv.cfg

# Activate flings virtual environment
$ source flings-env/bin/activate

# Check pip version in virtual environment
(flings-env) $ pip --version
pip 9.0.3 from /root/flings-env/lib64/python3.6/site-packages (python 3.6)
(flings-env) $

 

  • Install wheel package using python’s native pip (Ensuring pip version points to python 3.6 or above)

# Install vcfkite wheel package
(flings-env) $ pip3 install vcfkite-1.0.0-py3-none-any.whl

  • Once the package is installed, use vcfkite command to launch shell and follow instructions
    • To begin you first need to create session using CreateSession command
    • Use ?/help command to list all supported commands

# Launch vcfkite
(flings-env) $ vcfkite
################################################
vcfkite is part of flings.vmware.com
Support: Python (3.6+)
VCF version: 4.0.1+
#################################################
Welcome to vcfkite interactive shell - An administrative tool for VCF Management. 
Type help or ? to list commands or type ?[command] for command specific help.
INFO: Use CreateSession to begin
(vcfkite)

# Create session and run supported command
(vcfkite)CreateSession
Enter SDDC Manager Hostname(ip/fqdn): sddc-manager.vrack.vsphere.local
Enter API Username: administrator@vsphere.local
Enter API Password:

INFO: Use SetSSLPath command to set certificate path before CreateSession

WARNING: You are connecting to sddc-manager.vrack.vsphere.local . The certificate couldn't be verified.
Your connection may not be secure. Do you want to continue? [y/n]: y
Session created successfully for sddc-manager.vrack.vsphere.local!!

 

Version 1.0 Update (October 5, 2020)

  • Added a demo video to existing fling