/vropscli

A command line utility for managing VMWare vROps instances.

Primary LanguagePythonMIT LicenseMIT

vROpsCLI

A utility to assist in managing a vRealize Operation Manager (vROps) environment through the CLI. A user can perform MP installs and upgrades, licensing management, endpoint configuration, credential management, and more! The design is focused around exposing core functionality that can be scripted to make more complex solutions.

Usage

Development Environment Setup

  • Make sure to have Python and Pipenv install
    • For Mac, Install Homebrew (this may take a while if Xcode needs to be installed):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Run pipenv --python 3.7 In current directory (or pipenv --python 3.6 for vROps build directly)
    • If a local python is not available, you may need to install pyenv
  • Run pipenv lock --pre and pipenv sync to ensure everything is up to date

To Use

  • Run pipenv shell to enter environment

Development Environment Alternative - Docker

  • Use docker to run and test code. Run the following to start a dockerfile setup with pre-requisites install, and with the source mapped to /vropscli. Authentication information for the hosts .vropscli.yml will also be mapped in.
make devenv 

To Distribute

Make sure to compile this on the oldest OS you wish to support with your binary!

  • Run pylint tests
pylint --disable=all --enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode *.py
  • Run pytest suite
pytest
  • Make sure authentication tokens are cleared from recorded sessions.
make cleanauth
  • Run installer locally
pipenv shell
pipenv install pyinstaller
pyinstaller -F vropscli.py
  • If you wish to compile to work natively on a vROps system (SLES 11), run the Docker build script:
./build.sh

Binary build will be in a artifacts directory

Notes