Class: DockerCloud::Service

Inherits:
Type
  • Object
show all
Includes:
Helpers::Services
Defined in:
lib/docker_cloud/service.rb

Instance Attribute Summary

Attributes inherited from Type

#info

Instance Method Summary collapse

Methods included from Helpers::Services

#container_ports, #redeploy, #roles, #start, #stop, #terminate, #update

Methods inherited from Type

#initialize, #reload, #resource_uri, #uuid

Constructor Details

This class inherits a constructor from DockerCloud::Type

Instance Method Details

#amc_addressObject



109
110
111
# File 'lib/docker_cloud/service.rb', line 109

def amc_address
  info[:mac_address]
end

#auto_destroyObject



197
198
199
# File 'lib/docker_cloud/service.rb', line 197

def auto_destroy
  info[:autodestroy]
end

#auto_redeployObject



221
222
223
# File 'lib/docker_cloud/service.rb', line 221

def auto_redeploy
  info[:autoredeploy]
end

#auto_restartObject



193
194
195
# File 'lib/docker_cloud/service.rb', line 193

def auto_restart
  info[:autorestart]
end

#bindingsObject



189
190
191
# File 'lib/docker_cloud/service.rb', line 189

def bindings
  info[:bindings]
end

#cap_addObject



133
134
135
# File 'lib/docker_cloud/service.rb', line 133

def cap_add
  info[:cap_add]
end

#cap_dropObject



137
138
139
# File 'lib/docker_cloud/service.rb', line 137

def cap_drop
  info[:cap_add]
end

#cgroup_nameObject



113
114
115
# File 'lib/docker_cloud/service.rb', line 113

def cgroup_name
  info[:cgroup_name]
end

#container_env_varsObject



85
86
87
# File 'lib/docker_cloud/service.rb', line 85

def container_env_vars
  info[:container_envvars]
end

#containersObject

def containers; info; end



75
76
77
78
79
80
81
82
83
# File 'lib/docker_cloud/service.rb', line 75

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

#cpu_sharesObject



165
166
167
# File 'lib/docker_cloud/service.rb', line 165

def cpu_shares
  info[:cpu_shares]
end

#cpusetObject



169
170
171
# File 'lib/docker_cloud/service.rb', line 169

def cpuset
  info[:cpuset]
end

#current_num_containersObject



57
58
59
# File 'lib/docker_cloud/service.rb', line 57

def current_num_containers
  info[:current_num_containers]
end

#deployed_dateObject



37
38
39
# File 'lib/docker_cloud/service.rb', line 37

def deployed_date
  info[:deployed_datetime]
end

#deployment_strategyObject



213
214
215
# File 'lib/docker_cloud/service.rb', line 213

def deployment_strategy
  info[:deployment_strategy]
end

#destroyed_dateObject



49
50
51
# File 'lib/docker_cloud/service.rb', line 49

def destroyed_date
  info[:destroyed_datetime]
end

#devicesObject



141
142
143
# File 'lib/docker_cloud/service.rb', line 141

def devices
  info[:devices]
end

#dnsObject



125
126
127
# File 'lib/docker_cloud/service.rb', line 125

def dns
  info[:dns]
end

#dns_searchObject



129
130
131
# File 'lib/docker_cloud/service.rb', line 129

def dns_search
  info[:dns_search]
end

#domain_nameObject



105
106
107
# File 'lib/docker_cloud/service.rb', line 105

def domain_name
  info[:domainname]
end

#entrypointObject



153
154
155
# File 'lib/docker_cloud/service.rb', line 153

def entrypoint
  info[:entrypoint]
end

#extra_hosrsObject



145
146
147
# File 'lib/docker_cloud/service.rb', line 145

def extra_hosrs
  info[:extra_hosrs]
end

#hostnameObject



101
102
103
# File 'lib/docker_cloud/service.rb', line 101

def hostname
  info[:hostname]
end

#imageObject



9
10
11
# File 'lib/docker_cloud/service.rb', line 9

def image
  @image ||= client.images.get_from_uri(info[:image_tag]) unless info[:image_tag].nil?
end

#image_nameObject



5
6
7
# File 'lib/docker_cloud/service.rb', line 5

def image_name
  info[:image_name]
end

#labelsObject



89
90
91
# File 'lib/docker_cloud/service.rb', line 89

def labels
  info[:labels]
end


201
202
203
# File 'lib/docker_cloud/service.rb', line 201

def link_variables
  info[:link_variables]
end

#linked_from_serviceObject



181
182
183
# File 'lib/docker_cloud/service.rb', line 181

def linked_from_service
  info[:linked_from_service]
end

#linked_to_serviceObject



185
186
187
# File 'lib/docker_cloud/service.rb', line 185

def linked_to_service
  info[:linked_to_service]
end

#memoryObject



173
174
175
# File 'lib/docker_cloud/service.rb', line 173

def memory
  info[:memory]
end

#memory_swapObject



177
178
179
# File 'lib/docker_cloud/service.rb', line 177

def memory_swap
  info[:memory_swap]
end

#nameObject



13
14
15
# File 'lib/docker_cloud/service.rb', line 13

def name
  info[:name]
end

#netObject



25
26
27
# File 'lib/docker_cloud/service.rb', line 25

def net
  info[:net]
end

#nicknameObject



225
226
227
# File 'lib/docker_cloud/service.rb', line 225

def nickname
  info[:nickname]
end

#pidObject



29
30
31
# File 'lib/docker_cloud/service.rb', line 29

def pid
  info[:pid]
end

#privilegedObject



205
206
207
# File 'lib/docker_cloud/service.rb', line 205

def privileged
  info[:privileged]
end

#public_dnsObject



17
18
19
# File 'lib/docker_cloud/service.rb', line 17

def public_dns
  info[:public_dns]
end

#read_onlyObject



209
210
211
# File 'lib/docker_cloud/service.rb', line 209

def read_only
  info[:read_only]
end

#run_commandObject



157
158
159
# File 'lib/docker_cloud/service.rb', line 157

def run_command
  info[:run_command]
end

#running_num_containersObject



61
62
63
# File 'lib/docker_cloud/service.rb', line 61

def running_num_containers
  info[:running_num_containers]
end

#security_optObject



149
150
151
# File 'lib/docker_cloud/service.rb', line 149

def security_opt
  info[:security_opt]
end

#sequential_deploymentObject



161
162
163
# File 'lib/docker_cloud/service.rb', line 161

def sequential_deployment
  info[:sequential_deployment]
end

#stackObject

def stack; info; end



70
71
72
# File 'lib/docker_cloud/service.rb', line 70

def stack
  @stack ||= client.stacks.get_from_uri(info[:stack])
end

#started_dateObject



41
42
43
# File 'lib/docker_cloud/service.rb', line 41

def started_date
  info[:started_datetime]
end

#stateObject



21
22
23
# File 'lib/docker_cloud/service.rb', line 21

def state
  info[:state]
end

#stdin_openObject



121
122
123
# File 'lib/docker_cloud/service.rb', line 121

def stdin_open
  info[:stdin_open]
end

#stopped_dateObject



45
46
47
# File 'lib/docker_cloud/service.rb', line 45

def stopped_date
  info[:stopped_datetime]
end

#stopped_num_containersObject



65
66
67
# File 'lib/docker_cloud/service.rb', line 65

def stopped_num_containers
  info[:stopped_run_containers]
end

#synchronizedObject



33
34
35
# File 'lib/docker_cloud/service.rb', line 33

def synchronized
  info[:synchronized]
end

#tagsObject



217
218
219
# File 'lib/docker_cloud/service.rb', line 217

def tags
  info[:tags]
end

#target_container_numObject



53
54
55
# File 'lib/docker_cloud/service.rb', line 53

def target_container_num
  info[:target_num_containers]
end

#ttyObject



117
118
119
# File 'lib/docker_cloud/service.rb', line 117

def tty
  info[:tty]
end

#userObject



97
98
99
# File 'lib/docker_cloud/service.rb', line 97

def user
  info[:user]
end

#working_dirObject



93
94
95
# File 'lib/docker_cloud/service.rb', line 93

def working_dir
  info[:working_dir]
end