class Serverspec::Type::DockerNode
Public Instance Methods
active?()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 5 def active? availability == 'active' end
availability()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 17 def availability inspection['Spec']['Availability'] end
draining?()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 9 def draining? availability == 'drain' end
engine_version()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 41 def engine_version inspection['Description']['Engine']['EngineVersion'] end
exist?()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 45 def exist? get_inspection.success? end
has_engine_version?(version)
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 37 def has_engine_version?(version) engine_version == version end
labels()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 33 def labels inspection['Spec']['Labels'] end
manager?()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 25 def manager? role == 'manager' end
paused?()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 13 def paused? availability == 'pause' end
role()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 21 def role inspection['Spec']['Role'] end
worker?()
click to toggle source
# File lib/serverspec_extra_types/types/docker_node.rb, line 29 def worker? role == 'worker' end
Private Instance Methods
get_inspection()
click to toggle source
rubocop:disable Naming/AccessorMethodName
# File lib/serverspec_extra_types/types/docker_node.rb, line 52 def get_inspection @get_inspection ||= @runner.run_command("docker node inspect #{@name}") end