Sha256: dd256ef449af754387d2116a875169c255a8e6980a5a3894b90aeef1f241593d

Contents?: true

Size: 496 Bytes

Versions: 7

Compression:

Stored size: 496 Bytes

Contents

module AnsibleTowerClient
  class Inventory < BaseModel
    def self.endpoint
      "inventories".freeze
    end

    def inventory_sources
      Collection.new(api).find_all_by_url(related['inventory_sources'])
    end

    def update_all_inventory_sources
      inventory_sources.each do |inventory_source|
        inventory_source.update if inventory_source.can_update?
      end
    end

    def root_groups
      Collection.new(api).find_all_by_url(related['root_groups'])
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ansible_tower_client-0.5.0 lib/ansible_tower_client/base_models/inventory.rb
ansible_tower_client-0.4.1 lib/ansible_tower_client/base_models/inventory.rb
ansible_tower_client-0.4.0 lib/ansible_tower_client/base_models/inventory.rb
ansible_tower_client-0.3.3 lib/ansible_tower_client/inventory.rb
ansible_tower_client-0.3.2 lib/ansible_tower_client/inventory.rb
ansible_tower_client-0.3.1 lib/ansible_tower_client/inventory.rb
ansible_tower_client-0.3.0 lib/ansible_tower_client/inventory.rb