_ws1_profile_version

in chef/cookbooks/uber_helpers/libraries/node_utils.rb [130:148]


    def _ws1_profile_version(display_name, profiles)
      fail 'profiles XML parsing cannot be nil!' if profiles.nil?
      fail 'profiles XML parsing must be a Hash!' unless profiles.is_a?(Hash)

      
      profile_version = '0'
      if profiles.key?('_computerlevel')
        profiles['_computerlevel'].each do |profile|
          if profile['ProfileDisplayName'].nil?
            Chef::Log.warn("profile (#{profile['ProfileIdentifier']}) missing DisplayName key")
            next
          end
          profile_contents = profile['ProfileDisplayName'].split('/V_')
          return profile_contents[1] if profile_contents[0] == display_name
        end
      end
      profile_version
    end