'Method to validate shell parameters.
Raise when shell attribute is set to \'bash\' with roles set to
either \'admin\' or \'resource-admin\'.
NOTE: Admin and Resource-Admin roles automatically enable access to
all partitions, removing any other roles that the user might have
had. There are few other roles which do that but those roles,
do not allow bash.'

def validate_shell_parameter(self):

    err = "Shell    access    is    only    available    to    'admin'    or    'resource-admin'    roles"
    permit = ['admin', 'resource-admin']
    if (self.have is not None):
        have = self.have.partition_access
        if (not any((r['role'] for r in have if (r['role'] in permit)))):
            raise F5ModuleError(err)
    if (self.want.partition_access is not None):
        want = self.want.partition_access
        if (not any((r['role'] for r in want if (r['role'] in permit)))):
            raise F5ModuleError(err)
