Setter method for name_of_keychain, mapped from YANG variable /keychain/name_of_keychain (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name_of_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name_of_keychain() directly.

def _set_name_of_keychain(self, v, load=False):
    """
    Setter method for name_of_keychain, mapped from YANG variable /keychain/name_of_keychain (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name_of_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name_of_keychain() directly.
    """
    parent = getattr(self, "_parent", None)
    if parent is not None and load is False:
      raise AttributeError("Cannot set keys directly when" +
                             " within an instantiated list")

    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'4..32']}), is_leaf=True, yang_name="name-of-keychain", rest_name="name-of-keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'name of the keychain', u'cli-full-command': None, u'cli-full-no': None, u'cli-suppress-range': None, u'cli-drop-node-name': None}}, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-keychain', defining_module='brocade-keychain', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name_of_keychain must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'4..32']}), is_leaf=True, yang_name="name-of-keychain", rest_name="name-of-keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'name of the keychain', u'cli-full-command': None, u'cli-full-no': None, u'cli-suppress-range': None, u'cli-drop-node-name': None}}, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-keychain', defining_module='brocade-keychain', yang_type='string', is_config=True)""",
        })

    self.__name_of_keychain = t
    if hasattr(self, '_set'):
      self._set()