diff --git a/service/lib/agama/storage/config_conversions.rb b/service/lib/agama/storage/config_conversions.rb index 17ff47ee9b..e8f49d38f5 100644 --- a/service/lib/agama/storage/config_conversions.rb +++ b/service/lib/agama/storage/config_conversions.rb @@ -26,9 +26,6 @@ module Agama module Storage # Conversions for the storage config. module ConfigConversions - # Reserved string for Configs::Search meaning 'match all devices if there is any' - SEARCH_ANYTHING_STRING = "*" - private_constant :SEARCH_ANYTHING_STRING end end end diff --git a/service/lib/agama/storage/config_conversions/from_json_conversions/search.rb b/service/lib/agama/storage/config_conversions/from_json_conversions/search.rb index 7b372f55d8..e742de66a2 100644 --- a/service/lib/agama/storage/config_conversions/from_json_conversions/search.rb +++ b/service/lib/agama/storage/config_conversions/from_json_conversions/search.rb @@ -36,6 +36,12 @@ def convert private + # Reserved search value meaning 'match all devices or ignore the section'. + # + # { search: "*" } is a shortcut for { search: { ifNotFound: "skip" } }. + SEARCH_ANYTHING_STRING = "*" + private_constant :SEARCH_ANYTHING_STRING + alias_method :search_json, :config_json # @see Base#conversions