Sha256: ea1eb46d9b1966a7bf8fd7333e7478cdf76aee497e5c7f0785ffc57dce0139a9

Contents?: true

Size: 997 Bytes

Versions: 26

Compression:

Stored size: 997 Bytes

Contents

module HammerCLIForeman
  module ComputeResources
    class OpenStack < Base
      def name
        'OpenStack'
      end

      def compute_attributes
        %w[availability_zone boot_from_volume flavor_ref image_ref tenant_id security_groups network]
      end

      def provider_specific_fields
        super + [
          Fields::Field.new(:label => _('Tenant'), :path => [:tenant]),
          Fields::Field.new(:label => _('Project domain name'), :path => [:project_domain_name]),
          Fields::Field.new(:label => _('Project domain ID'), :path => [:project_domain_id])
        ]
      end

      def mandatory_resource_options
        super + %i[url user password]
      end

      def provider_vm_specific_fields
        [
          Fields::Field.new(:label => _('State'), :path => [:state]),
          Fields::Field.new(:label => _('Tenant Id'), :path => [:tenant_id])
        ]
      end
    end

    HammerCLIForeman.register_compute_resource('openstack', OpenStack.new)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
hammer_cli_foreman-3.13.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.12.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.10.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.9.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.8.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.7.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.5.1 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.6.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.5.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.4.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.3.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.2.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-2.5.2 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.1.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-3.0.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-2.5.1 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-2.5.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-2.3.2 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-2.4.0 lib/hammer_cli_foreman/compute_resource/openstack.rb
hammer_cli_foreman-2.3.1 lib/hammer_cli_foreman/compute_resource/openstack.rb