(POOLER-70) Add initial VM Provider service

Previously all of the VM provisioning code was intertwined with the VM lifecycle
code e.g. The VSphere specific code is mixed with Redis code.  This makes it
impossible to add aditional providers or disable VSphere integration.  This
commit begins the process to refactor the VSphere code out of the lifecycle code
by introducing the concept of VM Providers.  A Provider will contain the logic/
code to manage VMs i.e. create/destroy/inquire.  Therefore the Pool Manager can
query a strict interface into one or more Providers.  Initially only a VSphere
provider will be available.

This commit adds the base class for all providers and describes the API or
contract that the Pool Manager will use to manage VMs.
This commit is contained in:
Glenn Sarti 2017-03-01 20:49:09 -08:00
parent 03ad7bfa46
commit c502f92cd3
4 changed files with 207 additions and 1 deletions

View file

@ -12,7 +12,7 @@ module Vmpooler
require 'yaml'
require 'set'
%w(api graphite logger pool_manager vsphere_helper statsd dummy_statsd).each do |lib|
%w(api graphite logger pool_manager vsphere_helper statsd dummy_statsd providers).each do |lib|
begin
require "vmpooler/#{lib}"
rescue LoadError