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

    YANG Description: Port Mode Configuration

def _set_config_mode(self, v, load=False):
    """
    Setter method for config_mode, mapped from YANG variable /interface/fc_port/config_mode (interface-fc-config-mode-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config_mode() directly.

    YANG Description: Port Mode Configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'auto': {'value': 1}, u'nport': {'value': 3}, u'eport': {'value': 2}, u'fport': {'value': 4}},), default=unicode("auto"), is_leaf=True, yang_name="config-mode", rest_name="config-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure port as  F/E/N/Auto', u'cli-incomplete-no': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='interface-fc-config-mode-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config_mode must be of a type compatible with interface-fc-config-mode-type""",
          'defined-type': "brocade-interface:interface-fc-config-mode-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'auto': {'value': 1}, u'nport': {'value': 3}, u'eport': {'value': 2}, u'fport': {'value': 4}},), default=unicode("auto"), is_leaf=True, yang_name="config-mode", rest_name="config-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure port as  F/E/N/Auto', u'cli-incomplete-no': None, u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='interface-fc-config-mode-type', is_config=True)""",
        })

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