There is no validation done when indicating a repo's arch with --arch. We should validate that the user hasn't made a mistake and flagged a repo as, for instance, x86_65.
commit dc6e77c8da53066bd91703973a659656b5ed1051 tree ce00e5d1c8f1421fe50d04d854ff0c92977d5976 668097 - Added enumerated value set and checking for arch when creating a repo. src/pulp/server/api/repo.py src/pulp/server/db/model/resource.py test/unit/test_api.py Note: the error message is still the un-pretty traceback. I didn't address that here since it's covered by a bigger exception initiative. But the traceback should still indicate the arch was incorrect and list out the possible arches. Example Usage: $ pulp-admin repo create --id foo-1 --arch foo error: operation failed: Traceback (most recent call last): File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/base.py", line 52, in report_error return method(self, *args, **kwargs) File "/home/jdob/code/pulp/src/pulp/server/compat.py", line 40, in _decorator return decorator(*args,**kwargs) File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/base.py", line 131, in _auth_decorator value = method(self, *args, **kwargs) File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/repositories.py", line 103, in POST gpgkeys=repo_data.get('gpgkeys', None),) File "/home/jdob/code/pulp/src/pulp/server/compat.py", line 40, in _decorator return decorator(*args,**kwargs) File "/home/jdob/code/pulp/src/pulp/server/auditing.py", line 207, in _audit result = method(*args, **kwargs) File "/home/jdob/code/pulp/src/pulp/server/api/repo.py", line 150, in create raise PulpException('Architecture must be one of [%s]' % ', '.join(model.Repo.SUPPORTED_ARCHS)) PulpException: 'Architecture must be one of [noarch, i386, i686, ppc64, s390x, x86_64]' $ pulp-admin repo create --id foo-1 --arch i386 Successfully created repository [ foo-1 ]
Build: 0.140
[root@preethi ~]# rpm -q pulp pulp-0.0.173-1.fc14.noarch [root@preethi ~]# [root@preethi ~]# pulp-admin repo create --id foo-1 --arch foo error: operation failed: PulpException: 'Architecture must be one of [noarch, i386, i686, ppc64, s390x, x86_64]' [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# pulp-admin repo create --id foo-1 --arch i386 Successfully created repository [ foo-1 ]
Closing with Community Release 15 pulp-0.0.223-4.