Hide Forgot
Description of problem: API client.channel.software.createRepo() in 5.8.0 builds accepts only "yum" as a repository type and not "YUM" as it accepted in 5.7.0 Version-Release number of selected component (if applicable): spacewalk-java-2.5.14-8.el6sat.noarch How reproducible: always Steps to Reproduce: 1. See https://<sat580_fqdn>/rhn/apidoc/handlers/ChannelSoftwareHandler.jsp#createRepo Actual results: API calls returns error when you create repository with type set to "YUM" Expected results: Repository type "YUM" should work
Also reported bug 1380304 for this same API function.
spacewalk.git bae9b3d3e05e7bcc040ba039932c58bfe34141c1
Verified on spacewalk-java-2.5.14-22.el6sat. Creation of a new repo using the "channel.software.createRepo" API call now accepts any combination of (lower|upper)case of letters for the repository type field. In [12]: client58.channel.software.createRepo(key58, "testrepo4", "yum", "http://localhost/testrepo4") Out[12]: {'id': 503, 'label': 'testrepo4', 'sourceUrl': 'http://localhost/testrepo4', 'sslCaDesc': '', 'sslCertDesc': '', 'sslKeyDesc': '', 'type': 'yum'} In [13]: client58.channel.software.createRepo(key58, "testrepo5", "YUM", "http://localhost/testrepo5") Out[13]: {'id': 504, 'label': 'testrepo5', 'sourceUrl': 'http://localhost/testrepo5', 'sslCaDesc': '', 'sslCertDesc': '', 'sslKeyDesc': '', 'type': 'yum'} In [14]: client58.channel.software.createRepo(key58, "testrepo6", "yuM", "http://localhost/testrepo6") Out[14]: {'id': 505, 'label': 'testrepo6', 'sourceUrl': 'http://localhost/testrepo6', 'sslCaDesc': '', 'sslCertDesc': '', 'sslKeyDesc': '', 'type': 'yum'}
createRepo is overloaded and its version with 3 additional ssl parameters is not fixed (type is only converted to lowercase in the one without these parameters). Reproducer in python: client.channel.software.createRepo(key,"newrepo","yUm","http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64","RHN-ORG-TRUSTED-SSL-CERT","RHN-ORG-TRUSTED-SSL-CERT","RHN-ORG-TRUSTED-SSL-CERT")
spacewalk bf5d211e9d6329e2bd5aebefb2c0167ea7d36f26
Verified with spacewalk-java-2.5.14-71 . Tried with both versions of the API call and both now work with any combination of lowercase/uppercase characters.