Sha256: 2a1d1d1196a3735b09df6f835583806d836b71403851d2aee73bfce74e5f6342

Contents?: true

Size: 465 Bytes

Versions: 4

Compression:

Stored size: 465 Bytes

Contents

module AnsibleTowerClient
  class InventorySource < BaseModel
    def self.endpoint
      "inventory_sources".freeze
    end

    def can_update?
      response = api.get("#{related['update']}").body

      updatable = JSON.parse(response)
      updatable['can_update']
    end

    def update
      response = api.post("#{related['update']}").body

      update = JSON.parse(response)
      api.inventory_updates.find(update['inventory_update'])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ansible_tower_client-0.3.3 lib/ansible_tower_client/inventory_source.rb
ansible_tower_client-0.3.2 lib/ansible_tower_client/inventory_source.rb
ansible_tower_client-0.3.1 lib/ansible_tower_client/inventory_source.rb
ansible_tower_client-0.3.0 lib/ansible_tower_client/inventory_source.rb