class Egi::Fedcloud::Cloudhound::AppdbSite

Attributes

infrastructure[R]
name[R]
services[R]
status[R]
type[R]

Public Class Methods

extract_services(element) click to toggle source
# File lib/egi/fedcloud/cloudhound/appdb_site.rb, line 33
def extract_services(element)
  services = (element.locate('service') || [])
  services.map do |service|
    srv = {}
    srv['type'] = service.type
    srv['host'] = service.host
    srv
  end
end
new(element) click to toggle source
# File lib/egi/fedcloud/cloudhound/appdb_site.rb, line 8
def initialize(element)
  Egi::Fedcloud::Cloudhound::Log.debug "[#{self.class}] Initializing with #{element.inspect}"

  @services = self.class.extract_services(element)
  @gocdb_link = self.class.extract_gocdb_link(element)
  @name = element.name
  @type = @services.empty? ? 'grid' : 'cloud'
  @status = element.status
  @infrastructure = element.infrastructure
end

Public Instance Methods

contacts() click to toggle source
# File lib/egi/fedcloud/cloudhound/appdb_site.rb, line 20
def contacts
  {
    name: name,
    type: type,
    status: status,
    csirt: nil,
    ngi: nil
  }
end