class Docker::Swarm::Network
Attributes
hash[R]
Public Class Methods
new(swarm, hash)
click to toggle source
# File lib/docker/swarm/network.rb, line 6 def initialize(swarm, hash) @hash = hash @swarm = swarm end
Public Instance Methods
connection()
click to toggle source
# File lib/docker/swarm/network.rb, line 11 def connection return @swarm.connection end
driver()
click to toggle source
# File lib/docker/swarm/network.rb, line 23 def driver return @hash['Driver'] end
id()
click to toggle source
# File lib/docker/swarm/network.rb, line 15 def id return @hash['Id'] end
name()
click to toggle source
# File lib/docker/swarm/network.rb, line 19 def name return @hash['Name'] end
remove()
click to toggle source
# File lib/docker/swarm/network.rb, line 34 def remove if (@swarm) @swarm.nodes.each do |node| node.remove_network(self) end end end
subnets()
click to toggle source
# File lib/docker/swarm/network.rb, line 27 def subnets if (@hash['IPAM']) && (@hash['IPAM']['Config']) return @hash['IPAM']['Config'] end return [] end