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

    YANG Description: Enable port-security feature
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=port_security.port_security, is_container='container', presence=True, yang_name="port-security", rest_name="port-security", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Enable port-security feature', u'callpoint': u'interface_portsecurity'}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_security must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=port_security.port_security, is_container='container', presence=True, yang_name="port-security", rest_name="port-security", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Enable port-security feature', u'callpoint': u'interface_portsecurity'}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='container', is_config=True)""",
        })

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

    YANG Description: Enable port-security feature