@@ -382,7 +382,9 @@ def __init__(self, server_config=None, **kwargs):
382382 'name' : entity_fields .StringField (
383383 required = True , str_type = 'alpha' , length = (6 , 12 ), unique = True
384384 ),
385- 'content_type' : entity_fields .StringField (choices = ('file' , 'yum' ), default = 'yum' ),
385+ 'content_type' : entity_fields .StringField (
386+ choices = ('file' , 'yum' , 'deb' ), default = 'yum'
387+ ),
386388 'alternate_content_source_type' : entity_fields .StringField (
387389 choices = ('custom' , 'simplified' , 'rhui' ), default = 'custom'
388390 ),
@@ -405,6 +407,9 @@ def __init__(self, server_config=None, **kwargs):
405407 'product_ids' : entity_fields .ListField (),
406408 'products' : entity_fields .ListField (),
407409 'last_refresh' : entity_fields .DictField (),
410+ 'deb_releases' : entity_fields .StringField (),
411+ 'deb_components' : entity_fields .StringField (),
412+ 'deb_architectures' : entity_fields .StringField (),
408413 }
409414 self ._meta = {
410415 'api_path' : 'katello/api/alternate_content_sources' ,
@@ -419,22 +424,22 @@ def read(self, entity=None, attrs=None, ignore=None, params=None):
419424 ignore = set ()
420425
421426 # fields depending on the ACS type
422- if 'base_url' not in attrs :
423- ignore . add ( 'base_url' )
424- if 'subpaths' not in attrs :
425- ignore . add ( 'subpaths' )
426- if 'products' not in attrs :
427- ignore . add ( 'products' )
428- if 'verify_ssl' not in attrs :
429- ignore . add ( 'verify_ssl' )
430- if 'ssl_ca_cert' not in attrs :
431- ignore . add ( 'ssl_ca_cert' )
432- if 'ssl_client_cert' not in attrs :
433- ignore . add ( 'ssl_client_cert' )
434- if 'ssl_client_key' not in attrs :
435- ignore . add ( 'ssl_client_key' )
436- if 'upstream_username' not in attrs :
437- ignore .add ('upstream_username' )
427+ acs_dependence_fields = [
428+ 'base_url' ,
429+ 'subpaths' ,
430+ 'products' ,
431+ 'verify_ssl' ,
432+ 'ssl_ca_cert' ,
433+ 'ssl_client_cert' ,
434+ 'ssl_client_key' ,
435+ 'upstream_username' ,
436+ 'deb_releases' ,
437+ 'deb_components' ,
438+ 'deb_architectures' ,
439+ ]
440+ for field in acs_dependence_fields :
441+ if field not in attrs :
442+ ignore .add (field )
438443
439444 # returned in non-id fields
440445 ignore .add ('smart_proxy_ids' )
0 commit comments