Setter method for media_form_factor, mapped from YANG variable /brocade_interface_ext_rpc/get_media_detail/output/interface/qsfpp/media_form_factor (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_media_form_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_media_form_factor() directly.

def _set_media_form_factor(self, v, load=False):
    """
    Setter method for media_form_factor, mapped from YANG variable /brocade_interface_ext_rpc/get_media_detail/output/interface/qsfpp/media_form_factor (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_media_form_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_media_form_factor() 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'tv': {'value': 5}, u'tw': {'value': 8}, u'mi': {'value': 6}, u'tp': {'value': 7}, u'm5': {'value': 3}, u'm6': {'value': 4}, u'sm': {'value': 1}, u'unknown': {'value': 9}, u'mx': {'value': 2}},), is_leaf=True, yang_name="media-form-factor", rest_name="media-form-factor", parent=self, choice=(u'interface-identifier', u'qsfpp'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-interface-ext', defining_module='brocade-interface-ext', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """media_form_factor must be of a type compatible with enumeration""",
          'defined-type': "brocade-interface-ext:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'tv': {'value': 5}, u'tw': {'value': 8}, u'mi': {'value': 6}, u'tp': {'value': 7}, u'm5': {'value': 3}, u'm6': {'value': 4}, u'sm': {'value': 1}, u'unknown': {'value': 9}, u'mx': {'value': 2}},), is_leaf=True, yang_name="media-form-factor", rest_name="media-form-factor", parent=self, choice=(u'interface-identifier', u'qsfpp'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-interface-ext', defining_module='brocade-interface-ext', yang_type='enumeration', is_config=True)""",
        })

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