Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-8

Provide a full list of resolved collection-level dependencies via API

Details

    • Task
    • Resolution: Done
    • Normal
    • 2.0
    • None
    • Backend
    • AAH 4.3.0 Sprint 3

    Description

      This will be needed by ansible-builder in order to construct a list of python / system level dependencies. We will need to inspect each collection for the information surfaced by #23

      Proposed Solution

      I'm unopinionated on the implementation details, but if it helps to know what I'm currently doing... the only way for me to get the data I need is via a private method in the Galaxy CLI:
       

      from ansible import context
      from ansible.galaxy import Galaxy
      from ansible.galaxy.api import GalaxyAPI
      from ansible.galaxy.collection import _build_dependency_map
      
      
      context.CLIARGS = {'type': 'collection', 'ignore_certs': True}
      galaxy = Galaxy()
      api = GalaxyAPI(galaxy, 'default', 'https://galaxy.ansible.com')
      dependency_map = _build_dependency_map([('alancoding.deps', '*', None)],
                                             [],
                                             '/tmp/test',
                                             [api], False, False, False, False)
      print(dependency_map)
      

      Attachments

        Activity

          People

            bmclaugh@redhat.com Brian McLaughlin
            chousekn Chris Houseknecht (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: