Class: Bcome::Node::Server::Static
- Defined in:
- lib/objects/node/server/static.rb
Constant Summary
Constants inherited from Base
Constants included from LocalMetaDataFactory
LocalMetaDataFactory::META_DATA_FILE_PATH_PREFIX
Instance Attribute Summary collapse
-
#cloud_tags ⇒ Object
readonly
Returns the value of attribute cloud_tags.
Attributes inherited from Base
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #has_at_least_one_interface? ⇒ Boolean
-
#initialize(params) ⇒ Static
constructor
A new instance of Static.
- #static_server? ⇒ Boolean
- #verify_we_have_at_least_one_interface(config) ⇒ Object
Methods inherited from Base
#bootstrap?, #cache_data, #close_ssh_connection, #do_generate_cloud_tags, #do_run, #dup_with_new_parent, #dynamic_server?, #enabled_menu_items, #execute_script, #get, #has_description?, #has_no_ssh_connection?, #has_ssh_connection?, #has_tagged_value?, #list_attributes, #local_port_forward, #ls, #machines, #menu_items, #open_ssh_connection, #ping, #print_ping_result, #pseudo_tty, #put, #requires_description?, #requires_type?, #rsync, #run, #server?, #set_view_attributes, #ssh, #tags, #toggle_bootstrap, #type, #update_identifier, #update_parent
Methods inherited from Base
#bootstrap?, #close_ssh_connections, #collection?, const_missing, #data_print_from_hash, #enabled_menu_items, #execute_local, #execute_script, #has_parent?, #has_proxy?, #identifier=, #inventory?, #invoke, #is_top_level_node?, #keyed_namespace, #list_attributes, #list_key, #namespace, #no_nodes?, #nodes_loaded?, #open_ssh_connections, #pack_metadata, #prompt_breadcrumb, #proxy, #put, #recurse_resource_for_identifier, #requires_description?, #requires_type?, #resource_for_identifier, #resources, #rsync, #scp, #server?, #unpack_metadata, #validate_attributes, #validate_identifier
Methods included from RegistryManagement
#registry, #user_command_wrapper
Methods included from LocalMetaDataFactory
#do_create_metadata, #meta, #metadata, #metadata_for_namespace, #raw_metadata
Methods included from WorkspaceMenu
#item_spacing, #menu, #menu_item_spacing_length, #menu_items, #mode, #tab_spacing
Methods included from Attributes
#description, #filters, #identifier, #network_data, #network_driver, #recurse_hash_data_for_instance_var, #ssh_data, #ssh_driver, #type
Methods included from WorkspaceCommands
#back, #cd, #clear!, #disable, #disable!, #enable, #enable!, #interactive, #is_node_level_method?, #list_in_tree, #ls, #lsa, #method_in_registry?, #method_is_available_on_node?, #method_missing, #new_line, #parents, #ping, #pretty_description, #print_tree_view_for_resource, #resource_identifiers, #run, #tree, #tree_descriptions, #visual_hierarchy, #workon
Methods included from Context
#irb_workspace=, #is_current_context?, #previous_irb_workspace=
Constructor Details
#initialize(params) ⇒ Static
Returns a new instance of Static.
7 8 9 10 11 12 13 14 15 |
# File 'lib/objects/node/server/static.rb', line 7 def initialize(params) config = params[:views] @identifier = config[:identifier] @public_ip_address = config[:public_ip_address] @internal_ip_address = config[:internal_ip_address] @cloud_tags = config[:cloud_tags] verify_we_have_at_least_one_interface(config) super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bcome::WorkspaceCommands
Instance Attribute Details
#cloud_tags ⇒ Object (readonly)
Returns the value of attribute cloud_tags.
17 18 19 |
# File 'lib/objects/node/server/static.rb', line 17 def @cloud_tags end |
Class Method Details
.to_s ⇒ Object
3 4 5 |
# File 'lib/objects/node/server/static.rb', line 3 def self.to_s 'static server' end |
Instance Method Details
#has_at_least_one_interface? ⇒ Boolean
23 24 25 |
# File 'lib/objects/node/server/static.rb', line 23 def has_at_least_one_interface? @public_ip_address || @internal_ip_address end |
#static_server? ⇒ Boolean
27 28 29 |
# File 'lib/objects/node/server/static.rb', line 27 def static_server? true end |
#verify_we_have_at_least_one_interface(config) ⇒ Object
19 20 21 |
# File 'lib/objects/node/server/static.rb', line 19 def verify_we_have_at_least_one_interface(config) raise Bcome::Exception::MissingIpaddressOnServer, config unless has_at_least_one_interface? end |