serverspec-extra-types 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/.gitignore +13 -0
 - data/.rspec +3 -0
 - data/.rubocop.yml +6 -0
 - data/.travis.yml +7 -0
 - data/CODE_OF_CONDUCT.md +74 -0
 - data/Gemfile +6 -0
 - data/LICENSE.txt +21 -0
 - data/README.md +191 -0
 - data/Rakefile +7 -0
 - data/bin/console +14 -0
 - data/bin/setup +8 -0
 - data/lib/serverspec_extra_types.rb +3 -0
 - data/lib/serverspec_extra_types/helpers/properties.rb +11 -0
 - data/lib/serverspec_extra_types/matchers.rb +34 -0
 - data/lib/serverspec_extra_types/matchers/be_a_manager_node.rb +15 -0
 - data/lib/serverspec_extra_types/matchers/be_a_worker_node.rb +14 -0
 - data/lib/serverspec_extra_types/matchers/be_active.rb +11 -0
 - data/lib/serverspec_extra_types/matchers/configure_queue.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_count.rb +11 -0
 - data/lib/serverspec_extra_types/matchers/have_domain_name.rb +10 -0
 - data/lib/serverspec_extra_types/matchers/have_engine_version.rb +11 -0
 - data/lib/serverspec_extra_types/matchers/have_environment_variable.rb +21 -0
 - data/lib/serverspec_extra_types/matchers/have_ha_mode.rb +5 -0
 - data/lib/serverspec_extra_types/matchers/have_ha_nodes.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_ha_sync_mode.rb +5 -0
 - data/lib/serverspec_extra_types/matchers/have_host.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_hostname.rb +6 -0
 - data/lib/serverspec_extra_types/matchers/have_image.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_image_sha.rb +5 -0
 - data/lib/serverspec_extra_types/matchers/have_label.rb +20 -0
 - data/lib/serverspec_extra_types/matchers/have_mount.rb +11 -0
 - data/lib/serverspec_extra_types/matchers/have_network.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_placement_constraint.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_replica_count.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_restart_limit.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_restart_policy.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/have_user.rb +10 -0
 - data/lib/serverspec_extra_types/matchers/have_vhost.rb +5 -0
 - data/lib/serverspec_extra_types/matchers/include_regex.rb +5 -0
 - data/lib/serverspec_extra_types/matchers/map_port.rb +25 -0
 - data/lib/serverspec_extra_types/matchers/mirror_all.rb +5 -0
 - data/lib/serverspec_extra_types/matchers/publish_all_ports.rb +3 -0
 - data/lib/serverspec_extra_types/matchers/read_from_queue.rb +8 -0
 - data/lib/serverspec_extra_types/matchers/write_to_queue.rb +8 -0
 - data/lib/serverspec_extra_types/types.rb +18 -0
 - data/lib/serverspec_extra_types/types/api_base.rb +36 -0
 - data/lib/serverspec_extra_types/types/consul_base.rb +40 -0
 - data/lib/serverspec_extra_types/types/consul_node.rb +20 -0
 - data/lib/serverspec_extra_types/types/consul_node_list.rb +32 -0
 - data/lib/serverspec_extra_types/types/consul_service.rb +24 -0
 - data/lib/serverspec_extra_types/types/consul_service_list.rb +32 -0
 - data/lib/serverspec_extra_types/types/docker_container.rb +124 -0
 - data/lib/serverspec_extra_types/types/docker_node.rb +41 -0
 - data/lib/serverspec_extra_types/types/docker_service.rb +121 -0
 - data/lib/serverspec_extra_types/types/rabbitmq_base.rb +38 -0
 - data/lib/serverspec_extra_types/types/rabbitmq_node_list.rb +18 -0
 - data/lib/serverspec_extra_types/types/rabbitmq_user_permission.rb +39 -0
 - data/lib/serverspec_extra_types/types/rabbitmq_vhost_list.rb +22 -0
 - data/lib/serverspec_extra_types/types/rabbitmq_vhost_policy.rb +57 -0
 - data/lib/serverspec_extra_types/version.rb +3 -0
 - data/properties.yml +23 -0
 - data/serverspec-extra-types.gemspec +36 -0
 - metadata +232 -0
 
| 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            RSpec::Matchers.define :be_a_worker_node do
         
     | 
| 
      
 2 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 3 
     | 
    
         
            +
                actual.role == 'worker'
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 6 
     | 
    
         
            +
                "expected '#{actual.role}' to be worker"
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
              description do
         
     | 
| 
      
 9 
     | 
    
         
            +
                'be a worker node'
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
            end
         
     | 
| 
      
 12 
     | 
    
         
            +
            RSpec::Matchers.alias_matcher :be_worker, :be_a_worker_node
         
     | 
| 
      
 13 
     | 
    
         
            +
            RSpec::Matchers.alias_matcher :be_a_worker, :be_a_worker_node
         
     | 
| 
      
 14 
     | 
    
         
            +
            RSpec::Matchers.alias_matcher :be_worker_node, :be_a_worker_node
         
     | 
| 
         @@ -0,0 +1,10 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            RSpec::Matchers.define :have_domainname do |domain|
         
     | 
| 
      
 2 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 3 
     | 
    
         
            +
                actual.has_domainname? domain
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 6 
     | 
    
         
            +
                "expected domain name to be #{domain}, was #{actual.domain_name}"
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
            end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            RSpec::Matchers.alias_matcher :have_domain_name, :have_domainname
         
     | 
| 
         @@ -0,0 +1,11 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            RSpec::Matchers.define :have_engine_version do |version|
         
     | 
| 
      
 2 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 3 
     | 
    
         
            +
                actual.has_engine_version? version
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 6 
     | 
    
         
            +
                "expected version #{actual.engine_version} to be #{version}"
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
              description do
         
     | 
| 
      
 9 
     | 
    
         
            +
                "be running docker version #{version}"
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            RSpec::Matchers.define :have_environment_variable do |regex|
         
     | 
| 
      
 2 
     | 
    
         
            +
              chain :with_value do | value|
         
     | 
| 
      
 3 
     | 
    
         
            +
                @value = value
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 6 
     | 
    
         
            +
                actual.has_environment_variable? regex, @value
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
              description do
         
     | 
| 
      
 9 
     | 
    
         
            +
                message = "have an environment variable #{regex}"
         
     | 
| 
      
 10 
     | 
    
         
            +
                message << %( with a value of "#{@value}") if @value
         
     | 
| 
      
 11 
     | 
    
         
            +
                message
         
     | 
| 
      
 12 
     | 
    
         
            +
              end
         
     | 
| 
      
 13 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 14 
     | 
    
         
            +
                if !@value
         
     | 
| 
      
 15 
     | 
    
         
            +
                  "expected #{actual.environment_variables} to contain #{regex}"
         
     | 
| 
      
 16 
     | 
    
         
            +
                else
         
     | 
| 
      
 17 
     | 
    
         
            +
                  "expected #{regex} to have value #{@value}, it was #{actual.environment_variable(regex)}"
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            RSpec::Matchers.define :have_label do |label|
         
     | 
| 
      
 2 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 3 
     | 
    
         
            +
                actual.labels.key? label
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 6 
     | 
    
         
            +
                "expected #{actual.labels} to have key #{label}"
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
            end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            RSpec::Matchers.define :have_label_with_value do |label, value|
         
     | 
| 
      
 11 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 12 
     | 
    
         
            +
                actual.labels[label] == value
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 15 
     | 
    
         
            +
                "expected #{actual.labels[label]} to be #{value}"
         
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
              description do
         
     | 
| 
      
 18 
     | 
    
         
            +
                "have label #{label} with value #{value}"
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,11 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            RSpec::Matchers.define :have_mount do |source, target, type = 'bind'|
         
     | 
| 
      
 2 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 3 
     | 
    
         
            +
                actual.has_mount?(source, target, type)
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
              description do
         
     | 
| 
      
 6 
     | 
    
         
            +
                "mount #{source} on host to #{target} in container as a #{type} mount"
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 9 
     | 
    
         
            +
                "expected #{actual.mounts} to contain {'Target' => #{target}, 'Destination' => #{source} , 'Type' => #{type}}"
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,25 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            RSpec::Matchers.define :map_port do |host, container|
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              match do |actual|
         
     | 
| 
      
 4 
     | 
    
         
            +
                @protocol = 'tcp' unless @protocol
         
     | 
| 
      
 5 
     | 
    
         
            +
                if @mode
         
     | 
| 
      
 6 
     | 
    
         
            +
                  actual.map_port? host, container, @protocol, @mode
         
     | 
| 
      
 7 
     | 
    
         
            +
                else
         
     | 
| 
      
 8 
     | 
    
         
            +
                  actual.map_port? host, container, @protocol
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
              description do
         
     | 
| 
      
 12 
     | 
    
         
            +
                msg = "map container port #{container} to host port #{host}"
         
     | 
| 
      
 13 
     | 
    
         
            +
                msg << %( using the "#{@protocol}" protocol) if @protocol
         
     | 
| 
      
 14 
     | 
    
         
            +
                msg << %( in "#{@mode}" mode) if @mode
         
     | 
| 
      
 15 
     | 
    
         
            +
                msg
         
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
              failure_message do |actual|
         
     | 
| 
      
 18 
     | 
    
         
            +
                @protocol = 'tcp' unless @protocol
         
     | 
| 
      
 19 
     | 
    
         
            +
                "expected #{actual.port_map} to contain {\"#{container}/#{@protocol}\"=>[{\"HostPort\"=>\"#{host}\"}] }"
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              chain :using_protocol, :protocol
         
     | 
| 
      
 23 
     | 
    
         
            +
              chain :with_mode, :mode
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'serverspec_extra_types/types/docker_container'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'serverspec/helper/type'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module Serverspec
         
     | 
| 
      
 5 
     | 
    
         
            +
              module Helper
         
     | 
| 
      
 6 
     | 
    
         
            +
                module Type
         
     | 
| 
      
 7 
     | 
    
         
            +
                  types = %w[docker_service rabbitmq_vhost_policy rabbitmq_node_list rabbitmq_vhost_list
         
     | 
| 
      
 8 
     | 
    
         
            +
                             rabbitmq_user_permission consul_service consul_service_list consul_node consul_node_list]
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                  types.each do |type|
         
     | 
| 
      
 11 
     | 
    
         
            +
                    require "serverspec_extra_types/types/#{type}"
         
     | 
| 
      
 12 
     | 
    
         
            +
                    define_method type do |*_args|
         
     | 
| 
      
 13 
     | 
    
         
            +
                      eval "Serverspec::Type::#{type.to_camel_case}.new(*_args)"
         
     | 
| 
      
 14 
     | 
    
         
            +
                    end
         
     | 
| 
      
 15 
     | 
    
         
            +
                  end
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,36 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'serverspec'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'serverspec/type/base'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'multi_json'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'serverspec_extra_types/helpers/properties'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            module Serverspec::Type
         
     | 
| 
      
 7 
     | 
    
         
            +
              class ApiBase < Base
         
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize(name = nil, options = {})
         
     | 
| 
      
 9 
     | 
    
         
            +
                  super(name, options)
         
     | 
| 
      
 10 
     | 
    
         
            +
                end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                def [](key)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  value = inspection
         
     | 
| 
      
 14 
     | 
    
         
            +
                  key.split('.').each do |k|
         
     | 
| 
      
 15 
     | 
    
         
            +
                    is_index = k.start_with?('[') && k.end_with?(']')
         
     | 
| 
      
 16 
     | 
    
         
            +
                    value = value[is_index ? k[1..-2].to_i : k]
         
     | 
| 
      
 17 
     | 
    
         
            +
                  end
         
     | 
| 
      
 18 
     | 
    
         
            +
                  value
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                def url
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @url_base
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                def inspection
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @inspection ||= ::MultiJson.load(get_inspection.stdout)
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                private
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                def get_inspection
         
     | 
| 
      
 32 
     | 
    
         
            +
                  command = "curl -s #{url}"
         
     | 
| 
      
 33 
     | 
    
         
            +
                  @get_inspection ||= @runner.run_command(command)
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,40 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'serverspec'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'serverspec/type/base'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'multi_json'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'serverspec_extra_types/helpers/properties'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require 'serverspec_extra_types/types/api_base'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            module Serverspec::Type
         
     | 
| 
      
 8 
     | 
    
         
            +
              class ConsulBase < ApiBase
         
     | 
| 
      
 9 
     | 
    
         
            +
                def initialize(name = nil, acl_token = nil, options = {})
         
     | 
| 
      
 10 
     | 
    
         
            +
                  super(name, options)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @token = acl_token
         
     | 
| 
      
 12 
     | 
    
         
            +
                  @url_base = property[:variables][:consul_url] || 'http://localhost:8500'
         
     | 
| 
      
 13 
     | 
    
         
            +
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                def [](key)
         
     | 
| 
      
 16 
     | 
    
         
            +
                  value = inspection
         
     | 
| 
      
 17 
     | 
    
         
            +
                  key.split('.').each do |k|
         
     | 
| 
      
 18 
     | 
    
         
            +
                    is_index = k.start_with?('[') && k.end_with?(']')
         
     | 
| 
      
 19 
     | 
    
         
            +
                    value = value[is_index ? k[1..-2].to_i : k]
         
     | 
| 
      
 20 
     | 
    
         
            +
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                  value
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                def url
         
     | 
| 
      
 25 
     | 
    
         
            +
                  @url_base
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                def inspection
         
     | 
| 
      
 29 
     | 
    
         
            +
                  @inspection ||= ::MultiJson.load(get_inspection.stdout)[0]
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                private
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                def get_inspection
         
     | 
| 
      
 35 
     | 
    
         
            +
                  headers = @token ? "--header 'X-Consul-Token: #{@token}'" : ''
         
     | 
| 
      
 36 
     | 
    
         
            +
                  command = "curl -s #{headers} #{url}"
         
     | 
| 
      
 37 
     | 
    
         
            +
                  @get_inspection ||= @runner.run_command(command)
         
     | 
| 
      
 38 
     | 
    
         
            +
                end
         
     | 
| 
      
 39 
     | 
    
         
            +
              end
         
     | 
| 
      
 40 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'serverspec_extra_types/types/consul_base'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            # TODO: List and singular
         
     | 
| 
      
 5 
     | 
    
         
            +
            module Serverspec::Type
         
     | 
| 
      
 6 
     | 
    
         
            +
              class ConsulNode < ConsulBase
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def url
         
     | 
| 
      
 9 
     | 
    
         
            +
                  "#{@url_base}/v1/catalog/node/#{@name}"
         
     | 
| 
      
 10 
     | 
    
         
            +
                end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                def inspection
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @inspection ||= ::MultiJson.load(get_inspection.stdout) #Need a find
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     |