Class: CmdbDiscoverySite

Inherits:
Domain::Model show all
Defined in:
lib/domain/site/model.rb

Overview

CmdbDiscoverySite represents a site from the Configuration Management Database (CMDB). It contains various attributes related to the site’s location, business context, and network information.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::Model

columns, from_csv, from_json, headers, #initialize, primary_key, table_name, #to_csv, #to_hash

Constructor Details

This class inherits a constructor from Domain::Model

Instance Attribute Details

#applicationObject

Returns the value of attribute application.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def application
  @application
end

#buObject

Returns the value of attribute bu.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def bu
  @bu
end

#business_unitObject

Returns the value of attribute business_unit.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def business_unit
  @business_unit
end

#countryObject

Returns the value of attribute country.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def country
  @country
end

#country_codeObject

Returns the value of attribute country_code.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def country_code
  @country_code
end

#country_discovery_site_idObject

Returns the value of attribute country_discovery_site_id.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def country_discovery_site_id
  @country_discovery_site_id
end

#nameObject

Returns the value of attribute name.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def name
  @name
end

#network_zoneObject

Returns the value of attribute network_zone.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def network_zone
  @network_zone
end

#saObject

Returns the value of attribute sa.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def sa
  @sa
end

#scan_engineObject

Returns the value of attribute scan_engine.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def scan_engine
  @scan_engine
end

#scan_templateObject

Returns the value of attribute scan_template.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def scan_template
  @scan_template
end

#sub_areaObject

Returns the value of attribute sub_area.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def sub_area
  @sub_area
end

#targetsObject

Returns the value of attribute targets.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def targets
  @targets
end

#utrObject

Returns the value of attribute utr.



85
86
87
# File 'lib/domain/site/model.rb', line 85

def utr
  @utr
end

Class Method Details

.viewObject



100
101
102
# File 'lib/domain/site/model.rb', line 100

def self.view
  'cmdb_discovery_site_view'
end

Instance Method Details

#included_targetsObject



113
114
115
# File 'lib/domain/site/model.rb', line 113

def included_targets
  targets.split(/\s+/)
end

#tag_namesObject



108
109
110
111
# File 'lib/domain/site/model.rb', line 108

def tag_names
  app_utr = "#{application}-#{utr}"
  [country_code, network_zone, bu, sa, app_utr]
end

#to_sObject



104
105
106
# File 'lib/domain/site/model.rb', line 104

def to_s
  [name, country_code, network, business_unit, sub_area, application, utr].join ','
end