Exemple #1
0
  def _set_track_interface(self, v, load=False):
    """
    Setter method for track_interface, mapped from YANG variable /interfaces/interface/routed_vlan/ipv6/addresses/address/vrrp/vrrp_group/interface_tracking/config/track_interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_track_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_track_interface() directly.

    YANG Description: Sets a list of one or more interfaces that should
be tracked for up/down events to dynamically change the
priority state of the VRRP group, and potentially
change the mastership if the tracked interface going
down lowers the priority sufficiently.  Any of the tracked
interfaces going down will cause the priority to be lowered.
Some implementations may only support a single
tracked interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=TypedListType(allowed_type=ReferenceType(referenced_path='/oc-if:interfaces/oc-if:interface/oc-if:name',caller=self._path() + ['track-interface'], path_helper=self._path_helper, require_instance=True)), is_leaf=True, yang_name="track-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """track_interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=TypedListType(allowed_type=ReferenceType(referenced_path='/oc-if:interfaces/oc-if:interface/oc-if:name',caller=self._path() + ['track-interface'], path_helper=self._path_helper, require_instance=True)), is_leaf=True, yang_name="track-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)""",
        })

    self.__track_interface = t
    if hasattr(self, '_set'):
      self._set()
Exemple #2
0
  def _set_virtual_router_id(self, v, load=False):
    """
    Setter method for virtual_router_id, mapped from YANG variable /interfaces/interface/routed_vlan/ipv6/addresses/address/vrrp/vrrp_group/virtual_router_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_router_id() directly.

    YANG Description: References the configured virtual router id for this
VRRP group
    """
    parent = getattr(self, "_parent", None)
    if parent is not None and load is False:
      raise AttributeError("Cannot set keys directly when" +
                             " within an instantiated list")

    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=ReferenceType(referenced_path='../config/virtual-router-id', caller=self._path() + ['virtual-router-id'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="virtual-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_router_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=ReferenceType(referenced_path='../config/virtual-router-id', caller=self._path() + ['virtual-router-id'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="virtual-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)""",
        })

    self.__virtual_router_id = t
    if hasattr(self, '_set'):
      self._set()
Exemple #3
0
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /interfaces/interface/routed_vlan/ipv6/unnumbered/interface_ref/state/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=ReferenceType(referenced_path='/oc-if:interfaces/oc-if:interface/oc-if:name', caller=self._path() + ['interface'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=ReferenceType(referenced_path='/oc-if:interfaces/oc-if:interface/oc-if:name', caller=self._path() + ['interface'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=False)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()
Exemple #4
0
 def _unset_lsp_autobw_template(self):
     self.__lsp_autobw_template = YANGDynClass(
         base=ReferenceType(
             referenced_path='../../../autobw-template/autobw-template-name',
             caller=self._path() + ['lsp-autobw-template'],
             path_helper=self._path_helper,
             require_instance=True),
         is_leaf=True,
         yang_name="lsp-autobw-template",
         rest_name="template",
         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'Inherit Auto-bandwidth parameters from a template',
                 u'alt-name': u'template'
             }
         },
         namespace='urn:brocade.com:mgmt:brocade-mpls',
         defining_module='brocade-mpls',
         yang_type='leafref',
         is_config=True)
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /system/aaa/server_groups/server_group/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to configured name of the server group
    """
    parent = getattr(self, "_parent", None)
    if parent is not None and load is False:
      raise AttributeError("Cannot set keys directly when" +
                             " within an instantiated list")

    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=ReferenceType(referenced_path='../config/name', caller=self._path() + ['name'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/system', defining_module='openconfig-system', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=ReferenceType(referenced_path='../config/name', caller=self._path() + ['name'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/system', defining_module='openconfig-system', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()
Exemple #6
0
    def __init__(self, *args, **kwargs):

        helper = kwargs.pop("path_helper", None)
        if helper is False:
            self._path_helper = False
        elif helper is not None and isinstance(helper,
                                               xpathhelper.YANGPathHelper):
            self._path_helper = helper
        elif hasattr(self, "_parent"):
            helper = getattr(self._parent, "_path_helper", False)
            self._path_helper = helper
        else:
            self._path_helper = False

        self._extmethods = False
        self.__name = YANGDynClass(
            base=ReferenceType(
                referenced_path='../../../../../component/config/name',
                caller=self._path() + ['name'],
                path_helper=self._path_helper,
                require_instance=True),
            is_leaf=True,
            yang_name="name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace='http://openconfig.net/yang/platform',
            defining_module='openconfig-platform',
            yang_type='leafref',
            is_config=False)

        load = kwargs.pop("load", None)
        if args:
            if len(args) > 1:
                raise TypeError(
                    "cannot create a YANG container with >1 argument")
            all_attr = True
            for e in self._pyangbind_elements:
                if not hasattr(args[0], e):
                    all_attr = False
                    break
            if not all_attr:
                raise ValueError(
                    "Supplied object did not have the correct attributes")
            for e in self._pyangbind_elements:
                nobj = getattr(args[0], e)
                if nobj._changed() is False:
                    continue
                setmethod = getattr(self, "_set_%s" % e)
                if load is None:
                    setmethod(getattr(args[0], e))
                else:
                    setmethod(getattr(args[0], e), load=load)
Exemple #7
0
    def _set_lsp_autobw_template(self, v, load=False):
        """
    Setter method for lsp_autobw_template, mapped from YANG variable /mpls_config/router/mpls/mpls_cmds_holder/lsp/lsp_auto_bandwidth/lsp_autobw_template (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_autobw_template is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_autobw_template() directly.
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=ReferenceType(
                    referenced_path=
                    '../../../autobw-template/autobw-template-name',
                    caller=self._path() + ['lsp-autobw-template'],
                    path_helper=self._path_helper,
                    require_instance=True),
                is_leaf=True,
                yang_name="lsp-autobw-template",
                rest_name="template",
                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'Inherit Auto-bandwidth parameters from a template',
                        u'alt-name': u'template'
                    }
                },
                namespace='urn:brocade.com:mgmt:brocade-mpls',
                defining_module='brocade-mpls',
                yang_type='leafref',
                is_config=True)
        except (TypeError, ValueError):
            raise ValueError({
                'error-string':
                """lsp_autobw_template must be of a type compatible with leafref""",
                'defined-type':
                "leafref",
                'generated-type':
                """YANGDynClass(base=ReferenceType(referenced_path='../../../autobw-template/autobw-template-name', caller=self._path() + ['lsp-autobw-template'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="lsp-autobw-template", rest_name="template", 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'Inherit Auto-bandwidth parameters from a template', u'alt-name': u'template'}}, namespace='urn:brocade.com:mgmt:brocade-mpls', defining_module='brocade-mpls', yang_type='leafref', is_config=True)""",
            })

        self.__lsp_autobw_template = t
        if hasattr(self, '_set'):
            self._set()
    def _set_index(self, v, load=False):
        """
    Setter method for index, mapped from YANG variable /components/component/transceiver/physical_channels/channel/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the index number of the channel
    """
        parent = getattr(self, "_parent", None)
        if parent is not None and load is False:
            raise AttributeError("Cannot set keys directly when" +
                                 " within an instantiated list")

        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=ReferenceType(referenced_path='../config/index',
                                   caller=self._path() + ['index'],
                                   path_helper=self._path_helper,
                                   require_instance=True),
                is_leaf=True,
                yang_name="index",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                is_keyval=True,
                namespace='http://openconfig.net/yang/platform/transceiver',
                defining_module='openconfig-platform-transceiver',
                yang_type='leafref',
                is_config=True)
        except (TypeError, ValueError):
            raise ValueError({
                'error-string':
                """index must be of a type compatible with leafref""",
                'defined-type':
                "leafref",
                'generated-type':
                """YANGDynClass(base=ReferenceType(referenced_path='../config/index', caller=self._path() + ['index'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='leafref', is_config=True)""",
            })

        self.__index = t
        if hasattr(self, '_set'):
            self._set()
 def _unset_index(self):
     self.__index = YANGDynClass(
         base=ReferenceType(referenced_path='../state/index',
                            caller=self._path() + ['index'],
                            path_helper=self._path_helper,
                            require_instance=True),
         is_leaf=True,
         yang_name="index",
         parent=self,
         path_helper=self._path_helper,
         extmethods=self._extmethods,
         register_paths=True,
         is_keyval=True,
         namespace='http://openconfig.net/yang/system',
         defining_module='openconfig-system',
         yang_type='leafref',
         is_config=False)
Exemple #10
0
 def _unset_ip(self):
     self.__ip = YANGDynClass(
         base=ReferenceType(referenced_path='../config/ip',
                            caller=self._path() + ['ip'],
                            path_helper=self._path_helper,
                            require_instance=True),
         is_leaf=True,
         yang_name="ip",
         parent=self,
         path_helper=self._path_helper,
         extmethods=self._extmethods,
         register_paths=True,
         is_keyval=True,
         namespace='http://openconfig.net/yang/interfaces/ip',
         defining_module='openconfig-if-ip',
         yang_type='leafref',
         is_config=True)
Exemple #11
0
 def _unset_track_interface(self):
     self.__track_interface = YANGDynClass(
         base=TypedListType(allowed_type=ReferenceType(
             referenced_path='/oc-if:interfaces/oc-if:interface/oc-if:name',
             caller=self._path() + ['track-interface'],
             path_helper=self._path_helper,
             require_instance=True)),
         is_leaf=True,
         yang_name="track-interface",
         parent=self,
         path_helper=self._path_helper,
         extmethods=self._extmethods,
         register_paths=True,
         namespace='http://openconfig.net/yang/interfaces/ip',
         defining_module='openconfig-if-ip',
         yang_type='leafref',
         is_config=True)
Exemple #12
0
 def _unset_name(self):
     self.__name = YANGDynClass(
         base=ReferenceType(
             referenced_path='../../../../../component/config/name',
             caller=self._path() + ['name'],
             path_helper=self._path_helper,
             require_instance=True),
         is_leaf=True,
         yang_name="name",
         parent=self,
         path_helper=self._path_helper,
         extmethods=self._extmethods,
         register_paths=True,
         namespace='http://openconfig.net/yang/platform',
         defining_module='openconfig-platform',
         yang_type='leafref',
         is_config=False)
Exemple #13
0
 def _unset_subinterface(self):
     self.__subinterface = YANGDynClass(
         base=ReferenceType(
             referenced_path=
             '/oc-if:interfaces/oc-if:interface[oc-if:name=current()/../interface]/oc-if:subinterfaces/oc-if:subinterface/oc-if:index',
             caller=self._path() + ['subinterface'],
             path_helper=self._path_helper,
             require_instance=True),
         is_leaf=True,
         yang_name="subinterface",
         parent=self,
         path_helper=self._path_helper,
         extmethods=self._extmethods,
         register_paths=True,
         namespace='http://openconfig.net/yang/interfaces/ip',
         defining_module='openconfig-if-ip',
         yang_type='leafref',
         is_config=True)
Exemple #14
0
    def _set_name(self, v, load=False):
        """
    Setter method for name, mapped from YANG variable /components/component/subcomponents/subcomponent/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the subcomponent
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=ReferenceType(
                    referenced_path='../../../../../component/config/name',
                    caller=self._path() + ['name'],
                    path_helper=self._path_helper,
                    require_instance=True),
                is_leaf=True,
                yang_name="name",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace='http://openconfig.net/yang/platform',
                defining_module='openconfig-platform',
                yang_type='leafref',
                is_config=False)
        except (TypeError, ValueError):
            raise ValueError({
                'error-string':
                """name must be of a type compatible with leafref""",
                'defined-type':
                "leafref",
                'generated-type':
                """YANGDynClass(base=ReferenceType(referenced_path='../../../../../component/config/name', caller=self._path() + ['name'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform', defining_module='openconfig-platform', yang_type='leafref', is_config=False)""",
            })

        self.__name = t
        if hasattr(self, '_set'):
            self._set()
Exemple #15
0
  def __init__(self, *args, **kwargs):

    helper = kwargs.pop("path_helper", None)
    if helper is False:
      self._path_helper = False
    elif helper is not None and isinstance(helper, xpathhelper.YANGPathHelper):
      self._path_helper = helper
    elif hasattr(self, "_parent"):
      helper = getattr(self._parent, "_path_helper", False)
      self._path_helper = helper
    else:
      self._path_helper = False

    self._extmethods = False
    self.__virtual_router_id = YANGDynClass(base=ReferenceType(referenced_path='../config/virtual-router-id', caller=self._path() + ['virtual-router-id'], path_helper=self._path_helper, require_instance=True), is_leaf=True, yang_name="virtual-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=config.config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=state.state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='container', is_config=True)
    self.__interface_tracking = YANGDynClass(base=interface_tracking.interface_tracking, is_container='container', yang_name="interface-tracking", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='container', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)
Exemple #16
0
  def __init__(self, *args, **kwargs):

    helper = kwargs.pop("path_helper", None)
    if helper is False:
      self._path_helper = False
    elif helper is not None and isinstance(helper, xpathhelper.YANGPathHelper):
      self._path_helper = helper
    elif hasattr(self, "_parent"):
      helper = getattr(self._parent, "_path_helper", False)
      self._path_helper = helper
    else:
      self._path_helper = False

    self._extmethods = False
    self.__track_interface = YANGDynClass(base=TypedListType(allowed_type=ReferenceType(referenced_path='/oc-if:interfaces/oc-if:interface/oc-if:name',caller=self._path() + ['track-interface'], path_helper=self._path_helper, require_instance=True)), is_leaf=True, yang_name="track-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    self.__priority_decrement = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="priority-decrement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='uint8', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)
Exemple #17
0
    def __init__(self, *args, **kwargs):

        path_helper_ = kwargs.pop("path_helper", None)
        if path_helper_ is False:
            self._path_helper = False
        elif path_helper_ is not None and isinstance(
                path_helper_, xpathhelper.YANGPathHelper):
            self._path_helper = path_helper_
        elif hasattr(self, "_parent"):
            path_helper_ = getattr(self._parent, "_path_helper", False)
            self._path_helper = path_helper_
        else:
            self._path_helper = False

        extmethods = kwargs.pop("extmethods", None)
        if extmethods is False:
            self._extmethods = False
        elif extmethods is not None and isinstance(extmethods, dict):
            self._extmethods = extmethods
        elif hasattr(self, "_parent"):
            extmethods = getattr(self._parent, "_extmethods", None)
            self._extmethods = extmethods
        else:
            self._extmethods = False
        self.__adjustment_threshold = YANGDynClass(
            base=adjustment_threshold.adjustment_threshold,
            is_container='container',
            presence=False,
            yang_name="adjustment-threshold",
            rest_name="adjustment-threshold",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            extensions={
                u'tailf-common': {
                    u'info': u'Set adjustment-threshold',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='container',
            is_config=True)
        self.__overflow_limit = YANGDynClass(
            base=RestrictedClassType(base_type=RestrictedClassType(
                base_type=long,
                restriction_dict={'range': ['0..4294967295']},
                int_size=32),
                                     restriction_dict={'range':
                                                       [u'0..65535']}),
            is_leaf=True,
            yang_name="overflow-limit",
            rest_name="overflow-limit",
            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'Configure Overflow limit',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='uint32',
            is_config=True)
        self.__max_bandwidth = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=long,
                    restriction_dict={'range': ['0..4294967295']},
                    int_size=32),
                restriction_dict={'range': [u'0..2147483647']}),
            is_leaf=True,
            yang_name="max-bandwidth",
            rest_name="max-bandwidth",
            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'Configure Maximum bandwidth',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='uint32',
            is_config=True)
        self.__adjustment_interval = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=long,
                    restriction_dict={'range': ['0..4294967295']},
                    int_size=32),
                restriction_dict={'range': [u'300..2147483647']}),
            is_leaf=True,
            yang_name="adjustment-interval",
            rest_name="adjustment-interval",
            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'Configure Adjustment interval',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='uint32',
            is_config=True)
        self.__mode = YANGDynClass(
            base=RestrictedClassType(
                base_type=unicode,
                restriction_type="dict_key",
                restriction_arg={
                    u'monitor-and-signal': {
                        'value': 0
                    },
                    u'monitor-only': {
                        'value': 1
                    }
                },
            ),
            is_leaf=True,
            yang_name="mode",
            rest_name="mode",
            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'Configure Mode of autobandwidth',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='autobw-mode',
            is_config=True)
        self.__sample_recording = YANGDynClass(
            base=RestrictedClassType(
                base_type=unicode,
                restriction_type="dict_key",
                restriction_arg={
                    u'enable': {
                        'value': 1
                    },
                    u'disable': {
                        'value': 0
                    }
                },
            ),
            is_leaf=True,
            yang_name="sample-recording",
            rest_name="sample-recording",
            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 sample recording for this lsp',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='enable-disable',
            is_config=True)
        self.__underflow_limit = YANGDynClass(
            base=RestrictedClassType(base_type=RestrictedClassType(
                base_type=long,
                restriction_dict={'range': ['0..4294967295']},
                int_size=32),
                                     restriction_dict={'range':
                                                       [u'0..65535']}),
            is_leaf=True,
            yang_name="underflow-limit",
            rest_name="underflow-limit",
            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'Configure Underflow limit',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='uint32',
            is_config=True)
        self.__lsp_autobw_template = YANGDynClass(
            base=ReferenceType(
                referenced_path='../../../autobw-template/autobw-template-name',
                caller=self._path() + ['lsp-autobw-template'],
                path_helper=self._path_helper,
                require_instance=True),
            is_leaf=True,
            yang_name="lsp-autobw-template",
            rest_name="template",
            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'Inherit Auto-bandwidth parameters from a template',
                    u'alt-name': u'template'
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='leafref',
            is_config=True)
        self.__min_bandwidth = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=long,
                    restriction_dict={'range': ['0..4294967295']},
                    int_size=32),
                restriction_dict={'range': [u'0..2147483647']}),
            is_leaf=True,
            yang_name="min-bandwidth",
            rest_name="min-bandwidth",
            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'Configure Minimum Bandwidth',
                    u'cli-full-no': None
                }
            },
            namespace='urn:brocade.com:mgmt:brocade-mpls',
            defining_module='brocade-mpls',
            yang_type='uint32',
            is_config=True)

        load = kwargs.pop("load", None)
        if args:
            if len(args) > 1:
                raise TypeError(
                    "cannot create a YANG container with >1 argument")
            all_attr = True
            for e in self._pyangbind_elements:
                if not hasattr(args[0], e):
                    all_attr = False
                    break
            if not all_attr:
                raise ValueError(
                    "Supplied object did not have the correct attributes")
            for e in self._pyangbind_elements:
                nobj = getattr(args[0], e)
                if nobj._changed() is False:
                    continue
                setmethod = getattr(self, "_set_%s" % e)
                if load is None:
                    setmethod(getattr(args[0], e))
                else:
                    setmethod(getattr(args[0], e), load=load)