Method: OraUtils::TitleParser#parse_asm_name
- Defined in:
- lib/orabase/utils/title_parser.rb
#parse_asm_name ⇒ Object
TODO: Check how we can remove this duplication
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/orabase/utils/title_parser.rb', line 36 def parse_asm_name lambda do |name| begin groups = name.scan(/^((@?.*?)?(\@.*?)?)$/).flatten sid = parse_asm_sid.call(groups.last) object_name = groups[1] if self.name != :ora_exec && object_name.include?('/') Puppet.deprecation_warning("Using 'sid/name' in title is deprecated. Use 'name@sid'.") sid, object_name = object_name.scan(/^(.*)\/(.*)$/).flatten.flatten end "#{object_name}@#{sid}" rescue fail ArgumentError, 'a failure in parsing the asm object title. Check the documentation for the correct syntax of the title' end end end |