Try   HackMD

Visualizing Pulp3 data schema

Tools

Setup (Fedora34)

  • dnf install graphviz python3-graphviz python3-pygraphviz
  • pip install django-extensions pyparsing pydot
    • these aren't available in RPMs (that I know of?)

Recipes

"Show me All Of Pulp3!"

  • pulpcore-manager graph_models --pydot -a -g -o all_pulp3.png
    • ERROR - this istoo much, at least for my machine

"Create a dotfile for All Of Pulp3, I'll look at it in another tool"

"Show meJust pulp_rpm?"

  • Limit by django-application (ie plugin)
    • pulpcore-manager graph_models APPNAME --pydot -g -o APPNAME_visualized.png
    • APPNAME can be found from Pulp3 status output
      • Example:
      ​​​​​​​​$ pulp status | jq '.versions[].component'
      ​​​​​​​​"core"
      ​​​​​​​​"file"
      ​​​​​​​​"rpm"
      ​​​​​​​​"container"
      ​​​​​​​​"deb"
      ​​​​​​​​"certguard"
      ​​​​​​​​"pulp_2to3_migration"
      
  • pulpcore-manager graph_models rpm --pydot -g -o rpm_visualized.png
  • file:///home/ggainey/github/Pulp3/graph_models/rpm_visualized.png
  • Use -I to select-by-model.
  • Wildcards are supported
pulpcore-manager graph_models \
  -a \
  -I Content*,Artifact,Package,Repository,Remote,UpdateRecord, Rpm* \
  --pydot -g -o package_stuff.png
  • file:///home/ggainey/github/Pulp3/graph_models/package_stuff.png

"Cool, cool - where do I get these model-names?"

  • "core", below, is an APPNAME
$ pulpcore-manager shell
from django.apps import apps

app_models = apps.get_app_config("core").get_models()
names = [m.__name__ for m in app_models]
for name in sorted(names):
    print(name)