Since we treat ID values (repo ID, consumer ID, consumer group ID, consumer/repo group names, etc) as programmatic references, we really should define and enforce a format that will be able to safely be used. For instance, the ID is often used as a value in REST URLs. For compatibility and simplicity, we should restrict the values to easy to process characters.
I suggest we only allow the following in IDs: * Letters * Numbers * dash (-) * underscore (_) * period (.) We can define a regex to match these and add it to our create methods down near the database layer.
$ sudo pulp-admin repo create --id=abc$%%% error: operation failed: PulpException: 'Given ID is invalid. ID may contain numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)' $ sudo pulp-admin repo create --id=abc_xyz Successfully created repository [ abc_xyz ]
build 0.174
verified [root@preethi ~]# rpm -q pulp pulp-0.0.181-1.fc14.noarch [root@preethi ~]# pulp-admin repo create --id=abc$%%% error: operation failed: PulpException: 'Given ID is invalid. ID may contain numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)' [root@preethi ~]# [root@preethi ~]# pulp-admin repo create --id=abc** error: operation failed: PulpException: 'Given ID is invalid. ID may contain numbers(0-9), upper and lower case letters(A-Z, a-z), hyphens(-), underscore(_) and periods(.)' [root@preethi ~]# pulp-admin repo create --id=abc_12_AD Successfully created repository [ abc_12_AD ]
Closing with Community Release 15 pulp-0.0.223-4.