Skip to content

Commit

Permalink
As a user I can manage Pulp using a systemwide command
Browse files Browse the repository at this point in the history
  • Loading branch information
fdobrovolny committed Mar 31, 2017
1 parent c60e760 commit 67b1341
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 9 additions & 0 deletions app/pulp/app/entry_points.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""This module provides system wide command to interface with the pulp platform."""
import os
import sys


def pulp_manager_entry_point():
os.environ["DJANGO_SETTINGS_MODULE"] = "pulp.app.settings"
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
5 changes: 5 additions & 0 deletions app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
),
entry_points={
'console_scripts': [
'pulp-manager=pulp.app.entry_points:pulp_manager_entry_point'
]
},
)
6 changes: 3 additions & 3 deletions docs/integration_guide/rest_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ REST API Reference
All REST API endpoints are protected with basic authentication. The password for the "admin"
user can be set using two methods.

``python manage.py reset-admin-password``
``pulp-manager reset-admin-password``

The above command prompts the user to enter a new password for "admin" user.

``python manage.py reset-admin-password --random``
``pulp-manager reset-admin-password --random``

The above command generates a random password for "admin" user and prints it to the screen.
The above command generates a random password for "admin" user and prints it to the screen.

0 comments on commit 67b1341

Please sign in to comment.