pulp.app.urls¶
pulpcore.app.urls
¶
pulp URL Configuration
ViewSetNode(viewset=None)
¶
Each node is a tree that can register nested ViewSets with DRF nested routers.
The structure of the tree becomes the url heirarchy when the ViewSets are registered.
Example Structure:
RootNode
ββ RepositoryViewSet
β ββ PluginPublisherViewSet (non-nested)
β β ββ PluginPublisherVDistributionViewSet
β ββ AnotherPluginPublisherViewSet
β β ββ AnotherPluginDistributionViewSet
β ββ FileRemoteViewSet
ββ some-non-nested viewset
Create a new node.
Parameters:
-
viewset
(NamedModelViewSet
, default:None
) βIf provided, represent this viewset. If not provided, this is the root node.
add_decendent(node)
¶
Add a VSNode to the tree. If node is not a direct child, attempt to add the to each child.
Parameters:
-
node
(ViewSetNode
) βA node that represents a viewset and its decendents.
register_with(router)
¶
Register this tree with the specified router and create new routers as necessary.
Parameters:
-
router
(DefaultRouter
) βrouter to register the viewset with.
-
created_routers
(list
) βA running list of all routers.
Returns: list: List of new routers, including those created recursively.
PulpAPIRootView
¶
Bases: APIRootView
A Pulp-defined APIRootView class with no authentication requirements.
PulpDefaultRouter
¶
Bases: DefaultRouter
A DefaultRouter class that benefits from the customized PulpAPIRootView class.