Class: Hippo::DeploymentMonitor::Poll
- Inherits:
-
Object
- Object
- Hippo::DeploymentMonitor::Poll
- Defined in:
- lib/hippo/deployment_monitor.rb
Instance Attribute Summary collapse
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
-
#replica_sets ⇒ Object
readonly
Returns the value of attribute replica_sets.
Instance Method Summary collapse
-
#initialize(stage, deployment_id) ⇒ Poll
constructor
A new instance of Poll.
- #names ⇒ Object
- #pending_names ⇒ Object
Constructor Details
#initialize(stage, deployment_id) ⇒ Poll
Returns a new instance of Poll.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/hippo/deployment_monitor.rb', line 47 def initialize(stage, deployment_id) @stage = stage @deployment_id = deployment_id @replica_sets = @stage.get( 'rs', '--selector', 'hippo.adam.ac/deployID=' + @deployment_id ) @pending = @replica_sets.reject do |deploy| deploy['status']['availableReplicas'] == deploy['status']['replicas'] end end |
Instance Attribute Details
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
62 63 64 |
# File 'lib/hippo/deployment_monitor.rb', line 62 def pending @pending end |
#replica_sets ⇒ Object (readonly)
Returns the value of attribute replica_sets.
63 64 65 |
# File 'lib/hippo/deployment_monitor.rb', line 63 def replica_sets @replica_sets end |
Instance Method Details
#names ⇒ Object
69 70 71 |
# File 'lib/hippo/deployment_monitor.rb', line 69 def names make_names(@replica_sets) end |
#pending_names ⇒ Object
65 66 67 |
# File 'lib/hippo/deployment_monitor.rb', line 65 def pending_names make_names(@pending) end |