Fixes and overrides
Change-Id: Id9e930655495e0ed42bf08f1089d90ab22453798
This commit is contained in:
parent
06e2f0df24
commit
43a7f7b161
|
@ -126,6 +126,18 @@ possible run combinations you can use the **RUN:** annotation.::
|
||||||
It can be specified many times an all entered combinations will be added to the
|
It can be specified many times an all entered combinations will be added to the
|
||||||
list.
|
list.
|
||||||
|
|
||||||
|
There is also a way to use the reverse logic. You can specify the Hiera
|
||||||
|
and facts yaml files that you want to exclude from the list instead of
|
||||||
|
providing the list of included files.::
|
||||||
|
|
||||||
|
# SKIP_HIERA: neut_vlan.compute.ssl neut_vlan.compute.nossl
|
||||||
|
# SKIP_FACTS: centos6
|
||||||
|
|
||||||
|
These yaml files will be excluded from the list of possible yaml files. If
|
||||||
|
you have used both include and exclude options, the exclude option will have
|
||||||
|
the priority over the include option. If there are no included Hiera files
|
||||||
|
the list of Hiera files will be generated from the node roles.
|
||||||
|
|
||||||
The final annotation **DISABLE_SPEC** allows you to temporarily disable the
|
The final annotation **DISABLE_SPEC** allows you to temporarily disable the
|
||||||
spec from being seen the framework. It can use useful if you want to turn off
|
spec from being seen the framework. It can use useful if you want to turn off
|
||||||
a spec with run problems and fix them later without breaking the tests.::
|
a spec with run problems and fix them later without breaking the tests.::
|
||||||
|
|
|
@ -743,7 +743,8 @@ public_ssl:
|
||||||
hostname: public.fuel.local
|
hostname: public.fuel.local
|
||||||
horizon: true
|
horizon: true
|
||||||
services: true
|
services: true
|
||||||
cert_data: ''
|
cert_data:
|
||||||
|
content: 'somedataaboutyourkeypair'
|
||||||
cert_source: self_signed
|
cert_source: self_signed
|
||||||
metadata:
|
metadata:
|
||||||
group: security
|
group: security
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
storage:
|
||||||
|
volume_backend_names:
|
||||||
|
volumes_ceph: false
|
||||||
|
volumes_lvm: 'LVM-backend'
|
||||||
|
volumes_block_device: false
|
||||||
|
storage_hash:
|
||||||
|
volume_backend_names:
|
||||||
|
volumes_ceph: false
|
||||||
|
volumes_lvm: 'LVM-backend'
|
||||||
|
volumes_block_device: false
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
host_uuid: '00000000-0000-0000-0000-000000000000'
|
||||||
configuration:
|
configuration:
|
||||||
nova_config:
|
nova_config:
|
||||||
DEFAULT/debug:
|
DEFAULT/debug:
|
||||||
|
|
|
@ -176,9 +176,19 @@ module Noop
|
||||||
if line =~ /^\s*#\s*(?:yamls|hiera):\s*(.*)/
|
if line =~ /^\s*#\s*(?:yamls|hiera):\s*(.*)/
|
||||||
task_spec_metadata[:hiera] = get_list_of_yamls $1
|
task_spec_metadata[:hiera] = get_list_of_yamls $1
|
||||||
end
|
end
|
||||||
|
|
||||||
if line =~ /^\s*#\s*facts:\s*(.*)/
|
if line =~ /^\s*#\s*facts:\s*(.*)/
|
||||||
task_spec_metadata[:facts] = get_list_of_yamls $1
|
task_spec_metadata[:facts] = get_list_of_yamls $1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if line =~ /^\s*#\s*(?:skip_yamls|skip_hiera):\s(.*)/
|
||||||
|
task_spec_metadata[:skip_hiera] = get_list_of_yamls $1
|
||||||
|
end
|
||||||
|
|
||||||
|
if line =~ /^\s*#\s*skip_facts:\s(.*)/
|
||||||
|
task_spec_metadata[:skip_facts] = get_list_of_yamls $1
|
||||||
|
end
|
||||||
|
|
||||||
if line =~ /disable_spec/
|
if line =~ /disable_spec/
|
||||||
task_spec_metadata[:disable] = true
|
task_spec_metadata[:disable] = true
|
||||||
end
|
end
|
||||||
|
@ -216,8 +226,11 @@ module Noop
|
||||||
metadata = spec_run_metadata.fetch file_name_spec, {}
|
metadata = spec_run_metadata.fetch file_name_spec, {}
|
||||||
metadata[:facts] = [Noop::Config.default_facts_file_name] unless metadata[:facts]
|
metadata[:facts] = [Noop::Config.default_facts_file_name] unless metadata[:facts]
|
||||||
metadata[:hiera] = assign_spec_to_hiera.fetch file_name_spec, [] unless metadata[:hiera]
|
metadata[:hiera] = assign_spec_to_hiera.fetch file_name_spec, [] unless metadata[:hiera]
|
||||||
|
|
||||||
runs = []
|
runs = []
|
||||||
metadata[:facts].product metadata[:hiera] do |facts, hiera|
|
metadata[:facts].product metadata[:hiera] do |facts, hiera|
|
||||||
|
next if metadata[:skip_hiera].is_a? Array and metadata[:skip_hiera].include? hiera
|
||||||
|
next if metadata[:skip_facts].is_a? Array and metadata[:skip_facts].include? hiera
|
||||||
run_record = {
|
run_record = {
|
||||||
:hiera => hiera,
|
:hiera => hiera,
|
||||||
:facts => facts,
|
:facts => facts,
|
||||||
|
|
|
@ -130,10 +130,23 @@ module Noop
|
||||||
end.max
|
end.max
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def output_task_totals
|
||||||
|
tasks = 0
|
||||||
|
failed = 0
|
||||||
|
pending = 0
|
||||||
|
task_list.each do |task|
|
||||||
|
pending += 1 if task.pending?
|
||||||
|
failed += 1 if task.failed?
|
||||||
|
tasks += 1
|
||||||
|
end
|
||||||
|
output "Tasks: #{tasks} Failed: #{failed} Pending: #{pending}"
|
||||||
|
end
|
||||||
|
|
||||||
def task_report
|
def task_report
|
||||||
task_list.each do |task|
|
task_list.each do |task|
|
||||||
output_task_status task
|
output_task_status task
|
||||||
end
|
end
|
||||||
|
output_task_totals
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_filters
|
def show_filters
|
||||||
|
|
|
@ -119,7 +119,7 @@ module Noop
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [Object]
|
# @return [Object]
|
||||||
def hiera_structure(key, default = nil, separator = '/', resolution_type = :priority)
|
def hiera_structure(key, default = nil, separator = '/', resolution_type = :hash)
|
||||||
path_lookup = lambda do |data, path, default_value|
|
path_lookup = lambda do |data, path, default_value|
|
||||||
break default_value unless data
|
break default_value unless data
|
||||||
break data unless path.is_a? Array and path.any?
|
break data unless path.is_a? Array and path.any?
|
||||||
|
|
|
@ -24,7 +24,13 @@ module Noop
|
||||||
end
|
end
|
||||||
|
|
||||||
class << Hiera::Config
|
class << Hiera::Config
|
||||||
attr_accessor :config
|
def config
|
||||||
|
@config
|
||||||
|
end
|
||||||
|
|
||||||
|
def config=(value)
|
||||||
|
@config = value
|
||||||
|
end
|
||||||
|
|
||||||
def load(source)
|
def load(source)
|
||||||
@config ||= {}
|
@config ||= {}
|
||||||
|
|
|
@ -28,3 +28,5 @@ RSpec.configure do |c|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Noop.setup_overrides
|
||||||
|
|
Loading…
Reference in New Issue