Skip to content

Commit

Permalink
management: expand gettenantsecrets command with recording
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippKilian committed Aug 7, 2023
1 parent d30aee7 commit 3aa4b38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions b3lb/rest/management/commands/gettenantsecrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@


class Command(BaseCommand):
help = 'Get first secret and hostnames of tenants.'
help = 'Get secrets, endpoints and if recording is enabled.'

def handle(self, *args, **options):
tenant_dict = {}

for secret in Secret.objects.all():
tenant_dict["{}-{}".format(secret.tenant.slug, str(secret.sub_id).zfill(3))] = {"secret": secret.secret, "hostname": secret.endpoint}
tenant_dict["{}-{}".format(secret.tenant.slug, str(secret.sub_id).zfill(3))] = {"secret": secret.secret, "hostname": secret.endpoint, "recording": secret.is_record_enabled}

self.stdout.write(json.dumps(tenant_dict))

0 comments on commit 3aa4b38

Please sign in to comment.