Class: DockerCloud::Stack

Inherits:
Type
  • Object
show all
Defined in:
lib/docker_cloud/stack.rb

Instance Attribute Summary

Attributes inherited from Type

#info

Instance Method Summary collapse

Methods inherited from Type

#initialize, #reload, #resource_uri, #uuid

Constructor Details

This class inherits a constructor from DockerCloud::Type

Instance Method Details

#deployed_dateObject



26
27
28
# File 'lib/docker_cloud/stack.rb', line 26

def deployed_date
  info[:deployed_datetime]
end

#destroyed_dateObject



30
31
32
# File 'lib/docker_cloud/stack.rb', line 30

def destroyed_date
  info[:destroyed_datetime]
end

#exportObject



58
59
60
# File 'lib/docker_cloud/stack.rb', line 58

def export
  api.export(uuid)
end

#nameObject



3
4
5
# File 'lib/docker_cloud/stack.rb', line 3

def name
  info[:name]
end

#nicknameObject



34
35
36
# File 'lib/docker_cloud/stack.rb', line 34

def nickname
  info[:nickname]
end

#redeployObject



42
43
44
# File 'lib/docker_cloud/stack.rb', line 42

def redeploy
  api.redeploy(uuid)
end

#servicesObject

def services; info; end



16
17
18
19
20
21
22
23
24
# File 'lib/docker_cloud/stack.rb', line 16

def services
  if @services.nil?
    @services = []
    info[:services].each do |uri|
      @services.push(client.services.get_from_uri(uri))
    end
  end
  @services
end

#startObject



38
39
40
# File 'lib/docker_cloud/stack.rb', line 38

def start
  api.start(uuid)
end

#stateObject



7
8
9
# File 'lib/docker_cloud/stack.rb', line 7

def state
  info[:state]
end

#stopObject



50
51
52
# File 'lib/docker_cloud/stack.rb', line 50

def stop
  api.stop(uuid)
end

#synchronizedObject



11
12
13
# File 'lib/docker_cloud/stack.rb', line 11

def synchronized
  info[:synchronized]
end

#terminateObject



46
47
48
# File 'lib/docker_cloud/stack.rb', line 46

def terminate
  api.terminate(uuid)
end

#update(params) ⇒ Object



54
55
56
# File 'lib/docker_cloud/stack.rb', line 54

def update(params)
  api.update(uuid, params)
end