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

def _set_system_mode(self, v, load=False):
    """
    Setter method for system_mode, mapped from YANG variable /hardware/system_mode (system-mode-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_mode() directly.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'default': {'value': 0}, u'npb': {'value': 1}},), is_leaf=True, yang_name="system-mode", rest_name="system-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Set system mode', u'callpoint': u'ha_system_mode_callpoint', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-hardware', defining_module='brocade-hardware', yang_type='system-mode-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_mode must be of a type compatible with system-mode-type""",
          'defined-type': "brocade-hardware:system-mode-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'default': {'value': 0}, u'npb': {'value': 1}},), is_leaf=True, yang_name="system-mode", rest_name="system-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Set system mode', u'callpoint': u'ha_system_mode_callpoint', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-hardware', defining_module='brocade-hardware', yang_type='system-mode-type', is_config=True)""",
        })

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