Sha256: ab1ec1bf75152a0c9ce2054ccd922ba7ece1bdcd901edb199e94ebbb9ddff4a1

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

module ForemanXen
  module HostExtensions
    extend ActiveSupport::Concern

    def built(installed = true)
      compute_resource.cleanup_configdrive(uuid) if compute_resource && compute_resource.type == 'ForemanXen::Xenserver'
      super(installed)
    end

    def disassociate!
      # Disassociated host object cannot be saved unless provision_method
      # is supported by the default compute resource
      self.provision_method = 'build'
      super
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_xen-1.0.1 app/models/concerns/foreman_xen/host_extensions.rb
foreman_xen-1.0.0 app/models/concerns/foreman_xen/host_extensions.rb