Skip to content

Commit e9bfcba

Browse files
daviddavisggainey
authored andcommitted
Add a list-signing-services command
Adding a new list-signing-services command which makes it easier to manage signing services alongside the add/remove signing services command. This is helpful if you don't have easy access to the Pulp API or if the Pulp API is not up yet.
1 parent 9ced3b0 commit e9bfcba

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a `pulpcore-manager list-signing-services` command.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from django.apps import apps
2+
from django.core.management import BaseCommand
3+
4+
5+
class Command(BaseCommand):
6+
"""
7+
Django management command for listing signing services.
8+
"""
9+
10+
help = "List all SigningServices."
11+
12+
def add_arguments(self, parser):
13+
pass
14+
15+
def handle(self, *args, **options):
16+
SigningService = apps.get_model("core", "SigningService")
17+
results = list(SigningService.objects.all().values_list("name", flat=True))
18+
self.stdout.write(results)

0 commit comments

Comments
 (0)