Ejemplo n.º 1
0
                    def __init__(self):
                        super(ProcessesMemory.Nodes.Node.ProcessIds.ProcessId,
                              self).__init__()

                        self.yang_name = "process-id"
                        self.yang_parent_name = "process-ids"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {}

                        self.process_id = YLeaf(YType.int32, "process-id")

                        self.name = YLeaf(YType.str, "name")

                        self.jid = YLeaf(YType.uint32, "jid")

                        self.pid = YLeaf(YType.uint32, "pid")

                        self.text_seg_size = YLeaf(YType.uint32,
                                                   "text-seg-size")

                        self.data_seg_size = YLeaf(YType.uint32,
                                                   "data-seg-size")

                        self.stack_seg_size = YLeaf(YType.uint32,
                                                    "stack-seg-size")

                        self.malloc_size = YLeaf(YType.uint32, "malloc-size")

                        self.dyn_limit = YLeaf(YType.uint32, "dyn-limit")

                        self.shared_mem = YLeaf(YType.uint32, "shared-mem")

                        self.physical_mem = YLeaf(YType.uint32, "physical-mem")
                        self._segment_path = lambda: "process-id" + "[process-id='" + self.process_id.get(
                        ) + "']"
Ejemplo n.º 2
0
    class LispRouters(Entity):
        """
        List of LISP routers
        
        .. attribute:: top_id  <key>
        
        	ID number of the LISP router
        	**type**\: int
        
        	**range:** 0..4294967295
        
        .. attribute:: site_id
        
        	Site\-ID common to all devices attached to the same site
        	**type**\: int
        
        	**range:** 0..18446744073709551615
        
        .. attribute:: xtr_id
        
        	xTR\-ID of the device
        	**type**\: list of int
        
        	**range:** 0..255
        
        .. attribute:: instances
        
        	List of LISP instances
        	**type**\: list of  		 :py:class:`Instances <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances>`
        
        

        """

        _prefix = 'lisp-ios-xe-oper'
        _revision = '2017-07-04'

        def __init__(self):
            super(LispState.LispRouters, self).__init__()

            self.yang_name = "lisp-routers"
            self.yang_parent_name = "lisp-state"
            self.is_top_level_class = False
            self.has_list_ancestor = False
            self._child_container_classes = {}
            self._child_list_classes = {
                "instances": ("instances", LispState.LispRouters.Instances)
            }

            self.top_id = YLeaf(YType.uint32, "top-id")

            self.site_id = YLeaf(YType.uint64, "site-id")

            self.xtr_id = YLeafList(YType.uint8, "xtr-id")

            self.instances = YList(self)
            self._segment_path = lambda: "lisp-routers" + "[top-id='" + self.top_id.get(
            ) + "']"
            self._absolute_path = lambda: "Cisco-IOS-XE-lisp-oper:lisp-state/%s" % self._segment_path(
            )

        def __setattr__(self, name, value):
            self._perform_setattr(LispState.LispRouters,
                                  ['top_id', 'site_id', 'xtr_id'], name, value)

        class Instances(Entity):
            """
            List of LISP instances
            
            .. attribute:: iid  <key>
            
            	LISP Instance ID
            	**type**\: int
            
            	**range:** 0..16777215
            
            .. attribute:: af
            
            	List of Address\-Families enabled in this LISP instance
            	**type**\: list of  		 :py:class:`Af <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af>`
            
            

            """

            _prefix = 'lisp-ios-xe-oper'
            _revision = '2017-07-04'

            def __init__(self):
                super(LispState.LispRouters.Instances, self).__init__()

                self.yang_name = "instances"
                self.yang_parent_name = "lisp-routers"
                self.is_top_level_class = False
                self.has_list_ancestor = True
                self._child_container_classes = {}
                self._child_list_classes = {
                    "af": ("af", LispState.LispRouters.Instances.Af)
                }

                self.iid = YLeaf(YType.uint32, "iid")

                self.af = YList(self)
                self._segment_path = lambda: "instances" + "[iid='" + self.iid.get(
                ) + "']"

            def __setattr__(self, name, value):
                self._perform_setattr(LispState.LispRouters.Instances, ['iid'],
                                      name, value)

            class Af(Entity):
                """
                List of Address\-Families enabled in this LISP instance
                
                .. attribute:: iaftype  <key>
                
                	Instance\-specific service type
                	**type**\:  :py:class:`LispIaftypeType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispIaftypeType>`
                
                .. attribute:: role
                
                	LISP device role for this service
                	**type**\:  :py:class:`Role <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af.Role>`
                
                .. attribute:: map_cache
                
                	Map\-cache for this service instance
                	**type**\: list of  		 :py:class:`MapCache <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af.MapCache>`
                
                

                """

                _prefix = 'lisp-ios-xe-oper'
                _revision = '2017-07-04'

                def __init__(self):
                    super(LispState.LispRouters.Instances.Af, self).__init__()

                    self.yang_name = "af"
                    self.yang_parent_name = "instances"
                    self.is_top_level_class = False
                    self.has_list_ancestor = True
                    self._child_container_classes = {
                        "role":
                        ("role", LispState.LispRouters.Instances.Af.Role)
                    }
                    self._child_list_classes = {
                        "map-cache":
                        ("map_cache",
                         LispState.LispRouters.Instances.Af.MapCache)
                    }

                    self.iaftype = YLeaf(YType.enumeration, "iaftype")

                    self.role = LispState.LispRouters.Instances.Af.Role()
                    self.role.parent = self
                    self._children_name_map["role"] = "role"
                    self._children_yang_names.add("role")

                    self.map_cache = YList(self)
                    self._segment_path = lambda: "af" + "[iaftype='" + self.iaftype.get(
                    ) + "']"

                def __setattr__(self, name, value):
                    self._perform_setattr(LispState.LispRouters.Instances.Af,
                                          ['iaftype'], name, value)

                class Role(Entity):
                    """
                    LISP device role for this service
                    
                    .. attribute:: is_ms
                    
                    	LISP Map\-Server
                    	**type**\: bool
                    
                    .. attribute:: is_mr
                    
                    	LISP Map\-Resolver
                    	**type**\: bool
                    
                    .. attribute:: is_itr
                    
                    	LISP ITR
                    	**type**\: bool
                    
                    .. attribute:: is_etr
                    
                    	LISP ETR
                    	**type**\: bool
                    
                    .. attribute:: is_pitr
                    
                    	LISP Proxy\-ITR
                    	**type**\: bool
                    
                    .. attribute:: is_petr
                    
                    	LISP Proxy\-ETR
                    	**type**\: bool
                    
                    

                    """

                    _prefix = 'lisp-ios-xe-oper'
                    _revision = '2017-07-04'

                    def __init__(self):
                        super(LispState.LispRouters.Instances.Af.Role,
                              self).__init__()

                        self.yang_name = "role"
                        self.yang_parent_name = "af"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {}

                        self.is_ms = YLeaf(YType.boolean, "is-ms")

                        self.is_mr = YLeaf(YType.boolean, "is-mr")

                        self.is_itr = YLeaf(YType.boolean, "is-itr")

                        self.is_etr = YLeaf(YType.boolean, "is-etr")

                        self.is_pitr = YLeaf(YType.boolean, "is-pitr")

                        self.is_petr = YLeaf(YType.boolean, "is-petr")
                        self._segment_path = lambda: "role"

                    def __setattr__(self, name, value):
                        self._perform_setattr(
                            LispState.LispRouters.Instances.Af.Role, [
                                'is_ms', 'is_mr', 'is_itr', 'is_etr',
                                'is_pitr', 'is_petr'
                            ], name, value)

                class MapCache(Entity):
                    """
                    Map\-cache for this service instance
                    
                    .. attribute:: afi  <key>
                    
                    	LISP Address\-Family of the prefix
                    	**type**\:  :py:class:`LispAddressFamilyType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispAddressFamilyType>`
                    
                    .. attribute:: prefix  <key>
                    
                    	LISP prefix. Format is defined by the AF
                    	**type**\: str
                    
                    .. attribute:: up_time
                    
                    	Time that this entry was created
                    	**type**\: str
                    
                    	**pattern:** \\d{4}\-\\d{2}\-\\d{2}T\\d{2}\:\\d{2}\:\\d{2}(\\.\\d+)?(Z\|[\\+\\\-]\\d{2}\:\\d{2})
                    
                    .. attribute:: last_modified_time
                    
                    	Last time that the RLOC information or the entry state were modified
                    	**type**\: str
                    
                    	**pattern:** \\d{4}\-\\d{2}\-\\d{2}T\\d{2}\:\\d{2}\:\\d{2}(\\.\\d+)?(Z\|[\\+\\\-]\\d{2}\:\\d{2})
                    
                    .. attribute:: last_update_time
                    
                    	Last time a mapping record for this entry was received
                    	**type**\: str
                    
                    	**pattern:** \\d{4}\-\\d{2}\-\\d{2}T\\d{2}\:\\d{2}\:\\d{2}(\\.\\d+)?(Z\|[\\+\\\-]\\d{2}\:\\d{2})
                    
                    .. attribute:: ttl
                    
                    	Mapping validity period (in milliseconds)
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: is_authoritative
                    
                    	Indication if the mapping came from an authoritative source
                    	**type**\: bool
                    
                    .. attribute:: is_static
                    
                    	Indication if the mapping is static (i.e. configured)
                    	**type**\: bool
                    
                    .. attribute:: is_negative
                    
                    	Indication if the mapping is negative (i.e. provides no locators for LISP encapsulation)
                    	**type**\: bool
                    
                    .. attribute:: nmr_action
                    
                    	Forwarding action in case of negative entry
                    	**type**\:  :py:class:`LispMapReplyActionType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispMapReplyActionType>`
                    
                    .. attribute:: rloc
                    
                    	List of locators for positive mapping
                    	**type**\: list of  		 :py:class:`Rloc <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af.MapCache.Rloc>`
                    
                    

                    """

                    _prefix = 'lisp-ios-xe-oper'
                    _revision = '2017-07-04'

                    def __init__(self):
                        super(LispState.LispRouters.Instances.Af.MapCache,
                              self).__init__()

                        self.yang_name = "map-cache"
                        self.yang_parent_name = "af"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {
                            "rloc":
                            ("rloc",
                             LispState.LispRouters.Instances.Af.MapCache.Rloc)
                        }

                        self.afi = YLeaf(YType.enumeration, "afi")

                        self.prefix = YLeaf(YType.str, "prefix")

                        self.up_time = YLeaf(YType.str, "up-time")

                        self.last_modified_time = YLeaf(
                            YType.str, "last-modified-time")

                        self.last_update_time = YLeaf(YType.str,
                                                      "last-update-time")

                        self.ttl = YLeaf(YType.uint32, "ttl")

                        self.is_authoritative = YLeaf(YType.boolean,
                                                      "is-authoritative")

                        self.is_static = YLeaf(YType.boolean, "is-static")

                        self.is_negative = YLeaf(YType.boolean, "is-negative")

                        self.nmr_action = YLeaf(YType.enumeration,
                                                "nmr-action")

                        self.rloc = YList(self)
                        self._segment_path = lambda: "map-cache" + "[afi='" + self.afi.get(
                        ) + "']" + "[prefix='" + self.prefix.get() + "']"

                    def __setattr__(self, name, value):
                        self._perform_setattr(
                            LispState.LispRouters.Instances.Af.MapCache, [
                                'afi', 'prefix', 'up_time',
                                'last_modified_time', 'last_update_time',
                                'ttl', 'is_authoritative', 'is_static',
                                'is_negative', 'nmr_action'
                            ], name, value)

                    class Rloc(Entity):
                        """
                        List of locators for positive mapping
                        
                        .. attribute:: afi  <key>
                        
                        	LISP Address\-Family of the address
                        	**type**\:  :py:class:`LispAddressFamilyType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispAddressFamilyType>`
                        
                        .. attribute:: address  <key>
                        
                        	LISP address. Format is defined by the AF
                        	**type**\: str
                        
                        .. attribute:: params
                        
                        	Properties of the locator
                        	**type**\:  :py:class:`Params <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af.MapCache.Rloc.Params>`
                        
                        

                        """

                        _prefix = 'lisp-ios-xe-oper'
                        _revision = '2017-07-04'

                        def __init__(self):
                            super(
                                LispState.LispRouters.Instances.Af.MapCache.
                                Rloc, self).__init__()

                            self.yang_name = "rloc"
                            self.yang_parent_name = "map-cache"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self._child_container_classes = {
                                "params": ("params", LispState.LispRouters.
                                           Instances.Af.MapCache.Rloc.Params)
                            }
                            self._child_list_classes = {}

                            self.afi = YLeaf(YType.enumeration, "afi")

                            self.address = YLeaf(YType.str, "address")

                            self.params = LispState.LispRouters.Instances.Af.MapCache.Rloc.Params(
                            )
                            self.params.parent = self
                            self._children_name_map["params"] = "params"
                            self._children_yang_names.add("params")
                            self._segment_path = lambda: "rloc" + "[afi='" + self.afi.get(
                            ) + "']" + "[address='" + self.address.get() + "']"

                        def __setattr__(self, name, value):
                            self._perform_setattr(
                                LispState.LispRouters.Instances.Af.MapCache.
                                Rloc, ['afi', 'address'], name, value)

                        class Params(Entity):
                            """
                            Properties of the locator
                            
                            .. attribute:: priority
                            
                            	Locator priority
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: weight
                            
                            	Locator weight
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: mcast_priority
                            
                            	Locator's multicast priority
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: mcast_weight
                            
                            	Locator's multicast weight
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            

                            """

                            _prefix = 'lisp-ios-xe-oper'
                            _revision = '2017-07-04'

                            def __init__(self):
                                super(
                                    LispState.LispRouters.Instances.Af.
                                    MapCache.Rloc.Params, self).__init__()

                                self.yang_name = "params"
                                self.yang_parent_name = "rloc"
                                self.is_top_level_class = False
                                self.has_list_ancestor = True
                                self._child_container_classes = {}
                                self._child_list_classes = {}

                                self.priority = YLeaf(YType.uint8, "priority")

                                self.weight = YLeaf(YType.uint8, "weight")

                                self.mcast_priority = YLeaf(
                                    YType.uint8, "mcast-priority")

                                self.mcast_weight = YLeaf(
                                    YType.uint8, "mcast-weight")
                                self._segment_path = lambda: "params"

                            def __setattr__(self, name, value):
                                self._perform_setattr(
                                    LispState.LispRouters.Instances.Af.
                                    MapCache.Rloc.Params, [
                                        'priority', 'weight', 'mcast_priority',
                                        'mcast_weight'
                                    ], name, value)
Ejemplo n.º 3
0
                    def __init__(self):
                        super(LispState.LispRouters.Instances.Af.MapCache,
                              self).__init__()

                        self.yang_name = "map-cache"
                        self.yang_parent_name = "af"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {
                            "rloc":
                            ("rloc",
                             LispState.LispRouters.Instances.Af.MapCache.Rloc)
                        }

                        self.afi = YLeaf(YType.enumeration, "afi")

                        self.prefix = YLeaf(YType.str, "prefix")

                        self.up_time = YLeaf(YType.str, "up-time")

                        self.last_modified_time = YLeaf(
                            YType.str, "last-modified-time")

                        self.last_update_time = YLeaf(YType.str,
                                                      "last-update-time")

                        self.ttl = YLeaf(YType.uint32, "ttl")

                        self.is_authoritative = YLeaf(YType.boolean,
                                                      "is-authoritative")

                        self.is_static = YLeaf(YType.boolean, "is-static")

                        self.is_negative = YLeaf(YType.boolean, "is-negative")

                        self.nmr_action = YLeaf(YType.enumeration,
                                                "nmr-action")

                        self.rloc = YList(self)
                        self._segment_path = lambda: "map-cache" + "[afi='" + self.afi.get(
                        ) + "']" + "[prefix='" + self.prefix.get() + "']"
Ejemplo n.º 4
0
    class Node(Entity):
        """
        Node
        
        .. attribute:: location  <key>
        
        	Fully qualified line card specification
        	**type**\:  str
        
        	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
        
        .. attribute:: slice
        
        	Slice to be Provisioned
        	**type**\: list of    :py:class:`Slice <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.HardwareModule.Node.Slice>`
        
        

        """

        _prefix = 'ncs1k-mxp-cfg'
        _revision = '2015-11-09'

        def __init__(self):
            super(HardwareModule.Node, self).__init__()

            self.yang_name = "node"
            self.yang_parent_name = "hardware-module"

            self.location = YLeaf(YType.str, "location")

            self.slice = YList(self)

        def __setattr__(self, name, value):
            self._check_monkey_patching_error(name, value)
            with _handle_type_error():
                if name in self.__dict__ and isinstance(
                        self.__dict__[name], YList):
                    raise YPYModelError(
                        "Attempt to assign value of '{}' to YList ldata. "
                        "Please use list append or extend method.".format(
                            value))
                if isinstance(value, Enum.YLeaf):
                    value = value.name
                if name in ("location") and name in self.__dict__:
                    if isinstance(value, YLeaf):
                        self.__dict__[name].set(value.get())
                    elif isinstance(value, YLeafList):
                        super(HardwareModule.Node,
                              self).__setattr__(name, value)
                    else:
                        self.__dict__[name].set(value)
                else:
                    if hasattr(value, "parent") and name != "parent":
                        if hasattr(value, "is_presence_container"
                                   ) and value.is_presence_container:
                            value.parent = self
                        elif value.parent is None and value.yang_name in self._children_yang_names:
                            value.parent = self
                    super(HardwareModule.Node, self).__setattr__(name, value)

        class Slice(Entity):
            """
            Slice to be Provisioned
            
            .. attribute:: slice_id  <key>
            
            	Set Slice
            	**type**\:  str
            
            	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
            
            .. attribute:: lldp
            
            	Drop LLDP Packets
            	**type**\:  bool
            
            .. attribute:: values
            
            	Data rates & FEC
            	**type**\:   :py:class:`Values <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.HardwareModule.Node.Slice.Values>`
            
            

            """

            _prefix = 'ncs1k-mxp-cfg'
            _revision = '2015-11-09'

            def __init__(self):
                super(HardwareModule.Node.Slice, self).__init__()

                self.yang_name = "slice"
                self.yang_parent_name = "node"

                self.slice_id = YLeaf(YType.str, "slice-id")

                self.lldp = YLeaf(YType.boolean, "lldp")

                self.values = HardwareModule.Node.Slice.Values()
                self.values.parent = self
                self._children_name_map["values"] = "values"
                self._children_yang_names.add("values")

            def __setattr__(self, name, value):
                self._check_monkey_patching_error(name, value)
                with _handle_type_error():
                    if name in self.__dict__ and isinstance(
                            self.__dict__[name], YList):
                        raise YPYModelError(
                            "Attempt to assign value of '{}' to YList ldata. "
                            "Please use list append or extend method.".format(
                                value))
                    if isinstance(value, Enum.YLeaf):
                        value = value.name
                    if name in ("slice_id", "lldp") and name in self.__dict__:
                        if isinstance(value, YLeaf):
                            self.__dict__[name].set(value.get())
                        elif isinstance(value, YLeafList):
                            super(HardwareModule.Node.Slice,
                                  self).__setattr__(name, value)
                        else:
                            self.__dict__[name].set(value)
                    else:
                        if hasattr(value, "parent") and name != "parent":
                            if hasattr(value, "is_presence_container"
                                       ) and value.is_presence_container:
                                value.parent = self
                            elif value.parent is None and value.yang_name in self._children_yang_names:
                                value.parent = self
                        super(HardwareModule.Node.Slice,
                              self).__setattr__(name, value)

            class Values(Entity):
                """
                Data rates & FEC
                
                .. attribute:: client_rate
                
                	Client Rate
                	**type**\:   :py:class:`ClientDataRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.ClientDataRate>`
                
                .. attribute:: encrypted
                
                	Encrypted
                	**type**\:  bool
                
                	**default value**\: false
                
                .. attribute:: fec
                
                	FEC
                	**type**\:   :py:class:`Fec <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.Fec>`
                
                .. attribute:: trunk_rate
                
                	TrunkRate
                	**type**\:   :py:class:`TrunkDataRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.TrunkDataRate>`
                
                

                """

                _prefix = 'ncs1k-mxp-cfg'
                _revision = '2015-11-09'

                def __init__(self):
                    super(HardwareModule.Node.Slice.Values, self).__init__()

                    self.yang_name = "values"
                    self.yang_parent_name = "slice"

                    self.client_rate = YLeaf(YType.enumeration, "client-rate")

                    self.encrypted = YLeaf(YType.boolean, "encrypted")

                    self.fec = YLeaf(YType.enumeration, "fec")

                    self.trunk_rate = YLeaf(YType.enumeration, "trunk-rate")

                def __setattr__(self, name, value):
                    self._check_monkey_patching_error(name, value)
                    with _handle_type_error():
                        if name in self.__dict__ and isinstance(
                                self.__dict__[name], YList):
                            raise YPYModelError(
                                "Attempt to assign value of '{}' to YList ldata. "
                                "Please use list append or extend method.".
                                format(value))
                        if isinstance(value, Enum.YLeaf):
                            value = value.name
                        if name in ("client_rate", "encrypted", "fec",
                                    "trunk_rate") and name in self.__dict__:
                            if isinstance(value, YLeaf):
                                self.__dict__[name].set(value.get())
                            elif isinstance(value, YLeafList):
                                super(HardwareModule.Node.Slice.Values,
                                      self).__setattr__(name, value)
                            else:
                                self.__dict__[name].set(value)
                        else:
                            if hasattr(value, "parent") and name != "parent":
                                if hasattr(value, "is_presence_container"
                                           ) and value.is_presence_container:
                                    value.parent = self
                                elif value.parent is None and value.yang_name in self._children_yang_names:
                                    value.parent = self
                            super(HardwareModule.Node.Slice.Values,
                                  self).__setattr__(name, value)

                def has_data(self):
                    return (self.client_rate.is_set or self.encrypted.is_set
                            or self.fec.is_set or self.trunk_rate.is_set)

                def has_operation(self):
                    return (self.yfilter != YFilter.not_set
                            or self.client_rate.yfilter != YFilter.not_set
                            or self.encrypted.yfilter != YFilter.not_set
                            or self.fec.yfilter != YFilter.not_set
                            or self.trunk_rate.yfilter != YFilter.not_set)

                def get_segment_path(self):
                    path_buffer = ""
                    path_buffer = "values" + path_buffer

                    return path_buffer

                def get_entity_path(self, ancestor):
                    path_buffer = ""
                    if (ancestor is None):
                        raise YPYModelError(
                            "ancestor cannot be None as one of the ancestors is a list"
                        )
                    else:
                        path_buffer = _get_relative_entity_path(
                            self, ancestor, path_buffer)

                    leaf_name_data = LeafDataList()
                    if (self.client_rate.is_set
                            or self.client_rate.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.client_rate.get_name_leafdata())
                    if (self.encrypted.is_set
                            or self.encrypted.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.encrypted.get_name_leafdata())
                    if (self.fec.is_set
                            or self.fec.yfilter != YFilter.not_set):
                        leaf_name_data.append(self.fec.get_name_leafdata())
                    if (self.trunk_rate.is_set
                            or self.trunk_rate.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.trunk_rate.get_name_leafdata())

                    entity_path = EntityPath(path_buffer, leaf_name_data)
                    return entity_path

                def get_child_by_name(self, child_yang_name, segment_path):
                    child = self._get_child_by_seg_name(
                        [child_yang_name, segment_path])
                    if child is not None:
                        return child

                    return None

                def has_leaf_or_child_of_name(self, name):
                    if (name == "client-rate" or name == "encrypted"
                            or name == "fec" or name == "trunk-rate"):
                        return True
                    return False

                def set_value(self, value_path, value, name_space,
                              name_space_prefix):
                    if (value_path == "client-rate"):
                        self.client_rate = value
                        self.client_rate.value_namespace = name_space
                        self.client_rate.value_namespace_prefix = name_space_prefix
                    if (value_path == "encrypted"):
                        self.encrypted = value
                        self.encrypted.value_namespace = name_space
                        self.encrypted.value_namespace_prefix = name_space_prefix
                    if (value_path == "fec"):
                        self.fec = value
                        self.fec.value_namespace = name_space
                        self.fec.value_namespace_prefix = name_space_prefix
                    if (value_path == "trunk-rate"):
                        self.trunk_rate = value
                        self.trunk_rate.value_namespace = name_space
                        self.trunk_rate.value_namespace_prefix = name_space_prefix

            def has_data(self):
                return (self.slice_id.is_set or self.lldp.is_set or
                        (self.values is not None and self.values.has_data()))

            def has_operation(self):
                return (self.yfilter != YFilter.not_set
                        or self.slice_id.yfilter != YFilter.not_set
                        or self.lldp.yfilter != YFilter.not_set
                        or (self.values is not None
                            and self.values.has_operation()))

            def get_segment_path(self):
                path_buffer = ""
                path_buffer = "slice" + "[slice-id='" + self.slice_id.get(
                ) + "']" + path_buffer

                return path_buffer

            def get_entity_path(self, ancestor):
                path_buffer = ""
                if (ancestor is None):
                    raise YPYModelError(
                        "ancestor cannot be None as one of the ancestors is a list"
                    )
                else:
                    path_buffer = _get_relative_entity_path(
                        self, ancestor, path_buffer)

                leaf_name_data = LeafDataList()
                if (self.slice_id.is_set
                        or self.slice_id.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.slice_id.get_name_leafdata())
                if (self.lldp.is_set or self.lldp.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.lldp.get_name_leafdata())

                entity_path = EntityPath(path_buffer, leaf_name_data)
                return entity_path

            def get_child_by_name(self, child_yang_name, segment_path):
                child = self._get_child_by_seg_name(
                    [child_yang_name, segment_path])
                if child is not None:
                    return child

                if (child_yang_name == "values"):
                    if (self.values is None):
                        self.values = HardwareModule.Node.Slice.Values()
                        self.values.parent = self
                        self._children_name_map["values"] = "values"
                    return self.values

                return None

            def has_leaf_or_child_of_name(self, name):
                if (name == "values" or name == "slice-id" or name == "lldp"):
                    return True
                return False

            def set_value(self, value_path, value, name_space,
                          name_space_prefix):
                if (value_path == "slice-id"):
                    self.slice_id = value
                    self.slice_id.value_namespace = name_space
                    self.slice_id.value_namespace_prefix = name_space_prefix
                if (value_path == "lldp"):
                    self.lldp = value
                    self.lldp.value_namespace = name_space
                    self.lldp.value_namespace_prefix = name_space_prefix

        def has_data(self):
            for c in self.slice:
                if (c.has_data()):
                    return True
            return self.location.is_set

        def has_operation(self):
            for c in self.slice:
                if (c.has_operation()):
                    return True
            return (self.yfilter != YFilter.not_set
                    or self.location.yfilter != YFilter.not_set)

        def get_segment_path(self):
            path_buffer = ""
            path_buffer = "node" + "[location='" + self.location.get(
            ) + "']" + path_buffer

            return path_buffer

        def get_entity_path(self, ancestor):
            path_buffer = ""
            if (ancestor is None):
                path_buffer = "Cisco-IOS-XR-ncs1k-mxp-cfg:hardware-module/%s" % self.get_segment_path(
                )
            else:
                path_buffer = _get_relative_entity_path(
                    self, ancestor, path_buffer)

            leaf_name_data = LeafDataList()
            if (self.location.is_set
                    or self.location.yfilter != YFilter.not_set):
                leaf_name_data.append(self.location.get_name_leafdata())

            entity_path = EntityPath(path_buffer, leaf_name_data)
            return entity_path

        def get_child_by_name(self, child_yang_name, segment_path):
            child = self._get_child_by_seg_name(
                [child_yang_name, segment_path])
            if child is not None:
                return child

            if (child_yang_name == "slice"):
                for c in self.slice:
                    segment = c.get_segment_path()
                    if (segment_path == segment):
                        return c
                c = HardwareModule.Node.Slice()
                c.parent = self
                local_reference_key = "ydk::seg::%s" % segment_path
                self._local_refs[local_reference_key] = c
                self.slice.append(c)
                return c

            return None

        def has_leaf_or_child_of_name(self, name):
            if (name == "slice" or name == "location"):
                return True
            return False

        def set_value(self, value_path, value, name_space, name_space_prefix):
            if (value_path == "location"):
                self.location = value
                self.location.value_namespace = name_space
                self.location.value_namespace_prefix = name_space_prefix
Ejemplo n.º 5
0
                class AccessListEntry(Entity):
                    """
                    An ACL entry; either a description (remark)
                    or anAccess List Entry to match against
                    
                    .. attribute:: sequence_number  <key>
                    
                    	Sequence number of access list entry
                    	**type**\: int
                    
                    	**range:** 1..2147483646
                    
                    .. attribute:: grant
                    
                    	Whether to forward or drop packets matching the ACE
                    	**type**\:  :py:class:`EsAclGrantEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_es_acl_cfg.EsAclGrantEnum>`
                    
                    .. attribute:: source_network
                    
                    	Source network settings
                    	**type**\:  :py:class:`SourceNetwork <ydk.models.cisco_ios_xr.Cisco_IOS_XR_es_acl_cfg.EsAcl.Accesses.Access.AccessListEntries.AccessListEntry.SourceNetwork>`
                    
                    .. attribute:: destination_network
                    
                    	Destination network settings
                    	**type**\:  :py:class:`DestinationNetwork <ydk.models.cisco_ios_xr.Cisco_IOS_XR_es_acl_cfg.EsAcl.Accesses.Access.AccessListEntries.AccessListEntry.DestinationNetwork>`
                    
                    .. attribute:: vlan1
                    
                    	VLAN ID/range lower limit
                    	**type**\: int
                    
                    	**range:** 0..65535
                    
                    .. attribute:: vlan2
                    
                    	VLAN ID range higher limit
                    	**type**\: int
                    
                    	**range:** 0..65535
                    
                    .. attribute:: cos
                    
                    	COS value
                    	**type**\: int
                    
                    	**range:** 0..255
                    
                    .. attribute:: dei
                    
                    	DEI bit
                    	**type**\: int
                    
                    	**range:** 0..255
                    
                    .. attribute:: inner_vlan1
                    
                    	Inner VLAN ID/range lower limit
                    	**type**\: int
                    
                    	**range:** 0..65535
                    
                    .. attribute:: inner_vlan2
                    
                    	Inner VLAN ID range higher limit
                    	**type**\: int
                    
                    	**range:** 0..65535
                    
                    .. attribute:: inner_cos
                    
                    	Inner COS value
                    	**type**\: int
                    
                    	**range:** 0..255
                    
                    .. attribute:: inner_dei
                    
                    	Inner DEI bit
                    	**type**\: int
                    
                    	**range:** 0..255
                    
                    .. attribute:: remark
                    
                    	Comments or a description for the access list
                    	**type**\: str
                    
                    .. attribute:: ether_type_number
                    
                    	Ethernet type Number
                    	**type**\: int
                    
                    	**range:** 0..65535
                    
                    .. attribute:: capture
                    
                    	Enable capture
                    	**type**\: bool
                    
                    .. attribute:: log_option
                    
                    	Whether and how to log matches against this entry
                    	**type**\: int
                    
                    	**range:** 0..255
                    
                    .. attribute:: sequence_str
                    
                    	Sequence String for the ace
                    	**type**\: str
                    
                    	**length:** 1..64
                    
                    

                    """

                    _prefix = 'es-acl-cfg'
                    _revision = '2017-05-01'

                    def __init__(self):
                        super(
                            EsAcl.Accesses.Access.AccessListEntries.
                            AccessListEntry, self).__init__()

                        self.yang_name = "access-list-entry"
                        self.yang_parent_name = "access-list-entries"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {
                            "source-network":
                            ("source_network", EsAcl.Accesses.Access.
                             AccessListEntries.AccessListEntry.SourceNetwork),
                            "destination-network":
                            ("destination_network",
                             EsAcl.Accesses.Access.AccessListEntries.
                             AccessListEntry.DestinationNetwork)
                        }
                        self._child_list_classes = {}

                        self.sequence_number = YLeaf(YType.uint32,
                                                     "sequence-number")

                        self.grant = YLeaf(YType.enumeration, "grant")

                        self.vlan1 = YLeaf(YType.uint16, "vlan1")

                        self.vlan2 = YLeaf(YType.uint16, "vlan2")

                        self.cos = YLeaf(YType.uint8, "cos")

                        self.dei = YLeaf(YType.uint8, "dei")

                        self.inner_vlan1 = YLeaf(YType.uint16, "inner-vlan1")

                        self.inner_vlan2 = YLeaf(YType.uint16, "inner-vlan2")

                        self.inner_cos = YLeaf(YType.uint8, "inner-cos")

                        self.inner_dei = YLeaf(YType.uint8, "inner-dei")

                        self.remark = YLeaf(YType.str, "remark")

                        self.ether_type_number = YLeaf(YType.uint16,
                                                       "ether-type-number")

                        self.capture = YLeaf(YType.boolean, "capture")

                        self.log_option = YLeaf(YType.uint8, "log-option")

                        self.sequence_str = YLeaf(YType.str, "sequence-str")

                        self.source_network = EsAcl.Accesses.Access.AccessListEntries.AccessListEntry.SourceNetwork(
                        )
                        self.source_network.parent = self
                        self._children_name_map[
                            "source_network"] = "source-network"
                        self._children_yang_names.add("source-network")

                        self.destination_network = EsAcl.Accesses.Access.AccessListEntries.AccessListEntry.DestinationNetwork(
                        )
                        self.destination_network.parent = self
                        self._children_name_map[
                            "destination_network"] = "destination-network"
                        self._children_yang_names.add("destination-network")
                        self._segment_path = lambda: "access-list-entry" + "[sequence-number='" + self.sequence_number.get(
                        ) + "']"

                    def __setattr__(self, name, value):
                        self._perform_setattr(
                            EsAcl.Accesses.Access.AccessListEntries.
                            AccessListEntry, [
                                'sequence_number', 'grant', 'vlan1', 'vlan2',
                                'cos', 'dei', 'inner_vlan1', 'inner_vlan2',
                                'inner_cos', 'inner_dei', 'remark',
                                'ether_type_number', 'capture', 'log_option',
                                'sequence_str'
                            ], name, value)

                    class SourceNetwork(Entity):
                        """
                        Source network settings.
                        
                        .. attribute:: source_address
                        
                        	Source address to match, leave unspecified for any
                        	**type**\: str
                        
                        	**pattern:** ([0\-9a\-fA\-F]{1,4}(\\.[0\-9a\-fA\-F]{1,4}){2})
                        
                        .. attribute:: source_wild_card_bits
                        
                        	Wildcard bits to apply to source address (if specified), leave unspecified for no wildcarding
                        	**type**\: str
                        
                        	**pattern:** ([0\-9a\-fA\-F]{1,4}(\\.[0\-9a\-fA\-F]{1,4}){2})
                        
                        

                        """

                        _prefix = 'es-acl-cfg'
                        _revision = '2017-05-01'

                        def __init__(self):
                            super(
                                EsAcl.Accesses.Access.AccessListEntries.
                                AccessListEntry.SourceNetwork,
                                self).__init__()

                            self.yang_name = "source-network"
                            self.yang_parent_name = "access-list-entry"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self._child_container_classes = {}
                            self._child_list_classes = {}

                            self.source_address = YLeaf(
                                YType.str, "source-address")

                            self.source_wild_card_bits = YLeaf(
                                YType.str, "source-wild-card-bits")
                            self._segment_path = lambda: "source-network"

                        def __setattr__(self, name, value):
                            self._perform_setattr(
                                EsAcl.Accesses.Access.AccessListEntries.
                                AccessListEntry.SourceNetwork,
                                ['source_address', 'source_wild_card_bits'],
                                name, value)

                    class DestinationNetwork(Entity):
                        """
                        Destination network settings.
                        
                        .. attribute:: destination_address
                        
                        	Destination address to match (if a protocol was specified), leave unspecified for any
                        	**type**\: str
                        
                        	**pattern:** ([0\-9a\-fA\-F]{1,4}(\\.[0\-9a\-fA\-F]{1,4}){2})
                        
                        .. attribute:: destination_wild_card_bits
                        
                        	Wildcard bits to apply to destination address (if specified), leave unspecified for no wildcarding
                        	**type**\: str
                        
                        	**pattern:** ([0\-9a\-fA\-F]{1,4}(\\.[0\-9a\-fA\-F]{1,4}){2})
                        
                        

                        """

                        _prefix = 'es-acl-cfg'
                        _revision = '2017-05-01'

                        def __init__(self):
                            super(
                                EsAcl.Accesses.Access.AccessListEntries.
                                AccessListEntry.DestinationNetwork,
                                self).__init__()

                            self.yang_name = "destination-network"
                            self.yang_parent_name = "access-list-entry"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self._child_container_classes = {}
                            self._child_list_classes = {}

                            self.destination_address = YLeaf(
                                YType.str, "destination-address")

                            self.destination_wild_card_bits = YLeaf(
                                YType.str, "destination-wild-card-bits")
                            self._segment_path = lambda: "destination-network"

                        def __setattr__(self, name, value):
                            self._perform_setattr(
                                EsAcl.Accesses.Access.AccessListEntries.
                                AccessListEntry.DestinationNetwork, [
                                    'destination_address',
                                    'destination_wild_card_bits'
                                ], name, value)
Ejemplo n.º 6
0
            def __init__(self):
                super(CISCOIPURPFMIB.Cipurpfifmontable.Cipurpfifmonentry,
                      self).__init__()

                self.yang_name = "cipUrpfIfMonEntry"
                self.yang_parent_name = "cipUrpfIfMonTable"
                self.is_top_level_class = False
                self.has_list_ancestor = False
                self._child_container_classes = {}
                self._child_list_classes = {}

                self.ifindex = YLeaf(YType.str, "ifIndex")

                self.cipurpfifipversion = YLeaf(YType.enumeration,
                                                "cipUrpfIfIpVersion")

                self.cipurpfifdrops = YLeaf(YType.uint32, "cipUrpfIfDrops")

                self.cipurpfifsuppresseddrops = YLeaf(
                    YType.uint32, "cipUrpfIfSuppressedDrops")

                self.cipurpfifdroprate = YLeaf(YType.uint32,
                                               "cipUrpfIfDropRate")

                self.cipurpfifdiscontinuitytime = YLeaf(
                    YType.uint32, "cipUrpfIfDiscontinuityTime")

                self.cipurpfifdropratenotifyenable = YLeaf(
                    YType.boolean, "cipUrpfIfDropRateNotifyEnable")

                self.cipurpfifnotifydropratethreshold = YLeaf(
                    YType.uint32, "cipUrpfIfNotifyDropRateThreshold")

                self.cipurpfifnotifydrholddownreset = YLeaf(
                    YType.boolean, "cipUrpfIfNotifyDrHoldDownReset")

                self.cipurpfifcheckstrict = YLeaf(YType.enumeration,
                                                  "cipUrpfIfCheckStrict")

                self.cipurpfifwhichroutetableid = YLeaf(
                    YType.enumeration, "cipUrpfIfWhichRouteTableID")

                self.cipurpfifvrfname = YLeaf(YType.str, "cipUrpfIfVrfName")
                self._segment_path = lambda: "cipUrpfIfMonEntry" + "[ifIndex='" + self.ifindex.get(
                ) + "']" + "[cipUrpfIfIpVersion='" + self.cipurpfifipversion.get(
                ) + "']"
                self._absolute_path = lambda: "CISCO-IP-URPF-MIB:CISCO-IP-URPF-MIB/cipUrpfIfMonTable/%s" % self._segment_path(
                )
Ejemplo n.º 7
0
        class Cipurpfvrfentry(Entity):
            """
            An entry exists for a VRF if and only if the VRF
            is associated with an interface that is configured
            to perform IP URPF checking using the routing table 
            for that VRF.
            
            .. attribute:: cipurpfvrfname  <key>
            
            	This field is used to specify the VRF Table name
            	**type**\: str
            
            	**length:** 0..32
            
            

            """

            _prefix = 'CISCO-IP-URPF-MIB'
            _revision = '2011-12-29'

            def __init__(self):
                super(CISCOIPURPFMIB.Cipurpfvrftable.Cipurpfvrfentry,
                      self).__init__()

                self.yang_name = "cipUrpfVrfEntry"
                self.yang_parent_name = "cipUrpfVrfTable"
                self.is_top_level_class = False
                self.has_list_ancestor = False
                self._child_container_classes = {}
                self._child_list_classes = {}

                self.cipurpfvrfname = YLeaf(YType.str, "cipUrpfVrfName")
                self._segment_path = lambda: "cipUrpfVrfEntry" + "[cipUrpfVrfName='" + self.cipurpfvrfname.get(
                ) + "']"
                self._absolute_path = lambda: "CISCO-IP-URPF-MIB:CISCO-IP-URPF-MIB/cipUrpfVrfTable/%s" % self._segment_path(
                )

            def __setattr__(self, name, value):
                self._perform_setattr(
                    CISCOIPURPFMIB.Cipurpfvrftable.Cipurpfvrfentry,
                    ['cipurpfvrfname'], name, value)
Ejemplo n.º 8
0
class EventManager(Entity):
    """
    Event manager configuration
    
    .. attribute:: directory_user_library
    
    	Path of the user policy library directory
    	**type**\:  str
    
    .. attribute:: directory_user_policy
    
    	Set event manager user policy directory
    	**type**\:  str
    
    .. attribute:: environments
    
    	Set an event manager global variable for event manager policies
    	**type**\:   :py:class:`Environments <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManager.Environments>`
    
    .. attribute:: policies
    
    	Register an event manager policy
    	**type**\:   :py:class:`Policies <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManager.Policies>`
    
    .. attribute:: refresh_time
    
    	Set refresh time (in seconds) for policy username's AAA taskmap
    	**type**\:  int
    
    	**range:** 10..4294967295
    
    	**units**\: second
    
    	**default value**\: 1800
    
    .. attribute:: schedule_suspend
    
    	Enable suspend policy scheduling
    	**type**\:  bool
    
    .. attribute:: scheduler_script
    
    	scheduler classs type
    	**type**\:   :py:class:`SchedulerScript <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManager.SchedulerScript>`
    
    

    """

    _prefix = 'ha-eem-cfg'
    _revision = '2015-07-30'

    def __init__(self):
        super(EventManager, self).__init__()
        self._top_entity = None

        self.yang_name = "event-manager"
        self.yang_parent_name = "Cisco-IOS-XR-ha-eem-cfg"

        self.directory_user_library = YLeaf(YType.str,
                                            "directory-user-library")

        self.directory_user_policy = YLeaf(YType.str, "directory-user-policy")

        self.refresh_time = YLeaf(YType.uint32, "refresh-time")

        self.schedule_suspend = YLeaf(YType.boolean, "schedule-suspend")

        self.environments = EventManager.Environments()
        self.environments.parent = self
        self._children_name_map["environments"] = "environments"
        self._children_yang_names.add("environments")

        self.policies = EventManager.Policies()
        self.policies.parent = self
        self._children_name_map["policies"] = "policies"
        self._children_yang_names.add("policies")

        self.scheduler_script = EventManager.SchedulerScript()
        self.scheduler_script.parent = self
        self._children_name_map["scheduler_script"] = "scheduler-script"
        self._children_yang_names.add("scheduler-script")

    def __setattr__(self, name, value):
        self._check_monkey_patching_error(name, value)
        with _handle_type_error():
            if name in self.__dict__ and isinstance(self.__dict__[name],
                                                    YList):
                raise YPYModelError(
                    "Attempt to assign value of '{}' to YList ldata. "
                    "Please use list append or extend method.".format(value))
            if isinstance(value, Enum.YLeaf):
                value = value.name
            if name in ("directory_user_library", "directory_user_policy",
                        "refresh_time",
                        "schedule_suspend") and name in self.__dict__:
                if isinstance(value, YLeaf):
                    self.__dict__[name].set(value.get())
                elif isinstance(value, YLeafList):
                    super(EventManager, self).__setattr__(name, value)
                else:
                    self.__dict__[name].set(value)
            else:
                if hasattr(value, "parent") and name != "parent":
                    if hasattr(value, "is_presence_container"
                               ) and value.is_presence_container:
                        value.parent = self
                    elif value.parent is None and value.yang_name in self._children_yang_names:
                        value.parent = self
                super(EventManager, self).__setattr__(name, value)

    class Policies(Entity):
        """
        Register an event manager policy
        
        .. attribute:: policy
        
        	Name of the policy file
        	**type**\: list of    :py:class:`Policy <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManager.Policies.Policy>`
        
        

        """

        _prefix = 'ha-eem-cfg'
        _revision = '2015-07-30'

        def __init__(self):
            super(EventManager.Policies, self).__init__()

            self.yang_name = "policies"
            self.yang_parent_name = "event-manager"

            self.policy = YList(self)

        def __setattr__(self, name, value):
            self._check_monkey_patching_error(name, value)
            with _handle_type_error():
                if name in self.__dict__ and isinstance(
                        self.__dict__[name], YList):
                    raise YPYModelError(
                        "Attempt to assign value of '{}' to YList ldata. "
                        "Please use list append or extend method.".format(
                            value))
                if isinstance(value, Enum.YLeaf):
                    value = value.name
                if name in () and name in self.__dict__:
                    if isinstance(value, YLeaf):
                        self.__dict__[name].set(value.get())
                    elif isinstance(value, YLeafList):
                        super(EventManager.Policies,
                              self).__setattr__(name, value)
                    else:
                        self.__dict__[name].set(value)
                else:
                    if hasattr(value, "parent") and name != "parent":
                        if hasattr(value, "is_presence_container"
                                   ) and value.is_presence_container:
                            value.parent = self
                        elif value.parent is None and value.yang_name in self._children_yang_names:
                            value.parent = self
                    super(EventManager.Policies, self).__setattr__(name, value)

        class Policy(Entity):
            """
            Name of the policy file
            
            .. attribute:: policy_name  <key>
            
            	Name of the policy file
            	**type**\:  str
            
            	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
            
            .. attribute:: check_sum_value
            
            	CheckSum Value
            	**type**\:  str
            
            .. attribute:: checksum_type
            
            	Specify Embedded Event Manager policy checksum
            	**type**\:   :py:class:`EventManagerChecksum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerChecksum>`
            
            .. attribute:: persist_time
            
            	Time of validity (in seconds) for cached AAA taskmap of username (default is 3600)
            	**type**\:  int
            
            	**range:** 0..4294967295
            
            	**mandatory**\: True
            
            	**units**\: second
            
            .. attribute:: policy_security_level
            
            	Event Manager policy security Level
            	**type**\:   :py:class:`EventManagerPolicySec <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerPolicySec>`
            
            .. attribute:: policy_security_mode
            
            	Specify Embedded Event Manager policy security mode
            	**type**\:   :py:class:`EventManagerPolicyMode <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerPolicyMode>`
            
            .. attribute:: policy_type
            
            	Event manager type of this policy
            	**type**\:   :py:class:`EventManagerPolicy <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerPolicy>`
            
            .. attribute:: username
            
            	A configured username
            	**type**\:  str
            
            	**mandatory**\: True
            
            

            """

            _prefix = 'ha-eem-cfg'
            _revision = '2015-07-30'

            def __init__(self):
                super(EventManager.Policies.Policy, self).__init__()

                self.yang_name = "policy"
                self.yang_parent_name = "policies"

                self.policy_name = YLeaf(YType.str, "policy-name")

                self.check_sum_value = YLeaf(YType.str, "check-sum-value")

                self.checksum_type = YLeaf(YType.enumeration, "checksum-type")

                self.persist_time = YLeaf(YType.uint32, "persist-time")

                self.policy_security_level = YLeaf(YType.enumeration,
                                                   "policy-security-level")

                self.policy_security_mode = YLeaf(YType.enumeration,
                                                  "policy-security-mode")

                self.policy_type = YLeaf(YType.enumeration, "policy-type")

                self.username = YLeaf(YType.str, "username")

            def __setattr__(self, name, value):
                self._check_monkey_patching_error(name, value)
                with _handle_type_error():
                    if name in self.__dict__ and isinstance(
                            self.__dict__[name], YList):
                        raise YPYModelError(
                            "Attempt to assign value of '{}' to YList ldata. "
                            "Please use list append or extend method.".format(
                                value))
                    if isinstance(value, Enum.YLeaf):
                        value = value.name
                    if name in ("policy_name", "check_sum_value",
                                "checksum_type", "persist_time",
                                "policy_security_level",
                                "policy_security_mode", "policy_type",
                                "username") and name in self.__dict__:
                        if isinstance(value, YLeaf):
                            self.__dict__[name].set(value.get())
                        elif isinstance(value, YLeafList):
                            super(EventManager.Policies.Policy,
                                  self).__setattr__(name, value)
                        else:
                            self.__dict__[name].set(value)
                    else:
                        if hasattr(value, "parent") and name != "parent":
                            if hasattr(value, "is_presence_container"
                                       ) and value.is_presence_container:
                                value.parent = self
                            elif value.parent is None and value.yang_name in self._children_yang_names:
                                value.parent = self
                        super(EventManager.Policies.Policy,
                              self).__setattr__(name, value)

            def has_data(self):
                return (self.policy_name.is_set or self.check_sum_value.is_set
                        or self.checksum_type.is_set
                        or self.persist_time.is_set
                        or self.policy_security_level.is_set
                        or self.policy_security_mode.is_set
                        or self.policy_type.is_set or self.username.is_set)

            def has_operation(self):
                return (self.yfilter != YFilter.not_set
                        or self.policy_name.yfilter != YFilter.not_set
                        or self.check_sum_value.yfilter != YFilter.not_set
                        or self.checksum_type.yfilter != YFilter.not_set
                        or self.persist_time.yfilter != YFilter.not_set or
                        self.policy_security_level.yfilter != YFilter.not_set
                        or self.policy_security_mode.yfilter != YFilter.not_set
                        or self.policy_type.yfilter != YFilter.not_set
                        or self.username.yfilter != YFilter.not_set)

            def get_segment_path(self):
                path_buffer = ""
                path_buffer = "policy" + "[policy-name='" + self.policy_name.get(
                ) + "']" + path_buffer

                return path_buffer

            def get_entity_path(self, ancestor):
                path_buffer = ""
                if (ancestor is None):
                    path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/policies/%s" % self.get_segment_path(
                    )
                else:
                    path_buffer = _get_relative_entity_path(
                        self, ancestor, path_buffer)

                leaf_name_data = LeafDataList()
                if (self.policy_name.is_set
                        or self.policy_name.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.policy_name.get_name_leafdata())
                if (self.check_sum_value.is_set
                        or self.check_sum_value.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.check_sum_value.get_name_leafdata())
                if (self.checksum_type.is_set
                        or self.checksum_type.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.checksum_type.get_name_leafdata())
                if (self.persist_time.is_set
                        or self.persist_time.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.persist_time.get_name_leafdata())
                if (self.policy_security_level.is_set or
                        self.policy_security_level.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.policy_security_level.get_name_leafdata())
                if (self.policy_security_mode.is_set or
                        self.policy_security_mode.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.policy_security_mode.get_name_leafdata())
                if (self.policy_type.is_set
                        or self.policy_type.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.policy_type.get_name_leafdata())
                if (self.username.is_set
                        or self.username.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.username.get_name_leafdata())

                entity_path = EntityPath(path_buffer, leaf_name_data)
                return entity_path

            def get_child_by_name(self, child_yang_name, segment_path):
                child = self._get_child_by_seg_name(
                    [child_yang_name, segment_path])
                if child is not None:
                    return child

                return None

            def has_leaf_or_child_of_name(self, name):
                if (name == "policy-name" or name == "check-sum-value"
                        or name == "checksum-type" or name == "persist-time"
                        or name == "policy-security-level"
                        or name == "policy-security-mode"
                        or name == "policy-type" or name == "username"):
                    return True
                return False

            def set_value(self, value_path, value, name_space,
                          name_space_prefix):
                if (value_path == "policy-name"):
                    self.policy_name = value
                    self.policy_name.value_namespace = name_space
                    self.policy_name.value_namespace_prefix = name_space_prefix
                if (value_path == "check-sum-value"):
                    self.check_sum_value = value
                    self.check_sum_value.value_namespace = name_space
                    self.check_sum_value.value_namespace_prefix = name_space_prefix
                if (value_path == "checksum-type"):
                    self.checksum_type = value
                    self.checksum_type.value_namespace = name_space
                    self.checksum_type.value_namespace_prefix = name_space_prefix
                if (value_path == "persist-time"):
                    self.persist_time = value
                    self.persist_time.value_namespace = name_space
                    self.persist_time.value_namespace_prefix = name_space_prefix
                if (value_path == "policy-security-level"):
                    self.policy_security_level = value
                    self.policy_security_level.value_namespace = name_space
                    self.policy_security_level.value_namespace_prefix = name_space_prefix
                if (value_path == "policy-security-mode"):
                    self.policy_security_mode = value
                    self.policy_security_mode.value_namespace = name_space
                    self.policy_security_mode.value_namespace_prefix = name_space_prefix
                if (value_path == "policy-type"):
                    self.policy_type = value
                    self.policy_type.value_namespace = name_space
                    self.policy_type.value_namespace_prefix = name_space_prefix
                if (value_path == "username"):
                    self.username = value
                    self.username.value_namespace = name_space
                    self.username.value_namespace_prefix = name_space_prefix

        def has_data(self):
            for c in self.policy:
                if (c.has_data()):
                    return True
            return False

        def has_operation(self):
            for c in self.policy:
                if (c.has_operation()):
                    return True
            return self.yfilter != YFilter.not_set

        def get_segment_path(self):
            path_buffer = ""
            path_buffer = "policies" + path_buffer

            return path_buffer

        def get_entity_path(self, ancestor):
            path_buffer = ""
            if (ancestor is None):
                path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/%s" % self.get_segment_path(
                )
            else:
                path_buffer = _get_relative_entity_path(
                    self, ancestor, path_buffer)

            leaf_name_data = LeafDataList()

            entity_path = EntityPath(path_buffer, leaf_name_data)
            return entity_path

        def get_child_by_name(self, child_yang_name, segment_path):
            child = self._get_child_by_seg_name(
                [child_yang_name, segment_path])
            if child is not None:
                return child

            if (child_yang_name == "policy"):
                for c in self.policy:
                    segment = c.get_segment_path()
                    if (segment_path == segment):
                        return c
                c = EventManager.Policies.Policy()
                c.parent = self
                local_reference_key = "ydk::seg::%s" % segment_path
                self._local_refs[local_reference_key] = c
                self.policy.append(c)
                return c

            return None

        def has_leaf_or_child_of_name(self, name):
            if (name == "policy"):
                return True
            return False

        def set_value(self, value_path, value, name_space, name_space_prefix):
            pass

    class SchedulerScript(Entity):
        """
        scheduler classs type
        
        .. attribute:: thread_classes
        
        	scheduler thread classs 
        	**type**\:   :py:class:`ThreadClasses <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManager.SchedulerScript.ThreadClasses>`
        
        

        """

        _prefix = 'ha-eem-cfg'
        _revision = '2015-07-30'

        def __init__(self):
            super(EventManager.SchedulerScript, self).__init__()

            self.yang_name = "scheduler-script"
            self.yang_parent_name = "event-manager"

            self.thread_classes = EventManager.SchedulerScript.ThreadClasses()
            self.thread_classes.parent = self
            self._children_name_map["thread_classes"] = "thread-classes"
            self._children_yang_names.add("thread-classes")

        class ThreadClasses(Entity):
            """
            scheduler thread classs 
            
            .. attribute:: thread_class
            
            	scheduler classs type argument
            	**type**\: list of    :py:class:`ThreadClass <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManager.SchedulerScript.ThreadClasses.ThreadClass>`
            
            

            """

            _prefix = 'ha-eem-cfg'
            _revision = '2015-07-30'

            def __init__(self):
                super(EventManager.SchedulerScript.ThreadClasses,
                      self).__init__()

                self.yang_name = "thread-classes"
                self.yang_parent_name = "scheduler-script"

                self.thread_class = YList(self)

            def __setattr__(self, name, value):
                self._check_monkey_patching_error(name, value)
                with _handle_type_error():
                    if name in self.__dict__ and isinstance(
                            self.__dict__[name], YList):
                        raise YPYModelError(
                            "Attempt to assign value of '{}' to YList ldata. "
                            "Please use list append or extend method.".format(
                                value))
                    if isinstance(value, Enum.YLeaf):
                        value = value.name
                    if name in () and name in self.__dict__:
                        if isinstance(value, YLeaf):
                            self.__dict__[name].set(value.get())
                        elif isinstance(value, YLeafList):
                            super(EventManager.SchedulerScript.ThreadClasses,
                                  self).__setattr__(name, value)
                        else:
                            self.__dict__[name].set(value)
                    else:
                        if hasattr(value, "parent") and name != "parent":
                            if hasattr(value, "is_presence_container"
                                       ) and value.is_presence_container:
                                value.parent = self
                            elif value.parent is None and value.yang_name in self._children_yang_names:
                                value.parent = self
                        super(EventManager.SchedulerScript.ThreadClasses,
                              self).__setattr__(name, value)

            class ThreadClass(Entity):
                """
                scheduler classs type argument
                
                .. attribute:: thread_class_name  <key>
                
                	Name of the global variable
                	**type**\:  str
                
                	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
                
                .. attribute:: num_threads
                
                	number of scheduler threads
                	**type**\:  int
                
                	**range:** 1..5
                
                	**mandatory**\: True
                
                

                """

                _prefix = 'ha-eem-cfg'
                _revision = '2015-07-30'

                def __init__(self):
                    super(
                        EventManager.SchedulerScript.ThreadClasses.ThreadClass,
                        self).__init__()

                    self.yang_name = "thread-class"
                    self.yang_parent_name = "thread-classes"

                    self.thread_class_name = YLeaf(YType.str,
                                                   "thread-class-name")

                    self.num_threads = YLeaf(YType.uint32, "num-threads")

                def __setattr__(self, name, value):
                    self._check_monkey_patching_error(name, value)
                    with _handle_type_error():
                        if name in self.__dict__ and isinstance(
                                self.__dict__[name], YList):
                            raise YPYModelError(
                                "Attempt to assign value of '{}' to YList ldata. "
                                "Please use list append or extend method.".
                                format(value))
                        if isinstance(value, Enum.YLeaf):
                            value = value.name
                        if name in ("thread_class_name",
                                    "num_threads") and name in self.__dict__:
                            if isinstance(value, YLeaf):
                                self.__dict__[name].set(value.get())
                            elif isinstance(value, YLeafList):
                                super(
                                    EventManager.SchedulerScript.ThreadClasses.
                                    ThreadClass,
                                    self).__setattr__(name, value)
                            else:
                                self.__dict__[name].set(value)
                        else:
                            if hasattr(value, "parent") and name != "parent":
                                if hasattr(value, "is_presence_container"
                                           ) and value.is_presence_container:
                                    value.parent = self
                                elif value.parent is None and value.yang_name in self._children_yang_names:
                                    value.parent = self
                            super(
                                EventManager.SchedulerScript.ThreadClasses.
                                ThreadClass, self).__setattr__(name, value)

                def has_data(self):
                    return (self.thread_class_name.is_set
                            or self.num_threads.is_set)

                def has_operation(self):
                    return (self.yfilter != YFilter.not_set or
                            self.thread_class_name.yfilter != YFilter.not_set
                            or self.num_threads.yfilter != YFilter.not_set)

                def get_segment_path(self):
                    path_buffer = ""
                    path_buffer = "thread-class" + "[thread-class-name='" + self.thread_class_name.get(
                    ) + "']" + path_buffer

                    return path_buffer

                def get_entity_path(self, ancestor):
                    path_buffer = ""
                    if (ancestor is None):
                        path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/scheduler-script/thread-classes/%s" % self.get_segment_path(
                        )
                    else:
                        path_buffer = _get_relative_entity_path(
                            self, ancestor, path_buffer)

                    leaf_name_data = LeafDataList()
                    if (self.thread_class_name.is_set or
                            self.thread_class_name.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.thread_class_name.get_name_leafdata())
                    if (self.num_threads.is_set
                            or self.num_threads.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.num_threads.get_name_leafdata())

                    entity_path = EntityPath(path_buffer, leaf_name_data)
                    return entity_path

                def get_child_by_name(self, child_yang_name, segment_path):
                    child = self._get_child_by_seg_name(
                        [child_yang_name, segment_path])
                    if child is not None:
                        return child

                    return None

                def has_leaf_or_child_of_name(self, name):
                    if (name == "thread-class-name" or name == "num-threads"):
                        return True
                    return False

                def set_value(self, value_path, value, name_space,
                              name_space_prefix):
                    if (value_path == "thread-class-name"):
                        self.thread_class_name = value
                        self.thread_class_name.value_namespace = name_space
                        self.thread_class_name.value_namespace_prefix = name_space_prefix
                    if (value_path == "num-threads"):
                        self.num_threads = value
                        self.num_threads.value_namespace = name_space
                        self.num_threads.value_namespace_prefix = name_space_prefix

            def has_data(self):
                for c in self.thread_class:
                    if (c.has_data()):
                        return True
                return False

            def has_operation(self):
                for c in self.thread_class:
                    if (c.has_operation()):
                        return True
                return self.yfilter != YFilter.not_set

            def get_segment_path(self):
                path_buffer = ""
                path_buffer = "thread-classes" + path_buffer

                return path_buffer

            def get_entity_path(self, ancestor):
                path_buffer = ""
                if (ancestor is None):
                    path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/scheduler-script/%s" % self.get_segment_path(
                    )
                else:
                    path_buffer = _get_relative_entity_path(
                        self, ancestor, path_buffer)

                leaf_name_data = LeafDataList()

                entity_path = EntityPath(path_buffer, leaf_name_data)
                return entity_path

            def get_child_by_name(self, child_yang_name, segment_path):
                child = self._get_child_by_seg_name(
                    [child_yang_name, segment_path])
                if child is not None:
                    return child

                if (child_yang_name == "thread-class"):
                    for c in self.thread_class:
                        segment = c.get_segment_path()
                        if (segment_path == segment):
                            return c
                    c = EventManager.SchedulerScript.ThreadClasses.ThreadClass(
                    )
                    c.parent = self
                    local_reference_key = "ydk::seg::%s" % segment_path
                    self._local_refs[local_reference_key] = c
                    self.thread_class.append(c)
                    return c

                return None

            def has_leaf_or_child_of_name(self, name):
                if (name == "thread-class"):
                    return True
                return False

            def set_value(self, value_path, value, name_space,
                          name_space_prefix):
                pass

        def has_data(self):
            return (self.thread_classes is not None
                    and self.thread_classes.has_data())

        def has_operation(self):
            return (self.yfilter != YFilter.not_set
                    or (self.thread_classes is not None
                        and self.thread_classes.has_operation()))

        def get_segment_path(self):
            path_buffer = ""
            path_buffer = "scheduler-script" + path_buffer

            return path_buffer

        def get_entity_path(self, ancestor):
            path_buffer = ""
            if (ancestor is None):
                path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/%s" % self.get_segment_path(
                )
            else:
                path_buffer = _get_relative_entity_path(
                    self, ancestor, path_buffer)

            leaf_name_data = LeafDataList()

            entity_path = EntityPath(path_buffer, leaf_name_data)
            return entity_path

        def get_child_by_name(self, child_yang_name, segment_path):
            child = self._get_child_by_seg_name(
                [child_yang_name, segment_path])
            if child is not None:
                return child

            if (child_yang_name == "thread-classes"):
                if (self.thread_classes is None):
                    self.thread_classes = EventManager.SchedulerScript.ThreadClasses(
                    )
                    self.thread_classes.parent = self
                    self._children_name_map[
                        "thread_classes"] = "thread-classes"
                return self.thread_classes

            return None

        def has_leaf_or_child_of_name(self, name):
            if (name == "thread-classes"):
                return True
            return False

        def set_value(self, value_path, value, name_space, name_space_prefix):
            pass

    class Environments(Entity):
        """
        Set an event manager global variable for event
        manager policies
        
        .. attribute:: environment
        
        	Name of the global variable
        	**type**\: list of    :py:class:`Environment <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManager.Environments.Environment>`
        
        

        """

        _prefix = 'ha-eem-cfg'
        _revision = '2015-07-30'

        def __init__(self):
            super(EventManager.Environments, self).__init__()

            self.yang_name = "environments"
            self.yang_parent_name = "event-manager"

            self.environment = YList(self)

        def __setattr__(self, name, value):
            self._check_monkey_patching_error(name, value)
            with _handle_type_error():
                if name in self.__dict__ and isinstance(
                        self.__dict__[name], YList):
                    raise YPYModelError(
                        "Attempt to assign value of '{}' to YList ldata. "
                        "Please use list append or extend method.".format(
                            value))
                if isinstance(value, Enum.YLeaf):
                    value = value.name
                if name in () and name in self.__dict__:
                    if isinstance(value, YLeaf):
                        self.__dict__[name].set(value.get())
                    elif isinstance(value, YLeafList):
                        super(EventManager.Environments,
                              self).__setattr__(name, value)
                    else:
                        self.__dict__[name].set(value)
                else:
                    if hasattr(value, "parent") and name != "parent":
                        if hasattr(value, "is_presence_container"
                                   ) and value.is_presence_container:
                            value.parent = self
                        elif value.parent is None and value.yang_name in self._children_yang_names:
                            value.parent = self
                    super(EventManager.Environments,
                          self).__setattr__(name, value)

        class Environment(Entity):
            """
            Name of the global variable
            
            .. attribute:: environment_name  <key>
            
            	Name of the global variable
            	**type**\:  str
            
            	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
            
            .. attribute:: environment_value
            
            	Value of the global variable
            	**type**\:  str
            
            	**mandatory**\: True
            
            

            """

            _prefix = 'ha-eem-cfg'
            _revision = '2015-07-30'

            def __init__(self):
                super(EventManager.Environments.Environment, self).__init__()

                self.yang_name = "environment"
                self.yang_parent_name = "environments"

                self.environment_name = YLeaf(YType.str, "environment-name")

                self.environment_value = YLeaf(YType.str, "environment-value")

            def __setattr__(self, name, value):
                self._check_monkey_patching_error(name, value)
                with _handle_type_error():
                    if name in self.__dict__ and isinstance(
                            self.__dict__[name], YList):
                        raise YPYModelError(
                            "Attempt to assign value of '{}' to YList ldata. "
                            "Please use list append or extend method.".format(
                                value))
                    if isinstance(value, Enum.YLeaf):
                        value = value.name
                    if name in ("environment_name",
                                "environment_value") and name in self.__dict__:
                        if isinstance(value, YLeaf):
                            self.__dict__[name].set(value.get())
                        elif isinstance(value, YLeafList):
                            super(EventManager.Environments.Environment,
                                  self).__setattr__(name, value)
                        else:
                            self.__dict__[name].set(value)
                    else:
                        if hasattr(value, "parent") and name != "parent":
                            if hasattr(value, "is_presence_container"
                                       ) and value.is_presence_container:
                                value.parent = self
                            elif value.parent is None and value.yang_name in self._children_yang_names:
                                value.parent = self
                        super(EventManager.Environments.Environment,
                              self).__setattr__(name, value)

            def has_data(self):
                return (self.environment_name.is_set
                        or self.environment_value.is_set)

            def has_operation(self):
                return (self.yfilter != YFilter.not_set
                        or self.environment_name.yfilter != YFilter.not_set
                        or self.environment_value.yfilter != YFilter.not_set)

            def get_segment_path(self):
                path_buffer = ""
                path_buffer = "environment" + "[environment-name='" + self.environment_name.get(
                ) + "']" + path_buffer

                return path_buffer

            def get_entity_path(self, ancestor):
                path_buffer = ""
                if (ancestor is None):
                    path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/environments/%s" % self.get_segment_path(
                    )
                else:
                    path_buffer = _get_relative_entity_path(
                        self, ancestor, path_buffer)

                leaf_name_data = LeafDataList()
                if (self.environment_name.is_set
                        or self.environment_name.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.environment_name.get_name_leafdata())
                if (self.environment_value.is_set
                        or self.environment_value.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.environment_value.get_name_leafdata())

                entity_path = EntityPath(path_buffer, leaf_name_data)
                return entity_path

            def get_child_by_name(self, child_yang_name, segment_path):
                child = self._get_child_by_seg_name(
                    [child_yang_name, segment_path])
                if child is not None:
                    return child

                return None

            def has_leaf_or_child_of_name(self, name):
                if (name == "environment-name" or name == "environment-value"):
                    return True
                return False

            def set_value(self, value_path, value, name_space,
                          name_space_prefix):
                if (value_path == "environment-name"):
                    self.environment_name = value
                    self.environment_name.value_namespace = name_space
                    self.environment_name.value_namespace_prefix = name_space_prefix
                if (value_path == "environment-value"):
                    self.environment_value = value
                    self.environment_value.value_namespace = name_space
                    self.environment_value.value_namespace_prefix = name_space_prefix

        def has_data(self):
            for c in self.environment:
                if (c.has_data()):
                    return True
            return False

        def has_operation(self):
            for c in self.environment:
                if (c.has_operation()):
                    return True
            return self.yfilter != YFilter.not_set

        def get_segment_path(self):
            path_buffer = ""
            path_buffer = "environments" + path_buffer

            return path_buffer

        def get_entity_path(self, ancestor):
            path_buffer = ""
            if (ancestor is None):
                path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/%s" % self.get_segment_path(
                )
            else:
                path_buffer = _get_relative_entity_path(
                    self, ancestor, path_buffer)

            leaf_name_data = LeafDataList()

            entity_path = EntityPath(path_buffer, leaf_name_data)
            return entity_path

        def get_child_by_name(self, child_yang_name, segment_path):
            child = self._get_child_by_seg_name(
                [child_yang_name, segment_path])
            if child is not None:
                return child

            if (child_yang_name == "environment"):
                for c in self.environment:
                    segment = c.get_segment_path()
                    if (segment_path == segment):
                        return c
                c = EventManager.Environments.Environment()
                c.parent = self
                local_reference_key = "ydk::seg::%s" % segment_path
                self._local_refs[local_reference_key] = c
                self.environment.append(c)
                return c

            return None

        def has_leaf_or_child_of_name(self, name):
            if (name == "environment"):
                return True
            return False

        def set_value(self, value_path, value, name_space, name_space_prefix):
            pass

    def has_data(self):
        return (self.directory_user_library.is_set
                or self.directory_user_policy.is_set
                or self.refresh_time.is_set or self.schedule_suspend.is_set
                or (self.environments is not None
                    and self.environments.has_data())
                or (self.policies is not None and self.policies.has_data())
                or (self.scheduler_script is not None
                    and self.scheduler_script.has_data()))

    def has_operation(self):
        return (self.yfilter != YFilter.not_set
                or self.directory_user_library.yfilter != YFilter.not_set
                or self.directory_user_policy.yfilter != YFilter.not_set
                or self.refresh_time.yfilter != YFilter.not_set
                or self.schedule_suspend.yfilter != YFilter.not_set
                or (self.environments is not None
                    and self.environments.has_operation()) or
                (self.policies is not None and self.policies.has_operation())
                or (self.scheduler_script is not None
                    and self.scheduler_script.has_operation()))

    def get_segment_path(self):
        path_buffer = ""
        path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager" + path_buffer

        return path_buffer

    def get_entity_path(self, ancestor):
        path_buffer = ""
        if (not ancestor is None):
            raise YPYModelError("ancestor has to be None for top-level node")

        path_buffer = self.get_segment_path()
        leaf_name_data = LeafDataList()
        if (self.directory_user_library.is_set
                or self.directory_user_library.yfilter != YFilter.not_set):
            leaf_name_data.append(
                self.directory_user_library.get_name_leafdata())
        if (self.directory_user_policy.is_set
                or self.directory_user_policy.yfilter != YFilter.not_set):
            leaf_name_data.append(
                self.directory_user_policy.get_name_leafdata())
        if (self.refresh_time.is_set
                or self.refresh_time.yfilter != YFilter.not_set):
            leaf_name_data.append(self.refresh_time.get_name_leafdata())
        if (self.schedule_suspend.is_set
                or self.schedule_suspend.yfilter != YFilter.not_set):
            leaf_name_data.append(self.schedule_suspend.get_name_leafdata())

        entity_path = EntityPath(path_buffer, leaf_name_data)
        return entity_path

    def get_child_by_name(self, child_yang_name, segment_path):
        child = self._get_child_by_seg_name([child_yang_name, segment_path])
        if child is not None:
            return child

        if (child_yang_name == "environments"):
            if (self.environments is None):
                self.environments = EventManager.Environments()
                self.environments.parent = self
                self._children_name_map["environments"] = "environments"
            return self.environments

        if (child_yang_name == "policies"):
            if (self.policies is None):
                self.policies = EventManager.Policies()
                self.policies.parent = self
                self._children_name_map["policies"] = "policies"
            return self.policies

        if (child_yang_name == "scheduler-script"):
            if (self.scheduler_script is None):
                self.scheduler_script = EventManager.SchedulerScript()
                self.scheduler_script.parent = self
                self._children_name_map[
                    "scheduler_script"] = "scheduler-script"
            return self.scheduler_script

        return None

    def has_leaf_or_child_of_name(self, name):
        if (name == "environments" or name == "policies"
                or name == "scheduler-script"
                or name == "directory-user-library"
                or name == "directory-user-policy" or name == "refresh-time"
                or name == "schedule-suspend"):
            return True
        return False

    def set_value(self, value_path, value, name_space, name_space_prefix):
        if (value_path == "directory-user-library"):
            self.directory_user_library = value
            self.directory_user_library.value_namespace = name_space
            self.directory_user_library.value_namespace_prefix = name_space_prefix
        if (value_path == "directory-user-policy"):
            self.directory_user_policy = value
            self.directory_user_policy.value_namespace = name_space
            self.directory_user_policy.value_namespace_prefix = name_space_prefix
        if (value_path == "refresh-time"):
            self.refresh_time = value
            self.refresh_time.value_namespace = name_space
            self.refresh_time.value_namespace_prefix = name_space_prefix
        if (value_path == "schedule-suspend"):
            self.schedule_suspend = value
            self.schedule_suspend.value_namespace = name_space
            self.schedule_suspend.value_namespace_prefix = name_space_prefix

    def clone_ptr(self):
        self._top_entity = EventManager()
        return self._top_entity
Ejemplo n.º 9
0
        class Policy(Entity):
            """
            Name of the policy file
            
            .. attribute:: policy_name  <key>
            
            	Name of the policy file
            	**type**\:  str
            
            	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
            
            .. attribute:: check_sum_value
            
            	CheckSum Value
            	**type**\:  str
            
            .. attribute:: checksum_type
            
            	Specify Embedded Event Manager policy checksum
            	**type**\:   :py:class:`EventManagerChecksum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerChecksum>`
            
            .. attribute:: persist_time
            
            	Time of validity (in seconds) for cached AAA taskmap of username (default is 3600)
            	**type**\:  int
            
            	**range:** 0..4294967295
            
            	**mandatory**\: True
            
            	**units**\: second
            
            .. attribute:: policy_security_level
            
            	Event Manager policy security Level
            	**type**\:   :py:class:`EventManagerPolicySec <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerPolicySec>`
            
            .. attribute:: policy_security_mode
            
            	Specify Embedded Event Manager policy security mode
            	**type**\:   :py:class:`EventManagerPolicyMode <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerPolicyMode>`
            
            .. attribute:: policy_type
            
            	Event manager type of this policy
            	**type**\:   :py:class:`EventManagerPolicy <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg.EventManagerPolicy>`
            
            .. attribute:: username
            
            	A configured username
            	**type**\:  str
            
            	**mandatory**\: True
            
            

            """

            _prefix = 'ha-eem-cfg'
            _revision = '2015-07-30'

            def __init__(self):
                super(EventManager.Policies.Policy, self).__init__()

                self.yang_name = "policy"
                self.yang_parent_name = "policies"

                self.policy_name = YLeaf(YType.str, "policy-name")

                self.check_sum_value = YLeaf(YType.str, "check-sum-value")

                self.checksum_type = YLeaf(YType.enumeration, "checksum-type")

                self.persist_time = YLeaf(YType.uint32, "persist-time")

                self.policy_security_level = YLeaf(YType.enumeration,
                                                   "policy-security-level")

                self.policy_security_mode = YLeaf(YType.enumeration,
                                                  "policy-security-mode")

                self.policy_type = YLeaf(YType.enumeration, "policy-type")

                self.username = YLeaf(YType.str, "username")

            def __setattr__(self, name, value):
                self._check_monkey_patching_error(name, value)
                with _handle_type_error():
                    if name in self.__dict__ and isinstance(
                            self.__dict__[name], YList):
                        raise YPYModelError(
                            "Attempt to assign value of '{}' to YList ldata. "
                            "Please use list append or extend method.".format(
                                value))
                    if isinstance(value, Enum.YLeaf):
                        value = value.name
                    if name in ("policy_name", "check_sum_value",
                                "checksum_type", "persist_time",
                                "policy_security_level",
                                "policy_security_mode", "policy_type",
                                "username") and name in self.__dict__:
                        if isinstance(value, YLeaf):
                            self.__dict__[name].set(value.get())
                        elif isinstance(value, YLeafList):
                            super(EventManager.Policies.Policy,
                                  self).__setattr__(name, value)
                        else:
                            self.__dict__[name].set(value)
                    else:
                        if hasattr(value, "parent") and name != "parent":
                            if hasattr(value, "is_presence_container"
                                       ) and value.is_presence_container:
                                value.parent = self
                            elif value.parent is None and value.yang_name in self._children_yang_names:
                                value.parent = self
                        super(EventManager.Policies.Policy,
                              self).__setattr__(name, value)

            def has_data(self):
                return (self.policy_name.is_set or self.check_sum_value.is_set
                        or self.checksum_type.is_set
                        or self.persist_time.is_set
                        or self.policy_security_level.is_set
                        or self.policy_security_mode.is_set
                        or self.policy_type.is_set or self.username.is_set)

            def has_operation(self):
                return (self.yfilter != YFilter.not_set
                        or self.policy_name.yfilter != YFilter.not_set
                        or self.check_sum_value.yfilter != YFilter.not_set
                        or self.checksum_type.yfilter != YFilter.not_set
                        or self.persist_time.yfilter != YFilter.not_set or
                        self.policy_security_level.yfilter != YFilter.not_set
                        or self.policy_security_mode.yfilter != YFilter.not_set
                        or self.policy_type.yfilter != YFilter.not_set
                        or self.username.yfilter != YFilter.not_set)

            def get_segment_path(self):
                path_buffer = ""
                path_buffer = "policy" + "[policy-name='" + self.policy_name.get(
                ) + "']" + path_buffer

                return path_buffer

            def get_entity_path(self, ancestor):
                path_buffer = ""
                if (ancestor is None):
                    path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/policies/%s" % self.get_segment_path(
                    )
                else:
                    path_buffer = _get_relative_entity_path(
                        self, ancestor, path_buffer)

                leaf_name_data = LeafDataList()
                if (self.policy_name.is_set
                        or self.policy_name.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.policy_name.get_name_leafdata())
                if (self.check_sum_value.is_set
                        or self.check_sum_value.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.check_sum_value.get_name_leafdata())
                if (self.checksum_type.is_set
                        or self.checksum_type.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.checksum_type.get_name_leafdata())
                if (self.persist_time.is_set
                        or self.persist_time.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.persist_time.get_name_leafdata())
                if (self.policy_security_level.is_set or
                        self.policy_security_level.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.policy_security_level.get_name_leafdata())
                if (self.policy_security_mode.is_set or
                        self.policy_security_mode.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.policy_security_mode.get_name_leafdata())
                if (self.policy_type.is_set
                        or self.policy_type.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.policy_type.get_name_leafdata())
                if (self.username.is_set
                        or self.username.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.username.get_name_leafdata())

                entity_path = EntityPath(path_buffer, leaf_name_data)
                return entity_path

            def get_child_by_name(self, child_yang_name, segment_path):
                child = self._get_child_by_seg_name(
                    [child_yang_name, segment_path])
                if child is not None:
                    return child

                return None

            def has_leaf_or_child_of_name(self, name):
                if (name == "policy-name" or name == "check-sum-value"
                        or name == "checksum-type" or name == "persist-time"
                        or name == "policy-security-level"
                        or name == "policy-security-mode"
                        or name == "policy-type" or name == "username"):
                    return True
                return False

            def set_value(self, value_path, value, name_space,
                          name_space_prefix):
                if (value_path == "policy-name"):
                    self.policy_name = value
                    self.policy_name.value_namespace = name_space
                    self.policy_name.value_namespace_prefix = name_space_prefix
                if (value_path == "check-sum-value"):
                    self.check_sum_value = value
                    self.check_sum_value.value_namespace = name_space
                    self.check_sum_value.value_namespace_prefix = name_space_prefix
                if (value_path == "checksum-type"):
                    self.checksum_type = value
                    self.checksum_type.value_namespace = name_space
                    self.checksum_type.value_namespace_prefix = name_space_prefix
                if (value_path == "persist-time"):
                    self.persist_time = value
                    self.persist_time.value_namespace = name_space
                    self.persist_time.value_namespace_prefix = name_space_prefix
                if (value_path == "policy-security-level"):
                    self.policy_security_level = value
                    self.policy_security_level.value_namespace = name_space
                    self.policy_security_level.value_namespace_prefix = name_space_prefix
                if (value_path == "policy-security-mode"):
                    self.policy_security_mode = value
                    self.policy_security_mode.value_namespace = name_space
                    self.policy_security_mode.value_namespace_prefix = name_space_prefix
                if (value_path == "policy-type"):
                    self.policy_type = value
                    self.policy_type.value_namespace = name_space
                    self.policy_type.value_namespace_prefix = name_space_prefix
                if (value_path == "username"):
                    self.username = value
                    self.username.value_namespace = name_space
                    self.username.value_namespace_prefix = name_space_prefix
                        def __init__(self):
                            super(
                                Macsec.Secy.Interfaces.Interface.Stats.
                                IntfStats, self).__init__()

                            self.yang_name = "intf-stats"
                            self.yang_parent_name = "stats"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self.ylist_key_names = []
                            self._child_classes = OrderedDict([])
                            self._leafs = OrderedDict([
                                ('in_pkts_untagged',
                                 YLeaf(YType.uint64, 'in-pkts-untagged')),
                                ('in_pkts_no_tag',
                                 YLeaf(YType.uint64, 'in-pkts-no-tag')),
                                ('in_pkts_bad_tag',
                                 YLeaf(YType.uint64, 'in-pkts-bad-tag')),
                                ('in_pkts_unknown_sci',
                                 YLeaf(YType.uint64, 'in-pkts-unknown-sci')),
                                ('in_pkts_no_sci',
                                 YLeaf(YType.uint64, 'in-pkts-no-sci')),
                                ('in_pkts_overrun',
                                 YLeaf(YType.uint64, 'in-pkts-overrun')),
                                ('in_octets_validated',
                                 YLeaf(YType.uint64, 'in-octets-validated')),
                                ('in_octets_decrypted',
                                 YLeaf(YType.uint64, 'in-octets-decrypted')),
                                ('out_pkts_untagged',
                                 YLeaf(YType.uint64, 'out-pkts-untagged')),
                                ('out_pkts_too_long',
                                 YLeaf(YType.uint64, 'out-pkts-too-long')),
                                ('out_octets_protected',
                                 YLeaf(YType.uint64, 'out-octets-protected')),
                                ('out_octets_encrypted',
                                 YLeaf(YType.uint64, 'out-octets-encrypted')),
                            ])
                            self.in_pkts_untagged = None
                            self.in_pkts_no_tag = None
                            self.in_pkts_bad_tag = None
                            self.in_pkts_unknown_sci = None
                            self.in_pkts_no_sci = None
                            self.in_pkts_overrun = None
                            self.in_octets_validated = None
                            self.in_octets_decrypted = None
                            self.out_pkts_untagged = None
                            self.out_pkts_too_long = None
                            self.out_octets_protected = None
                            self.out_octets_encrypted = None
                            self._segment_path = lambda: "intf-stats"
                        def __init__(self):
                            super(
                                Macsec.Secy.Interfaces.Interface.Stats.
                                RxScStats, self).__init__()

                            self.yang_name = "rx-sc-stats"
                            self.yang_parent_name = "stats"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self.ylist_key_names = []
                            self._child_classes = OrderedDict([
                                ("rxsa-stat",
                                 ("rxsa_stat", Macsec.Secy.Interfaces.
                                  Interface.Stats.RxScStats.RxsaStat))
                            ])
                            self._leafs = OrderedDict([
                                ('rx_sci', YLeaf(YType.uint64, 'rx-sci')),
                                ('in_pkts_unchecked',
                                 YLeaf(YType.uint64, 'in-pkts-unchecked')),
                                ('in_pkts_delayed',
                                 YLeaf(YType.uint64, 'in-pkts-delayed')),
                                ('in_pkts_late',
                                 YLeaf(YType.uint64, 'in-pkts-late')),
                                ('in_pkts_ok', YLeaf(YType.uint64,
                                                     'in-pkts-ok')),
                                ('in_pkts_invalid',
                                 YLeaf(YType.uint64, 'in-pkts-invalid')),
                                ('in_pkts_not_valid',
                                 YLeaf(YType.uint64, 'in-pkts-not-valid')),
                                ('in_pkts_not_using_sa',
                                 YLeaf(YType.uint64, 'in-pkts-not-using-sa')),
                                ('in_pkts_unused_sa',
                                 YLeaf(YType.uint64, 'in-pkts-unused-sa')),
                                ('in_pkts_untagged_hit',
                                 YLeaf(YType.uint64, 'in-pkts-untagged-hit')),
                                ('in_octets_validated',
                                 YLeaf(YType.uint64, 'in-octets-validated')),
                                ('in_octets_decrypted',
                                 YLeaf(YType.uint64, 'in-octets-decrypted')),
                            ])
                            self.rx_sci = None
                            self.in_pkts_unchecked = None
                            self.in_pkts_delayed = None
                            self.in_pkts_late = None
                            self.in_pkts_ok = None
                            self.in_pkts_invalid = None
                            self.in_pkts_not_valid = None
                            self.in_pkts_not_using_sa = None
                            self.in_pkts_unused_sa = None
                            self.in_pkts_untagged_hit = None
                            self.in_octets_validated = None
                            self.in_octets_decrypted = None

                            self.rxsa_stat = YList(self)
                            self._segment_path = lambda: "rx-sc-stats"
Ejemplo n.º 12
0
            def __init__(self):
                super(MdtOperData.MdtSubscriptions.Base, self).__init__()

                self.yang_name = "base"
                self.yang_parent_name = "mdt-subscriptions"
                self.is_top_level_class = False
                self.has_list_ancestor = True
                self.ylist_key_names = []
                self._child_container_classes = OrderedDict([])
                self._child_list_classes = OrderedDict([])
                self._leafs = OrderedDict([
                    ('stream', YLeaf(YType.str, 'stream')),
                    ('encoding', YLeaf(YType.str, 'encoding')),
                    ('source_vrf', YLeaf(YType.str, 'source-vrf')),
                    ('source_address', YLeaf(YType.str, 'source-address')),
                    ('no_trigger', YLeaf(YType.uint32, 'no-trigger')),
                    ('period', YLeaf(YType.uint32, 'period')),
                    ('no_synch_on_start',
                     YLeaf(YType.boolean, 'no-synch-on-start')),
                    ('no_filter', YLeaf(YType.uint32, 'no-filter')),
                    ('xpath', YLeaf(YType.str, 'xpath')),
                    ('tdl_uri', YLeaf(YType.str, 'tdl-uri')),
                    ('transform_name', YLeaf(YType.str, 'transform-name')),
                ])
                self.stream = None
                self.encoding = None
                self.source_vrf = None
                self.source_address = None
                self.no_trigger = None
                self.period = None
                self.no_synch_on_start = None
                self.no_filter = None
                self.xpath = None
                self.tdl_uri = None
                self.transform_name = None
                self._segment_path = lambda: "base"
Ejemplo n.º 13
0
                def __init__(self):
                    super(MemorySummary.Nodes.Node.Detail, self).__init__()

                    self.yang_name = "detail"
                    self.yang_parent_name = "node"
                    self.is_top_level_class = False
                    self.has_list_ancestor = True
                    self.ylist_key_names = []
                    self._child_classes = OrderedDict([("shared-window", ("shared_window", MemorySummary.Nodes.Node.Detail.SharedWindow))])
                    self._leafs = OrderedDict([
                        ('page_size', (YLeaf(YType.uint32, 'page-size'), ['int'])),
                        ('ram_memory', (YLeaf(YType.uint64, 'ram-memory'), ['int'])),
                        ('free_physical_memory', (YLeaf(YType.uint64, 'free-physical-memory'), ['int'])),
                        ('private_physical_memory', (YLeaf(YType.uint64, 'private-physical-memory'), ['int'])),
                        ('system_ram_memory', (YLeaf(YType.uint64, 'system-ram-memory'), ['int'])),
                        ('free_application_memory', (YLeaf(YType.uint64, 'free-application-memory'), ['int'])),
                        ('image_memory', (YLeaf(YType.uint64, 'image-memory'), ['int'])),
                        ('boot_ram_size', (YLeaf(YType.uint64, 'boot-ram-size'), ['int'])),
                        ('reserved_memory', (YLeaf(YType.uint64, 'reserved-memory'), ['int'])),
                        ('io_memory', (YLeaf(YType.uint64, 'io-memory'), ['int'])),
                        ('flash_system', (YLeaf(YType.uint64, 'flash-system'), ['int'])),
                        ('total_shared_window', (YLeaf(YType.uint64, 'total-shared-window'), ['int'])),
                        ('allocated_memory', (YLeaf(YType.uint64, 'allocated-memory'), ['int'])),
                        ('program_text', (YLeaf(YType.uint64, 'program-text'), ['int'])),
                        ('program_data', (YLeaf(YType.uint64, 'program-data'), ['int'])),
                        ('program_stack', (YLeaf(YType.uint64, 'program-stack'), ['int'])),
                        ('total_used', (YLeaf(YType.uint64, 'total-used'), ['int'])),
                    ])
                    self.page_size = None
                    self.ram_memory = None
                    self.free_physical_memory = None
                    self.private_physical_memory = None
                    self.system_ram_memory = None
                    self.free_application_memory = None
                    self.image_memory = None
                    self.boot_ram_size = None
                    self.reserved_memory = None
                    self.io_memory = None
                    self.flash_system = None
                    self.total_shared_window = None
                    self.allocated_memory = None
                    self.program_text = None
                    self.program_data = None
                    self.program_stack = None
                    self.total_used = None

                    self.shared_window = YList(self)
                    self._segment_path = lambda: "detail"
                    self._is_frozen = True
Ejemplo n.º 14
0
        class Node(Entity):
            """
            Node ID
            
            .. attribute:: node_name  <key>
            
            	Node name
            	**type**\: str
            
            	**pattern:** ([a\-zA\-Z0\-9\_]\*\\d+/){1,2}([a\-zA\-Z0\-9\_]\*\\d+)
            
            .. attribute:: process_ids
            
            	List of jobs
            	**type**\:  :py:class:`ProcessIds <ydk.models.cisco_ios_xr.Cisco_IOS_XR_procmem_oper.ProcessesMemory.Nodes.Node.ProcessIds>`
            
            

            """

            _prefix = 'procmem-oper'
            _revision = '2017-05-01'

            def __init__(self):
                super(ProcessesMemory.Nodes.Node, self).__init__()

                self.yang_name = "node"
                self.yang_parent_name = "nodes"
                self.is_top_level_class = False
                self.has_list_ancestor = False
                self._child_container_classes = {
                    "process-ids":
                    ("process_ids", ProcessesMemory.Nodes.Node.ProcessIds)
                }
                self._child_list_classes = {}

                self.node_name = YLeaf(YType.str, "node-name")

                self.process_ids = ProcessesMemory.Nodes.Node.ProcessIds()
                self.process_ids.parent = self
                self._children_name_map["process_ids"] = "process-ids"
                self._children_yang_names.add("process-ids")
                self._segment_path = lambda: "node" + "[node-name='" + self.node_name.get(
                ) + "']"
                self._absolute_path = lambda: "Cisco-IOS-XR-procmem-oper:processes-memory/nodes/%s" % self._segment_path(
                )

            def __setattr__(self, name, value):
                self._perform_setattr(ProcessesMemory.Nodes.Node,
                                      ['node_name'], name, value)

            class ProcessIds(Entity):
                """
                List of jobs
                
                .. attribute:: process_id
                
                	Process Id
                	**type**\: list of  		 :py:class:`ProcessId <ydk.models.cisco_ios_xr.Cisco_IOS_XR_procmem_oper.ProcessesMemory.Nodes.Node.ProcessIds.ProcessId>`
                
                

                """

                _prefix = 'procmem-oper'
                _revision = '2017-05-01'

                def __init__(self):
                    super(ProcessesMemory.Nodes.Node.ProcessIds,
                          self).__init__()

                    self.yang_name = "process-ids"
                    self.yang_parent_name = "node"
                    self.is_top_level_class = False
                    self.has_list_ancestor = True
                    self._child_container_classes = {}
                    self._child_list_classes = {
                        "process-id":
                        ("process_id",
                         ProcessesMemory.Nodes.Node.ProcessIds.ProcessId)
                    }

                    self.process_id = YList(self)
                    self._segment_path = lambda: "process-ids"

                def __setattr__(self, name, value):
                    self._perform_setattr(
                        ProcessesMemory.Nodes.Node.ProcessIds, [], name, value)

                class ProcessId(Entity):
                    """
                    Process Id
                    
                    .. attribute:: process_id  <key>
                    
                    	Process Id
                    	**type**\: int
                    
                    	**range:** \-2147483648..2147483647
                    
                    .. attribute:: name
                    
                    	Process name
                    	**type**\: str
                    
                    .. attribute:: jid
                    
                    	Job ID
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: pid
                    
                    	Process ID
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: text_seg_size
                    
                    	Text Segment Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: data_seg_size
                    
                    	Data Segment Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: stack_seg_size
                    
                    	Stack Segment Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: malloc_size
                    
                    	Malloced Memory Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: dyn_limit
                    
                    	Dynamic memory limit
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: shared_mem
                    
                    	Shared memory size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: physical_mem
                    
                    	Physical memory size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    

                    """

                    _prefix = 'procmem-oper'
                    _revision = '2017-05-01'

                    def __init__(self):
                        super(ProcessesMemory.Nodes.Node.ProcessIds.ProcessId,
                              self).__init__()

                        self.yang_name = "process-id"
                        self.yang_parent_name = "process-ids"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {}

                        self.process_id = YLeaf(YType.int32, "process-id")

                        self.name = YLeaf(YType.str, "name")

                        self.jid = YLeaf(YType.uint32, "jid")

                        self.pid = YLeaf(YType.uint32, "pid")

                        self.text_seg_size = YLeaf(YType.uint32,
                                                   "text-seg-size")

                        self.data_seg_size = YLeaf(YType.uint32,
                                                   "data-seg-size")

                        self.stack_seg_size = YLeaf(YType.uint32,
                                                    "stack-seg-size")

                        self.malloc_size = YLeaf(YType.uint32, "malloc-size")

                        self.dyn_limit = YLeaf(YType.uint32, "dyn-limit")

                        self.shared_mem = YLeaf(YType.uint32, "shared-mem")

                        self.physical_mem = YLeaf(YType.uint32, "physical-mem")
                        self._segment_path = lambda: "process-id" + "[process-id='" + self.process_id.get(
                        ) + "']"

                    def __setattr__(self, name, value):
                        self._perform_setattr(
                            ProcessesMemory.Nodes.Node.ProcessIds.ProcessId, [
                                'process_id', 'name', 'jid', 'pid',
                                'text_seg_size', 'data_seg_size',
                                'stack_seg_size', 'malloc_size', 'dyn_limit',
                                'shared_mem', 'physical_mem'
                            ], name, value)
Ejemplo n.º 15
0
        class Cipurpfentry(Entity):
            """
            If the managed device supports URPF dropping,
            a row exists for each IP version type (v4 and v6).
            A row contains summary information on URPF
            dropping over the entire managed device.
            
            .. attribute:: cipurpfipversion  <key>
            
            	Specifies the version of IP forwarding on an interface to which the table row URPF counts, rates, and configuration apply
            	**type**\:  :py:class:`Cipurpfipversion <ydk.models.cisco_ios_xe.CISCO_IP_URPF_MIB.CISCOIPURPFMIB.Cipurpftable.Cipurpfentry.Cipurpfipversion>`
            
            .. attribute:: cipurpfdrops
            
            	Sum of dropped IP version cipUrpfIpVersion packets failing a URPF check. This value is the sum of drops of packets  received on all interfaces of the managed device
            	**type**\: int
            
            	**range:** 0..4294967295
            
            	**units**\: packets
            
            .. attribute:: cipurpfdroprate
            
            	The rate of packet drops of IP version cipUrpfIpVersion packets due to URPF for the managed device. The per\-interface drop rate notification is issued on rates exceeding a limit (rising rate). This dropping may indicate an security attack on the network. To determine whether the attack/event is over, the NMS must consult the managed device. This object can be polled to determine the recent drop rate for the managed device as a whole, in addition to querying particular interface objects.  This object is the average rate of dropping over the most recent window of time. The rate is computed by dividing the number of packets dropped over a window by the window time in seconds. The window time is specified by cipUrpfDropRateWindow. Each time the drop rate is computed, and at system startup, a snapshot is taken of the latest value of cipUrpfDrops. Subtracting from this the snapshot of cipUrpfDrops at the start of the current window of time gives the number of packets dropped. The drop rate is computed every cipUrpfComputeInterval seconds. As an example, let cipUrpfDropRateWindow be 300 seconds, and cipUrpfComputeInterval 30 seconds. Every 30 seconds, the drop count five minutes previous is subtracted from the current drop count, and the result is divided by 300 to arrive at the drop rate.  At device start\-up, until the device has been up more than cipUrpfDropRateWindow, when drop rate is computed, the value of cipUrpfDrops is divided by the time the device has been up.  After the device has been up for cipUrpfDropRateWindow, when drop rate is computed, the number of packet drops counted from interval start time to the computation time is divided by cipUrpfDropRateWindow.  Changes to cipUrpfDropRateWindow are not reflected in this object until the next computation time.  The rate from the most recent computation is the value fetched until the subsequent computation is performed
            	**type**\: int
            
            	**range:** 0..4294967295
            
            	**units**\: packets per second
            
            

            """

            _prefix = 'CISCO-IP-URPF-MIB'
            _revision = '2011-12-29'

            def __init__(self):
                super(CISCOIPURPFMIB.Cipurpftable.Cipurpfentry,
                      self).__init__()

                self.yang_name = "cipUrpfEntry"
                self.yang_parent_name = "cipUrpfTable"
                self.is_top_level_class = False
                self.has_list_ancestor = False
                self._child_container_classes = {}
                self._child_list_classes = {}

                self.cipurpfipversion = YLeaf(YType.enumeration,
                                              "cipUrpfIpVersion")

                self.cipurpfdrops = YLeaf(YType.uint32, "cipUrpfDrops")

                self.cipurpfdroprate = YLeaf(YType.uint32, "cipUrpfDropRate")
                self._segment_path = lambda: "cipUrpfEntry" + "[cipUrpfIpVersion='" + self.cipurpfipversion.get(
                ) + "']"
                self._absolute_path = lambda: "CISCO-IP-URPF-MIB:CISCO-IP-URPF-MIB/cipUrpfTable/%s" % self._segment_path(
                )

            def __setattr__(self, name, value):
                self._perform_setattr(
                    CISCOIPURPFMIB.Cipurpftable.Cipurpfentry,
                    ['cipurpfipversion', 'cipurpfdrops', 'cipurpfdroprate'],
                    name, value)

            class Cipurpfipversion(Enum):
                """
                Cipurpfipversion

                Specifies the version of IP forwarding on an interface

                to which the table row URPF counts, rates, and

                configuration apply.

                .. data:: ipv4 = 1

                .. data:: ipv6 = 2

                """

                ipv4 = Enum.YLeaf(1, "ipv4")

                ipv6 = Enum.YLeaf(2, "ipv6")
Ejemplo n.º 16
0
            def __init__(self):
                super(EventManager.Policies.Policy, self).__init__()

                self.yang_name = "policy"
                self.yang_parent_name = "policies"

                self.policy_name = YLeaf(YType.str, "policy-name")

                self.check_sum_value = YLeaf(YType.str, "check-sum-value")

                self.checksum_type = YLeaf(YType.enumeration, "checksum-type")

                self.persist_time = YLeaf(YType.uint32, "persist-time")

                self.policy_security_level = YLeaf(YType.enumeration,
                                                   "policy-security-level")

                self.policy_security_mode = YLeaf(YType.enumeration,
                                                  "policy-security-mode")

                self.policy_type = YLeaf(YType.enumeration, "policy-type")

                self.username = YLeaf(YType.str, "username")
Ejemplo n.º 17
0
        class Cipurpfifmonentry(Entity):
            """
            If IPv4 packet forwarding is configured on an interface,
            and is configured to perform URPF checking, a row appears
            in this table with indices [ifIndex][ipv4]. If IPv4
            packet forwarding is deconfigured, or URPF checking
            is deconfigured, the row disappears.
            
            If IPv6 packet forwarding is configured on an interface,
            and is configured to perform URPF checking, a row appears
            in the table with indices [ifIndex][ipv6].  If IPv6
            packet forwarding is deconfigured, or URPF checking
            is deconfigured, the row disappears.
            
            .. attribute:: ifindex  <key>
            
            	
            	**type**\: int
            
            	**range:** 1..2147483647
            
            	**refers to**\:  :py:class:`ifindex <ydk.models.cisco_ios_xe.IF_MIB.IFMIB.Iftable.Ifentry>`
            
            .. attribute:: cipurpfifipversion  <key>
            
            	Specifies the version of IP forwarding on an interface to which the table row URPF counts, rates, and  configuration apply
            	**type**\:  :py:class:`Cipurpfifipversion <ydk.models.cisco_ios_xe.CISCO_IP_URPF_MIB.CISCOIPURPFMIB.Cipurpfifmontable.Cipurpfifmonentry.Cipurpfifipversion>`
            
            .. attribute:: cipurpfifdrops
            
            	The number of IP packets of version cipUrpfIfIpVersion failing the URPF check and dropped by the managed device on a particular interface.  Discontinuities in the value of this variable can occur  at re\-initialization of the management system, and at  other times as indicated by the values of  cipUrpfIfDiscontinuityTime
            	**type**\: int
            
            	**range:** 0..4294967295
            
            	**units**\: packets
            
            .. attribute:: cipurpfifsuppresseddrops
            
            	The number of IP packets of version cipUrpfIfIpVersion failing the URPF check but given a reprieve and not  dropped by the managed device. Depending on the  device configuration and capabilities, the following  cases may cause incrementing of the counter\:  \- if the managed device is configured to allow self\-pings    and the managed device pings itself. \- if the managed device is configured for loose URPF (if any   interface has a route to the source), and the strict   case fails while the loose case passes. \- DHCP Request packets (src 0.0.0.0 dst 255.255.255.255)    will pass after initially being marked for drop. \- RIP routing on unnumbered interfaces will pass after    initially being marked for drop. \- multicast packets will pass after initially being marked    for drop \- ACL's can be applied to permit packets after initially    being marked for drop.  Discontinuities in the value of this variable can occur  at re\-initialization of the management system, and at  other times as indicated by the values of  cipUrpfIfDiscontinuityTime
            	**type**\: int
            
            	**range:** 0..4294967295
            
            	**units**\: packets
            
            .. attribute:: cipurpfifdroprate
            
            	The rate of packet drops of IP version cipUrpfIfIpVersion packets due to URPF on the interface.   This object is the average rate of dropping over the most  recent interval of time. The rate is computed by dividing the number of packets dropped over an interval by the  interval time in seconds. Each time the drop rate is computed, and at system startup, a snapshot is taken of the latest value of cipUrpfIfDrops. Subtracting from this the snapshot of cipUrpfIfDrops at the start of the current interval of time gives the number of packets dropped. The drop rate is computed every cipUrpfComputeInterval seconds.  When drop rate is computed, if time since the creation of  a row in cipUrpfIfMonTable is less than  cipUrpfDropRateWindow, the value of cipUrpfIfDrops is  divided by the time since row was created.  After the row has been in existence for  cipUrpfDropRateWindow, when drop rate is computed, the  number of packet drops counted on the interface from  interval start time to the computation time is divided  by cipUrpfDropRateWindow.  Changes to cipUrpfDropRateWindow are not reflected in this object until the next computation time.  The rate from the  most recent computation is the value  fetched until the subsequent computation is performed
            	**type**\: int
            
            	**range:** 0..4294967295
            
            	**units**\: packets/second
            
            .. attribute:: cipurpfifdiscontinuitytime
            
            	The value of sysUpTime on the most recent occasion at which this interface's  counters suffered  a discontinuity. If no such discontinuities have occurred since the last re\-initialization of the local management subsystem, then this object contains a value of zero
            	**type**\: int
            
            	**range:** 0..4294967295
            
            .. attribute:: cipurpfifdropratenotifyenable
            
            	This object specifies whether the system produces the cipUrpfIfDropRateNotify notification as a result of URPF  dropping of version cipUrpfIfIpVersion IP packets on this  interface. A false value prevents such notifications from  being generated by this system
            	**type**\: bool
            
            .. attribute:: cipurpfifnotifydropratethreshold
            
            	When the calculated rate of URPF packet drops (cipUrpfIfDropRate) meets or exceeds the value  specified by this object, a cipUrpfIfDropRateNotify  notification is sent if cipUrpfIfDropRateNotifyEnable  is set to true, and no such notification for the IP version has been sent for this interface for the  hold\-down period.  Note that due to the calculation used for drop rate,  if there are less than n drop events in an n\-second period the notification will not be generated. To allow for the detection of a small number of drop events, the value 0 (zero) is used to indicate that if any drop events occur during the interval, a notification is generated
            	**type**\: int
            
            	**range:** 0..4294967295
            
            	**units**\: packets/second
            
            .. attribute:: cipurpfifnotifydrholddownreset
            
            	Setting this object to true causes the five\-minute hold\-down timer for emitting URPF drop rate  notifications for IP version cipUrpfIfIpVersion on  the interface to be short\-circuited.  If a notification  is due and would be emitted for the interface if the  five\-minutes elapsed, setting this object will cause  the notification to be sent.  This is a trigger, and doesn't hold information. It is set and an action is performed. Therefore a get for  this object always returns false
            	**type**\: bool
            
            .. attribute:: cipurpfifcheckstrict
            
            	Interface configuration indicating the strictness of the reachability check performed  on the interface. \- strict\: check that source addr is reachable via            the interface it came in on. \- loose \: check that source addr is reachable via            some interface on the device
            	**type**\:  :py:class:`Cipurpfifcheckstrict <ydk.models.cisco_ios_xe.CISCO_IP_URPF_MIB.CISCOIPURPFMIB.Cipurpfifmontable.Cipurpfifmonentry.Cipurpfifcheckstrict>`
            
            .. attribute:: cipurpfifwhichroutetableid
            
            	Interface configuration indicating the routing table consulted for the reachability check\: \- default\: the non\-private routing table for of the             managed system. \- vrf   \: a particular VPN routing table
            	**type**\:  :py:class:`Cipurpfifwhichroutetableid <ydk.models.cisco_ios_xe.CISCO_IP_URPF_MIB.CISCOIPURPFMIB.Cipurpfifmontable.Cipurpfifmonentry.Cipurpfifwhichroutetableid>`
            
            .. attribute:: cipurpfifvrfname
            
            	If the value of cipUrpfIfWhichRouteTableID is 'vrf', the name of the VRF Table. Otherwise a zero\-length string
            	**type**\: str
            
            	**length:** 0..32
            
            

            """

            _prefix = 'CISCO-IP-URPF-MIB'
            _revision = '2011-12-29'

            def __init__(self):
                super(CISCOIPURPFMIB.Cipurpfifmontable.Cipurpfifmonentry,
                      self).__init__()

                self.yang_name = "cipUrpfIfMonEntry"
                self.yang_parent_name = "cipUrpfIfMonTable"
                self.is_top_level_class = False
                self.has_list_ancestor = False
                self._child_container_classes = {}
                self._child_list_classes = {}

                self.ifindex = YLeaf(YType.str, "ifIndex")

                self.cipurpfifipversion = YLeaf(YType.enumeration,
                                                "cipUrpfIfIpVersion")

                self.cipurpfifdrops = YLeaf(YType.uint32, "cipUrpfIfDrops")

                self.cipurpfifsuppresseddrops = YLeaf(
                    YType.uint32, "cipUrpfIfSuppressedDrops")

                self.cipurpfifdroprate = YLeaf(YType.uint32,
                                               "cipUrpfIfDropRate")

                self.cipurpfifdiscontinuitytime = YLeaf(
                    YType.uint32, "cipUrpfIfDiscontinuityTime")

                self.cipurpfifdropratenotifyenable = YLeaf(
                    YType.boolean, "cipUrpfIfDropRateNotifyEnable")

                self.cipurpfifnotifydropratethreshold = YLeaf(
                    YType.uint32, "cipUrpfIfNotifyDropRateThreshold")

                self.cipurpfifnotifydrholddownreset = YLeaf(
                    YType.boolean, "cipUrpfIfNotifyDrHoldDownReset")

                self.cipurpfifcheckstrict = YLeaf(YType.enumeration,
                                                  "cipUrpfIfCheckStrict")

                self.cipurpfifwhichroutetableid = YLeaf(
                    YType.enumeration, "cipUrpfIfWhichRouteTableID")

                self.cipurpfifvrfname = YLeaf(YType.str, "cipUrpfIfVrfName")
                self._segment_path = lambda: "cipUrpfIfMonEntry" + "[ifIndex='" + self.ifindex.get(
                ) + "']" + "[cipUrpfIfIpVersion='" + self.cipurpfifipversion.get(
                ) + "']"
                self._absolute_path = lambda: "CISCO-IP-URPF-MIB:CISCO-IP-URPF-MIB/cipUrpfIfMonTable/%s" % self._segment_path(
                )

            def __setattr__(self, name, value):
                self._perform_setattr(
                    CISCOIPURPFMIB.Cipurpfifmontable.Cipurpfifmonentry, [
                        'ifindex', 'cipurpfifipversion', 'cipurpfifdrops',
                        'cipurpfifsuppresseddrops', 'cipurpfifdroprate',
                        'cipurpfifdiscontinuitytime',
                        'cipurpfifdropratenotifyenable',
                        'cipurpfifnotifydropratethreshold',
                        'cipurpfifnotifydrholddownreset',
                        'cipurpfifcheckstrict', 'cipurpfifwhichroutetableid',
                        'cipurpfifvrfname'
                    ], name, value)

            class Cipurpfifcheckstrict(Enum):
                """
                Cipurpfifcheckstrict

                Interface configuration indicating the strictness of

                the reachability check performed 

                on the interface.

                \- strict\: check that source addr is reachable via 

                          the interface it came in on.

                \- loose \: check that source addr is reachable via 

                          some interface on the device.

                .. data:: strict = 1

                .. data:: loose = 2

                """

                strict = Enum.YLeaf(1, "strict")

                loose = Enum.YLeaf(2, "loose")

            class Cipurpfifipversion(Enum):
                """
                Cipurpfifipversion

                Specifies the version of IP forwarding on an interface

                to which the table row URPF counts, rates, and 

                configuration apply.

                .. data:: ipv4 = 1

                .. data:: ipv6 = 2

                """

                ipv4 = Enum.YLeaf(1, "ipv4")

                ipv6 = Enum.YLeaf(2, "ipv6")

            class Cipurpfifwhichroutetableid(Enum):
                """
                Cipurpfifwhichroutetableid

                Interface configuration indicating the routing table

                consulted for the reachability check\:

                \- default\: the non\-private routing table for of the 

                           managed system.

                \- vrf   \: a particular VPN routing table.

                .. data:: default = 1

                .. data:: vrf = 2

                """

                default = Enum.YLeaf(1, "default")

                vrf = Enum.YLeaf(2, "vrf")
Ejemplo n.º 18
0
        class Environment(Entity):
            """
            Name of the global variable
            
            .. attribute:: environment_name  <key>
            
            	Name of the global variable
            	**type**\:  str
            
            	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
            
            .. attribute:: environment_value
            
            	Value of the global variable
            	**type**\:  str
            
            	**mandatory**\: True
            
            

            """

            _prefix = 'ha-eem-cfg'
            _revision = '2015-07-30'

            def __init__(self):
                super(EventManager.Environments.Environment, self).__init__()

                self.yang_name = "environment"
                self.yang_parent_name = "environments"

                self.environment_name = YLeaf(YType.str, "environment-name")

                self.environment_value = YLeaf(YType.str, "environment-value")

            def __setattr__(self, name, value):
                self._check_monkey_patching_error(name, value)
                with _handle_type_error():
                    if name in self.__dict__ and isinstance(
                            self.__dict__[name], YList):
                        raise YPYModelError(
                            "Attempt to assign value of '{}' to YList ldata. "
                            "Please use list append or extend method.".format(
                                value))
                    if isinstance(value, Enum.YLeaf):
                        value = value.name
                    if name in ("environment_name",
                                "environment_value") and name in self.__dict__:
                        if isinstance(value, YLeaf):
                            self.__dict__[name].set(value.get())
                        elif isinstance(value, YLeafList):
                            super(EventManager.Environments.Environment,
                                  self).__setattr__(name, value)
                        else:
                            self.__dict__[name].set(value)
                    else:
                        if hasattr(value, "parent") and name != "parent":
                            if hasattr(value, "is_presence_container"
                                       ) and value.is_presence_container:
                                value.parent = self
                            elif value.parent is None and value.yang_name in self._children_yang_names:
                                value.parent = self
                        super(EventManager.Environments.Environment,
                              self).__setattr__(name, value)

            def has_data(self):
                return (self.environment_name.is_set
                        or self.environment_value.is_set)

            def has_operation(self):
                return (self.yfilter != YFilter.not_set
                        or self.environment_name.yfilter != YFilter.not_set
                        or self.environment_value.yfilter != YFilter.not_set)

            def get_segment_path(self):
                path_buffer = ""
                path_buffer = "environment" + "[environment-name='" + self.environment_name.get(
                ) + "']" + path_buffer

                return path_buffer

            def get_entity_path(self, ancestor):
                path_buffer = ""
                if (ancestor is None):
                    path_buffer = "Cisco-IOS-XR-ha-eem-cfg:event-manager/environments/%s" % self.get_segment_path(
                    )
                else:
                    path_buffer = _get_relative_entity_path(
                        self, ancestor, path_buffer)

                leaf_name_data = LeafDataList()
                if (self.environment_name.is_set
                        or self.environment_name.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.environment_name.get_name_leafdata())
                if (self.environment_value.is_set
                        or self.environment_value.yfilter != YFilter.not_set):
                    leaf_name_data.append(
                        self.environment_value.get_name_leafdata())

                entity_path = EntityPath(path_buffer, leaf_name_data)
                return entity_path

            def get_child_by_name(self, child_yang_name, segment_path):
                child = self._get_child_by_seg_name(
                    [child_yang_name, segment_path])
                if child is not None:
                    return child

                return None

            def has_leaf_or_child_of_name(self, name):
                if (name == "environment-name" or name == "environment-value"):
                    return True
                return False

            def set_value(self, value_path, value, name_space,
                          name_space_prefix):
                if (value_path == "environment-name"):
                    self.environment_name = value
                    self.environment_name.value_namespace = name_space
                    self.environment_name.value_namespace_prefix = name_space_prefix
                if (value_path == "environment-value"):
                    self.environment_value = value
                    self.environment_value.value_namespace = name_space
                    self.environment_value.value_namespace_prefix = name_space_prefix
Ejemplo n.º 19
0
        class Cipurpfvrfifentry(Entity):
            """
            An entry exists for a VRF and interface if and only
            if the VRF associated with the interface is configured 
            to perform IP URPF checking using the routing 
            table for the VRF.
            
            .. attribute:: cipurpfvrfname  <key>
            
            	
            	**type**\: str
            
            	**length:** 0..32
            
            	**refers to**\:  :py:class:`cipurpfvrfname <ydk.models.cisco_ios_xe.CISCO_IP_URPF_MIB.CISCOIPURPFMIB.Cipurpfvrftable.Cipurpfvrfentry>`
            
            .. attribute:: ifindex  <key>
            
            	
            	**type**\: int
            
            	**range:** 1..2147483647
            
            	**refers to**\:  :py:class:`ifindex <ydk.models.cisco_ios_xe.IF_MIB.IFMIB.Iftable.Ifentry>`
            
            .. attribute:: cipurpfvrfifdrops
            
            	The number of packets failing the URPF check for a VRF on the interface and dropped by the managed device.  Discontinuities in the value of this variable can occur  at re\-initialization of the management system, and at  other times as indicated by the values of  cipUrpfVrfIfDiscontinuityTime
            	**type**\: int
            
            	**range:** 0..4294967295
            
            	**units**\: packets
            
            .. attribute:: cipurpfvrfifdiscontinuitytime
            
            	The value of sysUpTime on the most recent occasion at which the URPF counters for this VRF on this interface  suffered  a discontinuity.  If no such discontinuities  have occurred since the last re\-initialization of the local management subsystem, then this object contains a  value of zero
            	**type**\: int
            
            	**range:** 0..4294967295
            
            

            """

            _prefix = 'CISCO-IP-URPF-MIB'
            _revision = '2011-12-29'

            def __init__(self):
                super(CISCOIPURPFMIB.Cipurpfvrfiftable.Cipurpfvrfifentry,
                      self).__init__()

                self.yang_name = "cipUrpfVrfIfEntry"
                self.yang_parent_name = "cipUrpfVrfIfTable"
                self.is_top_level_class = False
                self.has_list_ancestor = False
                self._child_container_classes = {}
                self._child_list_classes = {}

                self.cipurpfvrfname = YLeaf(YType.str, "cipUrpfVrfName")

                self.ifindex = YLeaf(YType.str, "ifIndex")

                self.cipurpfvrfifdrops = YLeaf(YType.uint32,
                                               "cipUrpfVrfIfDrops")

                self.cipurpfvrfifdiscontinuitytime = YLeaf(
                    YType.uint32, "cipUrpfVrfIfDiscontinuityTime")
                self._segment_path = lambda: "cipUrpfVrfIfEntry" + "[cipUrpfVrfName='" + self.cipurpfvrfname.get(
                ) + "']" + "[ifIndex='" + self.ifindex.get() + "']"
                self._absolute_path = lambda: "CISCO-IP-URPF-MIB:CISCO-IP-URPF-MIB/cipUrpfVrfIfTable/%s" % self._segment_path(
                )

            def __setattr__(self, name, value):
                self._perform_setattr(
                    CISCOIPURPFMIB.Cipurpfvrfiftable.Cipurpfvrfifentry, [
                        'cipurpfvrfname', 'ifindex', 'cipurpfvrfifdrops',
                        'cipurpfvrfifdiscontinuitytime'
                    ], name, value)
                    def __init__(self):
                        super(NetFlow.Statistics.Statistic.Producer.Statistics, self).__init__()

                        self.yang_name = "statistics"
                        self.yang_parent_name = "producer"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {}

                        self.ipv4_ingress_flows = YLeaf(YType.uint64, "ipv4-ingress-flows")

                        self.ipv4_egress_flows = YLeaf(YType.uint64, "ipv4-egress-flows")

                        self.ipv6_ingress_flows = YLeaf(YType.uint64, "ipv6-ingress-flows")

                        self.ipv6_egress_flows = YLeaf(YType.uint64, "ipv6-egress-flows")

                        self.mpls_ingress_flows = YLeaf(YType.uint64, "mpls-ingress-flows")

                        self.mpls_egress_flows = YLeaf(YType.uint64, "mpls-egress-flows")

                        self.drops_no_space = YLeaf(YType.uint64, "drops-no-space")

                        self.drops_others = YLeaf(YType.uint64, "drops-others")

                        self.unknown_ingress_flows = YLeaf(YType.uint64, "unknown-ingress-flows")

                        self.unknown_egress_flows = YLeaf(YType.uint64, "unknown-egress-flows")

                        self.waiting_servers = YLeaf(YType.uint64, "waiting-servers")

                        self.last_cleared = YLeaf(YType.str, "last-cleared")
                        self._segment_path = lambda: "statistics"
    class Input(Entity):
        """
        
        
        .. attribute:: target
        
        	Name of the configuration datastore towards which the transaction is started
        	**type**\:   :py:class:`Target <ydk.models.cisco_ios_xe.tailf_netconf_transactions.StartTransaction.Input.Target>`
        
        .. attribute:: with_inactive
        
        	If the parameter is present in <start\-transaction>, it MUST also be present in any <edit\-config>, <copy\-config>, <get>, or <get\-config> operations within the transaction.  If it is not present in <start\-transaction>, it MUST NOT be present in any <edit\-config> operation within the transaction
        	**type**\:  :py:class:`Empty<ydk.types.Empty>`
        
        

        """

        _prefix = 'tr'

        def __init__(self):
            super(StartTransaction.Input, self).__init__()

            self.yang_name = "input"
            self.yang_parent_name = "start-transaction"

            self.with_inactive = YLeaf(YType.empty, "tailf-netconf-inactive:with-inactive")

            self.target = StartTransaction.Input.Target()
            self.target.parent = self
            self._children_name_map["target"] = "target"
            self._children_yang_names.add("target")

        def __setattr__(self, name, value):
            self._check_monkey_patching_error(name, value)
            with _handle_type_error():
                if name in self.__dict__ and isinstance(self.__dict__[name], YList):
                    raise YPYModelError("Attempt to assign value of '{}' to YList ldata. "
                                        "Please use list append or extend method."
                                        .format(value))
                if isinstance(value, Enum.YLeaf):
                    value = value.name
                if name in ("with_inactive") and name in self.__dict__:
                    if isinstance(value, YLeaf):
                        self.__dict__[name].set(value.get())
                    elif isinstance(value, YLeafList):
                        super(StartTransaction.Input, self).__setattr__(name, value)
                    else:
                        self.__dict__[name].set(value)
                else:
                    if hasattr(value, "parent") and name != "parent":
                        if hasattr(value, "is_presence_container") and value.is_presence_container:
                            value.parent = self
                        elif value.parent is None and value.yang_name in self._children_yang_names:
                            value.parent = self
                    super(StartTransaction.Input, self).__setattr__(name, value)


        class Target(Entity):
            """
            Name of the configuration datastore towards which the
            transaction is started.
            
            .. attribute:: candidate
            
            	
            	**type**\:  :py:class:`Empty<ydk.types.Empty>`
            
            .. attribute:: running
            
            	
            	**type**\:  :py:class:`Empty<ydk.types.Empty>`
            
            .. attribute:: startup
            
            	
            	**type**\:  :py:class:`Empty<ydk.types.Empty>`
            
            

            """

            _prefix = 'tr'

            def __init__(self):
                super(StartTransaction.Input.Target, self).__init__()

                self.yang_name = "target"
                self.yang_parent_name = "input"

                self.candidate = YLeaf(YType.empty, "candidate")

                self.running = YLeaf(YType.empty, "running")

                self.startup = YLeaf(YType.empty, "startup")

            def __setattr__(self, name, value):
                self._check_monkey_patching_error(name, value)
                with _handle_type_error():
                    if name in self.__dict__ and isinstance(self.__dict__[name], YList):
                        raise YPYModelError("Attempt to assign value of '{}' to YList ldata. "
                                            "Please use list append or extend method."
                                            .format(value))
                    if isinstance(value, Enum.YLeaf):
                        value = value.name
                    if name in ("candidate",
                                "running",
                                "startup") and name in self.__dict__:
                        if isinstance(value, YLeaf):
                            self.__dict__[name].set(value.get())
                        elif isinstance(value, YLeafList):
                            super(StartTransaction.Input.Target, self).__setattr__(name, value)
                        else:
                            self.__dict__[name].set(value)
                    else:
                        if hasattr(value, "parent") and name != "parent":
                            if hasattr(value, "is_presence_container") and value.is_presence_container:
                                value.parent = self
                            elif value.parent is None and value.yang_name in self._children_yang_names:
                                value.parent = self
                        super(StartTransaction.Input.Target, self).__setattr__(name, value)

            def has_data(self):
                return (
                    self.candidate.is_set or
                    self.running.is_set or
                    self.startup.is_set)

            def has_operation(self):
                return (
                    self.yfilter != YFilter.not_set or
                    self.candidate.yfilter != YFilter.not_set or
                    self.running.yfilter != YFilter.not_set or
                    self.startup.yfilter != YFilter.not_set)

            def get_segment_path(self):
                path_buffer = ""
                path_buffer = "target" + path_buffer

                return path_buffer

            def get_entity_path(self, ancestor):
                path_buffer = ""
                if (ancestor is None):
                    path_buffer = "tailf-netconf-transactions:start-transaction/input/%s" % self.get_segment_path()
                else:
                    path_buffer = _get_relative_entity_path(self, ancestor, path_buffer)

                leaf_name_data = LeafDataList()
                if (self.candidate.is_set or self.candidate.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.candidate.get_name_leafdata())
                if (self.running.is_set or self.running.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.running.get_name_leafdata())
                if (self.startup.is_set or self.startup.yfilter != YFilter.not_set):
                    leaf_name_data.append(self.startup.get_name_leafdata())

                entity_path = EntityPath(path_buffer, leaf_name_data)
                return entity_path

            def get_child_by_name(self, child_yang_name, segment_path):
                child = self._get_child_by_seg_name([child_yang_name, segment_path])
                if child is not None:
                    return child

                return None

            def has_leaf_or_child_of_name(self, name):
                if(name == "candidate" or name == "running" or name == "startup"):
                    return True
                return False

            def set_value(self, value_path, value, name_space, name_space_prefix):
                if(value_path == "candidate"):
                    self.candidate = value
                    self.candidate.value_namespace = name_space
                    self.candidate.value_namespace_prefix = name_space_prefix
                if(value_path == "running"):
                    self.running = value
                    self.running.value_namespace = name_space
                    self.running.value_namespace_prefix = name_space_prefix
                if(value_path == "startup"):
                    self.startup = value
                    self.startup.value_namespace = name_space
                    self.startup.value_namespace_prefix = name_space_prefix

        def has_data(self):
            return (
                self.with_inactive.is_set or
                (self.target is not None and self.target.has_data()))

        def has_operation(self):
            return (
                self.yfilter != YFilter.not_set or
                self.with_inactive.yfilter != YFilter.not_set or
                (self.target is not None and self.target.has_operation()))

        def get_segment_path(self):
            path_buffer = ""
            path_buffer = "input" + path_buffer

            return path_buffer

        def get_entity_path(self, ancestor):
            path_buffer = ""
            if (ancestor is None):
                path_buffer = "tailf-netconf-transactions:start-transaction/%s" % self.get_segment_path()
            else:
                path_buffer = _get_relative_entity_path(self, ancestor, path_buffer)

            leaf_name_data = LeafDataList()
            if (self.with_inactive.is_set or self.with_inactive.yfilter != YFilter.not_set):
                leaf_name_data.append(self.with_inactive.get_name_leafdata())

            entity_path = EntityPath(path_buffer, leaf_name_data)
            return entity_path

        def get_child_by_name(self, child_yang_name, segment_path):
            child = self._get_child_by_seg_name([child_yang_name, segment_path])
            if child is not None:
                return child

            if (child_yang_name == "target"):
                if (self.target is None):
                    self.target = StartTransaction.Input.Target()
                    self.target.parent = self
                    self._children_name_map["target"] = "target"
                return self.target

            return None

        def has_leaf_or_child_of_name(self, name):
            if(name == "target" or name == "with-inactive"):
                return True
            return False

        def set_value(self, value_path, value, name_space, name_space_prefix):
            if(value_path == "with-inactive"):
                self.with_inactive = value
                self.with_inactive.value_namespace = name_space
                self.with_inactive.value_namespace_prefix = name_space_prefix
                    class FlowExporter(Entity):
                        """
                        Exporter information
                        
                        .. attribute:: exporter_name  <key>
                        
                        	Exporter name
                        	**type**\: str
                        
                        	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
                        
                        .. attribute:: exporter
                        
                        	Statistics information for the exporter
                        	**type**\:  :py:class:`Exporter <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter>`
                        
                        

                        """

                        _prefix = 'dnx-netflow-oper'
                        _revision = '2015-11-09'

                        def __init__(self):
                            super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter, self).__init__()

                            self.yang_name = "flow-exporter"
                            self.yang_parent_name = "flow-exporters"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self._child_container_classes = {"exporter" : ("exporter", NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter)}
                            self._child_list_classes = {}

                            self.exporter_name = YLeaf(YType.str, "exporter-name")

                            self.exporter = NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter()
                            self.exporter.parent = self
                            self._children_name_map["exporter"] = "exporter"
                            self._children_yang_names.add("exporter")
                            self._segment_path = lambda: "flow-exporter" + "[exporter-name='" + self.exporter_name.get() + "']"

                        def __setattr__(self, name, value):
                            self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter, ['exporter_name'], name, value)


                        class Exporter(Entity):
                            """
                            Statistics information for the exporter
                            
                            .. attribute:: statistic
                            
                            	Array of flow exporters
                            	**type**\: list of  		 :py:class:`Statistic <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic>`
                            
                            

                            """

                            _prefix = 'dnx-netflow-oper'
                            _revision = '2015-11-09'

                            def __init__(self):
                                super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter, self).__init__()

                                self.yang_name = "exporter"
                                self.yang_parent_name = "flow-exporter"
                                self.is_top_level_class = False
                                self.has_list_ancestor = True
                                self._child_container_classes = {}
                                self._child_list_classes = {"statistic" : ("statistic", NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic)}

                                self.statistic = YList(self)
                                self._segment_path = lambda: "exporter"

                            def __setattr__(self, name, value):
                                self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter, [], name, value)


                            class Statistic(Entity):
                                """
                                Array of flow exporters
                                
                                .. attribute:: name
                                
                                	Exporter name
                                	**type**\: str
                                
                                .. attribute:: memory_usage
                                
                                	Memory usage
                                	**type**\: int
                                
                                	**range:** 0..4294967295
                                
                                .. attribute:: used_by_flow_monitor
                                
                                	List of flow monitors that use the exporter
                                	**type**\: list of str
                                
                                .. attribute:: collector
                                
                                	Statistics of all collectors
                                	**type**\: list of  		 :py:class:`Collector <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector>`
                                
                                

                                """

                                _prefix = 'dnx-netflow-oper'
                                _revision = '2015-11-09'

                                def __init__(self):
                                    super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic, self).__init__()

                                    self.yang_name = "statistic"
                                    self.yang_parent_name = "exporter"
                                    self.is_top_level_class = False
                                    self.has_list_ancestor = True
                                    self._child_container_classes = {}
                                    self._child_list_classes = {"collector" : ("collector", NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector)}

                                    self.name = YLeaf(YType.str, "name")

                                    self.memory_usage = YLeaf(YType.uint32, "memory-usage")

                                    self.used_by_flow_monitor = YLeafList(YType.str, "used-by-flow-monitor")

                                    self.collector = YList(self)
                                    self._segment_path = lambda: "statistic"

                                def __setattr__(self, name, value):
                                    self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic, ['name', 'memory_usage', 'used_by_flow_monitor'], name, value)


                                class Collector(Entity):
                                    """
                                    Statistics of all collectors
                                    
                                    .. attribute:: exporter_state
                                    
                                    	Exporter state
                                    	**type**\: str
                                    
                                    .. attribute:: destination_address
                                    
                                    	Destination IPv4 address in AAA.BBB.CCC.DDD format
                                    	**type**\: str
                                    
                                    .. attribute:: source_address
                                    
                                    	Source IPv4 address in AAA.BBB.CCC.DDD format
                                    	**type**\: str
                                    
                                    .. attribute:: vrf_name
                                    
                                    	VRF Name
                                    	**type**\: str
                                    
                                    .. attribute:: destination_port
                                    
                                    	Destination port number
                                    	**type**\: int
                                    
                                    	**range:** 0..65535
                                    
                                    .. attribute:: souce_port
                                    
                                    	Source port number
                                    	**type**\: int
                                    
                                    	**range:** 0..65535
                                    
                                    .. attribute:: transport_protocol
                                    
                                    	Transport protocol
                                    	**type**\: str
                                    
                                    .. attribute:: packets_sent
                                    
                                    	Packets sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: flows_sent
                                    
                                    	Flows sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: templates_sent
                                    
                                    	Templates sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_templates_sent
                                    
                                    	Option templates sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_data_sent
                                    
                                    	Option data sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: bytes_sent
                                    
                                    	Bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: flow_bytes_sent
                                    
                                    	Flow bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: template_bytes_sent
                                    
                                    	Template bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_template_bytes_sent
                                    
                                    	Option template bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_data_bytes_sent
                                    
                                    	Option data bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: packets_dropped
                                    
                                    	Packets dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: flows_dropped
                                    
                                    	Flows dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: templates_dropped
                                    
                                    	Templates dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_templates_dropped
                                    
                                    	Option templates dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_data_dropped
                                    
                                    	Option data dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: bytes_dropped
                                    
                                    	Bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: flow_bytes_dropped
                                    
                                    	Flow bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: template_bytes_dropped
                                    
                                    	Template bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_template_bytes_dropped
                                    
                                    	Option template bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_data_bytes_dropped
                                    
                                    	Option data dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_hour_packest_sent
                                    
                                    	Total packets exported over the last one hour
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_hour_bytes_sent
                                    
                                    	Total bytes exported over the last one hour
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: last_hour_flows_sent
                                    
                                    	Total flows exported over the of last one hour
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_minute_packets
                                    
                                    	Total packets exported over the last one minute
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_minute_bytes_sent
                                    
                                    	Total bytes exported over the last one minute
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: last_minute_flows_sent
                                    
                                    	Total flows exported over the last one minute
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_second_packets_sent
                                    
                                    	Total packets exported over the last one second
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_second_bytes_sent
                                    
                                    	Total bytes exported over the last one second
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: last_second_flows_sent
                                    
                                    	Total flows exported over the last one second
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    

                                    """

                                    _prefix = 'dnx-netflow-oper'
                                    _revision = '2015-11-09'

                                    def __init__(self):
                                        super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector, self).__init__()

                                        self.yang_name = "collector"
                                        self.yang_parent_name = "statistic"
                                        self.is_top_level_class = False
                                        self.has_list_ancestor = True
                                        self._child_container_classes = {}
                                        self._child_list_classes = {}

                                        self.exporter_state = YLeaf(YType.str, "exporter-state")

                                        self.destination_address = YLeaf(YType.str, "destination-address")

                                        self.source_address = YLeaf(YType.str, "source-address")

                                        self.vrf_name = YLeaf(YType.str, "vrf-name")

                                        self.destination_port = YLeaf(YType.uint16, "destination-port")

                                        self.souce_port = YLeaf(YType.uint16, "souce-port")

                                        self.transport_protocol = YLeaf(YType.str, "transport-protocol")

                                        self.packets_sent = YLeaf(YType.uint64, "packets-sent")

                                        self.flows_sent = YLeaf(YType.uint64, "flows-sent")

                                        self.templates_sent = YLeaf(YType.uint64, "templates-sent")

                                        self.option_templates_sent = YLeaf(YType.uint64, "option-templates-sent")

                                        self.option_data_sent = YLeaf(YType.uint64, "option-data-sent")

                                        self.bytes_sent = YLeaf(YType.uint64, "bytes-sent")

                                        self.flow_bytes_sent = YLeaf(YType.uint64, "flow-bytes-sent")

                                        self.template_bytes_sent = YLeaf(YType.uint64, "template-bytes-sent")

                                        self.option_template_bytes_sent = YLeaf(YType.uint64, "option-template-bytes-sent")

                                        self.option_data_bytes_sent = YLeaf(YType.uint64, "option-data-bytes-sent")

                                        self.packets_dropped = YLeaf(YType.uint64, "packets-dropped")

                                        self.flows_dropped = YLeaf(YType.uint64, "flows-dropped")

                                        self.templates_dropped = YLeaf(YType.uint64, "templates-dropped")

                                        self.option_templates_dropped = YLeaf(YType.uint64, "option-templates-dropped")

                                        self.option_data_dropped = YLeaf(YType.uint64, "option-data-dropped")

                                        self.bytes_dropped = YLeaf(YType.uint64, "bytes-dropped")

                                        self.flow_bytes_dropped = YLeaf(YType.uint64, "flow-bytes-dropped")

                                        self.template_bytes_dropped = YLeaf(YType.uint64, "template-bytes-dropped")

                                        self.option_template_bytes_dropped = YLeaf(YType.uint64, "option-template-bytes-dropped")

                                        self.option_data_bytes_dropped = YLeaf(YType.uint64, "option-data-bytes-dropped")

                                        self.last_hour_packest_sent = YLeaf(YType.uint64, "last-hour-packest-sent")

                                        self.last_hour_bytes_sent = YLeaf(YType.uint64, "last-hour-bytes-sent")

                                        self.last_hour_flows_sent = YLeaf(YType.uint64, "last-hour-flows-sent")

                                        self.last_minute_packets = YLeaf(YType.uint64, "last-minute-packets")

                                        self.last_minute_bytes_sent = YLeaf(YType.uint64, "last-minute-bytes-sent")

                                        self.last_minute_flows_sent = YLeaf(YType.uint64, "last-minute-flows-sent")

                                        self.last_second_packets_sent = YLeaf(YType.uint64, "last-second-packets-sent")

                                        self.last_second_bytes_sent = YLeaf(YType.uint64, "last-second-bytes-sent")

                                        self.last_second_flows_sent = YLeaf(YType.uint64, "last-second-flows-sent")
                                        self._segment_path = lambda: "collector"

                                    def __setattr__(self, name, value):
                                        self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector, ['exporter_state', 'destination_address', 'source_address', 'vrf_name', 'destination_port', 'souce_port', 'transport_protocol', 'packets_sent', 'flows_sent', 'templates_sent', 'option_templates_sent', 'option_data_sent', 'bytes_sent', 'flow_bytes_sent', 'template_bytes_sent', 'option_template_bytes_sent', 'option_data_bytes_sent', 'packets_dropped', 'flows_dropped', 'templates_dropped', 'option_templates_dropped', 'option_data_dropped', 'bytes_dropped', 'flow_bytes_dropped', 'template_bytes_dropped', 'option_template_bytes_dropped', 'option_data_bytes_dropped', 'last_hour_packest_sent', 'last_hour_bytes_sent', 'last_hour_flows_sent', 'last_minute_packets', 'last_minute_bytes_sent', 'last_minute_flows_sent', 'last_second_packets_sent', 'last_second_bytes_sent', 'last_second_flows_sent'], name, value)
Ejemplo n.º 23
0
            class Values(Entity):
                """
                Data rates & FEC
                
                .. attribute:: client_rate
                
                	Client Rate
                	**type**\:   :py:class:`ClientDataRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.ClientDataRate>`
                
                .. attribute:: encrypted
                
                	Encrypted
                	**type**\:  bool
                
                	**default value**\: false
                
                .. attribute:: fec
                
                	FEC
                	**type**\:   :py:class:`Fec <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.Fec>`
                
                .. attribute:: trunk_rate
                
                	TrunkRate
                	**type**\:   :py:class:`TrunkDataRate <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg.TrunkDataRate>`
                
                

                """

                _prefix = 'ncs1k-mxp-cfg'
                _revision = '2015-11-09'

                def __init__(self):
                    super(HardwareModule.Node.Slice.Values, self).__init__()

                    self.yang_name = "values"
                    self.yang_parent_name = "slice"

                    self.client_rate = YLeaf(YType.enumeration, "client-rate")

                    self.encrypted = YLeaf(YType.boolean, "encrypted")

                    self.fec = YLeaf(YType.enumeration, "fec")

                    self.trunk_rate = YLeaf(YType.enumeration, "trunk-rate")

                def __setattr__(self, name, value):
                    self._check_monkey_patching_error(name, value)
                    with _handle_type_error():
                        if name in self.__dict__ and isinstance(
                                self.__dict__[name], YList):
                            raise YPYModelError(
                                "Attempt to assign value of '{}' to YList ldata. "
                                "Please use list append or extend method.".
                                format(value))
                        if isinstance(value, Enum.YLeaf):
                            value = value.name
                        if name in ("client_rate", "encrypted", "fec",
                                    "trunk_rate") and name in self.__dict__:
                            if isinstance(value, YLeaf):
                                self.__dict__[name].set(value.get())
                            elif isinstance(value, YLeafList):
                                super(HardwareModule.Node.Slice.Values,
                                      self).__setattr__(name, value)
                            else:
                                self.__dict__[name].set(value)
                        else:
                            if hasattr(value, "parent") and name != "parent":
                                if hasattr(value, "is_presence_container"
                                           ) and value.is_presence_container:
                                    value.parent = self
                                elif value.parent is None and value.yang_name in self._children_yang_names:
                                    value.parent = self
                            super(HardwareModule.Node.Slice.Values,
                                  self).__setattr__(name, value)

                def has_data(self):
                    return (self.client_rate.is_set or self.encrypted.is_set
                            or self.fec.is_set or self.trunk_rate.is_set)

                def has_operation(self):
                    return (self.yfilter != YFilter.not_set
                            or self.client_rate.yfilter != YFilter.not_set
                            or self.encrypted.yfilter != YFilter.not_set
                            or self.fec.yfilter != YFilter.not_set
                            or self.trunk_rate.yfilter != YFilter.not_set)

                def get_segment_path(self):
                    path_buffer = ""
                    path_buffer = "values" + path_buffer

                    return path_buffer

                def get_entity_path(self, ancestor):
                    path_buffer = ""
                    if (ancestor is None):
                        raise YPYModelError(
                            "ancestor cannot be None as one of the ancestors is a list"
                        )
                    else:
                        path_buffer = _get_relative_entity_path(
                            self, ancestor, path_buffer)

                    leaf_name_data = LeafDataList()
                    if (self.client_rate.is_set
                            or self.client_rate.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.client_rate.get_name_leafdata())
                    if (self.encrypted.is_set
                            or self.encrypted.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.encrypted.get_name_leafdata())
                    if (self.fec.is_set
                            or self.fec.yfilter != YFilter.not_set):
                        leaf_name_data.append(self.fec.get_name_leafdata())
                    if (self.trunk_rate.is_set
                            or self.trunk_rate.yfilter != YFilter.not_set):
                        leaf_name_data.append(
                            self.trunk_rate.get_name_leafdata())

                    entity_path = EntityPath(path_buffer, leaf_name_data)
                    return entity_path

                def get_child_by_name(self, child_yang_name, segment_path):
                    child = self._get_child_by_seg_name(
                        [child_yang_name, segment_path])
                    if child is not None:
                        return child

                    return None

                def has_leaf_or_child_of_name(self, name):
                    if (name == "client-rate" or name == "encrypted"
                            or name == "fec" or name == "trunk-rate"):
                        return True
                    return False

                def set_value(self, value_path, value, name_space,
                              name_space_prefix):
                    if (value_path == "client-rate"):
                        self.client_rate = value
                        self.client_rate.value_namespace = name_space
                        self.client_rate.value_namespace_prefix = name_space_prefix
                    if (value_path == "encrypted"):
                        self.encrypted = value
                        self.encrypted.value_namespace = name_space
                        self.encrypted.value_namespace_prefix = name_space_prefix
                    if (value_path == "fec"):
                        self.fec = value
                        self.fec.value_namespace = name_space
                        self.fec.value_namespace_prefix = name_space_prefix
                    if (value_path == "trunk-rate"):
                        self.trunk_rate = value
                        self.trunk_rate.value_namespace = name_space
                        self.trunk_rate.value_namespace_prefix = name_space_prefix
                                    def __init__(self):
                                        super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector, self).__init__()

                                        self.yang_name = "collector"
                                        self.yang_parent_name = "statistic"
                                        self.is_top_level_class = False
                                        self.has_list_ancestor = True
                                        self._child_container_classes = {}
                                        self._child_list_classes = {}

                                        self.exporter_state = YLeaf(YType.str, "exporter-state")

                                        self.destination_address = YLeaf(YType.str, "destination-address")

                                        self.source_address = YLeaf(YType.str, "source-address")

                                        self.vrf_name = YLeaf(YType.str, "vrf-name")

                                        self.destination_port = YLeaf(YType.uint16, "destination-port")

                                        self.souce_port = YLeaf(YType.uint16, "souce-port")

                                        self.transport_protocol = YLeaf(YType.str, "transport-protocol")

                                        self.packets_sent = YLeaf(YType.uint64, "packets-sent")

                                        self.flows_sent = YLeaf(YType.uint64, "flows-sent")

                                        self.templates_sent = YLeaf(YType.uint64, "templates-sent")

                                        self.option_templates_sent = YLeaf(YType.uint64, "option-templates-sent")

                                        self.option_data_sent = YLeaf(YType.uint64, "option-data-sent")

                                        self.bytes_sent = YLeaf(YType.uint64, "bytes-sent")

                                        self.flow_bytes_sent = YLeaf(YType.uint64, "flow-bytes-sent")

                                        self.template_bytes_sent = YLeaf(YType.uint64, "template-bytes-sent")

                                        self.option_template_bytes_sent = YLeaf(YType.uint64, "option-template-bytes-sent")

                                        self.option_data_bytes_sent = YLeaf(YType.uint64, "option-data-bytes-sent")

                                        self.packets_dropped = YLeaf(YType.uint64, "packets-dropped")

                                        self.flows_dropped = YLeaf(YType.uint64, "flows-dropped")

                                        self.templates_dropped = YLeaf(YType.uint64, "templates-dropped")

                                        self.option_templates_dropped = YLeaf(YType.uint64, "option-templates-dropped")

                                        self.option_data_dropped = YLeaf(YType.uint64, "option-data-dropped")

                                        self.bytes_dropped = YLeaf(YType.uint64, "bytes-dropped")

                                        self.flow_bytes_dropped = YLeaf(YType.uint64, "flow-bytes-dropped")

                                        self.template_bytes_dropped = YLeaf(YType.uint64, "template-bytes-dropped")

                                        self.option_template_bytes_dropped = YLeaf(YType.uint64, "option-template-bytes-dropped")

                                        self.option_data_bytes_dropped = YLeaf(YType.uint64, "option-data-bytes-dropped")

                                        self.last_hour_packest_sent = YLeaf(YType.uint64, "last-hour-packest-sent")

                                        self.last_hour_bytes_sent = YLeaf(YType.uint64, "last-hour-bytes-sent")

                                        self.last_hour_flows_sent = YLeaf(YType.uint64, "last-hour-flows-sent")

                                        self.last_minute_packets = YLeaf(YType.uint64, "last-minute-packets")

                                        self.last_minute_bytes_sent = YLeaf(YType.uint64, "last-minute-bytes-sent")

                                        self.last_minute_flows_sent = YLeaf(YType.uint64, "last-minute-flows-sent")

                                        self.last_second_packets_sent = YLeaf(YType.uint64, "last-second-packets-sent")

                                        self.last_second_bytes_sent = YLeaf(YType.uint64, "last-second-bytes-sent")

                                        self.last_second_flows_sent = YLeaf(YType.uint64, "last-second-flows-sent")
                                        self._segment_path = lambda: "collector"
Ejemplo n.º 25
0
                    def __init__(self):
                        super(
                            EsAcl.Accesses.Access.AccessListEntries.
                            AccessListEntry, self).__init__()

                        self.yang_name = "access-list-entry"
                        self.yang_parent_name = "access-list-entries"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {
                            "source-network":
                            ("source_network", EsAcl.Accesses.Access.
                             AccessListEntries.AccessListEntry.SourceNetwork),
                            "destination-network":
                            ("destination_network",
                             EsAcl.Accesses.Access.AccessListEntries.
                             AccessListEntry.DestinationNetwork)
                        }
                        self._child_list_classes = {}

                        self.sequence_number = YLeaf(YType.uint32,
                                                     "sequence-number")

                        self.grant = YLeaf(YType.enumeration, "grant")

                        self.vlan1 = YLeaf(YType.uint16, "vlan1")

                        self.vlan2 = YLeaf(YType.uint16, "vlan2")

                        self.cos = YLeaf(YType.uint8, "cos")

                        self.dei = YLeaf(YType.uint8, "dei")

                        self.inner_vlan1 = YLeaf(YType.uint16, "inner-vlan1")

                        self.inner_vlan2 = YLeaf(YType.uint16, "inner-vlan2")

                        self.inner_cos = YLeaf(YType.uint8, "inner-cos")

                        self.inner_dei = YLeaf(YType.uint8, "inner-dei")

                        self.remark = YLeaf(YType.str, "remark")

                        self.ether_type_number = YLeaf(YType.uint16,
                                                       "ether-type-number")

                        self.capture = YLeaf(YType.boolean, "capture")

                        self.log_option = YLeaf(YType.uint8, "log-option")

                        self.sequence_str = YLeaf(YType.str, "sequence-str")

                        self.source_network = EsAcl.Accesses.Access.AccessListEntries.AccessListEntry.SourceNetwork(
                        )
                        self.source_network.parent = self
                        self._children_name_map[
                            "source_network"] = "source-network"
                        self._children_yang_names.add("source-network")

                        self.destination_network = EsAcl.Accesses.Access.AccessListEntries.AccessListEntry.DestinationNetwork(
                        )
                        self.destination_network.parent = self
                        self._children_name_map[
                            "destination_network"] = "destination-network"
                        self._children_yang_names.add("destination-network")
                        self._segment_path = lambda: "access-list-entry" + "[sequence-number='" + self.sequence_number.get(
                        ) + "']"
        class Statistic(Entity):
            """
            NetFlow statistics information for a particular
            node
            
            .. attribute:: node  <key>
            
            	Node location
            	**type**\: str
            
            	**pattern:** ([a\-zA\-Z0\-9\_]\*\\d+/){1,2}([a\-zA\-Z0\-9\_]\*\\d+)
            
            .. attribute:: producer
            
            	NetFlow producer statistics
            	**type**\:  :py:class:`Producer <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Producer>`
            
            .. attribute:: server
            
            	NetFlow server statistics
            	**type**\:  :py:class:`Server <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server>`
            
            

            """

            _prefix = 'dnx-netflow-oper'
            _revision = '2015-11-09'

            def __init__(self):
                super(NetFlow.Statistics.Statistic, self).__init__()

                self.yang_name = "statistic"
                self.yang_parent_name = "statistics"
                self.is_top_level_class = False
                self.has_list_ancestor = False
                self._child_container_classes = {"producer" : ("producer", NetFlow.Statistics.Statistic.Producer), "server" : ("server", NetFlow.Statistics.Statistic.Server)}
                self._child_list_classes = {}

                self.node = YLeaf(YType.str, "node")

                self.producer = NetFlow.Statistics.Statistic.Producer()
                self.producer.parent = self
                self._children_name_map["producer"] = "producer"
                self._children_yang_names.add("producer")

                self.server = NetFlow.Statistics.Statistic.Server()
                self.server.parent = self
                self._children_name_map["server"] = "server"
                self._children_yang_names.add("server")
                self._segment_path = lambda: "statistic" + "[node='" + self.node.get() + "']"
                self._absolute_path = lambda: "Cisco-IOS-XR-dnx-netflow-oper:net-flow/statistics/%s" % self._segment_path()

            def __setattr__(self, name, value):
                self._perform_setattr(NetFlow.Statistics.Statistic, ['node'], name, value)


            class Producer(Entity):
                """
                NetFlow producer statistics
                
                .. attribute:: statistics
                
                	Statistics information
                	**type**\:  :py:class:`Statistics <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Producer.Statistics>`
                
                

                """

                _prefix = 'dnx-netflow-oper'
                _revision = '2015-11-09'

                def __init__(self):
                    super(NetFlow.Statistics.Statistic.Producer, self).__init__()

                    self.yang_name = "producer"
                    self.yang_parent_name = "statistic"
                    self.is_top_level_class = False
                    self.has_list_ancestor = True
                    self._child_container_classes = {"statistics" : ("statistics", NetFlow.Statistics.Statistic.Producer.Statistics)}
                    self._child_list_classes = {}

                    self.statistics = NetFlow.Statistics.Statistic.Producer.Statistics()
                    self.statistics.parent = self
                    self._children_name_map["statistics"] = "statistics"
                    self._children_yang_names.add("statistics")
                    self._segment_path = lambda: "producer"


                class Statistics(Entity):
                    """
                    Statistics information
                    
                    .. attribute:: ipv4_ingress_flows
                    
                    	IPv4 ingress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: ipv4_egress_flows
                    
                    	IPv4 egress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: ipv6_ingress_flows
                    
                    	IPv6 ingress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: ipv6_egress_flows
                    
                    	IPv6 egress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: mpls_ingress_flows
                    
                    	MPLS ingress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: mpls_egress_flows
                    
                    	MPLS egress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: drops_no_space
                    
                    	Drops (no space)
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: drops_others
                    
                    	Drops (others)
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: unknown_ingress_flows
                    
                    	Unknown ingress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: unknown_egress_flows
                    
                    	Unknown egress flows
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: waiting_servers
                    
                    	Number of waiting servers
                    	**type**\: int
                    
                    	**range:** 0..18446744073709551615
                    
                    .. attribute:: last_cleared
                    
                    	Last time Statistics cleared in 'Mon Jan 1 12\:00 \:00 2xxx' format
                    	**type**\: str
                    
                    

                    """

                    _prefix = 'dnx-netflow-oper'
                    _revision = '2015-11-09'

                    def __init__(self):
                        super(NetFlow.Statistics.Statistic.Producer.Statistics, self).__init__()

                        self.yang_name = "statistics"
                        self.yang_parent_name = "producer"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {}

                        self.ipv4_ingress_flows = YLeaf(YType.uint64, "ipv4-ingress-flows")

                        self.ipv4_egress_flows = YLeaf(YType.uint64, "ipv4-egress-flows")

                        self.ipv6_ingress_flows = YLeaf(YType.uint64, "ipv6-ingress-flows")

                        self.ipv6_egress_flows = YLeaf(YType.uint64, "ipv6-egress-flows")

                        self.mpls_ingress_flows = YLeaf(YType.uint64, "mpls-ingress-flows")

                        self.mpls_egress_flows = YLeaf(YType.uint64, "mpls-egress-flows")

                        self.drops_no_space = YLeaf(YType.uint64, "drops-no-space")

                        self.drops_others = YLeaf(YType.uint64, "drops-others")

                        self.unknown_ingress_flows = YLeaf(YType.uint64, "unknown-ingress-flows")

                        self.unknown_egress_flows = YLeaf(YType.uint64, "unknown-egress-flows")

                        self.waiting_servers = YLeaf(YType.uint64, "waiting-servers")

                        self.last_cleared = YLeaf(YType.str, "last-cleared")
                        self._segment_path = lambda: "statistics"

                    def __setattr__(self, name, value):
                        self._perform_setattr(NetFlow.Statistics.Statistic.Producer.Statistics, ['ipv4_ingress_flows', 'ipv4_egress_flows', 'ipv6_ingress_flows', 'ipv6_egress_flows', 'mpls_ingress_flows', 'mpls_egress_flows', 'drops_no_space', 'drops_others', 'unknown_ingress_flows', 'unknown_egress_flows', 'waiting_servers', 'last_cleared'], name, value)


            class Server(Entity):
                """
                NetFlow server statistics
                
                .. attribute:: flow_exporters
                
                	Flow exporter information
                	**type**\:  :py:class:`FlowExporters <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters>`
                
                

                """

                _prefix = 'dnx-netflow-oper'
                _revision = '2015-11-09'

                def __init__(self):
                    super(NetFlow.Statistics.Statistic.Server, self).__init__()

                    self.yang_name = "server"
                    self.yang_parent_name = "statistic"
                    self.is_top_level_class = False
                    self.has_list_ancestor = True
                    self._child_container_classes = {"flow-exporters" : ("flow_exporters", NetFlow.Statistics.Statistic.Server.FlowExporters)}
                    self._child_list_classes = {}

                    self.flow_exporters = NetFlow.Statistics.Statistic.Server.FlowExporters()
                    self.flow_exporters.parent = self
                    self._children_name_map["flow_exporters"] = "flow-exporters"
                    self._children_yang_names.add("flow-exporters")
                    self._segment_path = lambda: "server"


                class FlowExporters(Entity):
                    """
                    Flow exporter information
                    
                    .. attribute:: flow_exporter
                    
                    	Exporter information
                    	**type**\: list of  		 :py:class:`FlowExporter <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter>`
                    
                    

                    """

                    _prefix = 'dnx-netflow-oper'
                    _revision = '2015-11-09'

                    def __init__(self):
                        super(NetFlow.Statistics.Statistic.Server.FlowExporters, self).__init__()

                        self.yang_name = "flow-exporters"
                        self.yang_parent_name = "server"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {"flow-exporter" : ("flow_exporter", NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter)}

                        self.flow_exporter = YList(self)
                        self._segment_path = lambda: "flow-exporters"

                    def __setattr__(self, name, value):
                        self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters, [], name, value)


                    class FlowExporter(Entity):
                        """
                        Exporter information
                        
                        .. attribute:: exporter_name  <key>
                        
                        	Exporter name
                        	**type**\: str
                        
                        	**pattern:** [\\w\\\-\\.\:,\_@#%$\\+=\\\|;]+
                        
                        .. attribute:: exporter
                        
                        	Statistics information for the exporter
                        	**type**\:  :py:class:`Exporter <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter>`
                        
                        

                        """

                        _prefix = 'dnx-netflow-oper'
                        _revision = '2015-11-09'

                        def __init__(self):
                            super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter, self).__init__()

                            self.yang_name = "flow-exporter"
                            self.yang_parent_name = "flow-exporters"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self._child_container_classes = {"exporter" : ("exporter", NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter)}
                            self._child_list_classes = {}

                            self.exporter_name = YLeaf(YType.str, "exporter-name")

                            self.exporter = NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter()
                            self.exporter.parent = self
                            self._children_name_map["exporter"] = "exporter"
                            self._children_yang_names.add("exporter")
                            self._segment_path = lambda: "flow-exporter" + "[exporter-name='" + self.exporter_name.get() + "']"

                        def __setattr__(self, name, value):
                            self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter, ['exporter_name'], name, value)


                        class Exporter(Entity):
                            """
                            Statistics information for the exporter
                            
                            .. attribute:: statistic
                            
                            	Array of flow exporters
                            	**type**\: list of  		 :py:class:`Statistic <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic>`
                            
                            

                            """

                            _prefix = 'dnx-netflow-oper'
                            _revision = '2015-11-09'

                            def __init__(self):
                                super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter, self).__init__()

                                self.yang_name = "exporter"
                                self.yang_parent_name = "flow-exporter"
                                self.is_top_level_class = False
                                self.has_list_ancestor = True
                                self._child_container_classes = {}
                                self._child_list_classes = {"statistic" : ("statistic", NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic)}

                                self.statistic = YList(self)
                                self._segment_path = lambda: "exporter"

                            def __setattr__(self, name, value):
                                self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter, [], name, value)


                            class Statistic(Entity):
                                """
                                Array of flow exporters
                                
                                .. attribute:: name
                                
                                	Exporter name
                                	**type**\: str
                                
                                .. attribute:: memory_usage
                                
                                	Memory usage
                                	**type**\: int
                                
                                	**range:** 0..4294967295
                                
                                .. attribute:: used_by_flow_monitor
                                
                                	List of flow monitors that use the exporter
                                	**type**\: list of str
                                
                                .. attribute:: collector
                                
                                	Statistics of all collectors
                                	**type**\: list of  		 :py:class:`Collector <ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper.NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector>`
                                
                                

                                """

                                _prefix = 'dnx-netflow-oper'
                                _revision = '2015-11-09'

                                def __init__(self):
                                    super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic, self).__init__()

                                    self.yang_name = "statistic"
                                    self.yang_parent_name = "exporter"
                                    self.is_top_level_class = False
                                    self.has_list_ancestor = True
                                    self._child_container_classes = {}
                                    self._child_list_classes = {"collector" : ("collector", NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector)}

                                    self.name = YLeaf(YType.str, "name")

                                    self.memory_usage = YLeaf(YType.uint32, "memory-usage")

                                    self.used_by_flow_monitor = YLeafList(YType.str, "used-by-flow-monitor")

                                    self.collector = YList(self)
                                    self._segment_path = lambda: "statistic"

                                def __setattr__(self, name, value):
                                    self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic, ['name', 'memory_usage', 'used_by_flow_monitor'], name, value)


                                class Collector(Entity):
                                    """
                                    Statistics of all collectors
                                    
                                    .. attribute:: exporter_state
                                    
                                    	Exporter state
                                    	**type**\: str
                                    
                                    .. attribute:: destination_address
                                    
                                    	Destination IPv4 address in AAA.BBB.CCC.DDD format
                                    	**type**\: str
                                    
                                    .. attribute:: source_address
                                    
                                    	Source IPv4 address in AAA.BBB.CCC.DDD format
                                    	**type**\: str
                                    
                                    .. attribute:: vrf_name
                                    
                                    	VRF Name
                                    	**type**\: str
                                    
                                    .. attribute:: destination_port
                                    
                                    	Destination port number
                                    	**type**\: int
                                    
                                    	**range:** 0..65535
                                    
                                    .. attribute:: souce_port
                                    
                                    	Source port number
                                    	**type**\: int
                                    
                                    	**range:** 0..65535
                                    
                                    .. attribute:: transport_protocol
                                    
                                    	Transport protocol
                                    	**type**\: str
                                    
                                    .. attribute:: packets_sent
                                    
                                    	Packets sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: flows_sent
                                    
                                    	Flows sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: templates_sent
                                    
                                    	Templates sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_templates_sent
                                    
                                    	Option templates sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_data_sent
                                    
                                    	Option data sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: bytes_sent
                                    
                                    	Bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: flow_bytes_sent
                                    
                                    	Flow bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: template_bytes_sent
                                    
                                    	Template bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_template_bytes_sent
                                    
                                    	Option template bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_data_bytes_sent
                                    
                                    	Option data bytes sent
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: packets_dropped
                                    
                                    	Packets dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: flows_dropped
                                    
                                    	Flows dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: templates_dropped
                                    
                                    	Templates dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_templates_dropped
                                    
                                    	Option templates dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: option_data_dropped
                                    
                                    	Option data dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: bytes_dropped
                                    
                                    	Bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: flow_bytes_dropped
                                    
                                    	Flow bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: template_bytes_dropped
                                    
                                    	Template bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_template_bytes_dropped
                                    
                                    	Option template bytes dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: option_data_bytes_dropped
                                    
                                    	Option data dropped
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_hour_packest_sent
                                    
                                    	Total packets exported over the last one hour
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_hour_bytes_sent
                                    
                                    	Total bytes exported over the last one hour
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: last_hour_flows_sent
                                    
                                    	Total flows exported over the of last one hour
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_minute_packets
                                    
                                    	Total packets exported over the last one minute
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_minute_bytes_sent
                                    
                                    	Total bytes exported over the last one minute
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: last_minute_flows_sent
                                    
                                    	Total flows exported over the last one minute
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_second_packets_sent
                                    
                                    	Total packets exported over the last one second
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    .. attribute:: last_second_bytes_sent
                                    
                                    	Total bytes exported over the last one second
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    	**units**\: byte
                                    
                                    .. attribute:: last_second_flows_sent
                                    
                                    	Total flows exported over the last one second
                                    	**type**\: int
                                    
                                    	**range:** 0..18446744073709551615
                                    
                                    

                                    """

                                    _prefix = 'dnx-netflow-oper'
                                    _revision = '2015-11-09'

                                    def __init__(self):
                                        super(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector, self).__init__()

                                        self.yang_name = "collector"
                                        self.yang_parent_name = "statistic"
                                        self.is_top_level_class = False
                                        self.has_list_ancestor = True
                                        self._child_container_classes = {}
                                        self._child_list_classes = {}

                                        self.exporter_state = YLeaf(YType.str, "exporter-state")

                                        self.destination_address = YLeaf(YType.str, "destination-address")

                                        self.source_address = YLeaf(YType.str, "source-address")

                                        self.vrf_name = YLeaf(YType.str, "vrf-name")

                                        self.destination_port = YLeaf(YType.uint16, "destination-port")

                                        self.souce_port = YLeaf(YType.uint16, "souce-port")

                                        self.transport_protocol = YLeaf(YType.str, "transport-protocol")

                                        self.packets_sent = YLeaf(YType.uint64, "packets-sent")

                                        self.flows_sent = YLeaf(YType.uint64, "flows-sent")

                                        self.templates_sent = YLeaf(YType.uint64, "templates-sent")

                                        self.option_templates_sent = YLeaf(YType.uint64, "option-templates-sent")

                                        self.option_data_sent = YLeaf(YType.uint64, "option-data-sent")

                                        self.bytes_sent = YLeaf(YType.uint64, "bytes-sent")

                                        self.flow_bytes_sent = YLeaf(YType.uint64, "flow-bytes-sent")

                                        self.template_bytes_sent = YLeaf(YType.uint64, "template-bytes-sent")

                                        self.option_template_bytes_sent = YLeaf(YType.uint64, "option-template-bytes-sent")

                                        self.option_data_bytes_sent = YLeaf(YType.uint64, "option-data-bytes-sent")

                                        self.packets_dropped = YLeaf(YType.uint64, "packets-dropped")

                                        self.flows_dropped = YLeaf(YType.uint64, "flows-dropped")

                                        self.templates_dropped = YLeaf(YType.uint64, "templates-dropped")

                                        self.option_templates_dropped = YLeaf(YType.uint64, "option-templates-dropped")

                                        self.option_data_dropped = YLeaf(YType.uint64, "option-data-dropped")

                                        self.bytes_dropped = YLeaf(YType.uint64, "bytes-dropped")

                                        self.flow_bytes_dropped = YLeaf(YType.uint64, "flow-bytes-dropped")

                                        self.template_bytes_dropped = YLeaf(YType.uint64, "template-bytes-dropped")

                                        self.option_template_bytes_dropped = YLeaf(YType.uint64, "option-template-bytes-dropped")

                                        self.option_data_bytes_dropped = YLeaf(YType.uint64, "option-data-bytes-dropped")

                                        self.last_hour_packest_sent = YLeaf(YType.uint64, "last-hour-packest-sent")

                                        self.last_hour_bytes_sent = YLeaf(YType.uint64, "last-hour-bytes-sent")

                                        self.last_hour_flows_sent = YLeaf(YType.uint64, "last-hour-flows-sent")

                                        self.last_minute_packets = YLeaf(YType.uint64, "last-minute-packets")

                                        self.last_minute_bytes_sent = YLeaf(YType.uint64, "last-minute-bytes-sent")

                                        self.last_minute_flows_sent = YLeaf(YType.uint64, "last-minute-flows-sent")

                                        self.last_second_packets_sent = YLeaf(YType.uint64, "last-second-packets-sent")

                                        self.last_second_bytes_sent = YLeaf(YType.uint64, "last-second-bytes-sent")

                                        self.last_second_flows_sent = YLeaf(YType.uint64, "last-second-flows-sent")
                                        self._segment_path = lambda: "collector"

                                    def __setattr__(self, name, value):
                                        self._perform_setattr(NetFlow.Statistics.Statistic.Server.FlowExporters.FlowExporter.Exporter.Statistic.Collector, ['exporter_state', 'destination_address', 'source_address', 'vrf_name', 'destination_port', 'souce_port', 'transport_protocol', 'packets_sent', 'flows_sent', 'templates_sent', 'option_templates_sent', 'option_data_sent', 'bytes_sent', 'flow_bytes_sent', 'template_bytes_sent', 'option_template_bytes_sent', 'option_data_bytes_sent', 'packets_dropped', 'flows_dropped', 'templates_dropped', 'option_templates_dropped', 'option_data_dropped', 'bytes_dropped', 'flow_bytes_dropped', 'template_bytes_dropped', 'option_template_bytes_dropped', 'option_data_bytes_dropped', 'last_hour_packest_sent', 'last_hour_bytes_sent', 'last_hour_flows_sent', 'last_minute_packets', 'last_minute_bytes_sent', 'last_minute_flows_sent', 'last_second_packets_sent', 'last_second_bytes_sent', 'last_second_flows_sent'], name, value)
Ejemplo n.º 27
0
                class MapCache(Entity):
                    """
                    Map\-cache for this service instance
                    
                    .. attribute:: afi  <key>
                    
                    	LISP Address\-Family of the prefix
                    	**type**\:  :py:class:`LispAddressFamilyType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispAddressFamilyType>`
                    
                    .. attribute:: prefix  <key>
                    
                    	LISP prefix. Format is defined by the AF
                    	**type**\: str
                    
                    .. attribute:: up_time
                    
                    	Time that this entry was created
                    	**type**\: str
                    
                    	**pattern:** \\d{4}\-\\d{2}\-\\d{2}T\\d{2}\:\\d{2}\:\\d{2}(\\.\\d+)?(Z\|[\\+\\\-]\\d{2}\:\\d{2})
                    
                    .. attribute:: last_modified_time
                    
                    	Last time that the RLOC information or the entry state were modified
                    	**type**\: str
                    
                    	**pattern:** \\d{4}\-\\d{2}\-\\d{2}T\\d{2}\:\\d{2}\:\\d{2}(\\.\\d+)?(Z\|[\\+\\\-]\\d{2}\:\\d{2})
                    
                    .. attribute:: last_update_time
                    
                    	Last time a mapping record for this entry was received
                    	**type**\: str
                    
                    	**pattern:** \\d{4}\-\\d{2}\-\\d{2}T\\d{2}\:\\d{2}\:\\d{2}(\\.\\d+)?(Z\|[\\+\\\-]\\d{2}\:\\d{2})
                    
                    .. attribute:: ttl
                    
                    	Mapping validity period (in milliseconds)
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: is_authoritative
                    
                    	Indication if the mapping came from an authoritative source
                    	**type**\: bool
                    
                    .. attribute:: is_static
                    
                    	Indication if the mapping is static (i.e. configured)
                    	**type**\: bool
                    
                    .. attribute:: is_negative
                    
                    	Indication if the mapping is negative (i.e. provides no locators for LISP encapsulation)
                    	**type**\: bool
                    
                    .. attribute:: nmr_action
                    
                    	Forwarding action in case of negative entry
                    	**type**\:  :py:class:`LispMapReplyActionType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispMapReplyActionType>`
                    
                    .. attribute:: rloc
                    
                    	List of locators for positive mapping
                    	**type**\: list of  		 :py:class:`Rloc <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af.MapCache.Rloc>`
                    
                    

                    """

                    _prefix = 'lisp-ios-xe-oper'
                    _revision = '2017-07-04'

                    def __init__(self):
                        super(LispState.LispRouters.Instances.Af.MapCache,
                              self).__init__()

                        self.yang_name = "map-cache"
                        self.yang_parent_name = "af"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {
                            "rloc":
                            ("rloc",
                             LispState.LispRouters.Instances.Af.MapCache.Rloc)
                        }

                        self.afi = YLeaf(YType.enumeration, "afi")

                        self.prefix = YLeaf(YType.str, "prefix")

                        self.up_time = YLeaf(YType.str, "up-time")

                        self.last_modified_time = YLeaf(
                            YType.str, "last-modified-time")

                        self.last_update_time = YLeaf(YType.str,
                                                      "last-update-time")

                        self.ttl = YLeaf(YType.uint32, "ttl")

                        self.is_authoritative = YLeaf(YType.boolean,
                                                      "is-authoritative")

                        self.is_static = YLeaf(YType.boolean, "is-static")

                        self.is_negative = YLeaf(YType.boolean, "is-negative")

                        self.nmr_action = YLeaf(YType.enumeration,
                                                "nmr-action")

                        self.rloc = YList(self)
                        self._segment_path = lambda: "map-cache" + "[afi='" + self.afi.get(
                        ) + "']" + "[prefix='" + self.prefix.get() + "']"

                    def __setattr__(self, name, value):
                        self._perform_setattr(
                            LispState.LispRouters.Instances.Af.MapCache, [
                                'afi', 'prefix', 'up_time',
                                'last_modified_time', 'last_update_time',
                                'ttl', 'is_authoritative', 'is_static',
                                'is_negative', 'nmr_action'
                            ], name, value)

                    class Rloc(Entity):
                        """
                        List of locators for positive mapping
                        
                        .. attribute:: afi  <key>
                        
                        	LISP Address\-Family of the address
                        	**type**\:  :py:class:`LispAddressFamilyType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispAddressFamilyType>`
                        
                        .. attribute:: address  <key>
                        
                        	LISP address. Format is defined by the AF
                        	**type**\: str
                        
                        .. attribute:: params
                        
                        	Properties of the locator
                        	**type**\:  :py:class:`Params <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af.MapCache.Rloc.Params>`
                        
                        

                        """

                        _prefix = 'lisp-ios-xe-oper'
                        _revision = '2017-07-04'

                        def __init__(self):
                            super(
                                LispState.LispRouters.Instances.Af.MapCache.
                                Rloc, self).__init__()

                            self.yang_name = "rloc"
                            self.yang_parent_name = "map-cache"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self._child_container_classes = {
                                "params": ("params", LispState.LispRouters.
                                           Instances.Af.MapCache.Rloc.Params)
                            }
                            self._child_list_classes = {}

                            self.afi = YLeaf(YType.enumeration, "afi")

                            self.address = YLeaf(YType.str, "address")

                            self.params = LispState.LispRouters.Instances.Af.MapCache.Rloc.Params(
                            )
                            self.params.parent = self
                            self._children_name_map["params"] = "params"
                            self._children_yang_names.add("params")
                            self._segment_path = lambda: "rloc" + "[afi='" + self.afi.get(
                            ) + "']" + "[address='" + self.address.get() + "']"

                        def __setattr__(self, name, value):
                            self._perform_setattr(
                                LispState.LispRouters.Instances.Af.MapCache.
                                Rloc, ['afi', 'address'], name, value)

                        class Params(Entity):
                            """
                            Properties of the locator
                            
                            .. attribute:: priority
                            
                            	Locator priority
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: weight
                            
                            	Locator weight
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: mcast_priority
                            
                            	Locator's multicast priority
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: mcast_weight
                            
                            	Locator's multicast weight
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            

                            """

                            _prefix = 'lisp-ios-xe-oper'
                            _revision = '2017-07-04'

                            def __init__(self):
                                super(
                                    LispState.LispRouters.Instances.Af.
                                    MapCache.Rloc.Params, self).__init__()

                                self.yang_name = "params"
                                self.yang_parent_name = "rloc"
                                self.is_top_level_class = False
                                self.has_list_ancestor = True
                                self._child_container_classes = {}
                                self._child_list_classes = {}

                                self.priority = YLeaf(YType.uint8, "priority")

                                self.weight = YLeaf(YType.uint8, "weight")

                                self.mcast_priority = YLeaf(
                                    YType.uint8, "mcast-priority")

                                self.mcast_weight = YLeaf(
                                    YType.uint8, "mcast-weight")
                                self._segment_path = lambda: "params"

                            def __setattr__(self, name, value):
                                self._perform_setattr(
                                    LispState.LispRouters.Instances.Af.
                                    MapCache.Rloc.Params, [
                                        'priority', 'weight', 'mcast_priority',
                                        'mcast_weight'
                                    ], name, value)
Ejemplo n.º 28
0
    def __init__(self):
        super(Vpdn, self).__init__()
        self._top_entity = None

        self.yang_name = "vpdn"
        self.yang_parent_name = "Cisco-IOS-XR-tunnel-vpdn-cfg"
        self.is_top_level_class = True
        self.has_list_ancestor = False
        self.ylist_key_names = []
        self._child_container_classes = OrderedDict([
            ("history", ("history", Vpdn.History)),
            ("redundancy", ("redundancy", Vpdn.Redundancy)),
            ("local", ("local", Vpdn.Local)),
            ("templates", ("templates", Vpdn.Templates)),
            ("caller-id", ("caller_id", Vpdn.CallerId)),
            ("vpd-ngroups", ("vpd_ngroups", Vpdn.VpdNgroups)),
            ("loggings", ("loggings", Vpdn.Loggings)),
            ("l2tp", ("l2tp", Vpdn.L2Tp))
        ])
        self._child_list_classes = OrderedDict([])
        self._leafs = OrderedDict([
            ('session_limit', YLeaf(YType.uint32, 'session-limit')),
            ('enable', YLeaf(YType.empty, 'enable')),
            ('soft_shut', YLeaf(YType.empty, 'soft-shut')),
        ])
        self.session_limit = None
        self.enable = None
        self.soft_shut = None

        self.history = Vpdn.History()
        self.history.parent = self
        self._children_name_map["history"] = "history"
        self._children_yang_names.add("history")

        self.redundancy = Vpdn.Redundancy()
        self.redundancy.parent = self
        self._children_name_map["redundancy"] = "redundancy"
        self._children_yang_names.add("redundancy")

        self.local = Vpdn.Local()
        self.local.parent = self
        self._children_name_map["local"] = "local"
        self._children_yang_names.add("local")

        self.templates = Vpdn.Templates()
        self.templates.parent = self
        self._children_name_map["templates"] = "templates"
        self._children_yang_names.add("templates")

        self.caller_id = Vpdn.CallerId()
        self.caller_id.parent = self
        self._children_name_map["caller_id"] = "caller-id"
        self._children_yang_names.add("caller-id")

        self.vpd_ngroups = Vpdn.VpdNgroups()
        self.vpd_ngroups.parent = self
        self._children_name_map["vpd_ngroups"] = "vpd-ngroups"
        self._children_yang_names.add("vpd-ngroups")

        self.loggings = Vpdn.Loggings()
        self.loggings.parent = self
        self._children_name_map["loggings"] = "loggings"
        self._children_yang_names.add("loggings")

        self.l2tp = Vpdn.L2Tp()
        self.l2tp.parent = self
        self._children_name_map["l2tp"] = "l2tp"
        self._children_yang_names.add("l2tp")
        self._segment_path = lambda: "Cisco-IOS-XR-tunnel-vpdn-cfg:vpdn"
Ejemplo n.º 29
0
                    class Rloc(Entity):
                        """
                        List of locators for positive mapping
                        
                        .. attribute:: afi  <key>
                        
                        	LISP Address\-Family of the address
                        	**type**\:  :py:class:`LispAddressFamilyType <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispAddressFamilyType>`
                        
                        .. attribute:: address  <key>
                        
                        	LISP address. Format is defined by the AF
                        	**type**\: str
                        
                        .. attribute:: params
                        
                        	Properties of the locator
                        	**type**\:  :py:class:`Params <ydk.models.cisco_ios_xe.Cisco_IOS_XE_lisp_oper.LispState.LispRouters.Instances.Af.MapCache.Rloc.Params>`
                        
                        

                        """

                        _prefix = 'lisp-ios-xe-oper'
                        _revision = '2017-07-04'

                        def __init__(self):
                            super(
                                LispState.LispRouters.Instances.Af.MapCache.
                                Rloc, self).__init__()

                            self.yang_name = "rloc"
                            self.yang_parent_name = "map-cache"
                            self.is_top_level_class = False
                            self.has_list_ancestor = True
                            self._child_container_classes = {
                                "params": ("params", LispState.LispRouters.
                                           Instances.Af.MapCache.Rloc.Params)
                            }
                            self._child_list_classes = {}

                            self.afi = YLeaf(YType.enumeration, "afi")

                            self.address = YLeaf(YType.str, "address")

                            self.params = LispState.LispRouters.Instances.Af.MapCache.Rloc.Params(
                            )
                            self.params.parent = self
                            self._children_name_map["params"] = "params"
                            self._children_yang_names.add("params")
                            self._segment_path = lambda: "rloc" + "[afi='" + self.afi.get(
                            ) + "']" + "[address='" + self.address.get() + "']"

                        def __setattr__(self, name, value):
                            self._perform_setattr(
                                LispState.LispRouters.Instances.Af.MapCache.
                                Rloc, ['afi', 'address'], name, value)

                        class Params(Entity):
                            """
                            Properties of the locator
                            
                            .. attribute:: priority
                            
                            	Locator priority
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: weight
                            
                            	Locator weight
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: mcast_priority
                            
                            	Locator's multicast priority
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            .. attribute:: mcast_weight
                            
                            	Locator's multicast weight
                            	**type**\: int
                            
                            	**range:** 0..255
                            
                            

                            """

                            _prefix = 'lisp-ios-xe-oper'
                            _revision = '2017-07-04'

                            def __init__(self):
                                super(
                                    LispState.LispRouters.Instances.Af.
                                    MapCache.Rloc.Params, self).__init__()

                                self.yang_name = "params"
                                self.yang_parent_name = "rloc"
                                self.is_top_level_class = False
                                self.has_list_ancestor = True
                                self._child_container_classes = {}
                                self._child_list_classes = {}

                                self.priority = YLeaf(YType.uint8, "priority")

                                self.weight = YLeaf(YType.uint8, "weight")

                                self.mcast_priority = YLeaf(
                                    YType.uint8, "mcast-priority")

                                self.mcast_weight = YLeaf(
                                    YType.uint8, "mcast-weight")
                                self._segment_path = lambda: "params"

                            def __setattr__(self, name, value):
                                self._perform_setattr(
                                    LispState.LispRouters.Instances.Af.
                                    MapCache.Rloc.Params, [
                                        'priority', 'weight', 'mcast_priority',
                                        'mcast_weight'
                                    ], name, value)
Ejemplo n.º 30
0
                class ProcessId(Entity):
                    """
                    Process Id
                    
                    .. attribute:: process_id  <key>
                    
                    	Process Id
                    	**type**\: int
                    
                    	**range:** \-2147483648..2147483647
                    
                    .. attribute:: name
                    
                    	Process name
                    	**type**\: str
                    
                    .. attribute:: jid
                    
                    	Job ID
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: pid
                    
                    	Process ID
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: text_seg_size
                    
                    	Text Segment Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: data_seg_size
                    
                    	Data Segment Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: stack_seg_size
                    
                    	Stack Segment Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: malloc_size
                    
                    	Malloced Memory Size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: dyn_limit
                    
                    	Dynamic memory limit
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: shared_mem
                    
                    	Shared memory size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    .. attribute:: physical_mem
                    
                    	Physical memory size
                    	**type**\: int
                    
                    	**range:** 0..4294967295
                    
                    

                    """

                    _prefix = 'procmem-oper'
                    _revision = '2017-05-01'

                    def __init__(self):
                        super(ProcessesMemory.Nodes.Node.ProcessIds.ProcessId,
                              self).__init__()

                        self.yang_name = "process-id"
                        self.yang_parent_name = "process-ids"
                        self.is_top_level_class = False
                        self.has_list_ancestor = True
                        self._child_container_classes = {}
                        self._child_list_classes = {}

                        self.process_id = YLeaf(YType.int32, "process-id")

                        self.name = YLeaf(YType.str, "name")

                        self.jid = YLeaf(YType.uint32, "jid")

                        self.pid = YLeaf(YType.uint32, "pid")

                        self.text_seg_size = YLeaf(YType.uint32,
                                                   "text-seg-size")

                        self.data_seg_size = YLeaf(YType.uint32,
                                                   "data-seg-size")

                        self.stack_seg_size = YLeaf(YType.uint32,
                                                    "stack-seg-size")

                        self.malloc_size = YLeaf(YType.uint32, "malloc-size")

                        self.dyn_limit = YLeaf(YType.uint32, "dyn-limit")

                        self.shared_mem = YLeaf(YType.uint32, "shared-mem")

                        self.physical_mem = YLeaf(YType.uint32, "physical-mem")
                        self._segment_path = lambda: "process-id" + "[process-id='" + self.process_id.get(
                        ) + "']"

                    def __setattr__(self, name, value):
                        self._perform_setattr(
                            ProcessesMemory.Nodes.Node.ProcessIds.ProcessId, [
                                'process_id', 'name', 'jid', 'pid',
                                'text_seg_size', 'data_seg_size',
                                'stack_seg_size', 'malloc_size', 'dyn_limit',
                                'shared_mem', 'physical_mem'
                            ], name, value)