Ejemplo n.º 1
0
from pulp_ansible.app.viewsets import CollectionUploadViewSet

GALAXY_API_ROOT = getattr(settings, "GALAXY_API_ROOT",
                          "pulp_ansible/galaxy/<path:path>/api/")

v1_urls = [
    path("roles/", RoleList.as_view()),
    path("roles/<str:role_pk>/versions/", RoleVersionList.as_view()),
]

v2_urls = [
    path("collections/", GalaxyCollectionView.as_view()),
    path("collections/<str:namespace>/<str:name>/",
         GalaxyCollectionDetailView.as_view()),
    path("collections/<str:namespace>/<str:name>/versions/",
         GalaxyCollectionVersionList.as_view()),
    path(
        "collections/<str:namespace>/<str:name>/versions/<str:version>/",
        GalaxyCollectionVersionDetail.as_view(),
    ),
    path(
        "collection-imports/<uuid:pk>/",
        views_v3.CollectionImportViewSet.as_view({"get": "retrieve"}),
    ),
]

v3_urls = [
    path("collections/",
         views_v3.CollectionViewSet.as_view({"get": "list"}),
         name="collections-list"),
    path(
Ejemplo n.º 2
0
from pulp_ansible.app.viewsets import CopyViewSet, CollectionUploadViewSet


GALAXY_API_ROOT = getattr(settings, "GALAXY_API_ROOT", "pulp_ansible/galaxy/<path:path>/api/")


v1_urls = [
    path("roles/", RoleList.as_view()),
    path("roles/<str:role_pk>/versions/", RoleVersionList.as_view()),
]

v2_urls = [
    path("collections/", GalaxyCollectionView.as_view()),
    path("collections/<str:namespace>/<str:name>/", GalaxyCollectionDetailView.as_view()),
    path("collections/<str:namespace>/<str:name>/versions/", GalaxyCollectionVersionList.as_view()),
    path(
        "collections/<str:namespace>/<str:name>/versions/<str:version>/",
        GalaxyCollectionVersionDetail.as_view(),
    ),
    path(
        "collection-imports/<uuid:pk>/",
        views_v3.CollectionImportViewSet.as_view({"get": "retrieve"}),
    ),
]

v3_urls = [
    path(
        "collections/", views_v3.CollectionViewSet.as_view({"get": "list"}), name="collections-list"
    ),
    path(