Class: CmdbVulnerabilitySite
- Inherits:
-
Domain::Model
- Object
- Domain::Model
- CmdbVulnerabilitySite
- Defined in:
- lib/domain/site/model.rb
Overview
CmdbVulnerabilitySite 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
-
#assets ⇒ Object
Returns the value of attribute assets.
-
#business_unit_code ⇒ Object
Returns the value of attribute business_unit_code.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#country_discovery_site_id ⇒ Object
Returns the value of attribute country_discovery_site_id.
-
#end_day ⇒ Object
Returns the value of attribute end_day.
-
#end_hour ⇒ Object
Returns the value of attribute end_hour.
-
#engine_pool ⇒ Object
Returns the value of attribute engine_pool.
-
#network_zone ⇒ Object
Returns the value of attribute network_zone.
-
#scan_engine_pool_id ⇒ Object
Returns the value of attribute scan_engine_pool_id.
-
#start_day ⇒ Object
Returns the value of attribute start_day.
-
#start_hour ⇒ Object
Returns the value of attribute start_hour.
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, #to_s
Constructor Details
This class inherits a constructor from Domain::Model
Instance Attribute Details
#assets ⇒ Object
Returns the value of attribute assets.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def assets @assets end |
#business_unit_code ⇒ Object
Returns the value of attribute business_unit_code.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def business_unit_code @business_unit_code end |
#country_code ⇒ Object
Returns the value of attribute country_code.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def country_code @country_code end |
#country_discovery_site_id ⇒ Object
Returns the value of attribute country_discovery_site_id.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def country_discovery_site_id @country_discovery_site_id end |
#end_day ⇒ Object
Returns the value of attribute end_day.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def end_day @end_day end |
#end_hour ⇒ Object
Returns the value of attribute end_hour.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def end_hour @end_hour end |
#engine_pool ⇒ Object
Returns the value of attribute engine_pool.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def engine_pool @engine_pool end |
#network_zone ⇒ Object
Returns the value of attribute network_zone.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def network_zone @network_zone end |
#scan_engine_pool_id ⇒ Object
Returns the value of attribute scan_engine_pool_id.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def scan_engine_pool_id @scan_engine_pool_id end |
#start_day ⇒ Object
Returns the value of attribute start_day.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def start_day @start_day end |
#start_hour ⇒ Object
Returns the value of attribute start_hour.
123 124 125 |
# File 'lib/domain/site/model.rb', line 123 def start_hour @start_hour end |
Class Method Details
.view ⇒ Object
149 150 151 |
# File 'lib/domain/site/model.rb', line 149 def self.view 'cmdb_vulnerability_site_view' end |
Instance Method Details
#asset_group_name ⇒ Object
141 142 143 |
# File 'lib/domain/site/model.rb', line 141 def asset_group_name [country_code, network_zone, business_unit_code].join(':') end |
#duration_in_hours ⇒ Object
145 146 147 |
# File 'lib/domain/site/model.rb', line 145 def duration_in_hours Service::TimeZone.duration_in_hours(start_day, start_hour, end_day, end_hour) end |
#name ⇒ Object
135 136 137 138 139 |
# File 'lib/domain/site/model.rb', line 135 def name prefix = [country_code, network_zone, business_unit_code].join ':' suffix = 'Vulnerability Scan' "#{prefix} #{suffix}" end |