Class: PuppetX::Puppetlabs::Migration::OverviewModel::ResourceIssue Abstract

Inherits:
NodeIssue
  • Object
show all
Defined in:
lib/puppet_x/puppetlabs/migration/overview_model.rb

Overview

This class is abstract.

Direct Known Subclasses

ResourceAdded, ResourceConflict, ResourceMissing

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from NodeIssue

many_rels_hash

Methods inherited from Entity

#<=>, #eql?, from_hash, #hash, #id, init_relationships, many_relationship, #many_relationship, many_rels_hash, simple_name

Methods included from ModelObject

#initialize_from_hash, #to_hash

Constructor Details

#initialize(id, resource_id, location_id) ⇒ ResourceIssue

Returns a new instance of ResourceIssue.

Parameters:

  • id (Integer)

    The id of the created instance

  • resource_id (Integer)

    The id of the resource

  • location_id (Integer)

    The id of the location



512
513
514
515
516
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 512

def initialize(id, resource_id, location_id)
  super(id)
  @resource_id = resource_id
  @location_id = location_id
end

Instance Attribute Details

#location_idObject (readonly)



505
506
507
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 505

def location_id
  @location_id
end

#resource_idObject (readonly)



506
507
508
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 506

def resource_id
  @resource_id
end

Instance Method Details

#compliant?Boolean

Returns:

  • (Boolean)


527
528
529
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 527

def compliant?
  false
end

#one_relationship(name) ⇒ Object



518
519
520
521
522
523
524
525
# File 'lib/puppet_x/puppetlabs/migration/overview_model.rb', line 518

def one_relationship(name)
  case name
  when :location
    location_id || UNDEFINED_ID
  when :resource
    resource_id || UNDEFINED_ID
  end
end