original_docstring: Checks whether access rule type and level are valid.
docstring: Checks whether access rule type and level are valid.
docstring_tokens: Checks whether access rule type and level are valid .
code: def _validate_access_rule(self, rule):
          """Checks whether access rule type and level are valid."""
  
          if rule['access_type'] != 'user':
              msg = _("Clustered Data ONTAP supports only 'user' type for "
                      "share access rules with CIFS protocol.")
              raise exception.InvalidShareAccess(reason=msg)
  
          if rule['access_level'] not in constants.ACCESS_LEVELS:
              raise exception.InvalidShareAccessLevel(level=rule['access_level'])
code_tokens: def _validate_access_rule ( self , rule ) : if rule [ 'access_type' ] != 'user' : msg = _ ( "Clustered Data ONTAP supports only 'user' type for " "share access rules with CIFS protocol." ) raise exception . InvalidShareAccess ( reason = msg ) if rule [ 'access_level' ] not in constants . ACCESS_LEVELS : raise exception . InvalidShareAccessLevel ( level = rule [ 'access_level' ] )
short_docstring: Checks whether access rule type and level are valid.
short_docstring_tokens: Checks whether access rule type and level are valid .
comment: """Checks whether access rule type and level are valid."""