Factor out setting of allowed devices so that we can update allowed devi...

...ces

Co-Authored-By: Ian Main <imain@redhat.com>
Docker-DCO-1.1-Signed-off-by: Chris Alfonso <calfonso@redhat.com> (github: calfonso)
Is there a reason why this needs to be exported?  I don't see this function being called from another package.