Class: FishControl
- Inherits:
-
Object
- Object
- FishControl
- Defined in:
- lib/dockerfish.rb
Instance Method Summary collapse
- #containerctl(container, action, image = "<none>:<none>") ⇒ Object
-
#initialize ⇒ FishControl
constructor
A new instance of FishControl.
Constructor Details
#initialize ⇒ FishControl
Returns a new instance of FishControl.
561 562 563 564 |
# File 'lib/dockerfish.rb', line 561 def initialize @apiobj = DockerFish.new(false) @containerjson = "container.json" end |
Instance Method Details
#containerctl(container, action, image = "<none>:<none>") ⇒ Object
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/dockerfish.rb', line 566 def containerctl(container, action, image="<none>:<none>") if image != "<none>:<none>" @apiobj.image = image puts "My Image: #{image}" end container.split(",").each {|n| @apiobj.hostname = "#{n}" puts "Container: #{n} Action: #{action}" if action == "create" @apiobj.chooser("/containers/#{action}") else @apiobj.chooser("/containers/#{n}/#{action}") end @apiobj.apicall("#{action}") } exit end |