def _set_port_sec_violation(self, v, load=False):
    """
    Setter method for port_sec_violation, mapped from YANG variable /interface/port_channel/switchport/port_security/port_sec_violation (port-sec-violation)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_sec_violation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_sec_violation() directly.

    YANG Description: Set the action on violation
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'restrict': {'value': 1}, u'shutdown': {'value': 2}},), is_leaf=True, yang_name="port-sec-violation", rest_name="violation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'Set the action on violation', u'alt-name': u'violation'}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='port-sec-violation', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_sec_violation must be of a type compatible with port-sec-violation""",
          'defined-type': "brocade-interface:port-sec-violation",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'restrict': {'value': 1}, u'shutdown': {'value': 2}},), is_leaf=True, yang_name="port-sec-violation", rest_name="violation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'Set the action on violation', u'alt-name': u'violation'}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='port-sec-violation', is_config=True)""",
        })

    self.__port_sec_violation = t
    if hasattr(self, '_set'):
      self._set()
Setter method for port_sec_violation, mapped from YANG variable /interface/port_channel/switchport/port_security/port_sec_violation (port-sec-violation)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_sec_violation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_sec_violation() directly.

    YANG Description: Set the action on violation