Class: Miasma::Models::Compute::Server
- Inherits:
-
Types::Model
- Object
- Types::Data
- Types::Model
- Miasma::Models::Compute::Server
- Defined in:
- lib/miasma/models/compute/server.rb
Overview
Abstract server
Defined Under Namespace
Constant Summary
- VALID_COMPUTE_STATES =
Returns valid compute instance states
[:running, :stopped, :pending, :terminated]
Instance Attribute Summary (collapse)
-
- (Miasma::Types::Api) api
inherited
from Types::Model
readonly
Underlying service API.
Instance Method Summary (collapse)
-
- (String) address
Public IP address.
- - (Array<Smash>) addresses
Constructor Details
This class inherits a constructor from Miasma::Types::Model
Instance Attribute Details
- (Miasma::Types::Api) api (readonly) Originally defined in class Types::Model
Returns underlying service API
Instance Method Details
- (String) address
Returns public IP address
44 45 46 47 48 49 |
# File 'lib/miasma/models/compute/server.rb', line 44 def address obj = addresses_public.detect do |addr| addr.version == 4 end obj.address if obj end |
- (Array<Smash>) addresses
39 40 41 |
# File 'lib/miasma/models/compute/server.rb', line 39 def addresses addresses_public + addresses_private end |