More work on Device module

Signed-off-by: John Else <john.else@citrix.com>
Add a functional test

Signed-off-by: John Else <john.else@citrix.com>