Sha256: 353f51a9565d4cbc3f46c8fdc7b23b0a5b2960f1413f58d0e99284f4b308743b

Contents?: true

Size: 992 Bytes

Versions: 51

Compression:

Stored size: 992 Bytes

Contents

# Copyright (c) 2012 National ICT Australia Limited (NICTA).
# This software may be used and distributed solely under the terms of the MIT license (License).
# You should find a copy of the License in LICENSE.TXT or at http://opensource.org/licenses/MIT.
# By downloading or using this software you accept the terms and the liability disclaimer in the License.

# We can use communicator to interact with XMPP server
#
# Find all top level pubsub nodes
host = "pubsub.#{OmfCommon.comm.jid.domain}"

def discover
  OmfCommon.comm.discover('items', host, '') do |m|
    m.items.each { |i| info i.node }
    info "Found #{m.items.size} items"
  end
end


def cleanup
  OmfCommon.comm.affiliations do |a|
    if a[:owner]
      info "Found #{a[:owner].size} owned topics"
      info "Now cleaning up..."
      a[:owner].each do |t|
        OmfCommon.comm.delete_topic(t) do |m|
          debug m
        end
      end
    else
      info "Found no owned topics"
    end
  end
end

cleanup

done!

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
omf_ec-6.2.3 example/test_exp/test00.rb
omf_ec-6.2.2 example/test_exp/test00.rb
omf_ec-6.2.1 example/test_exp/test00.rb
omf_ec-6.2.0 example/test_exp/test00.rb
omf_ec-6.2.0.pre.2 example/test_exp/test00.rb
omf_ec-6.2.0.pre.1 example/test_exp/test00.rb
omf_ec-6.1.14.pre.2 example/test_exp/test00.rb
omf_ec-6.1.14.pre.1 example/test_exp/test00.rb
omf_ec-6.1.12 example/test_exp/test00.rb
omf_ec-6.1.11 example/test_exp/test00.rb
omf_ec-6.1.10 example/test_exp/test00.rb
omf_ec-6.1.9 example/test_exp/test00.rb
omf_ec-6.1.9.pre.4 example/test_exp/test00.rb
omf_ec-6.1.9.pre.3 example/test_exp/test00.rb
omf_ec-6.1.9.pre.2 example/test_exp/test00.rb
omf_ec-6.1.8 example/test_exp/test00.rb
omf_ec-6.1.7 example/test_exp/test00.rb
omf_ec-6.1.6 example/test_exp/test00.rb
omf_ec-6.1.6.pre.2 example/test_exp/test00.rb
omf_ec-6.1.6.pre.1 example/test_exp/test00.rb