From f605750107c1db6ae162a3555451e6b9958a98ea Mon Sep 17 00:00:00 2001 From: dosas Date: Tue, 2 Jul 2024 13:45:48 +0200 Subject: [PATCH] Add support for debian repository creation --- nailgun/entities.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nailgun/entities.py b/nailgun/entities.py index d8218571..e20055a8 100644 --- a/nailgun/entities.py +++ b/nailgun/entities.py @@ -6833,7 +6833,7 @@ def __init__(self, server_config=None, **kwargs): ), 'content_counts': entity_fields.DictField(), 'content_type': entity_fields.StringField( - choices=('puppet', 'yum', 'file', 'docker', 'ostree'), + choices=('puppet', 'yum', 'file', 'docker', 'ostree', 'deb'), default='yum', required=True, ), @@ -6874,12 +6874,18 @@ def __init__(self, server_config=None, **kwargs): choices=('global_default_http_proxy', 'none', 'use_selected_http_proxy') ), 'http_proxy_id': entity_fields.IntegerField(), + 'deb_releases': entity_fields.StringField(), + 'deb_errata_url': entity_fields.StringField(), + 'deb_components': entity_fields.StringField(), + 'deb_architectures': entity_fields.StringField(), } if self._fields['content_type'].choices == 'yum': self._fields['download_policy'].required = True self._meta = { 'api_path': 'katello/api/v2/repositories', } + if kwargs.get('content_type') == 'deb': + self._fields['deb_releases'].default = 'stable' super().__init__(server_config=server_config, **kwargs) def path(self, which=None):