nvpnathan / py-vsphere-automation

8 stars 4 forks source link

Consolidate multiple scipts to a single script option #10

Open tkrausjr opened 4 years ago

tkrausjr commented 4 years ago

Add an option to run a single python proram that will import all of the following python files as modules and run the entire pre- NSX-T installation.

  1. Nested ESXi 7 OVA deployment
  2. VCSA Appliance Deployment
  3. Datacenter & Cluster Creation & Adding Hosts
  4. Distributed Switch & DVPG Creation
  5. Coming Soon-Mount NFS Datastore(docs/nfs_README.md)

But still keep the ability to run the modules standalone programs as well.

Article below outlines how to have Python modules that can also be run as standalone programs. https://stackabuse.com/python-modules-creating-importing-and-sharing/

tkrausjr commented 4 years ago

Step 1 Complete - Created a Python Package for all vSphere components pre-wcp and pre-nsx called "vsphere" and moved all vSphere prep install programs to this directory. Updated docs for standalone python programs. https://github.com/nvpnathan/py-vsphere-automation/commit/1f9199b2408a93d696e04d170ce0e14f741fdffa

Working in Branch https://github.com/nvpnathan/py-vsphere-automation/tree/module-refactor Refactored all scripts so they can be run as a module

tkrausjr commented 4 years ago

Step 2 - Write Parent Python program to import the modules inside the vsphere package and call the appropriate functions inside these modules. Proposed Parent Python Program name is install_vsphere.py