class Bcome::Node::Server::Static
Attributes
description[R]
internal_ip_address[R]
public_ip_address[R]
Public Class Methods
new(params)
click to toggle source
Calls superclass method
Bcome::Node::Server::Base::new
# File lib/objects/node/server/static.rb, line 9 def initialize(params) @view_config = params[:views] set_cloud_tags @identifier = @view_config[:identifier] @public_ip_address = @view_config[:public_ip_address] @internal_ip_address = @view_config[:internal_ip_address] @cloud_tags = @view_config[:cloud_tags] @description = @view_config[:description] verify_we_have_at_least_one_interface verify_identifier_and_description super end
Public Instance Methods
has_at_least_one_interface?()
click to toggle source
# File lib/objects/node/server/static.rb, line 47 def has_at_least_one_interface? @public_ip_address || @internal_ip_address end
host()
click to toggle source
# File lib/objects/node/server/static.rb, line 5 def host 'static' end
static_server?()
click to toggle source
# File lib/objects/node/server/static.rb, line 51 def static_server? true end
verify_identifier_and_description()
click to toggle source
# File lib/objects/node/server/static.rb, line 42 def verify_identifier_and_description raise Bcome::Exception::Generic, "Your static server defined by #{@view_config} is missing a description" unless @description raise Bcome::Exception::Generic, "Your static server defined by #{@view_config} is missing an identifier" unless @identifier end
verify_we_have_at_least_one_interface()
click to toggle source
# File lib/objects/node/server/static.rb, line 38 def verify_we_have_at_least_one_interface raise Bcome::Exception::MissingIpaddressOnServer, @view_config unless has_at_least_one_interface? end