module Providers
  Aws = 'aws'
  Openstack = 'openstack'
  Static = 'static'

  def self.available
    [Aws, Openstack, Static]
  end

  def self.functionalities
    {
      images: [Aws, Openstack],
      stack_templates: [Aws, Openstack],
      stacks: [Aws, Openstack]
    }
  end

  def self.has_functionality?(provider, functionality)
    functionalities.fetch(functionality).include?(provider.to_s)
  end
end
