repo_name
stringlengths 5
100
| ref
stringlengths 12
67
| path
stringlengths 4
244
| copies
stringlengths 1
8
| content
stringlengths 0
1.05M
⌀ |
|---|---|---|---|---|
shakamunyi/neutron-dvr
|
refs/heads/master
|
neutron/tests/unit/ml2/test_ml2_plugin.py
|
1
|
# Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import contextlib
import mock
import testtools
import uuid
import webob
from neutron.common import exceptions as exc
from neutron import context
from neutron.extensions import multiprovidernet as mpnet
from neutron.extensions import portbindings
from neutron.extensions import providernet as pnet
from neutron import manager
from neutron.plugins.common import constants as service_constants
from neutron.plugins.ml2.common import exceptions as ml2_exc
from neutron.plugins.ml2 import config
from neutron.plugins.ml2 import db as ml2_db
from neutron.plugins.ml2 import driver_api
from neutron.plugins.ml2 import driver_context
from neutron.plugins.ml2 import plugin as ml2_plugin
from neutron.tests.unit import _test_extension_portbindings as test_bindings
from neutron.tests.unit.ml2.drivers import mechanism_logger as mech_logger
from neutron.tests.unit.ml2.drivers import mechanism_test as mech_test
from neutron.tests.unit import test_db_plugin as test_plugin
from neutron.tests.unit import test_extension_allowedaddresspairs as test_pair
from neutron.tests.unit import test_extension_extradhcpopts as test_dhcpopts
from neutron.tests.unit import test_security_groups_rpc as test_sg_rpc
config.cfg.CONF.import_opt('network_vlan_ranges',
'neutron.plugins.ml2.drivers.type_vlan',
group='ml2_type_vlan')
PLUGIN_NAME = 'neutron.plugins.ml2.plugin.Ml2Plugin'
class Ml2PluginV2TestCase(test_plugin.NeutronDbPluginV2TestCase):
_plugin_name = PLUGIN_NAME
_mechanism_drivers = ['logger', 'test']
def setUp(self):
# We need a L3 service plugin
l3_plugin = ('neutron.tests.unit.test_l3_plugin.'
'TestL3NatServicePlugin')
service_plugins = {'l3_plugin_name': l3_plugin}
# Enable the test mechanism driver to ensure that
# we can successfully call through to all mechanism
# driver apis.
config.cfg.CONF.set_override('mechanism_drivers',
self._mechanism_drivers,
group='ml2')
self.physnet = 'physnet1'
self.vlan_range = '1:100'
self.phys_vrange = ':'.join([self.physnet, self.vlan_range])
config.cfg.CONF.set_override('network_vlan_ranges', [self.phys_vrange],
group='ml2_type_vlan')
super(Ml2PluginV2TestCase, self).setUp(PLUGIN_NAME,
service_plugins=service_plugins)
self.port_create_status = 'DOWN'
self.driver = ml2_plugin.Ml2Plugin()
self.context = context.get_admin_context()
class TestMl2BulkToggleWithBulkless(Ml2PluginV2TestCase):
_mechanism_drivers = ['logger', 'test', 'bulkless']
def test_bulk_disable_with_bulkless_driver(self):
self.assertTrue(self._skip_native_bulk)
class TestMl2BulkToggleWithoutBulkless(Ml2PluginV2TestCase):
_mechanism_drivers = ['logger', 'test']
def test_bulk_enabled_with_bulk_drivers(self):
self.assertFalse(self._skip_native_bulk)
class TestMl2BasicGet(test_plugin.TestBasicGet,
Ml2PluginV2TestCase):
pass
class TestMl2V2HTTPResponse(test_plugin.TestV2HTTPResponse,
Ml2PluginV2TestCase):
pass
class TestMl2NetworksV2(test_plugin.TestNetworksV2,
Ml2PluginV2TestCase):
pass
class TestMl2SubnetsV2(test_plugin.TestSubnetsV2,
Ml2PluginV2TestCase):
pass
class TestMl2PortsV2(test_plugin.TestPortsV2, Ml2PluginV2TestCase):
def test_update_port_status_build(self):
with self.port() as port:
self.assertEqual('DOWN', port['port']['status'])
self.assertEqual('DOWN', self.port_create_status)
def test_update_non_existent_port(self):
ctx = context.get_admin_context()
plugin = manager.NeutronManager.get_plugin()
data = {'port': {'admin_state_up': False}}
self.assertRaises(exc.PortNotFound, plugin.update_port, ctx,
'invalid-uuid', data)
def test_delete_non_existent_port(self):
ctx = context.get_admin_context()
plugin = manager.NeutronManager.get_plugin()
with mock.patch.object(ml2_plugin.LOG, 'debug') as log_debug:
plugin.delete_port(ctx, 'invalid-uuid', l3_port_check=False)
log_debug.assert_has_calls([
mock.call(_("Deleting port %s"), 'invalid-uuid'),
mock.call(_("The port '%s' was deleted"), 'invalid-uuid')
])
def test_delete_port_no_notify_in_disassociate_floatingips(self):
ctx = context.get_admin_context()
plugin = manager.NeutronManager.get_plugin()
l3plugin = manager.NeutronManager.get_service_plugins().get(
service_constants.L3_ROUTER_NAT)
with contextlib.nested(
self.port(do_delete=False),
mock.patch.object(l3plugin, 'disassociate_floatingips'),
mock.patch.object(l3plugin, 'notify_routers_updated')
) as (port, disassociate_floatingips, notify):
port_id = port['port']['id']
plugin.delete_port(ctx, port_id)
# check that no notification was requested while under
# transaction
disassociate_floatingips.assert_has_calls([
mock.call(ctx, port_id, do_notify=False)
])
# check that notifier was still triggered
notify.assert_has_calls([
mock.call(ctx, disassociate_floatingips.return_value)
])
def test_disassociate_floatingips_do_notify_returns_nothing(self):
ctx = context.get_admin_context()
l3plugin = manager.NeutronManager.get_service_plugins().get(
service_constants.L3_ROUTER_NAT)
with self.port() as port:
port_id = port['port']['id']
# check that nothing is returned when notifications are handled
# by the called method
self.assertIsNone(l3plugin.disassociate_floatingips(ctx, port_id))
class TestMl2PortBinding(Ml2PluginV2TestCase,
test_bindings.PortBindingsTestCase):
# Test case does not set binding:host_id, so ml2 does not attempt
# to bind port
VIF_TYPE = portbindings.VIF_TYPE_UNBOUND
HAS_PORT_FILTER = False
ENABLE_SG = True
FIREWALL_DRIVER = test_sg_rpc.FIREWALL_HYBRID_DRIVER
def setUp(self, firewall_driver=None):
test_sg_rpc.set_firewall_driver(self.FIREWALL_DRIVER)
config.cfg.CONF.set_override(
'enable_security_group', self.ENABLE_SG,
group='SECURITYGROUP')
super(TestMl2PortBinding, self).setUp()
def _check_port_binding_profile(self, port, profile=None):
self.assertIn('id', port)
self.assertIn(portbindings.PROFILE, port)
value = port[portbindings.PROFILE]
self.assertEqual(profile or {}, value)
def test_create_port_binding_profile(self):
self._test_create_port_binding_profile({'a': 1, 'b': 2})
def test_update_port_binding_profile(self):
self._test_update_port_binding_profile({'c': 3})
def test_create_port_binding_profile_too_big(self):
s = 'x' * 5000
profile_arg = {portbindings.PROFILE: {'d': s}}
try:
with self.port(expected_res_status=400,
arg_list=(portbindings.PROFILE,),
**profile_arg):
pass
except webob.exc.HTTPClientError:
pass
def test_remove_port_binding_profile(self):
profile = {'e': 5}
profile_arg = {portbindings.PROFILE: profile}
with self.port(arg_list=(portbindings.PROFILE,),
**profile_arg) as port:
self._check_port_binding_profile(port['port'], profile)
port_id = port['port']['id']
profile_arg = {portbindings.PROFILE: None}
port = self._update('ports', port_id,
{'port': profile_arg})['port']
self._check_port_binding_profile(port)
port = self._show('ports', port_id)['port']
self._check_port_binding_profile(port)
def test_return_on_concurrent_delete_and_binding(self):
# create a port and delete it so we have an expired mechanism context
with self.port() as port:
plugin = manager.NeutronManager.get_plugin()
binding = ml2_db.get_locked_port_and_binding(self.context.session,
port['port']['id'])[1]
binding['host'] = 'test'
mech_context = driver_context.PortContext(
plugin, self.context, port['port'],
plugin.get_network(self.context, port['port']['network_id']),
binding)
with contextlib.nested(
mock.patch('neutron.plugins.ml2.plugin.'
'db.get_locked_port_and_binding',
return_value=(None, None)),
mock.patch('neutron.plugins.ml2.plugin.Ml2Plugin._make_port_dict')
) as (glpab_mock, mpd_mock):
plugin._bind_port_if_needed(mech_context)
# called during deletion to get port
self.assertTrue(glpab_mock.mock_calls)
# should have returned before calling _make_port_dict
self.assertFalse(mpd_mock.mock_calls)
class TestMl2PortBindingNoSG(TestMl2PortBinding):
HAS_PORT_FILTER = False
ENABLE_SG = False
FIREWALL_DRIVER = test_sg_rpc.FIREWALL_NOOP_DRIVER
class TestMl2PortBindingHost(Ml2PluginV2TestCase,
test_bindings.PortBindingsHostTestCaseMixin):
pass
class TestMl2PortBindingVnicType(Ml2PluginV2TestCase,
test_bindings.PortBindingsVnicTestCaseMixin):
pass
class TestMultiSegmentNetworks(Ml2PluginV2TestCase):
def setUp(self, plugin=None):
super(TestMultiSegmentNetworks, self).setUp()
def test_create_network_provider(self):
data = {'network': {'name': 'net1',
pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1,
'tenant_id': 'tenant_one'}}
network_req = self.new_create_request('networks', data)
network = self.deserialize(self.fmt,
network_req.get_response(self.api))
self.assertEqual('vlan', network['network'][pnet.NETWORK_TYPE])
self.assertEqual('physnet1', network['network'][pnet.PHYSICAL_NETWORK])
self.assertEqual(1, network['network'][pnet.SEGMENTATION_ID])
self.assertNotIn(mpnet.SEGMENTS, network['network'])
def test_create_network_single_multiprovider(self):
data = {'network': {'name': 'net1',
mpnet.SEGMENTS:
[{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1}],
'tenant_id': 'tenant_one'}}
net_req = self.new_create_request('networks', data)
network = self.deserialize(self.fmt, net_req.get_response(self.api))
self.assertEqual('vlan', network['network'][pnet.NETWORK_TYPE])
self.assertEqual('physnet1', network['network'][pnet.PHYSICAL_NETWORK])
self.assertEqual(1, network['network'][pnet.SEGMENTATION_ID])
self.assertNotIn(mpnet.SEGMENTS, network['network'])
# Tests get_network()
net_req = self.new_show_request('networks', network['network']['id'])
network = self.deserialize(self.fmt, net_req.get_response(self.api))
self.assertEqual('vlan', network['network'][pnet.NETWORK_TYPE])
self.assertEqual('physnet1', network['network'][pnet.PHYSICAL_NETWORK])
self.assertEqual(1, network['network'][pnet.SEGMENTATION_ID])
self.assertNotIn(mpnet.SEGMENTS, network['network'])
def test_create_network_multiprovider(self):
data = {'network': {'name': 'net1',
mpnet.SEGMENTS:
[{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1},
{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 2}],
'tenant_id': 'tenant_one'}}
network_req = self.new_create_request('networks', data)
network = self.deserialize(self.fmt,
network_req.get_response(self.api))
tz = network['network'][mpnet.SEGMENTS]
for tz in data['network'][mpnet.SEGMENTS]:
for field in [pnet.NETWORK_TYPE, pnet.PHYSICAL_NETWORK,
pnet.SEGMENTATION_ID]:
self.assertEqual(tz.get(field), tz.get(field))
# Tests get_network()
net_req = self.new_show_request('networks', network['network']['id'])
network = self.deserialize(self.fmt, net_req.get_response(self.api))
tz = network['network'][mpnet.SEGMENTS]
for tz in data['network'][mpnet.SEGMENTS]:
for field in [pnet.NETWORK_TYPE, pnet.PHYSICAL_NETWORK,
pnet.SEGMENTATION_ID]:
self.assertEqual(tz.get(field), tz.get(field))
def test_create_network_with_provider_and_multiprovider_fail(self):
data = {'network': {'name': 'net1',
mpnet.SEGMENTS:
[{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1}],
pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1,
'tenant_id': 'tenant_one'}}
network_req = self.new_create_request('networks', data)
res = network_req.get_response(self.api)
self.assertEqual(400, res.status_int)
def test_create_network_duplicate_full_segments(self):
data = {'network': {'name': 'net1',
mpnet.SEGMENTS:
[{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1},
{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1}],
'tenant_id': 'tenant_one'}}
network_req = self.new_create_request('networks', data)
res = network_req.get_response(self.api)
self.assertEqual(400, res.status_int)
def test_create_network_duplicate_partial_segments(self):
data = {'network': {'name': 'net1',
mpnet.SEGMENTS:
[{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1'},
{pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1'}],
'tenant_id': 'tenant_one'}}
network_req = self.new_create_request('networks', data)
res = network_req.get_response(self.api)
self.assertEqual(201, res.status_int)
def test_release_segment_no_type_driver(self):
segment = {driver_api.NETWORK_TYPE: 'faketype',
driver_api.PHYSICAL_NETWORK: 'physnet1',
driver_api.ID: 1}
with mock.patch('neutron.plugins.ml2.managers.LOG') as log:
self.driver.type_manager.release_segment(session=None,
segment=segment)
log.error.assert_called_once_with(
"Failed to release segment '%s' because "
"network type is not supported.", segment)
def test_create_provider_fail(self):
segment = {pnet.NETWORK_TYPE: None,
pnet.PHYSICAL_NETWORK: 'phys_net',
pnet.SEGMENTATION_ID: None}
with testtools.ExpectedException(exc.InvalidInput):
self.driver._process_provider_create(segment)
def test_create_network_plugin(self):
data = {'network': {'name': 'net1',
'admin_state_up': True,
'shared': False,
pnet.NETWORK_TYPE: 'vlan',
pnet.PHYSICAL_NETWORK: 'physnet1',
pnet.SEGMENTATION_ID: 1,
'tenant_id': 'tenant_one'}}
def raise_mechanism_exc(*args, **kwargs):
raise ml2_exc.MechanismDriverError(
method='create_network_postcommit')
with mock.patch('neutron.plugins.ml2.managers.MechanismManager.'
'create_network_precommit', new=raise_mechanism_exc):
with testtools.ExpectedException(ml2_exc.MechanismDriverError):
self.driver.create_network(self.context, data)
def test_extend_dictionary_no_segments(self):
network = dict(name='net_no_segment', id='5', tenant_id='tenant_one')
self.driver._extend_network_dict_provider(self.context, network)
self.assertIsNone(network[pnet.NETWORK_TYPE])
self.assertIsNone(network[pnet.PHYSICAL_NETWORK])
self.assertIsNone(network[pnet.SEGMENTATION_ID])
class TestMl2AllowedAddressPairs(Ml2PluginV2TestCase,
test_pair.TestAllowedAddressPairs):
def setUp(self, plugin=None):
super(test_pair.TestAllowedAddressPairs, self).setUp(
plugin=PLUGIN_NAME)
class DHCPOptsTestCase(test_dhcpopts.TestExtraDhcpOpt):
def setUp(self, plugin=None):
super(test_dhcpopts.ExtraDhcpOptDBTestCase, self).setUp(
plugin=PLUGIN_NAME)
class Ml2PluginV2FaultyDriverTestCase(test_plugin.NeutronDbPluginV2TestCase):
def setUp(self):
# Enable the test mechanism driver to ensure that
# we can successfully call through to all mechanism
# driver apis.
config.cfg.CONF.set_override('mechanism_drivers',
['test', 'logger'],
group='ml2')
super(Ml2PluginV2FaultyDriverTestCase, self).setUp(PLUGIN_NAME)
self.port_create_status = 'DOWN'
class TestFaultyMechansimDriver(Ml2PluginV2FaultyDriverTestCase):
def test_create_network_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'create_network_postcommit',
side_effect=ml2_exc.MechanismDriverError):
tenant_id = str(uuid.uuid4())
data = {'network': {'name': 'net1',
'tenant_id': tenant_id}}
req = self.new_create_request('networks', data)
res = req.get_response(self.api)
self.assertEqual(500, res.status_int)
error = self.deserialize(self.fmt, res)
self.assertEqual('MechanismDriverError',
error['NeutronError']['type'])
query_params = "tenant_id=%s" % tenant_id
nets = self._list('networks', query_params=query_params)
self.assertFalse(nets['networks'])
def test_delete_network_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'delete_network_postcommit',
side_effect=ml2_exc.MechanismDriverError):
with mock.patch.object(mech_logger.LoggerMechanismDriver,
'delete_network_postcommit') as dnp:
data = {'network': {'name': 'net1',
'tenant_id': 'tenant_one'}}
network_req = self.new_create_request('networks', data)
network_res = network_req.get_response(self.api)
self.assertEqual(201, network_res.status_int)
network = self.deserialize(self.fmt, network_res)
net_id = network['network']['id']
req = self.new_delete_request('networks', net_id)
res = req.get_response(self.api)
self.assertEqual(204, res.status_int)
# Test if other mechanism driver was called
self.assertTrue(dnp.called)
self._show('networks', net_id,
expected_code=webob.exc.HTTPNotFound.code)
def test_update_network_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'update_network_postcommit',
side_effect=ml2_exc.MechanismDriverError):
with mock.patch.object(mech_logger.LoggerMechanismDriver,
'update_network_postcommit') as unp:
data = {'network': {'name': 'net1',
'tenant_id': 'tenant_one'}}
network_req = self.new_create_request('networks', data)
network_res = network_req.get_response(self.api)
self.assertEqual(201, network_res.status_int)
network = self.deserialize(self.fmt, network_res)
net_id = network['network']['id']
new_name = 'a_brand_new_name'
data = {'network': {'name': new_name}}
req = self.new_update_request('networks', data, net_id)
res = req.get_response(self.api)
self.assertEqual(500, res.status_int)
error = self.deserialize(self.fmt, res)
self.assertEqual('MechanismDriverError',
error['NeutronError']['type'])
# Test if other mechanism driver was called
self.assertTrue(unp.called)
net = self._show('networks', net_id)
self.assertEqual(new_name, net['network']['name'])
self._delete('networks', net_id)
def test_create_subnet_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'create_subnet_postcommit',
side_effect=ml2_exc.MechanismDriverError):
with self.network() as network:
net_id = network['network']['id']
data = {'subnet': {'network_id': net_id,
'cidr': '10.0.20.0/24',
'ip_version': '4',
'name': 'subnet1',
'tenant_id':
network['network']['tenant_id'],
'gateway_ip': '10.0.2.1'}}
req = self.new_create_request('subnets', data)
res = req.get_response(self.api)
self.assertEqual(500, res.status_int)
error = self.deserialize(self.fmt, res)
self.assertEqual('MechanismDriverError',
error['NeutronError']['type'])
query_params = "network_id=%s" % net_id
subnets = self._list('subnets', query_params=query_params)
self.assertFalse(subnets['subnets'])
def test_delete_subnet_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'delete_subnet_postcommit',
side_effect=ml2_exc.MechanismDriverError):
with mock.patch.object(mech_logger.LoggerMechanismDriver,
'delete_subnet_postcommit') as dsp:
with self.network() as network:
data = {'subnet': {'network_id':
network['network']['id'],
'cidr': '10.0.20.0/24',
'ip_version': '4',
'name': 'subnet1',
'tenant_id':
network['network']['tenant_id'],
'gateway_ip': '10.0.2.1'}}
subnet_req = self.new_create_request('subnets', data)
subnet_res = subnet_req.get_response(self.api)
self.assertEqual(201, subnet_res.status_int)
subnet = self.deserialize(self.fmt, subnet_res)
subnet_id = subnet['subnet']['id']
req = self.new_delete_request('subnets', subnet_id)
res = req.get_response(self.api)
self.assertEqual(204, res.status_int)
# Test if other mechanism driver was called
self.assertTrue(dsp.called)
self._show('subnets', subnet_id,
expected_code=webob.exc.HTTPNotFound.code)
def test_update_subnet_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'update_subnet_postcommit',
side_effect=ml2_exc.MechanismDriverError):
with mock.patch.object(mech_logger.LoggerMechanismDriver,
'update_subnet_postcommit') as usp:
with self.network() as network:
data = {'subnet': {'network_id':
network['network']['id'],
'cidr': '10.0.20.0/24',
'ip_version': '4',
'name': 'subnet1',
'tenant_id':
network['network']['tenant_id'],
'gateway_ip': '10.0.2.1'}}
subnet_req = self.new_create_request('subnets', data)
subnet_res = subnet_req.get_response(self.api)
self.assertEqual(201, subnet_res.status_int)
subnet = self.deserialize(self.fmt, subnet_res)
subnet_id = subnet['subnet']['id']
new_name = 'a_brand_new_name'
data = {'subnet': {'name': new_name}}
req = self.new_update_request('subnets', data, subnet_id)
res = req.get_response(self.api)
self.assertEqual(500, res.status_int)
error = self.deserialize(self.fmt, res)
self.assertEqual('MechanismDriverError',
error['NeutronError']['type'])
# Test if other mechanism driver was called
self.assertTrue(usp.called)
subnet = self._show('subnets', subnet_id)
self.assertEqual(new_name, subnet['subnet']['name'])
self._delete('subnets', subnet['subnet']['id'])
def test_create_port_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'create_port_postcommit',
side_effect=ml2_exc.MechanismDriverError):
with self.network() as network:
net_id = network['network']['id']
data = {'port': {'network_id': net_id,
'tenant_id':
network['network']['tenant_id'],
'name': 'port1',
'admin_state_up': 1,
'fixed_ips': []}}
req = self.new_create_request('ports', data)
res = req.get_response(self.api)
self.assertEqual(500, res.status_int)
error = self.deserialize(self.fmt, res)
self.assertEqual('MechanismDriverError',
error['NeutronError']['type'])
query_params = "network_id=%s" % net_id
ports = self._list('ports', query_params=query_params)
self.assertFalse(ports['ports'])
def test_update_port_faulty(self):
with mock.patch.object(mech_test.TestMechanismDriver,
'update_port_postcommit',
side_effect=ml2_exc.MechanismDriverError):
with mock.patch.object(mech_logger.LoggerMechanismDriver,
'update_port_postcommit') as upp:
with self.network() as network:
data = {'port': {'network_id': network['network']['id'],
'tenant_id':
network['network']['tenant_id'],
'name': 'port1',
'admin_state_up': 1,
'fixed_ips': []}}
port_req = self.new_create_request('ports', data)
port_res = port_req.get_response(self.api)
self.assertEqual(201, port_res.status_int)
port = self.deserialize(self.fmt, port_res)
port_id = port['port']['id']
new_name = 'a_brand_new_name'
data = {'port': {'name': new_name}}
req = self.new_update_request('ports', data, port_id)
res = req.get_response(self.api)
self.assertEqual(500, res.status_int)
error = self.deserialize(self.fmt, res)
self.assertEqual('MechanismDriverError',
error['NeutronError']['type'])
# Test if other mechanism driver was called
self.assertTrue(upp.called)
port = self._show('ports', port_id)
self.assertEqual(new_name, port['port']['name'])
self._delete('ports', port['port']['id'])
|
sinhrks/scikit-learn
|
refs/heads/master
|
sklearn/ensemble/gradient_boosting.py
|
18
|
"""Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regression and classification
only differ in the concrete ``LossFunction`` used.
- ``GradientBoostingClassifier`` implements gradient boosting for
classification problems.
- ``GradientBoostingRegressor`` implements gradient boosting for
regression problems.
"""
# Authors: Peter Prettenhofer, Scott White, Gilles Louppe, Emanuele Olivetti,
# Arnaud Joly, Jacob Schreiber
# License: BSD 3 clause
from __future__ import print_function
from __future__ import division
from abc import ABCMeta
from abc import abstractmethod
from .base import BaseEnsemble
from ..base import BaseEstimator
from ..base import ClassifierMixin
from ..base import RegressorMixin
from ..externals import six
from ..feature_selection.from_model import _LearntSelectorMixin
from ._gradient_boosting import predict_stages
from ._gradient_boosting import predict_stage
from ._gradient_boosting import _random_sample_mask
import numbers
import numpy as np
from scipy import stats
from scipy.sparse import csc_matrix
from scipy.sparse import csr_matrix
from scipy.sparse import issparse
from time import time
from ..tree.tree import DecisionTreeRegressor
from ..tree._tree import DTYPE
from ..tree._tree import TREE_LEAF
from ..utils import check_random_state
from ..utils import check_array
from ..utils import check_X_y
from ..utils import column_or_1d
from ..utils import check_consistent_length
from ..utils import deprecated
from ..utils.extmath import logsumexp
from ..utils.fixes import expit
from ..utils.fixes import bincount
from ..utils.stats import _weighted_percentile
from ..utils.validation import check_is_fitted
from ..utils.multiclass import check_classification_targets
from ..exceptions import NotFittedError
class QuantileEstimator(BaseEstimator):
"""An estimator predicting the alpha-quantile of the training targets."""
def __init__(self, alpha=0.9):
if not 0 < alpha < 1.0:
raise ValueError("`alpha` must be in (0, 1.0) but was %r" % alpha)
self.alpha = alpha
def fit(self, X, y, sample_weight=None):
if sample_weight is None:
self.quantile = stats.scoreatpercentile(y, self.alpha * 100.0)
else:
self.quantile = _weighted_percentile(y, sample_weight,
self.alpha * 100.0)
def predict(self, X):
check_is_fitted(self, 'quantile')
y = np.empty((X.shape[0], 1), dtype=np.float64)
y.fill(self.quantile)
return y
class MeanEstimator(BaseEstimator):
"""An estimator predicting the mean of the training targets."""
def fit(self, X, y, sample_weight=None):
if sample_weight is None:
self.mean = np.mean(y)
else:
self.mean = np.average(y, weights=sample_weight)
def predict(self, X):
check_is_fitted(self, 'mean')
y = np.empty((X.shape[0], 1), dtype=np.float64)
y.fill(self.mean)
return y
class LogOddsEstimator(BaseEstimator):
"""An estimator predicting the log odds ratio."""
scale = 1.0
def fit(self, X, y, sample_weight=None):
# pre-cond: pos, neg are encoded as 1, 0
if sample_weight is None:
pos = np.sum(y)
neg = y.shape[0] - pos
else:
pos = np.sum(sample_weight * y)
neg = np.sum(sample_weight * (1 - y))
if neg == 0 or pos == 0:
raise ValueError('y contains non binary labels.')
self.prior = self.scale * np.log(pos / neg)
def predict(self, X):
check_is_fitted(self, 'prior')
y = np.empty((X.shape[0], 1), dtype=np.float64)
y.fill(self.prior)
return y
class ScaledLogOddsEstimator(LogOddsEstimator):
"""Log odds ratio scaled by 0.5 -- for exponential loss. """
scale = 0.5
class PriorProbabilityEstimator(BaseEstimator):
"""An estimator predicting the probability of each
class in the training data.
"""
def fit(self, X, y, sample_weight=None):
if sample_weight is None:
sample_weight = np.ones_like(y, dtype=np.float64)
class_counts = bincount(y, weights=sample_weight)
self.priors = class_counts / class_counts.sum()
def predict(self, X):
check_is_fitted(self, 'priors')
y = np.empty((X.shape[0], self.priors.shape[0]), dtype=np.float64)
y[:] = self.priors
return y
class ZeroEstimator(BaseEstimator):
"""An estimator that simply predicts zero. """
def fit(self, X, y, sample_weight=None):
if np.issubdtype(y.dtype, int):
# classification
self.n_classes = np.unique(y).shape[0]
if self.n_classes == 2:
self.n_classes = 1
else:
# regression
self.n_classes = 1
def predict(self, X):
check_is_fitted(self, 'n_classes')
y = np.empty((X.shape[0], self.n_classes), dtype=np.float64)
y.fill(0.0)
return y
class LossFunction(six.with_metaclass(ABCMeta, object)):
"""Abstract base class for various loss functions.
Attributes
----------
K : int
The number of regression trees to be induced;
1 for regression and binary classification;
``n_classes`` for multi-class classification.
"""
is_multi_class = False
def __init__(self, n_classes):
self.K = n_classes
def init_estimator(self):
"""Default ``init`` estimator for loss function. """
raise NotImplementedError()
@abstractmethod
def __call__(self, y, pred, sample_weight=None):
"""Compute the loss of prediction ``pred`` and ``y``. """
@abstractmethod
def negative_gradient(self, y, y_pred, **kargs):
"""Compute the negative gradient.
Parameters
---------
y : np.ndarray, shape=(n,)
The target labels.
y_pred : np.ndarray, shape=(n,):
The predictions.
"""
def update_terminal_regions(self, tree, X, y, residual, y_pred,
sample_weight, sample_mask,
learning_rate=1.0, k=0):
"""Update the terminal regions (=leaves) of the given tree and
updates the current predictions of the model. Traverses tree
and invokes template method `_update_terminal_region`.
Parameters
----------
tree : tree.Tree
The tree object.
X : ndarray, shape=(n, m)
The data array.
y : ndarray, shape=(n,)
The target labels.
residual : ndarray, shape=(n,)
The residuals (usually the negative gradient).
y_pred : ndarray, shape=(n,)
The predictions.
sample_weight : ndarray, shape=(n,)
The weight of each sample.
sample_mask : ndarray, shape=(n,)
The sample mask to be used.
learning_rate : float, default=0.1
learning rate shrinks the contribution of each tree by
``learning_rate``.
k : int, default 0
The index of the estimator being updated.
"""
# compute leaf for each sample in ``X``.
terminal_regions = tree.apply(X)
# mask all which are not in sample mask.
masked_terminal_regions = terminal_regions.copy()
masked_terminal_regions[~sample_mask] = -1
# update each leaf (= perform line search)
for leaf in np.where(tree.children_left == TREE_LEAF)[0]:
self._update_terminal_region(tree, masked_terminal_regions,
leaf, X, y, residual,
y_pred[:, k], sample_weight)
# update predictions (both in-bag and out-of-bag)
y_pred[:, k] += (learning_rate
* tree.value[:, 0, 0].take(terminal_regions, axis=0))
@abstractmethod
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
"""Template method for updating terminal regions (=leaves). """
class RegressionLossFunction(six.with_metaclass(ABCMeta, LossFunction)):
"""Base class for regression loss functions. """
def __init__(self, n_classes):
if n_classes != 1:
raise ValueError("``n_classes`` must be 1 for regression but "
"was %r" % n_classes)
super(RegressionLossFunction, self).__init__(n_classes)
class LeastSquaresError(RegressionLossFunction):
"""Loss function for least squares (LS) estimation.
Terminal regions need not to be updated for least squares. """
def init_estimator(self):
return MeanEstimator()
def __call__(self, y, pred, sample_weight=None):
if sample_weight is None:
return np.mean((y - pred.ravel()) ** 2.0)
else:
return (1.0 / sample_weight.sum() *
np.sum(sample_weight * ((y - pred.ravel()) ** 2.0)))
def negative_gradient(self, y, pred, **kargs):
return y - pred.ravel()
def update_terminal_regions(self, tree, X, y, residual, y_pred,
sample_weight, sample_mask,
learning_rate=1.0, k=0):
"""Least squares does not need to update terminal regions.
But it has to update the predictions.
"""
# update predictions
y_pred[:, k] += learning_rate * tree.predict(X).ravel()
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
pass
class LeastAbsoluteError(RegressionLossFunction):
"""Loss function for least absolute deviation (LAD) regression. """
def init_estimator(self):
return QuantileEstimator(alpha=0.5)
def __call__(self, y, pred, sample_weight=None):
if sample_weight is None:
return np.abs(y - pred.ravel()).mean()
else:
return (1.0 / sample_weight.sum() *
np.sum(sample_weight * np.abs(y - pred.ravel())))
def negative_gradient(self, y, pred, **kargs):
"""1.0 if y - pred > 0.0 else -1.0"""
pred = pred.ravel()
return 2.0 * (y - pred > 0.0) - 1.0
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
"""LAD updates terminal regions to median estimates. """
terminal_region = np.where(terminal_regions == leaf)[0]
sample_weight = sample_weight.take(terminal_region, axis=0)
diff = y.take(terminal_region, axis=0) - pred.take(terminal_region, axis=0)
tree.value[leaf, 0, 0] = _weighted_percentile(diff, sample_weight, percentile=50)
class HuberLossFunction(RegressionLossFunction):
"""Huber loss function for robust regression.
M-Regression proposed in Friedman 2001.
References
----------
J. Friedman, Greedy Function Approximation: A Gradient Boosting
Machine, The Annals of Statistics, Vol. 29, No. 5, 2001.
"""
def __init__(self, n_classes, alpha=0.9):
super(HuberLossFunction, self).__init__(n_classes)
self.alpha = alpha
self.gamma = None
def init_estimator(self):
return QuantileEstimator(alpha=0.5)
def __call__(self, y, pred, sample_weight=None):
pred = pred.ravel()
diff = y - pred
gamma = self.gamma
if gamma is None:
if sample_weight is None:
gamma = stats.scoreatpercentile(np.abs(diff), self.alpha * 100)
else:
gamma = _weighted_percentile(np.abs(diff), sample_weight, self.alpha * 100)
gamma_mask = np.abs(diff) <= gamma
if sample_weight is None:
sq_loss = np.sum(0.5 * diff[gamma_mask] ** 2.0)
lin_loss = np.sum(gamma * (np.abs(diff[~gamma_mask]) - gamma / 2.0))
loss = (sq_loss + lin_loss) / y.shape[0]
else:
sq_loss = np.sum(0.5 * sample_weight[gamma_mask] * diff[gamma_mask] ** 2.0)
lin_loss = np.sum(gamma * sample_weight[~gamma_mask] *
(np.abs(diff[~gamma_mask]) - gamma / 2.0))
loss = (sq_loss + lin_loss) / sample_weight.sum()
return loss
def negative_gradient(self, y, pred, sample_weight=None, **kargs):
pred = pred.ravel()
diff = y - pred
if sample_weight is None:
gamma = stats.scoreatpercentile(np.abs(diff), self.alpha * 100)
else:
gamma = _weighted_percentile(np.abs(diff), sample_weight, self.alpha * 100)
gamma_mask = np.abs(diff) <= gamma
residual = np.zeros((y.shape[0],), dtype=np.float64)
residual[gamma_mask] = diff[gamma_mask]
residual[~gamma_mask] = gamma * np.sign(diff[~gamma_mask])
self.gamma = gamma
return residual
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
terminal_region = np.where(terminal_regions == leaf)[0]
sample_weight = sample_weight.take(terminal_region, axis=0)
gamma = self.gamma
diff = (y.take(terminal_region, axis=0)
- pred.take(terminal_region, axis=0))
median = _weighted_percentile(diff, sample_weight, percentile=50)
diff_minus_median = diff - median
tree.value[leaf, 0] = median + np.mean(
np.sign(diff_minus_median) *
np.minimum(np.abs(diff_minus_median), gamma))
class QuantileLossFunction(RegressionLossFunction):
"""Loss function for quantile regression.
Quantile regression allows to estimate the percentiles
of the conditional distribution of the target.
"""
def __init__(self, n_classes, alpha=0.9):
super(QuantileLossFunction, self).__init__(n_classes)
assert 0 < alpha < 1.0
self.alpha = alpha
self.percentile = alpha * 100.0
def init_estimator(self):
return QuantileEstimator(self.alpha)
def __call__(self, y, pred, sample_weight=None):
pred = pred.ravel()
diff = y - pred
alpha = self.alpha
mask = y > pred
if sample_weight is None:
loss = (alpha * diff[mask].sum() +
(1.0 - alpha) * diff[~mask].sum()) / y.shape[0]
else:
loss = ((alpha * np.sum(sample_weight[mask] * diff[mask]) +
(1.0 - alpha) * np.sum(sample_weight[~mask] * diff[~mask])) /
sample_weight.sum())
return loss
def negative_gradient(self, y, pred, **kargs):
alpha = self.alpha
pred = pred.ravel()
mask = y > pred
return (alpha * mask) - ((1.0 - alpha) * ~mask)
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
terminal_region = np.where(terminal_regions == leaf)[0]
diff = (y.take(terminal_region, axis=0)
- pred.take(terminal_region, axis=0))
sample_weight = sample_weight.take(terminal_region, axis=0)
val = _weighted_percentile(diff, sample_weight, self.percentile)
tree.value[leaf, 0] = val
class ClassificationLossFunction(six.with_metaclass(ABCMeta, LossFunction)):
"""Base class for classification loss functions. """
def _score_to_proba(self, score):
"""Template method to convert scores to probabilities.
the does not support probabilites raises AttributeError.
"""
raise TypeError('%s does not support predict_proba' % type(self).__name__)
@abstractmethod
def _score_to_decision(self, score):
"""Template method to convert scores to decisions.
Returns int arrays.
"""
class BinomialDeviance(ClassificationLossFunction):
"""Binomial deviance loss function for binary classification.
Binary classification is a special case; here, we only need to
fit one tree instead of ``n_classes`` trees.
"""
def __init__(self, n_classes):
if n_classes != 2:
raise ValueError("{0:s} requires 2 classes.".format(
self.__class__.__name__))
# we only need to fit one tree for binary clf.
super(BinomialDeviance, self).__init__(1)
def init_estimator(self):
return LogOddsEstimator()
def __call__(self, y, pred, sample_weight=None):
"""Compute the deviance (= 2 * negative log-likelihood). """
# logaddexp(0, v) == log(1.0 + exp(v))
pred = pred.ravel()
if sample_weight is None:
return -2.0 * np.mean((y * pred) - np.logaddexp(0.0, pred))
else:
return (-2.0 / sample_weight.sum() *
np.sum(sample_weight * ((y * pred) - np.logaddexp(0.0, pred))))
def negative_gradient(self, y, pred, **kargs):
"""Compute the residual (= negative gradient). """
return y - expit(pred.ravel())
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
"""Make a single Newton-Raphson step.
our node estimate is given by:
sum(w * (y - prob)) / sum(w * prob * (1 - prob))
we take advantage that: y - prob = residual
"""
terminal_region = np.where(terminal_regions == leaf)[0]
residual = residual.take(terminal_region, axis=0)
y = y.take(terminal_region, axis=0)
sample_weight = sample_weight.take(terminal_region, axis=0)
numerator = np.sum(sample_weight * residual)
denominator = np.sum(sample_weight * (y - residual) * (1 - y + residual))
if denominator == 0.0:
tree.value[leaf, 0, 0] = 0.0
else:
tree.value[leaf, 0, 0] = numerator / denominator
def _score_to_proba(self, score):
proba = np.ones((score.shape[0], 2), dtype=np.float64)
proba[:, 1] = expit(score.ravel())
proba[:, 0] -= proba[:, 1]
return proba
def _score_to_decision(self, score):
proba = self._score_to_proba(score)
return np.argmax(proba, axis=1)
class MultinomialDeviance(ClassificationLossFunction):
"""Multinomial deviance loss function for multi-class classification.
For multi-class classification we need to fit ``n_classes`` trees at
each stage.
"""
is_multi_class = True
def __init__(self, n_classes):
if n_classes < 3:
raise ValueError("{0:s} requires more than 2 classes.".format(
self.__class__.__name__))
super(MultinomialDeviance, self).__init__(n_classes)
def init_estimator(self):
return PriorProbabilityEstimator()
def __call__(self, y, pred, sample_weight=None):
# create one-hot label encoding
Y = np.zeros((y.shape[0], self.K), dtype=np.float64)
for k in range(self.K):
Y[:, k] = y == k
if sample_weight is None:
return np.sum(-1 * (Y * pred).sum(axis=1) +
logsumexp(pred, axis=1))
else:
return np.sum(-1 * sample_weight * (Y * pred).sum(axis=1) +
logsumexp(pred, axis=1))
def negative_gradient(self, y, pred, k=0, **kwargs):
"""Compute negative gradient for the ``k``-th class. """
return y - np.nan_to_num(np.exp(pred[:, k] -
logsumexp(pred, axis=1)))
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
"""Make a single Newton-Raphson step. """
terminal_region = np.where(terminal_regions == leaf)[0]
residual = residual.take(terminal_region, axis=0)
y = y.take(terminal_region, axis=0)
sample_weight = sample_weight.take(terminal_region, axis=0)
numerator = np.sum(sample_weight * residual)
numerator *= (self.K - 1) / self.K
denominator = np.sum(sample_weight * (y - residual) *
(1.0 - y + residual))
if denominator == 0.0:
tree.value[leaf, 0, 0] = 0.0
else:
tree.value[leaf, 0, 0] = numerator / denominator
def _score_to_proba(self, score):
return np.nan_to_num(
np.exp(score - (logsumexp(score, axis=1)[:, np.newaxis])))
def _score_to_decision(self, score):
proba = self._score_to_proba(score)
return np.argmax(proba, axis=1)
class ExponentialLoss(ClassificationLossFunction):
"""Exponential loss function for binary classification.
Same loss as AdaBoost.
References
----------
Greg Ridgeway, Generalized Boosted Models: A guide to the gbm package, 2007
"""
def __init__(self, n_classes):
if n_classes != 2:
raise ValueError("{0:s} requires 2 classes.".format(
self.__class__.__name__))
# we only need to fit one tree for binary clf.
super(ExponentialLoss, self).__init__(1)
def init_estimator(self):
return ScaledLogOddsEstimator()
def __call__(self, y, pred, sample_weight=None):
pred = pred.ravel()
if sample_weight is None:
return np.mean(np.exp(-(2. * y - 1.) * pred))
else:
return (1.0 / sample_weight.sum() *
np.sum(sample_weight * np.exp(-(2 * y - 1) * pred)))
def negative_gradient(self, y, pred, **kargs):
y_ = -(2. * y - 1.)
return y_ * np.exp(y_ * pred.ravel())
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
residual, pred, sample_weight):
terminal_region = np.where(terminal_regions == leaf)[0]
pred = pred.take(terminal_region, axis=0)
y = y.take(terminal_region, axis=0)
sample_weight = sample_weight.take(terminal_region, axis=0)
y_ = 2. * y - 1.
numerator = np.sum(y_ * sample_weight * np.exp(-y_ * pred))
denominator = np.sum(sample_weight * np.exp(-y_ * pred))
if denominator == 0.0:
tree.value[leaf, 0, 0] = 0.0
else:
tree.value[leaf, 0, 0] = numerator / denominator
def _score_to_proba(self, score):
proba = np.ones((score.shape[0], 2), dtype=np.float64)
proba[:, 1] = expit(2.0 * score.ravel())
proba[:, 0] -= proba[:, 1]
return proba
def _score_to_decision(self, score):
return (score.ravel() >= 0.0).astype(np.int)
LOSS_FUNCTIONS = {'ls': LeastSquaresError,
'lad': LeastAbsoluteError,
'huber': HuberLossFunction,
'quantile': QuantileLossFunction,
'deviance': None, # for both, multinomial and binomial
'exponential': ExponentialLoss,
}
INIT_ESTIMATORS = {'zero': ZeroEstimator}
class VerboseReporter(object):
"""Reports verbose output to stdout.
If ``verbose==1`` output is printed once in a while (when iteration mod
verbose_mod is zero).; if larger than 1 then output is printed for
each update.
"""
def __init__(self, verbose):
self.verbose = verbose
def init(self, est, begin_at_stage=0):
# header fields and line format str
header_fields = ['Iter', 'Train Loss']
verbose_fmt = ['{iter:>10d}', '{train_score:>16.4f}']
# do oob?
if est.subsample < 1:
header_fields.append('OOB Improve')
verbose_fmt.append('{oob_impr:>16.4f}')
header_fields.append('Remaining Time')
verbose_fmt.append('{remaining_time:>16s}')
# print the header line
print(('%10s ' + '%16s ' *
(len(header_fields) - 1)) % tuple(header_fields))
self.verbose_fmt = ' '.join(verbose_fmt)
# plot verbose info each time i % verbose_mod == 0
self.verbose_mod = 1
self.start_time = time()
self.begin_at_stage = begin_at_stage
def update(self, j, est):
"""Update reporter with new iteration. """
do_oob = est.subsample < 1
# we need to take into account if we fit additional estimators.
i = j - self.begin_at_stage # iteration relative to the start iter
if (i + 1) % self.verbose_mod == 0:
oob_impr = est.oob_improvement_[j] if do_oob else 0
remaining_time = ((est.n_estimators - (j + 1)) *
(time() - self.start_time) / float(i + 1))
if remaining_time > 60:
remaining_time = '{0:.2f}m'.format(remaining_time / 60.0)
else:
remaining_time = '{0:.2f}s'.format(remaining_time)
print(self.verbose_fmt.format(iter=j + 1,
train_score=est.train_score_[j],
oob_impr=oob_impr,
remaining_time=remaining_time))
if self.verbose == 1 and ((i + 1) // (self.verbose_mod * 10) > 0):
# adjust verbose frequency (powers of 10)
self.verbose_mod *= 10
class BaseGradientBoosting(six.with_metaclass(ABCMeta, BaseEnsemble,
_LearntSelectorMixin)):
"""Abstract base class for Gradient Boosting. """
@abstractmethod
def __init__(self, loss, learning_rate, n_estimators, min_samples_split,
min_samples_leaf, min_weight_fraction_leaf,
max_depth, init, subsample, max_features,
random_state, alpha=0.9, verbose=0, max_leaf_nodes=None,
warm_start=False, presort='auto'):
self.n_estimators = n_estimators
self.learning_rate = learning_rate
self.loss = loss
self.min_samples_split = min_samples_split
self.min_samples_leaf = min_samples_leaf
self.min_weight_fraction_leaf = min_weight_fraction_leaf
self.subsample = subsample
self.max_features = max_features
self.max_depth = max_depth
self.init = init
self.random_state = random_state
self.alpha = alpha
self.verbose = verbose
self.max_leaf_nodes = max_leaf_nodes
self.warm_start = warm_start
self.presort = presort
self.estimators_ = np.empty((0, 0), dtype=np.object)
def _fit_stage(self, i, X, y, y_pred, sample_weight, sample_mask,
random_state, X_idx_sorted, X_csc=None, X_csr=None):
"""Fit another stage of ``n_classes_`` trees to the boosting model. """
assert sample_mask.dtype == np.bool
loss = self.loss_
original_y = y
for k in range(loss.K):
if loss.is_multi_class:
y = np.array(original_y == k, dtype=np.float64)
residual = loss.negative_gradient(y, y_pred, k=k,
sample_weight=sample_weight)
# induce regression tree on residuals
tree = DecisionTreeRegressor(
criterion='friedman_mse',
splitter='best',
max_depth=self.max_depth,
min_samples_split=self.min_samples_split,
min_samples_leaf=self.min_samples_leaf,
min_weight_fraction_leaf=self.min_weight_fraction_leaf,
max_features=self.max_features,
max_leaf_nodes=self.max_leaf_nodes,
random_state=random_state,
presort=self.presort)
if self.subsample < 1.0:
# no inplace multiplication!
sample_weight = sample_weight * sample_mask.astype(np.float64)
if X_csc is not None:
tree.fit(X_csc, residual, sample_weight=sample_weight,
check_input=False, X_idx_sorted=X_idx_sorted)
else:
tree.fit(X, residual, sample_weight=sample_weight,
check_input=False, X_idx_sorted=X_idx_sorted)
# update tree leaves
if X_csr is not None:
loss.update_terminal_regions(tree.tree_, X_csr, y, residual, y_pred,
sample_weight, sample_mask,
self.learning_rate, k=k)
else:
loss.update_terminal_regions(tree.tree_, X, y, residual, y_pred,
sample_weight, sample_mask,
self.learning_rate, k=k)
# add tree to ensemble
self.estimators_[i, k] = tree
return y_pred
def _check_params(self):
"""Check validity of parameters and raise ValueError if not valid. """
if self.n_estimators <= 0:
raise ValueError("n_estimators must be greater than 0 but "
"was %r" % self.n_estimators)
if self.learning_rate <= 0.0:
raise ValueError("learning_rate must be greater than 0 but "
"was %r" % self.learning_rate)
if (self.loss not in self._SUPPORTED_LOSS
or self.loss not in LOSS_FUNCTIONS):
raise ValueError("Loss '{0:s}' not supported. ".format(self.loss))
if self.loss == 'deviance':
loss_class = (MultinomialDeviance
if len(self.classes_) > 2
else BinomialDeviance)
else:
loss_class = LOSS_FUNCTIONS[self.loss]
if self.loss in ('huber', 'quantile'):
self.loss_ = loss_class(self.n_classes_, self.alpha)
else:
self.loss_ = loss_class(self.n_classes_)
if not (0.0 < self.subsample <= 1.0):
raise ValueError("subsample must be in (0,1] but "
"was %r" % self.subsample)
if self.init is not None:
if isinstance(self.init, six.string_types):
if self.init not in INIT_ESTIMATORS:
raise ValueError('init="%s" is not supported' % self.init)
else:
if (not hasattr(self.init, 'fit')
or not hasattr(self.init, 'predict')):
raise ValueError("init=%r must be valid BaseEstimator "
"and support both fit and "
"predict" % self.init)
if not (0.0 < self.alpha < 1.0):
raise ValueError("alpha must be in (0.0, 1.0) but "
"was %r" % self.alpha)
if isinstance(self.max_features, six.string_types):
if self.max_features == "auto":
# if is_classification
if self.n_classes_ > 1:
max_features = max(1, int(np.sqrt(self.n_features)))
else:
# is regression
max_features = self.n_features
elif self.max_features == "sqrt":
max_features = max(1, int(np.sqrt(self.n_features)))
elif self.max_features == "log2":
max_features = max(1, int(np.log2(self.n_features)))
else:
raise ValueError("Invalid value for max_features: %r. "
"Allowed string values are 'auto', 'sqrt' "
"or 'log2'." % self.max_features)
elif self.max_features is None:
max_features = self.n_features
elif isinstance(self.max_features, (numbers.Integral, np.integer)):
max_features = self.max_features
else: # float
if 0. < self.max_features <= 1.:
max_features = max(int(self.max_features * self.n_features), 1)
else:
raise ValueError("max_features must be in (0, n_features]")
self.max_features_ = max_features
def _init_state(self):
"""Initialize model state and allocate model state data structures. """
if self.init is None:
self.init_ = self.loss_.init_estimator()
elif isinstance(self.init, six.string_types):
self.init_ = INIT_ESTIMATORS[self.init]()
else:
self.init_ = self.init
self.estimators_ = np.empty((self.n_estimators, self.loss_.K),
dtype=np.object)
self.train_score_ = np.zeros((self.n_estimators,), dtype=np.float64)
# do oob?
if self.subsample < 1.0:
self.oob_improvement_ = np.zeros((self.n_estimators),
dtype=np.float64)
def _clear_state(self):
"""Clear the state of the gradient boosting model. """
if hasattr(self, 'estimators_'):
self.estimators_ = np.empty((0, 0), dtype=np.object)
if hasattr(self, 'train_score_'):
del self.train_score_
if hasattr(self, 'oob_improvement_'):
del self.oob_improvement_
if hasattr(self, 'init_'):
del self.init_
def _resize_state(self):
"""Add additional ``n_estimators`` entries to all attributes. """
# self.n_estimators is the number of additional est to fit
total_n_estimators = self.n_estimators
if total_n_estimators < self.estimators_.shape[0]:
raise ValueError('resize with smaller n_estimators %d < %d' %
(total_n_estimators, self.estimators_[0]))
self.estimators_.resize((total_n_estimators, self.loss_.K))
self.train_score_.resize(total_n_estimators)
if (self.subsample < 1 or hasattr(self, 'oob_improvement_')):
# if do oob resize arrays or create new if not available
if hasattr(self, 'oob_improvement_'):
self.oob_improvement_.resize(total_n_estimators)
else:
self.oob_improvement_ = np.zeros((total_n_estimators,),
dtype=np.float64)
def _is_initialized(self):
return len(getattr(self, 'estimators_', [])) > 0
def _check_initialized(self):
"""Check that the estimator is initialized, raising an error if not."""
if self.estimators_ is None or len(self.estimators_) == 0:
raise NotFittedError("Estimator not fitted, call `fit`"
" before making predictions`.")
def fit(self, X, y, sample_weight=None, monitor=None):
"""Fit the gradient boosting model.
Parameters
----------
X : array-like, shape = [n_samples, n_features]
Training vectors, where n_samples is the number of samples
and n_features is the number of features.
y : array-like, shape = [n_samples]
Target values (integers in classification, real numbers in
regression)
For classification, labels must correspond to classes.
sample_weight : array-like, shape = [n_samples] or None
Sample weights. If None, then samples are equally weighted. Splits
that would create child nodes with net zero or negative weight are
ignored while searching for a split in each node. In the case of
classification, splits are also ignored if they would result in any
single class carrying a negative weight in either child node.
monitor : callable, optional
The monitor is called after each iteration with the current
iteration, a reference to the estimator and the local variables of
``_fit_stages`` as keyword arguments ``callable(i, self,
locals())``. If the callable returns ``True`` the fitting procedure
is stopped. The monitor can be used for various things such as
computing held-out estimates, early stopping, model introspect, and
snapshoting.
Returns
-------
self : object
Returns self.
"""
# if not warmstart - clear the estimator state
if not self.warm_start:
self._clear_state()
# Check input
X, y = check_X_y(X, y, accept_sparse=['csr', 'csc', 'coo'], dtype=DTYPE)
n_samples, self.n_features = X.shape
if sample_weight is None:
sample_weight = np.ones(n_samples, dtype=np.float32)
else:
sample_weight = column_or_1d(sample_weight, warn=True)
check_consistent_length(X, y, sample_weight)
y = self._validate_y(y)
random_state = check_random_state(self.random_state)
self._check_params()
if not self._is_initialized():
# init state
self._init_state()
# fit initial model - FIXME make sample_weight optional
self.init_.fit(X, y, sample_weight)
# init predictions
y_pred = self.init_.predict(X)
begin_at_stage = 0
else:
# add more estimators to fitted model
# invariant: warm_start = True
if self.n_estimators < self.estimators_.shape[0]:
raise ValueError('n_estimators=%d must be larger or equal to '
'estimators_.shape[0]=%d when '
'warm_start==True'
% (self.n_estimators,
self.estimators_.shape[0]))
begin_at_stage = self.estimators_.shape[0]
y_pred = self._decision_function(X)
self._resize_state()
X_idx_sorted = None
presort = self.presort
# Allow presort to be 'auto', which means True if the dataset is dense,
# otherwise it will be False.
if presort == 'auto' and issparse(X):
presort = False
elif presort == 'auto':
presort = True
if presort == True:
if issparse(X):
raise ValueError("Presorting is not supported for sparse matrices.")
else:
X_idx_sorted = np.asfortranarray(np.argsort(X, axis=0),
dtype=np.int32)
# fit the boosting stages
n_stages = self._fit_stages(X, y, y_pred, sample_weight, random_state,
begin_at_stage, monitor, X_idx_sorted)
# change shape of arrays after fit (early-stopping or additional ests)
if n_stages != self.estimators_.shape[0]:
self.estimators_ = self.estimators_[:n_stages]
self.train_score_ = self.train_score_[:n_stages]
if hasattr(self, 'oob_improvement_'):
self.oob_improvement_ = self.oob_improvement_[:n_stages]
return self
def _fit_stages(self, X, y, y_pred, sample_weight, random_state,
begin_at_stage=0, monitor=None, X_idx_sorted=None):
"""Iteratively fits the stages.
For each stage it computes the progress (OOB, train score)
and delegates to ``_fit_stage``.
Returns the number of stages fit; might differ from ``n_estimators``
due to early stopping.
"""
n_samples = X.shape[0]
do_oob = self.subsample < 1.0
sample_mask = np.ones((n_samples, ), dtype=np.bool)
n_inbag = max(1, int(self.subsample * n_samples))
loss_ = self.loss_
# Set min_weight_leaf from min_weight_fraction_leaf
if self.min_weight_fraction_leaf != 0. and sample_weight is not None:
min_weight_leaf = (self.min_weight_fraction_leaf *
np.sum(sample_weight))
else:
min_weight_leaf = 0.
if self.verbose:
verbose_reporter = VerboseReporter(self.verbose)
verbose_reporter.init(self, begin_at_stage)
X_csc = csc_matrix(X) if issparse(X) else None
X_csr = csr_matrix(X) if issparse(X) else None
# perform boosting iterations
i = begin_at_stage
for i in range(begin_at_stage, self.n_estimators):
# subsampling
if do_oob:
sample_mask = _random_sample_mask(n_samples, n_inbag,
random_state)
# OOB score before adding this stage
old_oob_score = loss_(y[~sample_mask],
y_pred[~sample_mask],
sample_weight[~sample_mask])
# fit next stage of trees
y_pred = self._fit_stage(i, X, y, y_pred, sample_weight,
sample_mask, random_state, X_idx_sorted,
X_csc, X_csr)
# track deviance (= loss)
if do_oob:
self.train_score_[i] = loss_(y[sample_mask],
y_pred[sample_mask],
sample_weight[sample_mask])
self.oob_improvement_[i] = (
old_oob_score - loss_(y[~sample_mask],
y_pred[~sample_mask],
sample_weight[~sample_mask]))
else:
# no need to fancy index w/ no subsampling
self.train_score_[i] = loss_(y, y_pred, sample_weight)
if self.verbose > 0:
verbose_reporter.update(i, self)
if monitor is not None:
early_stopping = monitor(i, self, locals())
if early_stopping:
break
return i + 1
def _make_estimator(self, append=True):
# we don't need _make_estimator
raise NotImplementedError()
def _init_decision_function(self, X):
"""Check input and compute prediction of ``init``. """
self._check_initialized()
X = self.estimators_[0, 0]._validate_X_predict(X, check_input=True)
if X.shape[1] != self.n_features:
raise ValueError("X.shape[1] should be {0:d}, not {1:d}.".format(
self.n_features, X.shape[1]))
score = self.init_.predict(X).astype(np.float64)
return score
def _decision_function(self, X):
# for use in inner loop, not raveling the output in single-class case,
# not doing input validation.
score = self._init_decision_function(X)
predict_stages(self.estimators_, X, self.learning_rate, score)
return score
@deprecated(" and will be removed in 0.19")
def decision_function(self, X):
"""Compute the decision function of ``X``.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
score : array, shape = [n_samples, n_classes] or [n_samples]
The decision function of the input samples. The order of the
classes corresponds to that in the attribute `classes_`.
Regression and binary classification produce an array of shape
[n_samples].
"""
self._check_initialized()
X = self.estimators_[0, 0]._validate_X_predict(X, check_input=True)
score = self._decision_function(X)
if score.shape[1] == 1:
return score.ravel()
return score
def _staged_decision_function(self, X):
"""Compute decision function of ``X`` for each iteration.
This method allows monitoring (i.e. determine error on testing set)
after each stage.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
score : generator of array, shape = [n_samples, k]
The decision function of the input samples. The order of the
classes corresponds to that in the attribute `classes_`.
Regression and binary classification are special cases with
``k == 1``, otherwise ``k==n_classes``.
"""
X = check_array(X, dtype=DTYPE, order="C")
score = self._init_decision_function(X)
for i in range(self.estimators_.shape[0]):
predict_stage(self.estimators_, i, X, self.learning_rate, score)
yield score.copy()
@deprecated(" and will be removed in 0.19")
def staged_decision_function(self, X):
"""Compute decision function of ``X`` for each iteration.
This method allows monitoring (i.e. determine error on testing set)
after each stage.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
score : generator of array, shape = [n_samples, k]
The decision function of the input samples. The order of the
classes corresponds to that in the attribute `classes_`.
Regression and binary classification are special cases with
``k == 1``, otherwise ``k==n_classes``.
"""
for dec in self._staged_decision_function(X):
# no yield from in Python2.X
yield dec
@property
def feature_importances_(self):
"""Return the feature importances (the higher, the more important the
feature).
Returns
-------
feature_importances_ : array, shape = [n_features]
"""
self._check_initialized()
total_sum = np.zeros((self.n_features, ), dtype=np.float64)
for stage in self.estimators_:
stage_sum = sum(tree.feature_importances_
for tree in stage) / len(stage)
total_sum += stage_sum
importances = total_sum / len(self.estimators_)
return importances
def _validate_y(self, y):
self.n_classes_ = 1
if y.dtype.kind == 'O':
y = y.astype(np.float64)
# Default implementation
return y
def apply(self, X):
"""Apply trees in the ensemble to X, return leaf indices.
.. versionadded:: 0.17
Parameters
----------
X : array-like or sparse matrix, shape = [n_samples, n_features]
The input samples. Internally, it will be converted to
``dtype=np.float32`` and if a sparse matrix is provided
to a sparse ``csr_matrix``.
Returns
-------
X_leaves : array_like, shape = [n_samples, n_estimators, n_classes]
For each datapoint x in X and for each tree in the ensemble,
return the index of the leaf x ends up in in each estimator.
In the case of binary classification n_classes is 1.
"""
self._check_initialized()
X = self.estimators_[0, 0]._validate_X_predict(X, check_input=True)
# n_classes will be equal to 1 in the binary classification or the
# regression case.
n_estimators, n_classes = self.estimators_.shape
leaves = np.zeros((X.shape[0], n_estimators, n_classes))
for i in range(n_estimators):
for j in range(n_classes):
estimator = self.estimators_[i, j]
leaves[:, i, j] = estimator.apply(X, check_input=False)
return leaves
class GradientBoostingClassifier(BaseGradientBoosting, ClassifierMixin):
"""Gradient Boosting for classification.
GB builds an additive model in a
forward stage-wise fashion; it allows for the optimization of
arbitrary differentiable loss functions. In each stage ``n_classes_``
regression trees are fit on the negative gradient of the
binomial or multinomial deviance loss function. Binary classification
is a special case where only a single regression tree is induced.
Read more in the :ref:`User Guide <gradient_boosting>`.
Parameters
----------
loss : {'deviance', 'exponential'}, optional (default='deviance')
loss function to be optimized. 'deviance' refers to
deviance (= logistic regression) for classification
with probabilistic outputs. For loss 'exponential' gradient
boosting recovers the AdaBoost algorithm.
learning_rate : float, optional (default=0.1)
learning rate shrinks the contribution of each tree by `learning_rate`.
There is a trade-off between learning_rate and n_estimators.
n_estimators : int (default=100)
The number of boosting stages to perform. Gradient boosting
is fairly robust to over-fitting so a large number usually
results in better performance.
max_depth : integer, optional (default=3)
maximum depth of the individual regression estimators. The maximum
depth limits the number of nodes in the tree. Tune this parameter
for best performance; the best value depends on the interaction
of the input variables.
Ignored if ``max_leaf_nodes`` is not None.
min_samples_split : int, float, optional (default=2)
The minimum number of samples required to split an internal node:
- If int, then consider `min_samples_split` as the minimum number.
- If float, then `min_samples_split` is a percentage and
`ceil(min_samples_split * n_samples)` are the minimum
number of samples for each split.
min_samples_leaf : int, float, optional (default=1)
The minimum number of samples required to be at a leaf node:
- If int, then consider `min_samples_leaf` as the minimum number.
- If float, then `min_samples_leaf` is a percentage and
`ceil(min_samples_leaf * n_samples)` are the minimum
number of samples for each node.
min_weight_fraction_leaf : float, optional (default=0.)
The minimum weighted fraction of the input samples required to be at a
leaf node.
subsample : float, optional (default=1.0)
The fraction of samples to be used for fitting the individual base
learners. If smaller than 1.0 this results in Stochastic Gradient
Boosting. `subsample` interacts with the parameter `n_estimators`.
Choosing `subsample < 1.0` leads to a reduction of variance
and an increase in bias.
max_features : int, float, string or None, optional (default=None)
The number of features to consider when looking for the best split:
- If int, then consider `max_features` features at each split.
- If float, then `max_features` is a percentage and
`int(max_features * n_features)` features are considered at each
split.
- If "auto", then `max_features=sqrt(n_features)`.
- If "sqrt", then `max_features=sqrt(n_features)`.
- If "log2", then `max_features=log2(n_features)`.
- If None, then `max_features=n_features`.
Choosing `max_features < n_features` leads to a reduction of variance
and an increase in bias.
Note: the search for a split does not stop until at least one
valid partition of the node samples is found, even if it requires to
effectively inspect more than ``max_features`` features.
max_leaf_nodes : int or None, optional (default=None)
Grow trees with ``max_leaf_nodes`` in best-first fashion.
Best nodes are defined as relative reduction in impurity.
If None then unlimited number of leaf nodes.
If not None then ``max_depth`` will be ignored.
init : BaseEstimator, None, optional (default=None)
An estimator object that is used to compute the initial
predictions. ``init`` has to provide ``fit`` and ``predict``.
If None it uses ``loss.init_estimator``.
verbose : int, default: 0
Enable verbose output. If 1 then it prints progress and performance
once in a while (the more trees the lower the frequency). If greater
than 1 then it prints progress and performance for every tree.
warm_start : bool, default: False
When set to ``True``, reuse the solution of the previous call to fit
and add more estimators to the ensemble, otherwise, just erase the
previous solution.
random_state : int, RandomState instance or None, optional (default=None)
If int, random_state is the seed used by the random number generator;
If RandomState instance, random_state is the random number generator;
If None, the random number generator is the RandomState instance used
by `np.random`.
presort : bool or 'auto', optional (default='auto')
Whether to presort the data to speed up the finding of best splits in
fitting. Auto mode by default will use presorting on dense data and
default to normal sorting on sparse data. Setting presort to true on
sparse data will raise an error.
.. versionadded:: 0.17
*presort* parameter.
Attributes
----------
feature_importances_ : array, shape = [n_features]
The feature importances (the higher, the more important the feature).
oob_improvement_ : array, shape = [n_estimators]
The improvement in loss (= deviance) on the out-of-bag samples
relative to the previous iteration.
``oob_improvement_[0]`` is the improvement in
loss of the first stage over the ``init`` estimator.
train_score_ : array, shape = [n_estimators]
The i-th score ``train_score_[i]`` is the deviance (= loss) of the
model at iteration ``i`` on the in-bag sample.
If ``subsample == 1`` this is the deviance on the training data.
loss_ : LossFunction
The concrete ``LossFunction`` object.
init : BaseEstimator
The estimator that provides the initial predictions.
Set via the ``init`` argument or ``loss.init_estimator``.
estimators_ : ndarray of DecisionTreeRegressor, shape = [n_estimators, ``loss_.K``]
The collection of fitted sub-estimators. ``loss_.K`` is 1 for binary
classification, otherwise n_classes.
See also
--------
sklearn.tree.DecisionTreeClassifier, RandomForestClassifier
AdaBoostClassifier
References
----------
J. Friedman, Greedy Function Approximation: A Gradient Boosting
Machine, The Annals of Statistics, Vol. 29, No. 5, 2001.
J. Friedman, Stochastic Gradient Boosting, 1999
T. Hastie, R. Tibshirani and J. Friedman.
Elements of Statistical Learning Ed. 2, Springer, 2009.
"""
_SUPPORTED_LOSS = ('deviance', 'exponential')
def __init__(self, loss='deviance', learning_rate=0.1, n_estimators=100,
subsample=1.0, min_samples_split=2,
min_samples_leaf=1, min_weight_fraction_leaf=0.,
max_depth=3, init=None, random_state=None,
max_features=None, verbose=0,
max_leaf_nodes=None, warm_start=False,
presort='auto'):
super(GradientBoostingClassifier, self).__init__(
loss=loss, learning_rate=learning_rate, n_estimators=n_estimators,
min_samples_split=min_samples_split,
min_samples_leaf=min_samples_leaf,
min_weight_fraction_leaf=min_weight_fraction_leaf,
max_depth=max_depth, init=init, subsample=subsample,
max_features=max_features,
random_state=random_state, verbose=verbose,
max_leaf_nodes=max_leaf_nodes, warm_start=warm_start,
presort=presort)
def _validate_y(self, y):
check_classification_targets(y)
self.classes_, y = np.unique(y, return_inverse=True)
self.n_classes_ = len(self.classes_)
return y
def decision_function(self, X):
"""Compute the decision function of ``X``.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
score : array, shape = [n_samples, n_classes] or [n_samples]
The decision function of the input samples. The order of the
classes corresponds to that in the attribute `classes_`.
Regression and binary classification produce an array of shape
[n_samples].
"""
X = check_array(X, dtype=DTYPE, order="C")
score = self._decision_function(X)
if score.shape[1] == 1:
return score.ravel()
return score
def staged_decision_function(self, X):
"""Compute decision function of ``X`` for each iteration.
This method allows monitoring (i.e. determine error on testing set)
after each stage.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
score : generator of array, shape = [n_samples, k]
The decision function of the input samples. The order of the
classes corresponds to that in the attribute `classes_`.
Regression and binary classification are special cases with
``k == 1``, otherwise ``k==n_classes``.
"""
for dec in self._staged_decision_function(X):
# no yield from in Python2.X
yield dec
def predict(self, X):
"""Predict class for X.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
y: array of shape = ["n_samples]
The predicted values.
"""
score = self.decision_function(X)
decisions = self.loss_._score_to_decision(score)
return self.classes_.take(decisions, axis=0)
def staged_predict(self, X):
"""Predict class at each stage for X.
This method allows monitoring (i.e. determine error on testing set)
after each stage.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
y : generator of array of shape = [n_samples]
The predicted value of the input samples.
"""
for score in self._staged_decision_function(X):
decisions = self.loss_._score_to_decision(score)
yield self.classes_.take(decisions, axis=0)
def predict_proba(self, X):
"""Predict class probabilities for X.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Raises
------
AttributeError
If the ``loss`` does not support probabilities.
Returns
-------
p : array of shape = [n_samples]
The class probabilities of the input samples. The order of the
classes corresponds to that in the attribute `classes_`.
"""
score = self.decision_function(X)
try:
return self.loss_._score_to_proba(score)
except NotFittedError:
raise
except AttributeError:
raise AttributeError('loss=%r does not support predict_proba' %
self.loss)
def predict_log_proba(self, X):
"""Predict class log-probabilities for X.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Raises
------
AttributeError
If the ``loss`` does not support probabilities.
Returns
-------
p : array of shape = [n_samples]
The class log-probabilities of the input samples. The order of the
classes corresponds to that in the attribute `classes_`.
"""
proba = self.predict_proba(X)
return np.log(proba)
def staged_predict_proba(self, X):
"""Predict class probabilities at each stage for X.
This method allows monitoring (i.e. determine error on testing set)
after each stage.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
y : generator of array of shape = [n_samples]
The predicted value of the input samples.
"""
try:
for score in self._staged_decision_function(X):
yield self.loss_._score_to_proba(score)
except NotFittedError:
raise
except AttributeError:
raise AttributeError('loss=%r does not support predict_proba' %
self.loss)
class GradientBoostingRegressor(BaseGradientBoosting, RegressorMixin):
"""Gradient Boosting for regression.
GB builds an additive model in a forward stage-wise fashion;
it allows for the optimization of arbitrary differentiable loss functions.
In each stage a regression tree is fit on the negative gradient of the
given loss function.
Read more in the :ref:`User Guide <gradient_boosting>`.
Parameters
----------
loss : {'ls', 'lad', 'huber', 'quantile'}, optional (default='ls')
loss function to be optimized. 'ls' refers to least squares
regression. 'lad' (least absolute deviation) is a highly robust
loss function solely based on order information of the input
variables. 'huber' is a combination of the two. 'quantile'
allows quantile regression (use `alpha` to specify the quantile).
learning_rate : float, optional (default=0.1)
learning rate shrinks the contribution of each tree by `learning_rate`.
There is a trade-off between learning_rate and n_estimators.
n_estimators : int (default=100)
The number of boosting stages to perform. Gradient boosting
is fairly robust to over-fitting so a large number usually
results in better performance.
max_depth : integer, optional (default=3)
maximum depth of the individual regression estimators. The maximum
depth limits the number of nodes in the tree. Tune this parameter
for best performance; the best value depends on the interaction
of the input variables.
Ignored if ``max_leaf_nodes`` is not None.
min_samples_split : int, float, optional (default=2)
The minimum number of samples required to split an internal node:
- If int, then consider `min_samples_split` as the minimum number.
- If float, then `min_samples_split` is a percentage and
`ceil(min_samples_split * n_samples)` are the minimum
number of samples for each split.
min_samples_leaf : int, float, optional (default=1)
The minimum number of samples required to be at a leaf node:
- If int, then consider `min_samples_leaf` as the minimum number.
- If float, then `min_samples_leaf` is a percentage and
`ceil(min_samples_leaf * n_samples)` are the minimum
number of samples for each node.
min_weight_fraction_leaf : float, optional (default=0.)
The minimum weighted fraction of the input samples required to be at a
leaf node.
subsample : float, optional (default=1.0)
The fraction of samples to be used for fitting the individual base
learners. If smaller than 1.0 this results in Stochastic Gradient
Boosting. `subsample` interacts with the parameter `n_estimators`.
Choosing `subsample < 1.0` leads to a reduction of variance
and an increase in bias.
max_features : int, float, string or None, optional (default=None)
The number of features to consider when looking for the best split:
- If int, then consider `max_features` features at each split.
- If float, then `max_features` is a percentage and
`int(max_features * n_features)` features are considered at each
split.
- If "auto", then `max_features=n_features`.
- If "sqrt", then `max_features=sqrt(n_features)`.
- If "log2", then `max_features=log2(n_features)`.
- If None, then `max_features=n_features`.
Choosing `max_features < n_features` leads to a reduction of variance
and an increase in bias.
Note: the search for a split does not stop until at least one
valid partition of the node samples is found, even if it requires to
effectively inspect more than ``max_features`` features.
max_leaf_nodes : int or None, optional (default=None)
Grow trees with ``max_leaf_nodes`` in best-first fashion.
Best nodes are defined as relative reduction in impurity.
If None then unlimited number of leaf nodes.
alpha : float (default=0.9)
The alpha-quantile of the huber loss function and the quantile
loss function. Only if ``loss='huber'`` or ``loss='quantile'``.
init : BaseEstimator, None, optional (default=None)
An estimator object that is used to compute the initial
predictions. ``init`` has to provide ``fit`` and ``predict``.
If None it uses ``loss.init_estimator``.
verbose : int, default: 0
Enable verbose output. If 1 then it prints progress and performance
once in a while (the more trees the lower the frequency). If greater
than 1 then it prints progress and performance for every tree.
warm_start : bool, default: False
When set to ``True``, reuse the solution of the previous call to fit
and add more estimators to the ensemble, otherwise, just erase the
previous solution.
random_state : int, RandomState instance or None, optional (default=None)
If int, random_state is the seed used by the random number generator;
If RandomState instance, random_state is the random number generator;
If None, the random number generator is the RandomState instance used
by `np.random`.
presort : bool or 'auto', optional (default='auto')
Whether to presort the data to speed up the finding of best splits in
fitting. Auto mode by default will use presorting on dense data and
default to normal sorting on sparse data. Setting presort to true on
sparse data will raise an error.
.. versionadded:: 0.17
optional parameter *presort*.
Attributes
----------
feature_importances_ : array, shape = [n_features]
The feature importances (the higher, the more important the feature).
oob_improvement_ : array, shape = [n_estimators]
The improvement in loss (= deviance) on the out-of-bag samples
relative to the previous iteration.
``oob_improvement_[0]`` is the improvement in
loss of the first stage over the ``init`` estimator.
train_score_ : array, shape = [n_estimators]
The i-th score ``train_score_[i]`` is the deviance (= loss) of the
model at iteration ``i`` on the in-bag sample.
If ``subsample == 1`` this is the deviance on the training data.
loss_ : LossFunction
The concrete ``LossFunction`` object.
`init` : BaseEstimator
The estimator that provides the initial predictions.
Set via the ``init`` argument or ``loss.init_estimator``.
estimators_ : ndarray of DecisionTreeRegressor, shape = [n_estimators, 1]
The collection of fitted sub-estimators.
See also
--------
DecisionTreeRegressor, RandomForestRegressor
References
----------
J. Friedman, Greedy Function Approximation: A Gradient Boosting
Machine, The Annals of Statistics, Vol. 29, No. 5, 2001.
J. Friedman, Stochastic Gradient Boosting, 1999
T. Hastie, R. Tibshirani and J. Friedman.
Elements of Statistical Learning Ed. 2, Springer, 2009.
"""
_SUPPORTED_LOSS = ('ls', 'lad', 'huber', 'quantile')
def __init__(self, loss='ls', learning_rate=0.1, n_estimators=100,
subsample=1.0, min_samples_split=2,
min_samples_leaf=1, min_weight_fraction_leaf=0.,
max_depth=3, init=None, random_state=None,
max_features=None, alpha=0.9, verbose=0, max_leaf_nodes=None,
warm_start=False, presort='auto'):
super(GradientBoostingRegressor, self).__init__(
loss=loss, learning_rate=learning_rate, n_estimators=n_estimators,
min_samples_split=min_samples_split,
min_samples_leaf=min_samples_leaf,
min_weight_fraction_leaf=min_weight_fraction_leaf,
max_depth=max_depth, init=init, subsample=subsample,
max_features=max_features,
random_state=random_state, alpha=alpha, verbose=verbose,
max_leaf_nodes=max_leaf_nodes, warm_start=warm_start,
presort=presort)
def predict(self, X):
"""Predict regression target for X.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
y : array of shape = [n_samples]
The predicted values.
"""
X = check_array(X, dtype=DTYPE, order="C")
return self._decision_function(X).ravel()
def staged_predict(self, X):
"""Predict regression target at each stage for X.
This method allows monitoring (i.e. determine error on testing set)
after each stage.
Parameters
----------
X : array-like of shape = [n_samples, n_features]
The input samples.
Returns
-------
y : generator of array of shape = [n_samples]
The predicted value of the input samples.
"""
for y in self._staged_decision_function(X):
yield y.ravel()
def apply(self, X):
"""Apply trees in the ensemble to X, return leaf indices.
.. versionadded:: 0.17
Parameters
----------
X : array-like or sparse matrix, shape = [n_samples, n_features]
The input samples. Internally, it will be converted to
``dtype=np.float32`` and if a sparse matrix is provided
to a sparse ``csr_matrix``.
Returns
-------
X_leaves : array_like, shape = [n_samples, n_estimators]
For each datapoint x in X and for each tree in the ensemble,
return the index of the leaf x ends up in in each estimator.
"""
leaves = super(GradientBoostingRegressor, self).apply(X)
leaves = leaves.reshape(X.shape[0], self.estimators_.shape[0])
return leaves
|
ressu/SickGear
|
refs/heads/master
|
lib/guessit/hash_ed2k.py
|
21
|
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2011 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# GuessIt is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Lesser GNU General Public License for more details.
#
# You should have received a copy of the Lesser GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import unicode_literals
from guessit import s, to_hex
import hashlib
import os.path
def hash_file(filename):
"""Returns the ed2k hash of a given file.
>>> s(hash_file('tests/dummy.srt'))
'ed2k://|file|dummy.srt|44|1CA0B9DED3473B926AA93A0A546138BB|/'
"""
return 'ed2k://|file|%s|%d|%s|/' % (os.path.basename(filename),
os.path.getsize(filename),
hash_filehash(filename).upper())
def hash_filehash(filename):
"""Returns the ed2k hash of a given file.
This function is taken from:
http://www.radicand.org/blog/orz/2010/2/21/edonkey2000-hash-in-python/
"""
md4 = hashlib.new('md4').copy
def gen(f):
while True:
x = f.read(9728000)
if x:
yield x
else:
return
def md4_hash(data):
m = md4()
m.update(data)
return m
with open(filename, 'rb') as f:
a = gen(f)
hashes = [md4_hash(data).digest() for data in a]
if len(hashes) == 1:
return to_hex(hashes[0])
else:
return md4_hash(reduce(lambda a, d: a + d, hashes, "")).hexd
|
111pontes/ydk-py
|
refs/heads/master
|
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_infra_rcmd_oper.py
|
1
|
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLIST, REFERENCE_IDENTITY_CLASS, REFERENCE_ENUM_CLASS, REFERENCE_BITS, REFERENCE_UNION, ANYXML_CLASS
from ydk.errors import YPYError, YPYModelError
from ydk.providers._importer import _yang_ns
_meta_table = {
'RcmdShowIntfEventEnum' : _MetaInfoEnum('RcmdShowIntfEventEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'create':'create',
'delete':'delete',
'link-up':'link_up',
'link-down':'link_down',
'primary-address':'primary_address',
'secondary-address':'secondary_address',
'ipv6-link-local-address':'ipv6_link_local_address',
'ipv6-global-address':'ipv6_global_address',
'mtu':'mtu',
'band-width':'band_width',
'ldp-sync':'ldp_sync',
'forward-reference':'forward_reference',
'ldp-no-sync':'ldp_no_sync',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowInstStateEnum' : _MetaInfoEnum('RcmdShowInstStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'unknown':'unknown',
'active':'active',
'in-active':'in_active',
'na':'na',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdLsChangeEnum' : _MetaInfoEnum('RcmdLsChangeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'new':'new',
'delete':'delete',
'modify':'modify',
'noop':'noop',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowRoutePathChangeEnum' : _MetaInfoEnum('RcmdShowRoutePathChangeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'primary':'primary',
'backup':'backup',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowLdpConvStateEnum' : _MetaInfoEnum('RcmdShowLdpConvStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'not-full':'not_full',
'fully-covered':'fully_covered',
'coverage-above-threshold':'coverage_above_threshold',
'coverage-below-threshold':'coverage_below_threshold',
'coverage-flapping':'coverage_flapping',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowLdpNeighbourStatusEnum' : _MetaInfoEnum('RcmdShowLdpNeighbourStatusEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'down':'down',
'up':'up',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdBagEnableDisableEnum' : _MetaInfoEnum('RcmdBagEnableDisableEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'disable':'disable',
'enable':'enable',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdSpfStateEnum' : _MetaInfoEnum('RcmdSpfStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'complete':'complete',
'in-complete':'in_complete',
'collecting':'collecting',
'no-route-change':'no_route_change',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdIsisLvlEnum' : _MetaInfoEnum('RcmdIsisLvlEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'l1':'l1',
'l2':'l2',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdLdpEventEnum' : _MetaInfoEnum('RcmdLdpEventEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'neighbor':'neighbor',
'adjacency':'adjacency',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowCompIdEnum' : _MetaInfoEnum('RcmdShowCompIdEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'ospf':'ospf',
'isis':'isis',
'un-known':'un_known',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdPriorityLevelEnum' : _MetaInfoEnum('RcmdPriorityLevelEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'critical':'critical',
'high':'high',
'medium':'medium',
'low':'low',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowNodeEnum' : _MetaInfoEnum('RcmdShowNodeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'unknown':'unknown',
'lc':'lc',
'rp':'rp',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdProtocolIdEnum' : _MetaInfoEnum('RcmdProtocolIdEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'ospf':'ospf',
'isis':'isis',
'na':'na',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdIsisSpfEnum' : _MetaInfoEnum('RcmdIsisSpfEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'full':'full',
'incremental':'incremental',
'next-hop':'next_hop',
'partial-route':'partial_route',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowIpfrrLfaEnum' : _MetaInfoEnum('RcmdShowIpfrrLfaEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'none':'none',
'local':'local',
'remote':'remote',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowMemEnum' : _MetaInfoEnum('RcmdShowMemEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'standard':'standard',
'chunk':'chunk',
'edm':'edm',
'string':'string',
'static':'static',
'unknown':'unknown',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowRouteEnum' : _MetaInfoEnum('RcmdShowRouteEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'ospf':'ospf',
'intra':'intra',
'inter':'inter',
'ext-1':'ext_1',
'ext-2':'ext_2',
'nssa-1':'nssa_1',
'nssa-2':'nssa_2',
'isis':'isis',
'l1-summary':'l1_summary',
'l1':'l1',
'l2-summary':'l2_summary',
'l2':'l2',
'inter-area-summary':'inter_area_summary',
'inter-area':'inter_area',
'default-attached':'default_attached',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdLsaEnum' : _MetaInfoEnum('RcmdLsaEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'unknown':'unknown',
'router':'router',
'network':'network',
'summary':'summary',
'asbr':'asbr',
'external':'external',
'multicast':'multicast',
'nssa':'nssa',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowPrcsStateEnum' : _MetaInfoEnum('RcmdShowPrcsStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'success':'success',
'cpu':'cpu',
'memory':'memory',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdBoolYesNoEnum' : _MetaInfoEnum('RcmdBoolYesNoEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'no':'no',
'yes':'yes',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdBagEnblDsblEnum' : _MetaInfoEnum('RcmdBagEnblDsblEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'dsbl':'dsbl',
'enbl':'enbl',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdLinecardSpeedEnum' : _MetaInfoEnum('RcmdLinecardSpeedEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'other':'other',
'fastest':'fastest',
'slowest':'slowest',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdShowLdpSessionStateEnum' : _MetaInfoEnum('RcmdShowLdpSessionStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'gr-down':'gr_down',
'gr-converging':'gr_converging',
'establishing':'establishing',
'converging':'converging',
'converged':'converged',
'retrying':'retrying',
'total':'total',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'RcmdChangeEnum' : _MetaInfoEnum('RcmdChangeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper',
{
'none':'none',
'add':'add',
'delete':'delete',
'modify':'modify',
'no-change':'no_change',
}, 'Cisco-IOS-XR-infra-rcmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper']),
'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic',
False,
[
_MetaInfoClassMember('below-threshold', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Covearge is below Configured Threshold
''',
'below_threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('local-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Local LFA Coverage in percentage
''',
'local_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Remote LFA Coverage in percentage
''',
'remote_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'primary-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode',
False,
[
_MetaInfoClassMember('in-use-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Inuse time of the Remote Node (eg: Apr 24 13:16
:04.961)
''',
'in_use_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of paths protected by this Remote Node
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('primary-path', REFERENCE_LIST, 'PrimaryPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath',
[], [],
''' Protected Primary Paths
''',
'primary_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote-LFA Node ID
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-node',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific IP-FRR Event
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('completed-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Completed reference SPF Run Number
''',
'completed_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage for all priorities
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration for the calculation (in milliseconds)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-id-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Event ID
''',
'event_id_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-statistic', REFERENCE_LIST, 'IpfrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic',
[], [],
''' IP-Frr Statistics categorized by priority
''',
'ipfrr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node', REFERENCE_LIST, 'RemoteNode' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode',
[], [],
''' Remote Node Information
''',
'remote_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time-offset', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start Time offset from trigger time (in
milliseconds)
''',
'start_time_offset',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Routes for all priorities
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Triggered reference SPF Run Number
''',
'trigger_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (eg: Apr 24 13:16:04.961)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Waiting Time (in milliseconds)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries',
False,
[
_MetaInfoClassMember('ipfrr-event-summary', REFERENCE_LIST, 'IpfrrEventSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary',
[], [],
''' IP-FRR Event data
''',
'ipfrr_event_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic',
False,
[
_MetaInfoClassMember('prefix-info', REFERENCE_UNION, 'str' , None, None,
[], [],
''' Events with Prefix
''',
'prefix_info',
'Cisco-IOS-XR-infra-rcmd-oper', True, [
_MetaInfoClassMember('prefix-info', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' Events with Prefix
''',
'prefix_info',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('prefix-info', ATTRIBUTE, 'str' , None, None,
[], [b'((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'],
''' Events with Prefix
''',
'prefix_info',
'Cisco-IOS-XR-infra-rcmd-oper', True),
]),
_MetaInfoClassMember('add-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times route gets Added
''',
'add_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('critical-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under Critical Priority
''',
'critical_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('delete-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times route gets Deleted
''',
'delete_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('high-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under High Priority
''',
'high_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Last event Add/Delete
''',
'last_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Last Known Cost
''',
'last_cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-event-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last event trigger time
''',
'last_event_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Last event processed priority
''',
'last_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Last event Route Type
''',
'last_route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('low-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under Low Priority
''',
'low_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('medium-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under Medium Priority
''',
'medium_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modify-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times route gets Deleted
''',
'modify_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceed-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times threshold got exceeded
''',
'threshold_exceed_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventStatistics',
False,
[
_MetaInfoClassMember('prefix-event-statistic', REFERENCE_LIST, 'PrefixEventStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic',
[], [],
''' Prefix Event statistics
''',
'prefix_event_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of complete SPF calculation (in ss
.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('is-data-complete', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Whether the event has all information
''',
'is_data_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_LIST, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary',
[], [],
''' Convergence information summary on per-priority
basis
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start time (offset from event trigger time in ss
.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'RcmdSpfStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdSpfStateEnum',
[], [],
''' SPF state
''',
'state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-dijkstra-runs', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of Dijkstra runs
''',
'total_dijkstra_runs',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-inter-area-and-external-batches', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of inter-area/external computation
batches
''',
'total_inter_area_and_external_batches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-type12lsa-changes', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of Type 1/2 LSA changes processed
''',
'total_type12lsa_changes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-type357lsa-changes', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of Type 3/5/7 LSA changes processed
''',
'total_type357lsa_changes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (in hh:mm:ss.msec)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-origin',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-redistribute',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', REFERENCE_CLASS, 'LdpEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter',
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', REFERENCE_CLASS, 'LdpExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpExit',
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', REFERENCE_CLASS, 'LsdEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter',
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', REFERENCE_CLASS, 'LsdExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdExit',
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', REFERENCE_CLASS, 'RiBv4Enter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter',
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', REFERENCE_CLASS, 'RiBv4Exit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit',
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', REFERENCE_CLASS, 'RiBv4Redistribute' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute',
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', REFERENCE_CLASS, 'RouteOrigin' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin',
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'convergence-timeline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksAdded' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksAdded',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-added',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksDeleted' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksDeleted',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-deleted',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority',
False,
[
_MetaInfoClassMember('convergence-timeline', REFERENCE_LIST, 'ConvergenceTimeline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline',
[], [],
''' Convergence timeline details
''',
'convergence_timeline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-added', REFERENCE_LIST, 'LeafNetworksAdded' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksAdded',
[], [],
''' List of Leaf Networks Added
''',
'leaf_networks_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-deleted', REFERENCE_LIST, 'LeafNetworksDeleted' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksDeleted',
[], [],
''' List of Leaf Networks Deleted
''',
'leaf_networks_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_CLASS, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary',
[], [],
''' Summary of the priority
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun',
False,
[
_MetaInfoClassMember('area-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Area ID
''',
'area_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('dijkstra-run-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Area Dijkstra run number
''',
'dijkstra_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of Dijktra calculation (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.LsaProcessed',
[], [],
''' List of type 1/2 LSA changes processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority',
[], [],
''' Convergence information on per-priority basis
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start time (offset from event trigger time in ss
.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.TriggerLsa',
[], [],
''' LSA that triggered the Dijkstra run
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (in hh:mm:ss.msec)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Wait time (offset from event trigger time in ss
.msec)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'dijkstra-run',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary',
False,
[
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type3ls-as', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of Type 3 LSA
''',
'type3ls_as',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type4ls-as', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of Type 4 LSA
''',
'type4ls_as',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type57ls-as', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of Type 5/7 LSA
''',
'type57ls_as',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-origin',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-redistribute',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', REFERENCE_CLASS, 'LdpEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter',
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', REFERENCE_CLASS, 'LdpExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit',
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', REFERENCE_CLASS, 'LsdEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter',
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', REFERENCE_CLASS, 'LsdExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit',
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', REFERENCE_CLASS, 'RiBv4Enter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter',
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', REFERENCE_CLASS, 'RiBv4Exit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit',
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', REFERENCE_CLASS, 'RiBv4Redistribute' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute',
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', REFERENCE_CLASS, 'RouteOrigin' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin',
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'convergence-timeline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksAdded' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksAdded',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-added',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksDeleted' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksDeleted',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-deleted',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority',
False,
[
_MetaInfoClassMember('convergence-timeline', REFERENCE_LIST, 'ConvergenceTimeline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline',
[], [],
''' Convergence timeline details
''',
'convergence_timeline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-added', REFERENCE_LIST, 'LeafNetworksAdded' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksAdded',
[], [],
''' List of Leaf Networks Added
''',
'leaf_networks_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-deleted', REFERENCE_LIST, 'LeafNetworksDeleted' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksDeleted',
[], [],
''' List of Leaf Networks Deleted
''',
'leaf_networks_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_CLASS, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary',
[], [],
''' Summary of the priority
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal',
False,
[
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority',
[], [],
''' Convergence information on a per-priority basis
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'inter-area-and-external',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary',
False,
[
_MetaInfoClassMember('spf-run-number', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific SPF run
''',
'spf_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('dijkstra-run', REFERENCE_LIST, 'DijkstraRun' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun',
[], [],
''' List of Dijkstra runs
''',
'dijkstra_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-and-external', REFERENCE_LIST, 'InterAreaAndExternal' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal',
[], [],
''' Inter-area & external calculation information
''',
'inter_area_and_external',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-summary', REFERENCE_CLASS, 'SpfSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary',
[], [],
''' SPF summary information
''',
'spf_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunSummaries',
False,
[
_MetaInfoClassMember('spf-run-summary', REFERENCE_LIST, 'SpfRunSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary',
[], [],
''' SPF Event data
''',
'spf_run_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic',
False,
[
_MetaInfoClassMember('below-threshold', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Covearge is below Configured Threshold
''',
'below_threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('local-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Local LFA Coverage in percentage
''',
'local_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Remote LFA Coverage in percentage
''',
'remote_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'primary-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode',
False,
[
_MetaInfoClassMember('in-use-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Inuse time of the Remote Node (eg: Apr 24 13:16
:04.961)
''',
'in_use_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of paths protected by this Remote Node
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('primary-path', REFERENCE_LIST, 'PrimaryPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath',
[], [],
''' Protected Primary Paths
''',
'primary_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote-LFA Node ID
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-node',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific IP-FRR Event
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('completed-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Completed reference SPF Run Number
''',
'completed_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage for all priorities
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration for the calculation (in milliseconds)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-id-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Event ID
''',
'event_id_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-statistic', REFERENCE_LIST, 'IpfrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic',
[], [],
''' IP-Frr Statistics categorized by priority
''',
'ipfrr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node', REFERENCE_LIST, 'RemoteNode' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode',
[], [],
''' Remote Node Information
''',
'remote_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time-offset', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start Time offset from trigger time (in
milliseconds)
''',
'start_time_offset',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Routes for all priorities
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Triggered reference SPF Run Number
''',
'trigger_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (eg: Apr 24 13:16:04.961)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Waiting Time (in milliseconds)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-offline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines',
False,
[
_MetaInfoClassMember('ipfrr-event-offline', REFERENCE_LIST, 'IpfrrEventOffline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline',
[], [],
''' Offline operational data for particular OSPF
IP-FRR Event
''',
'ipfrr_event_offline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-offlines',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of complete SPF calculation (in ss
.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('is-data-complete', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Whether the event has all information
''',
'is_data_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_LIST, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary',
[], [],
''' Convergence information summary on per-priority
basis
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start time (offset from event trigger time in ss
.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'RcmdSpfStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdSpfStateEnum',
[], [],
''' SPF state
''',
'state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-dijkstra-runs', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of Dijkstra runs
''',
'total_dijkstra_runs',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-inter-area-and-external-batches', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of inter-area/external computation
batches
''',
'total_inter_area_and_external_batches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-type12lsa-changes', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of Type 1/2 LSA changes processed
''',
'total_type12lsa_changes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-type357lsa-changes', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of Type 3/5/7 LSA changes processed
''',
'total_type357lsa_changes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (in hh:mm:ss.msec)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-origin',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-redistribute',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', REFERENCE_CLASS, 'LdpEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter',
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', REFERENCE_CLASS, 'LdpExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpExit',
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', REFERENCE_CLASS, 'LsdEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter',
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', REFERENCE_CLASS, 'LsdExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdExit',
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', REFERENCE_CLASS, 'RiBv4Enter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter',
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', REFERENCE_CLASS, 'RiBv4Exit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit',
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', REFERENCE_CLASS, 'RiBv4Redistribute' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute',
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', REFERENCE_CLASS, 'RouteOrigin' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin',
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'convergence-timeline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksAdded' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksAdded',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-added',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksDeleted' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksDeleted',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-deleted',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority',
False,
[
_MetaInfoClassMember('convergence-timeline', REFERENCE_LIST, 'ConvergenceTimeline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline',
[], [],
''' Convergence timeline details
''',
'convergence_timeline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-added', REFERENCE_LIST, 'LeafNetworksAdded' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksAdded',
[], [],
''' List of Leaf Networks Added
''',
'leaf_networks_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-deleted', REFERENCE_LIST, 'LeafNetworksDeleted' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksDeleted',
[], [],
''' List of Leaf Networks Deleted
''',
'leaf_networks_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_CLASS, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary',
[], [],
''' Summary of the priority
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun',
False,
[
_MetaInfoClassMember('area-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Area ID
''',
'area_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('dijkstra-run-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Area Dijkstra run number
''',
'dijkstra_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of Dijktra calculation (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.LsaProcessed',
[], [],
''' List of type 1/2 LSA changes processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority',
[], [],
''' Convergence information on per-priority basis
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start time (offset from event trigger time in ss
.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.TriggerLsa',
[], [],
''' LSA that triggered the Dijkstra run
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (in hh:mm:ss.msec)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Wait time (offset from event trigger time in ss
.msec)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'dijkstra-run',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary',
False,
[
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type3ls-as', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of Type 3 LSA
''',
'type3ls_as',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type4ls-as', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of Type 4 LSA
''',
'type4ls_as',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type57ls-as', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of Type 5/7 LSA
''',
'type57ls_as',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-origin',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-redistribute',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', REFERENCE_CLASS, 'LdpEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter',
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', REFERENCE_CLASS, 'LdpExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit',
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', REFERENCE_CLASS, 'LsdEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter',
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', REFERENCE_CLASS, 'LsdExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit',
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', REFERENCE_CLASS, 'RiBv4Enter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter',
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', REFERENCE_CLASS, 'RiBv4Exit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit',
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', REFERENCE_CLASS, 'RiBv4Redistribute' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute',
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', REFERENCE_CLASS, 'RouteOrigin' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin',
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'convergence-timeline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksAdded' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksAdded',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-added',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksDeleted' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksDeleted',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-deleted',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority',
False,
[
_MetaInfoClassMember('convergence-timeline', REFERENCE_LIST, 'ConvergenceTimeline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline',
[], [],
''' Convergence timeline details
''',
'convergence_timeline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-added', REFERENCE_LIST, 'LeafNetworksAdded' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksAdded',
[], [],
''' List of Leaf Networks Added
''',
'leaf_networks_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-deleted', REFERENCE_LIST, 'LeafNetworksDeleted' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksDeleted',
[], [],
''' List of Leaf Networks Deleted
''',
'leaf_networks_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_CLASS, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary',
[], [],
''' Summary of the priority
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal',
False,
[
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority',
[], [],
''' Convergence information on a per-priority basis
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'inter-area-and-external',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline',
False,
[
_MetaInfoClassMember('spf-run-number', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific SPF run
''',
'spf_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('dijkstra-run', REFERENCE_LIST, 'DijkstraRun' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun',
[], [],
''' List of Dijkstra runs
''',
'dijkstra_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-and-external', REFERENCE_LIST, 'InterAreaAndExternal' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal',
[], [],
''' Inter-area & external calculation information
''',
'inter_area_and_external',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-summary', REFERENCE_CLASS, 'SpfSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary',
[], [],
''' SPF summary information
''',
'spf_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-offline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SpfRunOfflines' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SpfRunOfflines',
False,
[
_MetaInfoClassMember('spf-run-offline', REFERENCE_LIST, 'SpfRunOffline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline',
[], [],
''' Offline operational data for particular OSPF
SPF run
''',
'spf_run_offline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-offlines',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path.LfaPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path.LfaPath',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-type', REFERENCE_ENUM_CLASS, 'RcmdShowIpfrrLfaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowIpfrrLfaEnum',
[], [],
''' Type of LFA
''',
'lfa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID, in case of Remote LFA
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lfa-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-path', REFERENCE_LIST, 'LfaPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path.LfaPath',
[], [],
''' Backup Path Informatoin
''',
'lfa_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'time-line',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protocol route cost
''',
'cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced IP-FRR Event ID (0 - Not Applicable)
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.LsaProcessed',
[], [],
''' List of LSAs processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path', REFERENCE_LIST, 'Path' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path',
[], [],
''' Path information
''',
'path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Event processed priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-path-change-type', REFERENCE_ENUM_CLASS, 'RcmdShowRoutePathChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRoutePathChangeEnum',
[], [],
''' Route Path Change Type
''',
'route_path_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Route Type intra/inter/l1/l2
''',
'route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-no', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced SPF Run No (0 - Not Applicable)
''',
'spf_run_no',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('time-line', REFERENCE_LIST, 'TimeLine' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine',
[], [],
''' Timeline information
''',
'time_line',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TriggerLsa',
[], [],
''' LSA that triggered this event
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event trigger time
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'summary-external-event-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries',
False,
[
_MetaInfoClassMember('summary-external-event-summary', REFERENCE_LIST, 'SummaryExternalEventSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary',
[], [],
''' OSPF Summary-External Prefix Event data
''',
'summary_external_event_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'summary-external-event-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-type', REFERENCE_ENUM_CLASS, 'RcmdShowIpfrrLfaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowIpfrrLfaEnum',
[], [],
''' Type of LFA
''',
'lfa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID, in case of Remote LFA
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lfa-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-path', REFERENCE_LIST, 'LfaPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath',
[], [],
''' Backup Path Informatoin
''',
'lfa_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'time-line',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protocol route cost
''',
'cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced IP-FRR Event ID (0 - Not Applicable)
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed',
[], [],
''' List of LSAs processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path', REFERENCE_LIST, 'Path' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path',
[], [],
''' Path information
''',
'path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Event processed priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-path-change-type', REFERENCE_ENUM_CLASS, 'RcmdShowRoutePathChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRoutePathChangeEnum',
[], [],
''' Route Path Change Type
''',
'route_path_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Route Type intra/inter/l1/l2
''',
'route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-no', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced SPF Run No (0 - Not Applicable)
''',
'spf_run_no',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('time-line', REFERENCE_LIST, 'TimeLine' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine',
[], [],
''' Timeline information
''',
'time_line',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa',
[], [],
''' LSA that triggered this event
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event trigger time
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventSummaries',
False,
[
_MetaInfoClassMember('prefix-event-summary', REFERENCE_LIST, 'PrefixEventSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary',
[], [],
''' OSPF Prefix Event data
''',
'prefix_event_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path.LfaPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path.LfaPath',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-type', REFERENCE_ENUM_CLASS, 'RcmdShowIpfrrLfaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowIpfrrLfaEnum',
[], [],
''' Type of LFA
''',
'lfa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID, in case of Remote LFA
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lfa-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-path', REFERENCE_LIST, 'LfaPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path.LfaPath',
[], [],
''' Backup Path Informatoin
''',
'lfa_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'time-line',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protocol route cost
''',
'cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced IP-FRR Event ID (0 - Not Applicable)
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.LsaProcessed',
[], [],
''' List of LSAs processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path', REFERENCE_LIST, 'Path' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path',
[], [],
''' Path information
''',
'path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Event processed priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-path-change-type', REFERENCE_ENUM_CLASS, 'RcmdShowRoutePathChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRoutePathChangeEnum',
[], [],
''' Route Path Change Type
''',
'route_path_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Route Type intra/inter/l1/l2
''',
'route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-no', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced SPF Run No (0 - Not Applicable)
''',
'spf_run_no',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('time-line', REFERENCE_LIST, 'TimeLine' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine',
[], [],
''' Timeline information
''',
'time_line',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TriggerLsa',
[], [],
''' LSA that triggered this event
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event trigger time
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'summary-external-event-offline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines',
False,
[
_MetaInfoClassMember('summary-external-event-offline', REFERENCE_LIST, 'SummaryExternalEventOffline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline',
[], [],
''' Offline operational data for particular OSPF
Prefix Event
''',
'summary_external_event_offline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'summary-external-event-offlines',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-type', REFERENCE_ENUM_CLASS, 'RcmdShowIpfrrLfaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowIpfrrLfaEnum',
[], [],
''' Type of LFA
''',
'lfa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID, in case of Remote LFA
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lfa-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-path', REFERENCE_LIST, 'LfaPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath',
[], [],
''' Backup Path Informatoin
''',
'lfa_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'time-line',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protocol route cost
''',
'cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced IP-FRR Event ID (0 - Not Applicable)
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed',
[], [],
''' List of LSAs processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path', REFERENCE_LIST, 'Path' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path',
[], [],
''' Path information
''',
'path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Event processed priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-path-change-type', REFERENCE_ENUM_CLASS, 'RcmdShowRoutePathChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRoutePathChangeEnum',
[], [],
''' Route Path Change Type
''',
'route_path_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Route Type intra/inter/l1/l2
''',
'route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-no', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced SPF Run No (0 - Not Applicable)
''',
'spf_run_no',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('time-line', REFERENCE_LIST, 'TimeLine' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine',
[], [],
''' Timeline information
''',
'time_line',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa',
[], [],
''' LSA that triggered this event
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event trigger time
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-offline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.PrefixEventOfflines',
False,
[
_MetaInfoClassMember('prefix-event-offline', REFERENCE_LIST, 'PrefixEventOffline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline',
[], [],
''' Offline operational data for particular OSPF
Prefix Event
''',
'prefix_event_offline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-offlines',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance.SummaryExternalEventStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance.SummaryExternalEventStatistics',
False,
[
_MetaInfoClassMember('external-added', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Ext Routes Added
''',
'external_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('external-critical', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Ext Routes Critical
''',
'external_critical',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('external-deleted', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Ext Routes Deleted
''',
'external_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('external-high', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Ext Routes High
''',
'external_high',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('external-low', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Ext Routes Low
''',
'external_low',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('external-medium', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Ext Routes Medium
''',
'external_medium',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('external-modified', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Ext Routes Modified
''',
'external_modified',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('external-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total External Routes
''',
'external_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-added', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total IA Routes Added
''',
'inter_area_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-critical', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total IA Routes Critical
''',
'inter_area_critical',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-deleted', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total IA Routes Deleted
''',
'inter_area_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-high', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total IA Routes High
''',
'inter_area_high',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-low', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total IA Routes Low
''',
'inter_area_low',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-medium', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total IA Routes Medium
''',
'inter_area_medium',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-modified', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total IA Routes Modified
''',
'inter_area_modified',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('inter-area-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Inter-Area Routes
''',
'inter_area_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'summary-external-event-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances.Instance' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances.Instance',
False,
[
_MetaInfoClassMember('instance-name', ATTRIBUTE, 'str' , None, None,
[], [b'[\\w\\-\\.:,_@#%$\\+=\\|;]+'],
''' Operational data for a particular instance
''',
'instance_name',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('ipfrr-event-offlines', REFERENCE_CLASS, 'IpfrrEventOfflines' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines',
[], [],
''' OSPF IP-FRR Event offline data
''',
'ipfrr_event_offlines',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-summaries', REFERENCE_CLASS, 'IpfrrEventSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries',
[], [],
''' OSPF IP-FRR events summary data
''',
'ipfrr_event_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-event-offlines', REFERENCE_CLASS, 'PrefixEventOfflines' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventOfflines',
[], [],
''' OSPF Prefix events offline data
''',
'prefix_event_offlines',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-event-statistics', REFERENCE_CLASS, 'PrefixEventStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventStatistics',
[], [],
''' OSPF Prefix events summary data
''',
'prefix_event_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-event-summaries', REFERENCE_CLASS, 'PrefixEventSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.PrefixEventSummaries',
[], [],
''' OSPF Prefix events summary data
''',
'prefix_event_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-offlines', REFERENCE_CLASS, 'SpfRunOfflines' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunOfflines',
[], [],
''' OSPF SPF run offline data
''',
'spf_run_offlines',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-summaries', REFERENCE_CLASS, 'SpfRunSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SpfRunSummaries',
[], [],
''' OSPF SPF run summary data
''',
'spf_run_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('summary-external-event-offlines', REFERENCE_CLASS, 'SummaryExternalEventOfflines' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines',
[], [],
''' OSPF Summary-External Prefix events offline
data
''',
'summary_external_event_offlines',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('summary-external-event-statistics', REFERENCE_CLASS, 'SummaryExternalEventStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventStatistics',
[], [],
''' Summary-External prefix monitoring statistics
''',
'summary_external_event_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('summary-external-event-summaries', REFERENCE_CLASS, 'SummaryExternalEventSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries',
[], [],
''' OSPF Summary-External Prefix events summary
data
''',
'summary_external_event_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf.Instances' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf.Instances',
False,
[
_MetaInfoClassMember('instance', REFERENCE_LIST, 'Instance' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances.Instance',
[], [],
''' Operational data for a particular instance
''',
'instance',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instances',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ospf' : {
'meta_info' : _MetaInfoClass('Rcmd.Ospf',
False,
[
_MetaInfoClassMember('instances', REFERENCE_CLASS, 'Instances' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf.Instances',
[], [],
''' Operational data
''',
'instances',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ospf',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Normal.ProtocolConfig.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Normal.ProtocolConfig.Priority',
False,
[
_MetaInfoClassMember('disable', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Enable/Disable cfg
''',
'disable',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-name', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Priority Level
''',
'priority_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' threshold value
''',
'threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Normal.ProtocolConfig' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Normal.ProtocolConfig',
False,
[
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Normal.ProtocolConfig.Priority',
[], [],
''' Priority level configuration
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protocol-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Protocol Name
''',
'protocol_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'protocol-config',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Normal.ServerDetail.TraceInformation' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Normal.ServerDetail.TraceInformation',
False,
[
_MetaInfoClassMember('error-stats', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Server Error Status
''',
'error_stats',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-run-stats', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Server Last Run Status
''',
'last_run_stats',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-stats', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Server Total Status
''',
'total_stats',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trace-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Configured Hostname
''',
'trace_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trace-information',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Normal.ServerDetail' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Normal.ServerDetail',
False,
[
_MetaInfoClassMember('memory-suspend', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Memory Suspend
''',
'memory_suspend',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('overload-suspend', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Overload suspend
''',
'overload_suspend',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trace-information', REFERENCE_LIST, 'TraceInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Normal.ServerDetail.TraceInformation',
[], [],
''' Trace Information
''',
'trace_information',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'server-detail',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Normal' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Normal',
False,
[
_MetaInfoClassMember('archive-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive Count
''',
'archive_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('diag-node-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Diag Node count
''',
'diag_node_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('diagnostics-archive-node', ATTRIBUTE, 'str' , None, None,
[], [],
''' Diagnostics Archival Node (Applicable for local
location)
''',
'diagnostics_archive_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('diagnostics-archive-path', ATTRIBUTE, 'str' , None, None,
[], [],
''' Diagnostics Archival Path
''',
'diagnostics_archive_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('disabled-node-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Disabled Node count
''',
'disabled_node_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-buffer-size', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Event Buffer Size
''',
'event_buffer_size',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('host-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Configured Hostname
''',
'host_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('in-active-node-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Disabled Node count
''',
'in_active_node_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Interface events count
''',
'interface_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-archival-error', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Archival Error
''',
'last_archival_error',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-archival-error-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Archival Status
''',
'last_archival_error_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-archival-status', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Archival Status
''',
'last_archival_status',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-process-duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Processing Duration
''',
'last_process_duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-process-start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Processing Start Time
''',
'last_process_start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-process-state', REFERENCE_ENUM_CLASS, 'RcmdShowPrcsStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowPrcsStateEnum',
[], [],
''' Process state
''',
'last_process_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('max-events', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Maximum Events
''',
'max_events',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('max-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Max Interface events count
''',
'max_interface_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('monitoring-interval', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Configured Monitor Interval
''',
'monitoring_interval',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('next-interval', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time for next processing
''',
'next_interval',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-lc-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LC count
''',
'node_lc_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-rp-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' RP count
''',
'node_rp_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Post Processing count
''',
'process_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protocol-config', REFERENCE_LIST, 'ProtocolConfig' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Normal.ProtocolConfig',
[], [],
''' Protocol level configuration
''',
'protocol_config',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reports-archive-node', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reports Archival Node (Applicable for local
location)
''',
'reports_archive_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reports-archive-path', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reports Archival Path
''',
'reports_archive_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('server-detail', REFERENCE_LIST, 'ServerDetail' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Normal.ServerDetail',
[], [],
''' Detailed Information
''',
'server_detail',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-process-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Processing count
''',
'spf_process_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('status', REFERENCE_ENUM_CLASS, 'RcmdBagEnableDisableEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBagEnableDisableEnum',
[], [],
''' Server Status
''',
'status',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'normal',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Detail.ProtocolConfig.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Detail.ProtocolConfig.Priority',
False,
[
_MetaInfoClassMember('disable', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Enable/Disable cfg
''',
'disable',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-name', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Priority Level
''',
'priority_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' threshold value
''',
'threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Detail.ProtocolConfig' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Detail.ProtocolConfig',
False,
[
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Detail.ProtocolConfig.Priority',
[], [],
''' Priority level configuration
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protocol-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Protocol Name
''',
'protocol_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'protocol-config',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Detail.ServerDetail.TraceInformation' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Detail.ServerDetail.TraceInformation',
False,
[
_MetaInfoClassMember('error-stats', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Server Error Status
''',
'error_stats',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-run-stats', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Server Last Run Status
''',
'last_run_stats',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-stats', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Server Total Status
''',
'total_stats',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trace-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Configured Hostname
''',
'trace_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trace-information',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Detail.ServerDetail' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Detail.ServerDetail',
False,
[
_MetaInfoClassMember('memory-suspend', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Memory Suspend
''',
'memory_suspend',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('overload-suspend', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Overload suspend
''',
'overload_suspend',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trace-information', REFERENCE_LIST, 'TraceInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Detail.ServerDetail.TraceInformation',
[], [],
''' Trace Information
''',
'trace_information',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'server-detail',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server.Detail' : {
'meta_info' : _MetaInfoClass('Rcmd.Server.Detail',
False,
[
_MetaInfoClassMember('archive-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive Count
''',
'archive_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('diag-node-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Diag Node count
''',
'diag_node_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('diagnostics-archive-node', ATTRIBUTE, 'str' , None, None,
[], [],
''' Diagnostics Archival Node (Applicable for local
location)
''',
'diagnostics_archive_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('diagnostics-archive-path', ATTRIBUTE, 'str' , None, None,
[], [],
''' Diagnostics Archival Path
''',
'diagnostics_archive_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('disabled-node-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Disabled Node count
''',
'disabled_node_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-buffer-size', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Event Buffer Size
''',
'event_buffer_size',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('host-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Configured Hostname
''',
'host_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('in-active-node-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Disabled Node count
''',
'in_active_node_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Interface events count
''',
'interface_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-archival-error', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Archival Error
''',
'last_archival_error',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-archival-error-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Archival Status
''',
'last_archival_error_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-archival-status', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Archival Status
''',
'last_archival_status',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-process-duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Processing Duration
''',
'last_process_duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-process-start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Processing Start Time
''',
'last_process_start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-process-state', REFERENCE_ENUM_CLASS, 'RcmdShowPrcsStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowPrcsStateEnum',
[], [],
''' Process state
''',
'last_process_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('max-events', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Maximum Events
''',
'max_events',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('max-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Max Interface events count
''',
'max_interface_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('monitoring-interval', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Configured Monitor Interval
''',
'monitoring_interval',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('next-interval', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time for next processing
''',
'next_interval',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-lc-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LC count
''',
'node_lc_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-rp-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' RP count
''',
'node_rp_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Post Processing count
''',
'process_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protocol-config', REFERENCE_LIST, 'ProtocolConfig' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Detail.ProtocolConfig',
[], [],
''' Protocol level configuration
''',
'protocol_config',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reports-archive-node', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reports Archival Node (Applicable for local
location)
''',
'reports_archive_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reports-archive-path', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reports Archival Path
''',
'reports_archive_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('server-detail', REFERENCE_LIST, 'ServerDetail' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Detail.ServerDetail',
[], [],
''' Detailed Information
''',
'server_detail',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-process-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Processing count
''',
'spf_process_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('status', REFERENCE_ENUM_CLASS, 'RcmdBagEnableDisableEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBagEnableDisableEnum',
[], [],
''' Server Status
''',
'status',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'detail',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Server' : {
'meta_info' : _MetaInfoClass('Rcmd.Server',
False,
[
_MetaInfoClassMember('detail', REFERENCE_CLASS, 'Detail' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Detail',
[], [],
''' Server Info
''',
'detail',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('normal', REFERENCE_CLASS, 'Normal' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server.Normal',
[], [],
''' Server Info
''',
'normal',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'server',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Node.NodeInformation' : {
'meta_info' : _MetaInfoClass('Rcmd.Node.NodeInformation',
False,
[
_MetaInfoClassMember('card-state', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Card State
''',
'card_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('diag-mode', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Diag Mode
''',
'diag_mode',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fwd-referenced', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Forward Referenced
''',
'fwd_referenced',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-update-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Updated Time
''',
'last_update_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Node Id
''',
'node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Node Name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-state', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Node State
''',
'node_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-type', REFERENCE_ENUM_CLASS, 'RcmdShowNodeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowNodeEnum',
[], [],
''' Node Type
''',
'node_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('rack-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Rack Id
''',
'rack_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('redundancy-state', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Redundancy State
''',
'redundancy_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('software-state', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Software State
''',
'software_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('status', REFERENCE_ENUM_CLASS, 'RcmdBagEnblDsblEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBagEnblDsblEnum',
[], [],
''' Status
''',
'status',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'node-information',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Node' : {
'meta_info' : _MetaInfoClass('Rcmd.Node',
False,
[
_MetaInfoClassMember('node-information', REFERENCE_LIST, 'NodeInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Node.NodeInformation',
[], [],
''' Node Info
''',
'node_information',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'node',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic',
False,
[
_MetaInfoClassMember('below-threshold', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Covearge is below Configured Threshold
''',
'below_threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('local-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Local LFA Coverage in percentage
''',
'local_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Remote LFA Coverage in percentage
''',
'remote_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'primary-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode',
False,
[
_MetaInfoClassMember('in-use-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Inuse time of the Remote Node (eg: Apr 24 13:16
:04.961)
''',
'in_use_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of paths protected by this Remote Node
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('primary-path', REFERENCE_LIST, 'PrimaryPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath',
[], [],
''' Protected Primary Paths
''',
'primary_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote-LFA Node ID
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-node',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific IP-FRR Event
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('completed-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Completed reference SPF Run Number
''',
'completed_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage for all priorities
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration for the calculation (in milliseconds)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-id-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Event ID
''',
'event_id_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-statistic', REFERENCE_LIST, 'IpfrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic',
[], [],
''' IP-Frr Statistics categorized by priority
''',
'ipfrr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node', REFERENCE_LIST, 'RemoteNode' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode',
[], [],
''' Remote Node Information
''',
'remote_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time-offset', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start Time offset from trigger time (in
milliseconds)
''',
'start_time_offset',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Routes for all priorities
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Triggered reference SPF Run Number
''',
'trigger_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (eg: Apr 24 13:16:04.961)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Waiting Time (in milliseconds)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventSummaries',
False,
[
_MetaInfoClassMember('ipfrr-event-summary', REFERENCE_LIST, 'IpfrrEventSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary',
[], [],
''' IP-FRR Event data
''',
'ipfrr_event_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic',
False,
[
_MetaInfoClassMember('prefix-info', REFERENCE_UNION, 'str' , None, None,
[], [],
''' Events with Prefix
''',
'prefix_info',
'Cisco-IOS-XR-infra-rcmd-oper', True, [
_MetaInfoClassMember('prefix-info', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' Events with Prefix
''',
'prefix_info',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('prefix-info', ATTRIBUTE, 'str' , None, None,
[], [b'((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'],
''' Events with Prefix
''',
'prefix_info',
'Cisco-IOS-XR-infra-rcmd-oper', True),
]),
_MetaInfoClassMember('add-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times route gets Added
''',
'add_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('critical-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under Critical Priority
''',
'critical_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('delete-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times route gets Deleted
''',
'delete_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('high-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under High Priority
''',
'high_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Last event Add/Delete
''',
'last_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Last Known Cost
''',
'last_cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-event-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last event trigger time
''',
'last_event_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Last event processed priority
''',
'last_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Last event Route Type
''',
'last_route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('low-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under Low Priority
''',
'low_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('medium-priority', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times processed under Medium Priority
''',
'medium_priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modify-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times route gets Deleted
''',
'modify_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceed-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No. of times threshold got exceeded
''',
'threshold_exceed_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventStatistics',
False,
[
_MetaInfoClassMember('prefix-event-statistic', REFERENCE_LIST, 'PrefixEventStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic',
[], [],
''' Monitoring Statistics
''',
'prefix_event_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of SPF calculation (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('is-data-complete', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Whether the event has all information
''',
'is_data_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('isis-level', REFERENCE_ENUM_CLASS, 'RcmdIsisLvlEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdIsisLvlEnum',
[], [],
''' ISIS Level
''',
'isis_level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_LIST, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary',
[], [],
''' Convergence information summary on per-priority
basis
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'RcmdSpfStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdSpfStateEnum',
[], [],
''' SPF state
''',
'state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('topology', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Topology index (multi-topology)
''',
'topology',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-lsp-changes', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of LSP changes processed
''',
'total_lsp_changes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (in hh:mm:ss.msec)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'RcmdIsisSpfEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdIsisSpfEnum',
[], [],
''' Type of SPF
''',
'type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.NodeStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.NodeStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'node-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.TriggerLsp' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.TriggerLsp',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-id', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP ID
''',
'lsp_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsp',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RouteOrigin' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RouteOrigin',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-origin',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Enter' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Enter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Exit' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Exit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Redistribute' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Redistribute',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-redistribute',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', REFERENCE_CLASS, 'LdpEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpEnter',
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', REFERENCE_CLASS, 'LdpExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpExit',
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', REFERENCE_CLASS, 'LsdEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdEnter',
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', REFERENCE_CLASS, 'LsdExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdExit',
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', REFERENCE_CLASS, 'RiBv4Enter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Enter',
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', REFERENCE_CLASS, 'RiBv4Exit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Exit',
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', REFERENCE_CLASS, 'RiBv4Redistribute' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Redistribute',
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', REFERENCE_CLASS, 'RouteOrigin' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RouteOrigin',
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'convergence-timeline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksAdded' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksAdded',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-added',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksDeleted' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksDeleted',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-deleted',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority',
False,
[
_MetaInfoClassMember('convergence-timeline', REFERENCE_LIST, 'ConvergenceTimeline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline',
[], [],
''' Convergence timeline details
''',
'convergence_timeline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-added', REFERENCE_LIST, 'LeafNetworksAdded' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksAdded',
[], [],
''' List of Leaf Networks Added
''',
'leaf_networks_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-deleted', REFERENCE_LIST, 'LeafNetworksDeleted' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksDeleted',
[], [],
''' List of Leaf Networks Deleted
''',
'leaf_networks_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_CLASS, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary',
[], [],
''' Summary of the priority
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-id', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP ID
''',
'lsp_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsp-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspRegenerated' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspRegenerated',
False,
[
_MetaInfoClassMember('isis-level', REFERENCE_ENUM_CLASS, 'RcmdIsisLvlEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdIsisLvlEnum',
[], [],
''' ISIS Level
''',
'isis_level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-id', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP ID
''',
'lsp_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reason', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger reasons for LSP regeneration. Example:
pr^ - periodic, cr^ - clear (Check the
documentation for the entire list)
''',
'reason',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('serial-number-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Serial Number of the session event
''',
'serial_number_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Run Number
''',
'spf_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsp-regenerated',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary',
False,
[
_MetaInfoClassMember('spf-run-number', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific SPF run
''',
'spf_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('lsp-processed', REFERENCE_LIST, 'LspProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspProcessed',
[], [],
''' List of LSP changes processed
''',
'lsp_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regenerated', REFERENCE_LIST, 'LspRegenerated' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspRegenerated',
[], [],
''' List of LSP regenerated
''',
'lsp_regenerated',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-statistics', REFERENCE_CLASS, 'NodeStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.NodeStatistics',
[], [],
''' SPF Node statistics
''',
'node_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority',
[], [],
''' Convergence information on per-priority basis
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reason', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger reasons for SPF run. Example: pr^ -
periodic, cr^ - clear (Check the documentation
for the entire list)
''',
'reason',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-summary', REFERENCE_CLASS, 'SpfSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary',
[], [],
''' SPF summary information
''',
'spf_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start time (offset from event trigger time in ss
.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsp', REFERENCE_LIST, 'TriggerLsp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.TriggerLsp',
[], [],
''' Trigger LSP
''',
'trigger_lsp',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Wait time applied at SPF schedule (in msec)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunSummaries',
False,
[
_MetaInfoClassMember('spf-run-summary', REFERENCE_LIST, 'SpfRunSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary',
[], [],
''' SPF Event data
''',
'spf_run_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic',
False,
[
_MetaInfoClassMember('below-threshold', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Covearge is below Configured Threshold
''',
'below_threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('local-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Local LFA Coverage in percentage
''',
'local_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-lfa-coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Remote LFA Coverage in percentage
''',
'remote_lfa_coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'primary-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode',
False,
[
_MetaInfoClassMember('in-use-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Inuse time of the Remote Node (eg: Apr 24 13:16
:04.961)
''',
'in_use_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of paths protected by this Remote Node
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('primary-path', REFERENCE_LIST, 'PrimaryPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath',
[], [],
''' Protected Primary Paths
''',
'primary_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote-LFA Node ID
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-node',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific IP-FRR Event
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('completed-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Completed reference SPF Run Number
''',
'completed_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage for all priorities
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration for the calculation (in milliseconds)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-id-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Event ID
''',
'event_id_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-statistic', REFERENCE_LIST, 'IpfrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic',
[], [],
''' IP-Frr Statistics categorized by priority
''',
'ipfrr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node', REFERENCE_LIST, 'RemoteNode' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode',
[], [],
''' Remote Node Information
''',
'remote_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time-offset', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start Time offset from trigger time (in
milliseconds)
''',
'start_time_offset',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cumulative Number of Routes for all priorities
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IP-Frr Triggered reference SPF Run Number
''',
'trigger_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (eg: Apr 24 13:16:04.961)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Waiting Time (in milliseconds)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-offline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.IpfrrEventOfflines',
False,
[
_MetaInfoClassMember('ipfrr-event-offline', REFERENCE_LIST, 'IpfrrEventOffline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline',
[], [],
''' Offline operational data for particular ISIS
IP-FRR Event
''',
'ipfrr_event_offline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ipfrr-event-offlines',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of SPF calculation (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('is-data-complete', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Whether the event has all information
''',
'is_data_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('isis-level', REFERENCE_ENUM_CLASS, 'RcmdIsisLvlEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdIsisLvlEnum',
[], [],
''' ISIS Level
''',
'isis_level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_LIST, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary',
[], [],
''' Convergence information summary on per-priority
basis
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'RcmdSpfStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdSpfStateEnum',
[], [],
''' SPF state
''',
'state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('topology', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Topology index (multi-topology)
''',
'topology',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-lsp-changes', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Total number of LSP changes processed
''',
'total_lsp_changes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger time (in hh:mm:ss.msec)
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'RcmdIsisSpfEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdIsisSpfEnum',
[], [],
''' Type of SPF
''',
'type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.NodeStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.NodeStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'node-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.TriggerLsp' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.TriggerLsp',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-id', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP ID
''',
'lsp_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsp',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.RouteStatistics' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.RouteStatistics',
False,
[
_MetaInfoClassMember('adds', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Added
''',
'adds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('deletes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Deleted
''',
'deletes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('modifies', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Modified
''',
'modifies',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Reachable
''',
'reachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('touches', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Touched
''',
'touches',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('unreachables', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unreachable
''',
'unreachables',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.FrrStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.FrrStatistic',
False,
[
_MetaInfoClassMember('coverage', ATTRIBUTE, 'str' , None, None,
[], [],
''' Coverage in percentage
''',
'coverage',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fully-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Fully Protected Routes
''',
'fully_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('partially-protected-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Partially Protected Routes
''',
'partially_protected_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-routes', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Number of Routes
''',
'total_routes',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'frr-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary',
False,
[
_MetaInfoClassMember('frr-statistic', REFERENCE_LIST, 'FrrStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.FrrStatistic',
[], [],
''' Fast Re-Route Statistics
''',
'frr_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('level', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Critical, High, Medium or Low
''',
'level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-statistics', REFERENCE_CLASS, 'RouteStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.RouteStatistics',
[], [],
''' Route statistics
''',
'route_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RouteOrigin' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RouteOrigin',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'route-origin',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Enter' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Enter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Exit' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Exit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Redistribute' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Redistribute',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ri-bv4-redistribute',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdEnter' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdEnter',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-enter',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdExit' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdExit',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsd-exit',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls.FibComplete' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls.FibComplete',
False,
[
_MetaInfoClassMember('duration', ATTRIBUTE, 'str' , None, None,
[], [],
''' Duration of processing (in ss.msec)
''',
'duration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last route process time relative to event
trigger time (in ss.msec)
''',
'end_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' First route process time relative to event
trigger time (in ss.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'fib-complete',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', REFERENCE_CLASS, 'FibComplete' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls.FibComplete',
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', REFERENCE_CLASS, 'LdpEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpEnter',
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', REFERENCE_CLASS, 'LdpExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpExit',
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', REFERENCE_CLASS, 'LsdEnter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdEnter',
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', REFERENCE_CLASS, 'LsdExit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdExit',
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', REFERENCE_CLASS, 'RiBv4Enter' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Enter',
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', REFERENCE_CLASS, 'RiBv4Exit' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Exit',
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', REFERENCE_CLASS, 'RiBv4Redistribute' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Redistribute',
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', REFERENCE_CLASS, 'RouteOrigin' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RouteOrigin',
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'convergence-timeline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksAdded' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksAdded',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-added',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksDeleted' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksDeleted',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IP address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('net-mask', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Mask
''',
'net_mask',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'leaf-networks-deleted',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority',
False,
[
_MetaInfoClassMember('convergence-timeline', REFERENCE_LIST, 'ConvergenceTimeline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline',
[], [],
''' Convergence timeline details
''',
'convergence_timeline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-added', REFERENCE_LIST, 'LeafNetworksAdded' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksAdded',
[], [],
''' List of Leaf Networks Added
''',
'leaf_networks_added',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('leaf-networks-deleted', REFERENCE_LIST, 'LeafNetworksDeleted' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksDeleted',
[], [],
''' List of Leaf Networks Deleted
''',
'leaf_networks_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority-summary', REFERENCE_CLASS, 'PrioritySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary',
[], [],
''' Summary of the priority
''',
'priority_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'priority',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-id', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP ID
''',
'lsp_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsp-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspRegenerated' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspRegenerated',
False,
[
_MetaInfoClassMember('isis-level', REFERENCE_ENUM_CLASS, 'RcmdIsisLvlEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdIsisLvlEnum',
[], [],
''' ISIS Level
''',
'isis_level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-id', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP ID
''',
'lsp_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reason', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger reasons for LSP regeneration. Example:
pr^ - periodic, cr^ - clear (Check the
documentation for the entire list)
''',
'reason',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('serial-number-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Serial Number of the session event
''',
'serial_number_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Run Number
''',
'spf_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsp-regenerated',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline',
False,
[
_MetaInfoClassMember('spf-run-number', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific SPF run
''',
'spf_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('lsp-processed', REFERENCE_LIST, 'LspProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspProcessed',
[], [],
''' List of LSP changes processed
''',
'lsp_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regenerated', REFERENCE_LIST, 'LspRegenerated' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspRegenerated',
[], [],
''' List of LSP regenerated
''',
'lsp_regenerated',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-statistics', REFERENCE_CLASS, 'NodeStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.NodeStatistics',
[], [],
''' SPF Node statistics
''',
'node_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_LIST, 'Priority' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority',
[], [],
''' Convergence information on per-priority basis
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reason', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger reasons for SPF run. Example: pr^ -
periodic, cr^ - clear (Check the documentation
for the entire list)
''',
'reason',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-summary', REFERENCE_CLASS, 'SpfSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary',
[], [],
''' SPF summary information
''',
'spf_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('start-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Start time (offset from event trigger time in ss
.msec)
''',
'start_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsp', REFERENCE_LIST, 'TriggerLsp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.TriggerLsp',
[], [],
''' Trigger LSP
''',
'trigger_lsp',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('wait-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Wait time applied at SPF schedule (in msec)
''',
'wait_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-offline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.SpfRunOfflines' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.SpfRunOfflines',
False,
[
_MetaInfoClassMember('spf-run-offline', REFERENCE_LIST, 'SpfRunOffline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline',
[], [],
''' Offline operational data for particular ISIS
SPF run
''',
'spf_run_offline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'spf-run-offlines',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-type', REFERENCE_ENUM_CLASS, 'RcmdShowIpfrrLfaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowIpfrrLfaEnum',
[], [],
''' Type of LFA
''',
'lfa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID, in case of Remote LFA
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lfa-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-path', REFERENCE_LIST, 'LfaPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath',
[], [],
''' Backup Path Informatoin
''',
'lfa_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'time-line',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protocol route cost
''',
'cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced IP-FRR Event ID (0 - Not Applicable)
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed',
[], [],
''' List of LSAs processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path', REFERENCE_LIST, 'Path' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path',
[], [],
''' Path information
''',
'path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Event processed priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-path-change-type', REFERENCE_ENUM_CLASS, 'RcmdShowRoutePathChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRoutePathChangeEnum',
[], [],
''' Route Path Change Type
''',
'route_path_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Route Type intra/inter/l1/l2
''',
'route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-no', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced SPF Run No (0 - Not Applicable)
''',
'spf_run_no',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('time-line', REFERENCE_LIST, 'TimeLine' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine',
[], [],
''' Timeline information
''',
'time_line',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa',
[], [],
''' LSA that triggered this event
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event trigger time
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventSummaries',
False,
[
_MetaInfoClassMember('prefix-event-summary', REFERENCE_LIST, 'PrefixEventSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary',
[], [],
''' Prefix Event data
''',
'prefix_event_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ip-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime',
False,
[
_MetaInfoClassMember('fastest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the minimum time
''',
'fastest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('maximum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Maximum time(in seconds.milliseconds)
''',
'maximum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('minimum-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Minimum time(in seconds.milliseconds)
''',
'minimum_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('slowest-node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name which took the maximum time
''',
'slowest_node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'mpls-convergence-time',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-type', REFERENCE_ENUM_CLASS, 'RcmdShowIpfrrLfaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowIpfrrLfaEnum',
[], [],
''' Type of LFA
''',
'lfa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID, in case of Remote LFA
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lfa-path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lfa-path', REFERENCE_LIST, 'LfaPath' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath',
[], [],
''' Backup Path Informatoin
''',
'lfa_path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('neighbour-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Nexthop Address
''',
'neighbour_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-metric', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Path Metric
''',
'path_metric',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'path',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'trigger-lsa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-ip',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls',
False,
[
_MetaInfoClassMember('fib-complete', ATTRIBUTE, 'str' , None, None,
[], [],
''' Completion point of FIB
''',
'fib_complete',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Linecard node name
''',
'node_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('speed', REFERENCE_ENUM_CLASS, 'RcmdLinecardSpeedEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLinecardSpeedEnum',
[], [],
''' Relative convergence speed
''',
'speed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lc-mpls',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine',
False,
[
_MetaInfoClassMember('lc-ip', REFERENCE_LIST, 'LcIp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp',
[], [],
''' List of Linecards' completion point for IP
routes
''',
'lc_ip',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lc-mpls', REFERENCE_LIST, 'LcMpls' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls',
[], [],
''' List of Linecards' completion point for MPLS
labels
''',
'lc_mpls',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LDP
''',
'ldp_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LDP to LSD
''',
'ldp_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of LSD
''',
'lsd_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsd-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point of LSD to FIBs
''',
'lsd_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-enter', ATTRIBUTE, 'str' , None, None,
[], [],
''' Entry point of IPv4 RIB
''',
'ri_bv4_enter',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-exit', ATTRIBUTE, 'str' , None, None,
[], [],
''' Exit point from IPv4 RIB to FIBs
''',
'ri_bv4_exit',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ri-bv4-redistribute', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route Redistribute point from IPv4 RIB to LDP
''',
'ri_bv4_redistribute',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-origin', ATTRIBUTE, 'str' , None, None,
[], [],
''' Route origin (routing protocol)
''',
'route_origin',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'time-line',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed',
False,
[
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdLsChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsChangeEnum',
[], [],
''' Add, Delete, Modify
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' LSA ID
''',
'lsa_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-type', REFERENCE_ENUM_CLASS, 'RcmdLsaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLsaEnum',
[], [],
''' LSA type
''',
'lsa_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('origin-router-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Originating Router ID
''',
'origin_router_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'str' , None, None,
[], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsa-processed',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('change-type', REFERENCE_ENUM_CLASS, 'RcmdChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdChangeEnum',
[], [],
''' Event Add/Delete
''',
'change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('cost', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protocol route cost
''',
'cost',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ip-convergence-time', REFERENCE_CLASS, 'IpConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime',
[], [],
''' Convergence time for IP route programming
''',
'ip_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced IP-FRR Event ID (0 - Not Applicable)
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsa-processed', REFERENCE_LIST, 'LsaProcessed' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed',
[], [],
''' List of LSAs processed
''',
'lsa_processed',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('mpls-convergence-time', REFERENCE_CLASS, 'MplsConvergenceTime' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime',
[], [],
''' Convergence time for MPLS label programming
''',
'mpls_convergence_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path', REFERENCE_LIST, 'Path' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path',
[], [],
''' Path information
''',
'path',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Prefix
''',
'prefix',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-lenth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Prefix length
''',
'prefix_lenth',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'RcmdPriorityLevelEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdPriorityLevelEnum',
[], [],
''' Event processed priority
''',
'priority',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-path-change-type', REFERENCE_ENUM_CLASS, 'RcmdShowRoutePathChangeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRoutePathChangeEnum',
[], [],
''' Route Path Change Type
''',
'route_path_change_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-type', REFERENCE_ENUM_CLASS, 'RcmdShowRouteEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowRouteEnum',
[], [],
''' Route Type intra/inter/l1/l2
''',
'route_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-no', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Referenced SPF Run No (0 - Not Applicable)
''',
'spf_run_no',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('threshold-exceeded', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Threshold exceeded
''',
'threshold_exceeded',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('time-line', REFERENCE_LIST, 'TimeLine' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine',
[], [],
''' Timeline information
''',
'time_line',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-lsa', REFERENCE_LIST, 'TriggerLsa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa',
[], [],
''' LSA that triggered this event
''',
'trigger_lsa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('trigger-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event trigger time
''',
'trigger_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-offline',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.PrefixEventOfflines' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.PrefixEventOfflines',
False,
[
_MetaInfoClassMember('prefix-event-offline', REFERENCE_LIST, 'PrefixEventOffline' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline',
[], [],
''' Offline operational data for particular ISIS
Prefix Event
''',
'prefix_event_offline',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'prefix-event-offlines',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.LspRegenerateds.LspRegenerated' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.LspRegenerateds.LspRegenerated',
False,
[
_MetaInfoClassMember('serial-number', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Data for a particular regenerated LSP
''',
'serial_number',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('isis-level', REFERENCE_ENUM_CLASS, 'RcmdIsisLvlEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdIsisLvlEnum',
[], [],
''' ISIS Level
''',
'isis_level',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-id', ATTRIBUTE, 'str' , None, None,
[], [],
''' LSP ID
''',
'lsp_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reason', ATTRIBUTE, 'str' , None, None,
[], [],
''' Trigger reasons for LSP regeneration. Example:
pr^ - periodic, cr^ - clear (Check the
documentation for the entire list)
''',
'reason',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('reception-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Reception Time on router (in hh:mm:ss.msec)
''',
'reception_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence Number
''',
'sequence_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('serial-number-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Serial Number of the session event
''',
'serial_number_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Run Number
''',
'spf_run_number',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsp-regenerated',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance.LspRegenerateds' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance.LspRegenerateds',
False,
[
_MetaInfoClassMember('lsp-regenerated', REFERENCE_LIST, 'LspRegenerated' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.LspRegenerateds.LspRegenerated',
[], [],
''' Regenerated LSP data
''',
'lsp_regenerated',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'lsp-regenerateds',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances.Instance' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances.Instance',
False,
[
_MetaInfoClassMember('instance-name', ATTRIBUTE, 'str' , None, None,
[], [b'[\\w\\-\\.:,_@#%$\\+=\\|;]+'],
''' Operational data for a particular instance
''',
'instance_name',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('ipfrr-event-offlines', REFERENCE_CLASS, 'IpfrrEventOfflines' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventOfflines',
[], [],
''' ISIS IP-FRR Event offline data
''',
'ipfrr_event_offlines',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-summaries', REFERENCE_CLASS, 'IpfrrEventSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.IpfrrEventSummaries',
[], [],
''' ISIS IP-FRR events summary data
''',
'ipfrr_event_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regenerateds', REFERENCE_CLASS, 'LspRegenerateds' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.LspRegenerateds',
[], [],
''' Regenerated LSP data
''',
'lsp_regenerateds',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-event-offlines', REFERENCE_CLASS, 'PrefixEventOfflines' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventOfflines',
[], [],
''' ISIS Prefix events offline data
''',
'prefix_event_offlines',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-event-statistics', REFERENCE_CLASS, 'PrefixEventStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventStatistics',
[], [],
''' ISIS Prefix events statistics data
''',
'prefix_event_statistics',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('prefix-event-summaries', REFERENCE_CLASS, 'PrefixEventSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.PrefixEventSummaries',
[], [],
''' ISIS Prefix events summary data
''',
'prefix_event_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-offlines', REFERENCE_CLASS, 'SpfRunOfflines' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunOfflines',
[], [],
''' ISIS SPF run offline data
''',
'spf_run_offlines',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-run-summaries', REFERENCE_CLASS, 'SpfRunSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance.SpfRunSummaries',
[], [],
''' ISIS SPF run summary data
''',
'spf_run_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis.Instances' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis.Instances',
False,
[
_MetaInfoClassMember('instance', REFERENCE_LIST, 'Instance' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances.Instance',
[], [],
''' Operational data for a particular instance
''',
'instance',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instances',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Isis' : {
'meta_info' : _MetaInfoClass('Rcmd.Isis',
False,
[
_MetaInfoClassMember('instances', REFERENCE_CLASS, 'Instances' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis.Instances',
[], [],
''' Operational data
''',
'instances',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'isis',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Memory.MemoryInfo' : {
'meta_info' : _MetaInfoClass('Rcmd.Memory.MemoryInfo',
False,
[
_MetaInfoClassMember('alloc-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Allocated count
''',
'alloc_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('alloc-fails', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Allocation Fails
''',
'alloc_fails',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('current-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Current Count
''',
'current_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('freed-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Freed Count
''',
'freed_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('memory-type', REFERENCE_ENUM_CLASS, 'RcmdShowMemEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowMemEnum',
[], [],
''' Memory Type
''',
'memory_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('size', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Size of the datastructure
''',
'size',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('structure-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Structure Name
''',
'structure_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'memory-info',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Memory.EdmMemoryInfo' : {
'meta_info' : _MetaInfoClass('Rcmd.Memory.EdmMemoryInfo',
False,
[
_MetaInfoClassMember('failure', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cache-hit failure
''',
'failure',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('size', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Size of the block
''',
'size',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('success', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cache-hit success
''',
'success',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total request
''',
'total',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'edm-memory-info',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Memory.StringMemoryInfo' : {
'meta_info' : _MetaInfoClass('Rcmd.Memory.StringMemoryInfo',
False,
[
_MetaInfoClassMember('failure', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cache-hit failure
''',
'failure',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('size', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Size of the block
''',
'size',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('success', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cache-hit success
''',
'success',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total request
''',
'total',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'string-memory-info',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Memory' : {
'meta_info' : _MetaInfoClass('Rcmd.Memory',
False,
[
_MetaInfoClassMember('edm-memory-info', REFERENCE_LIST, 'EdmMemoryInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Memory.EdmMemoryInfo',
[], [],
''' Memory Info
''',
'edm_memory_info',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('memory-info', REFERENCE_LIST, 'MemoryInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Memory.MemoryInfo',
[], [],
''' Memory Info
''',
'memory_info',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('string-memory-info', REFERENCE_LIST, 'StringMemoryInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Memory.StringMemoryInfo',
[], [],
''' Memory Info
''',
'string_memory_info',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'memory',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.Sessions.Session' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.Sessions.Session',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' transport address or adjacency address
''',
'address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-id-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Event ID
''',
'event_id_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event Time
''',
'event_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-type', REFERENCE_ENUM_CLASS, 'RcmdLdpEventEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdLdpEventEnum',
[], [],
''' Type of event
''',
'event_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsr-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Label Space Router ID
''',
'lsr_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'RcmdShowLdpNeighbourStatusEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowLdpNeighbourStatusEnum',
[], [],
''' Adjacency Session Status
''',
'state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'session',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.Sessions' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.Sessions',
False,
[
_MetaInfoClassMember('session', REFERENCE_LIST, 'Session' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.Sessions.Session',
[], [],
''' Session
''',
'session',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'sessions',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaS.RemoteLfa.SessionStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaS.RemoteLfa.SessionStatistic',
False,
[
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Path Count
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Path Count
''',
'protected_path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Route Count
''',
'protected_route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-label-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Remote Label Count
''',
'remote_label_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Route Count
''',
'route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LDP Session Count
''',
'session_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-state', REFERENCE_ENUM_CLASS, 'RcmdShowLdpSessionStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowLdpSessionStateEnum',
[], [],
''' Session State
''',
'session_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'session-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaS.RemoteLfa.RemoteNode' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaS.RemoteLfa.RemoteNode',
False,
[
_MetaInfoClassMember('in-use-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Inuse time of the Session
''',
'in_use_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsr-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Label Space Router ID
''',
'lsr_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Path Count
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Path Count
''',
'protected_path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Route Count
''',
'protected_route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-label-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Remote Label Count
''',
'remote_label_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Route Count
''',
'route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-state', REFERENCE_ENUM_CLASS, 'RcmdShowLdpSessionStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowLdpSessionStateEnum',
[], [],
''' Session State
''',
'session_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('transport-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Transport Address
''',
'transport_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-node',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaS.RemoteLfa.Logs' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaS.RemoteLfa.Logs',
False,
[
_MetaInfoClassMember('label-coverage-state', REFERENCE_ENUM_CLASS, 'RcmdShowLdpConvStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowLdpConvStateEnum',
[], [],
''' Label Coverage State
''',
'label_coverage_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('log-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event Time (eg: Apr 24 13:16:04.961)
''',
'log_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-label-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Remote Label Count
''',
'remote_label_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Route Count
''',
'route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'logs',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaS.RemoteLfa' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaS.RemoteLfa',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('below-threshold', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Coverage Below Threshold
''',
'below_threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-of-calculation-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' End of IGP LFA Calculation Time (eg: Apr 24 13
:16:04.961)
''',
'end_of_calculation_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-id-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LDP-rLFA Event ID
''',
'event_id_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('igp-protocol', REFERENCE_ENUM_CLASS, 'RcmdProtocolIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdProtocolIdEnum',
[], [],
''' IGP Protocol
''',
'igp_protocol',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IGP IP-FRR Event ID (ref:
rcmd_show_ipfrr_event_info(EventID))
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('logs', REFERENCE_LIST, 'Logs' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaS.RemoteLfa.Logs',
[], [],
''' Logs Information
''',
'logs',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Process Name
''',
'process_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node', REFERENCE_LIST, 'RemoteNode' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaS.RemoteLfa.RemoteNode',
[], [],
''' Remote Node Information
''',
'remote_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-statistic', REFERENCE_LIST, 'SessionStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaS.RemoteLfa.SessionStatistic',
[], [],
''' RLFA Statistics categorized by session state
''',
'session_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-lfa',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaS' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaS',
False,
[
_MetaInfoClassMember('remote-lfa', REFERENCE_LIST, 'RemoteLfa' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaS.RemoteLfa',
[], [],
''' RemoteLFA
''',
'remote_lfa',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-lfa-s',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.SessionStatistic' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.SessionStatistic',
False,
[
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Path Count
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Path Count
''',
'protected_path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Route Count
''',
'protected_route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-label-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Remote Label Count
''',
'remote_label_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Route Count
''',
'route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LDP Session Count
''',
'session_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-state', REFERENCE_ENUM_CLASS, 'RcmdShowLdpSessionStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowLdpSessionStateEnum',
[], [],
''' Session State
''',
'session_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'session-statistic',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.RemoteNode' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.RemoteNode',
False,
[
_MetaInfoClassMember('in-use-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Inuse time of the Session
''',
'in_use_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsr-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Label Space Router ID
''',
'lsr_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Path Count
''',
'path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-path-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Path Count
''',
'protected_path_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protected-route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Protected Route Count
''',
'protected_route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-label-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Remote Label Count
''',
'remote_label_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node-id', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Remote Node ID
''',
'remote_node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Route Count
''',
'route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-state', REFERENCE_ENUM_CLASS, 'RcmdShowLdpSessionStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowLdpSessionStateEnum',
[], [],
''' Session State
''',
'session_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('transport-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Transport Address
''',
'transport_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-node',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.Logs' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.Logs',
False,
[
_MetaInfoClassMember('label-coverage-state', REFERENCE_ENUM_CLASS, 'RcmdShowLdpConvStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowLdpConvStateEnum',
[], [],
''' Label Coverage State
''',
'label_coverage_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('log-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event Time (eg: Apr 24 13:16:04.961)
''',
'log_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-label-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Remote Label Count
''',
'remote_label_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total Route Count
''',
'route_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'logs',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary',
False,
[
_MetaInfoClassMember('event-id', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event ID
''',
'event_id',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('below-threshold', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Coverage Below Threshold
''',
'below_threshold',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('end-of-calculation-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' End of IGP LFA Calculation Time (eg: Apr 24 13
:16:04.961)
''',
'end_of_calculation_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-id-xr', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LDP-rLFA Event ID
''',
'event_id_xr',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('igp-protocol', REFERENCE_ENUM_CLASS, 'RcmdProtocolIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdProtocolIdEnum',
[], [],
''' IGP Protocol
''',
'igp_protocol',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ipfrr-event-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IGP IP-FRR Event ID (ref:
rcmd_show_ipfrr_event_info(EventID))
''',
'ipfrr_event_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('logs', REFERENCE_LIST, 'Logs' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.Logs',
[], [],
''' Logs Information
''',
'logs',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Process Name
''',
'process_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-node', REFERENCE_LIST, 'RemoteNode' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.RemoteNode',
[], [],
''' Remote Node Information
''',
'remote_node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('session-statistic', REFERENCE_LIST, 'SessionStatistic' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.SessionStatistic',
[], [],
''' RLFA Statistics categorized by session state
''',
'session_statistic',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-lfa-summary',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp.RemoteLfaSummaries' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp.RemoteLfaSummaries',
False,
[
_MetaInfoClassMember('remote-lfa-summary', REFERENCE_LIST, 'RemoteLfaSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary',
[], [],
''' Summary operational data for Remote LFA
''',
'remote_lfa_summary',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'remote-lfa-summaries',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Ldp' : {
'meta_info' : _MetaInfoClass('Rcmd.Ldp',
False,
[
_MetaInfoClassMember('remote-lfa-s', REFERENCE_CLASS, 'RemoteLfaS' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaS',
[], [],
''' Remote LFA Coverage Events
''',
'remote_lfa_s',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('remote-lfa-summaries', REFERENCE_CLASS, 'RemoteLfaSummaries' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.RemoteLfaSummaries',
[], [],
''' Remote LFA Coverage Events
''',
'remote_lfa_summaries',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sessions', REFERENCE_CLASS, 'Sessions' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp.Sessions',
[], [],
''' Session Events
''',
'sessions',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Intf.Events.Event' : {
'meta_info' : _MetaInfoClass('Rcmd.Intf.Events.Event',
False,
[
_MetaInfoClassMember('event-no', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Specific Event No.
''',
'event_no',
'Cisco-IOS-XR-infra-rcmd-oper', True),
_MetaInfoClassMember('component', REFERENCE_ENUM_CLASS, 'RcmdShowCompIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowCompIdEnum',
[], [],
''' Component info
''',
'component',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Event Time
''',
'event_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('event-type', REFERENCE_ENUM_CLASS, 'RcmdShowIntfEventEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowIntfEventEnum',
[], [],
''' Event Info
''',
'event_type',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface Name
''',
'interface_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('primary-address', ATTRIBUTE, 'str' , None, None,
[], [b'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Primary Address
''',
'primary_address',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('sequence-no', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sequence No
''',
'sequence_no',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'event',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Intf.Events' : {
'meta_info' : _MetaInfoClass('Rcmd.Intf.Events',
False,
[
_MetaInfoClassMember('event', REFERENCE_LIST, 'Event' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Intf.Events.Event',
[], [],
''' Events
''',
'event',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'events',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Intf' : {
'meta_info' : _MetaInfoClass('Rcmd.Intf',
False,
[
_MetaInfoClassMember('events', REFERENCE_CLASS, 'Events' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Intf.Events',
[], [],
''' Events
''',
'events',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'intf',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Isis.Process_.InstanceName.Instance' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Isis.Process_.InstanceName.Instance',
False,
[
_MetaInfoClassMember('arch-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' spf run can be archived
''',
'arch_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fwd-referenced', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Forward Referenced
''',
'fwd_referenced',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-deleted', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Instance Deleted
''',
'instance_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Instance Id
''',
'instance_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-state', REFERENCE_ENUM_CLASS, 'RcmdShowInstStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowInstStateEnum',
[], [],
''' Instance State
''',
'instance_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-update-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Updated Time
''',
'last_update_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('no-route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No Route change spf nos
''',
'no_route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Node Id
''',
'node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('not-interested-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Not Interested SPF nos
''',
'not_interested_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Route change spf nos
''',
'route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-offset', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Offset
''',
'spf_offset',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spf nos
''',
'total_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spt-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spt nos
''',
'total_spt_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Isis.Process_.InstanceName' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Isis.Process_.InstanceName',
False,
[
_MetaInfoClassMember('arch-lsp-regeneration', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive Lsp regen
''',
'arch_lsp_regeneration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('arch-spf-event', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive SPF event
''',
'arch_spf_event',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance', REFERENCE_LIST, 'Instance' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Isis.Process_.InstanceName.Instance',
[], [],
''' Instance Information
''',
'instance',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-update-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Updated Time
''',
'last_update_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regeneration-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LSP Regen Count
''',
'lsp_regeneration_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regeneration-serial', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Last Serial
''',
'lsp_regeneration_serial',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Instance Name
''',
'name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('no-route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No Route change spf nos
''',
'no_route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('not-interested-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Not Interested SPF nos
''',
'not_interested_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Route change spf nos
''',
'route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spf nos
''',
'total_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance-name',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Isis.Process_' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Isis.Process_',
False,
[
_MetaInfoClassMember('instance-name', REFERENCE_LIST, 'InstanceName' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Isis.Process_.InstanceName',
[], [],
''' Instance/VRF Name
''',
'instance_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Process Name
''',
'process_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protocol-id', REFERENCE_ENUM_CLASS, 'RcmdProtocolIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdProtocolIdEnum',
[], [],
''' Protocol id
''',
'protocol_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'process',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Isis' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Isis',
False,
[
_MetaInfoClassMember('process', REFERENCE_LIST, 'Process_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Isis.Process_',
[], [],
''' Process Information
''',
'process',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'isis',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ospf.Process_.InstanceName.Instance' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ospf.Process_.InstanceName.Instance',
False,
[
_MetaInfoClassMember('arch-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' spf run can be archived
''',
'arch_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fwd-referenced', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Forward Referenced
''',
'fwd_referenced',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-deleted', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Instance Deleted
''',
'instance_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Instance Id
''',
'instance_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-state', REFERENCE_ENUM_CLASS, 'RcmdShowInstStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowInstStateEnum',
[], [],
''' Instance State
''',
'instance_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-update-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Updated Time
''',
'last_update_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('no-route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No Route change spf nos
''',
'no_route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Node Id
''',
'node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('not-interested-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Not Interested SPF nos
''',
'not_interested_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Route change spf nos
''',
'route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-offset', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Offset
''',
'spf_offset',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spf nos
''',
'total_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spt-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spt nos
''',
'total_spt_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ospf.Process_.InstanceName' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ospf.Process_.InstanceName',
False,
[
_MetaInfoClassMember('arch-lsp-regeneration', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive Lsp regen
''',
'arch_lsp_regeneration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('arch-spf-event', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive SPF event
''',
'arch_spf_event',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance', REFERENCE_LIST, 'Instance' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ospf.Process_.InstanceName.Instance',
[], [],
''' Instance Information
''',
'instance',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-update-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Updated Time
''',
'last_update_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regeneration-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LSP Regen Count
''',
'lsp_regeneration_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regeneration-serial', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Last Serial
''',
'lsp_regeneration_serial',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Instance Name
''',
'name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('no-route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No Route change spf nos
''',
'no_route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('not-interested-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Not Interested SPF nos
''',
'not_interested_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Route change spf nos
''',
'route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spf nos
''',
'total_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance-name',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ospf.Process_' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ospf.Process_',
False,
[
_MetaInfoClassMember('instance-name', REFERENCE_LIST, 'InstanceName' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ospf.Process_.InstanceName',
[], [],
''' Instance/VRF Name
''',
'instance_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Process Name
''',
'process_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protocol-id', REFERENCE_ENUM_CLASS, 'RcmdProtocolIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdProtocolIdEnum',
[], [],
''' Protocol id
''',
'protocol_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'process',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ospf' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ospf',
False,
[
_MetaInfoClassMember('process', REFERENCE_LIST, 'Process_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ospf.Process_',
[], [],
''' Process Information
''',
'process',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ospf',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ldp.Process_.InstanceName.Instance' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ldp.Process_.InstanceName.Instance',
False,
[
_MetaInfoClassMember('arch-spf-run', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' spf run can be archived
''',
'arch_spf_run',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('fwd-referenced', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Forward Referenced
''',
'fwd_referenced',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-deleted', REFERENCE_ENUM_CLASS, 'RcmdBoolYesNoEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdBoolYesNoEnum',
[], [],
''' Instance Deleted
''',
'instance_deleted',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Instance Id
''',
'instance_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance-state', REFERENCE_ENUM_CLASS, 'RcmdShowInstStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdShowInstStateEnum',
[], [],
''' Instance State
''',
'instance_state',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-update-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Updated Time
''',
'last_update_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('no-route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No Route change spf nos
''',
'no_route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Node Id
''',
'node_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('not-interested-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Not Interested SPF nos
''',
'not_interested_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Route change spf nos
''',
'route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('spf-offset', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SPF Offset
''',
'spf_offset',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spf nos
''',
'total_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spt-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spt nos
''',
'total_spt_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ldp.Process_.InstanceName' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ldp.Process_.InstanceName',
False,
[
_MetaInfoClassMember('arch-lsp-regeneration', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive Lsp regen
''',
'arch_lsp_regeneration',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('arch-spf-event', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Archive SPF event
''',
'arch_spf_event',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('instance', REFERENCE_LIST, 'Instance' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ldp.Process_.InstanceName.Instance',
[], [],
''' Instance Information
''',
'instance',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('last-update-time', ATTRIBUTE, 'str' , None, None,
[], [],
''' Last Updated Time
''',
'last_update_time',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regeneration-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LSP Regen Count
''',
'lsp_regeneration_count',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('lsp-regeneration-serial', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Last Serial
''',
'lsp_regeneration_serial',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Instance Name
''',
'name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('no-route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' No Route change spf nos
''',
'no_route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('not-interested-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Not Interested SPF nos
''',
'not_interested_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('route-change-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Route change spf nos
''',
'route_change_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('total-spf-nos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total spf nos
''',
'total_spf_nos',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'instance-name',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ldp.Process_' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ldp.Process_',
False,
[
_MetaInfoClassMember('instance-name', REFERENCE_LIST, 'InstanceName' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ldp.Process_.InstanceName',
[], [],
''' Instance/VRF Name
''',
'instance_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Process Name
''',
'process_name',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('protocol-id', REFERENCE_ENUM_CLASS, 'RcmdProtocolIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'RcmdProtocolIdEnum',
[], [],
''' Protocol id
''',
'protocol_id',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'process',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process.Ldp' : {
'meta_info' : _MetaInfoClass('Rcmd.Process.Ldp',
False,
[
_MetaInfoClassMember('process', REFERENCE_LIST, 'Process_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ldp.Process_',
[], [],
''' Process Information
''',
'process',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'ldp',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd.Process' : {
'meta_info' : _MetaInfoClass('Rcmd.Process',
False,
[
_MetaInfoClassMember('isis', REFERENCE_CLASS, 'Isis' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Isis',
[], [],
''' ISIS Process Information
''',
'isis',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp', REFERENCE_CLASS, 'Ldp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ldp',
[], [],
''' LDP Process Information
''',
'ldp',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ospf', REFERENCE_CLASS, 'Ospf' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process.Ospf',
[], [],
''' OSPF Process Information
''',
'ospf',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'process',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
'Rcmd' : {
'meta_info' : _MetaInfoClass('Rcmd',
False,
[
_MetaInfoClassMember('intf', REFERENCE_CLASS, 'Intf' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Intf',
[], [],
''' Interface data
''',
'intf',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('isis', REFERENCE_CLASS, 'Isis' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Isis',
[], [],
''' Operational data for ISIS
''',
'isis',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ldp', REFERENCE_CLASS, 'Ldp' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ldp',
[], [],
''' LDP data
''',
'ldp',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('memory', REFERENCE_CLASS, 'Memory' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Memory',
[], [],
''' Memory Info
''',
'memory',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('node', REFERENCE_CLASS, 'Node' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Node',
[], [],
''' Node Info
''',
'node',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('ospf', REFERENCE_CLASS, 'Ospf' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Ospf',
[], [],
''' Operational data for OSPF
''',
'ospf',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('process', REFERENCE_CLASS, 'Process' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Process',
[], [],
''' Process information
''',
'process',
'Cisco-IOS-XR-infra-rcmd-oper', False),
_MetaInfoClassMember('server', REFERENCE_CLASS, 'Server' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper', 'Rcmd.Server',
[], [],
''' Server Info
''',
'server',
'Cisco-IOS-XR-infra-rcmd-oper', False),
],
'Cisco-IOS-XR-infra-rcmd-oper',
'rcmd',
_yang_ns._namespaces['Cisco-IOS-XR-infra-rcmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper'
),
},
}
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventStatistics']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LdpExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LsdExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.ConvergenceTimeline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksAdded']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority.LeafNetworksDeleted']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.Priority']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksAdded']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority.LeafNetworksDeleted']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal.Priority']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.DijkstraRun']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary.InterAreaAndExternal']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RouteOrigin']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Enter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Exit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.RiBv4Redistribute']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LdpExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LsdExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.ConvergenceTimeline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksAdded']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority.LeafNetworksDeleted']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.Priority']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RouteOrigin']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Enter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Exit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.RiBv4Redistribute']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LdpExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdEnter']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LsdExit']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.ConvergenceTimeline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksAdded']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority.LeafNetworksDeleted']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal.Priority']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.DijkstraRun']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline.InterAreaAndExternal']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path.LfaPath']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.Path']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.TimeLine']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries.SummaryExternalEventSummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path.LfaPath']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.Path']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.TimeLine']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines.SummaryExternalEventOffline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventSummaries']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunSummaries']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.IpfrrEventOfflines']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SpfRunOfflines']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventSummaries']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventSummaries']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventOfflines']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.PrefixEventOfflines']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance.SummaryExternalEventStatistics']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info']
_meta_table['Rcmd.Ospf.Instances.Instance']['meta_info'].parent =_meta_table['Rcmd.Ospf.Instances']['meta_info']
_meta_table['Rcmd.Ospf.Instances']['meta_info'].parent =_meta_table['Rcmd.Ospf']['meta_info']
_meta_table['Rcmd.Server.Normal.ProtocolConfig.Priority']['meta_info'].parent =_meta_table['Rcmd.Server.Normal.ProtocolConfig']['meta_info']
_meta_table['Rcmd.Server.Normal.ServerDetail.TraceInformation']['meta_info'].parent =_meta_table['Rcmd.Server.Normal.ServerDetail']['meta_info']
_meta_table['Rcmd.Server.Normal.ProtocolConfig']['meta_info'].parent =_meta_table['Rcmd.Server.Normal']['meta_info']
_meta_table['Rcmd.Server.Normal.ServerDetail']['meta_info'].parent =_meta_table['Rcmd.Server.Normal']['meta_info']
_meta_table['Rcmd.Server.Detail.ProtocolConfig.Priority']['meta_info'].parent =_meta_table['Rcmd.Server.Detail.ProtocolConfig']['meta_info']
_meta_table['Rcmd.Server.Detail.ServerDetail.TraceInformation']['meta_info'].parent =_meta_table['Rcmd.Server.Detail.ServerDetail']['meta_info']
_meta_table['Rcmd.Server.Detail.ProtocolConfig']['meta_info'].parent =_meta_table['Rcmd.Server.Detail']['meta_info']
_meta_table['Rcmd.Server.Detail.ServerDetail']['meta_info'].parent =_meta_table['Rcmd.Server.Detail']['meta_info']
_meta_table['Rcmd.Server.Normal']['meta_info'].parent =_meta_table['Rcmd.Server']['meta_info']
_meta_table['Rcmd.Server.Detail']['meta_info'].parent =_meta_table['Rcmd.Server']['meta_info']
_meta_table['Rcmd.Node.NodeInformation']['meta_info'].parent =_meta_table['Rcmd.Node']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode.PrimaryPath']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.IpfrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary.RemoteNode']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries.IpfrrEventSummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventStatistics.PrefixEventStatistic']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventStatistics']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RouteOrigin']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Enter']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Exit']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.RiBv4Redistribute']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpEnter']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LdpExit']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdEnter']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LsdExit']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcIp']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.ConvergenceTimeline']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksAdded']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority.LeafNetworksDeleted']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.SpfSummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.NodeStatistics']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.TriggerLsp']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.Priority']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspProcessed']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary.LspRegenerated']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries.SpfRunSummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode.PrimaryPath']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.IpfrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline.RemoteNode']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines.IpfrrEventOffline']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.RouteStatistics']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary.FrrStatistic']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls.FibComplete']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RouteOrigin']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Enter']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Exit']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.RiBv4Redistribute']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpEnter']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LdpExit']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdEnter']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LsdExit']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcIp']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.PrioritySummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.ConvergenceTimeline']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksAdded']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority.LeafNetworksDeleted']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.SpfSummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.NodeStatistics']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.TriggerLsp']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.Priority']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspProcessed']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline.LspRegenerated']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines.SpfRunOffline']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path.LfaPath']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcIp']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.Path']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.TimeLine']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries.PrefixEventSummary']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path.LfaPath']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcIp']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine.LcMpls']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.IpConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.MplsConvergenceTime']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.Path']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TriggerLsa']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.TimeLine']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline.LsaProcessed']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines.PrefixEventOffline']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.LspRegenerateds.LspRegenerated']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance.LspRegenerateds']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventSummaries']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventStatistics']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunSummaries']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.IpfrrEventOfflines']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.SpfRunOfflines']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventSummaries']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.PrefixEventOfflines']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance.LspRegenerateds']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances.Instance']['meta_info']
_meta_table['Rcmd.Isis.Instances.Instance']['meta_info'].parent =_meta_table['Rcmd.Isis.Instances']['meta_info']
_meta_table['Rcmd.Isis.Instances']['meta_info'].parent =_meta_table['Rcmd.Isis']['meta_info']
_meta_table['Rcmd.Memory.MemoryInfo']['meta_info'].parent =_meta_table['Rcmd.Memory']['meta_info']
_meta_table['Rcmd.Memory.EdmMemoryInfo']['meta_info'].parent =_meta_table['Rcmd.Memory']['meta_info']
_meta_table['Rcmd.Memory.StringMemoryInfo']['meta_info'].parent =_meta_table['Rcmd.Memory']['meta_info']
_meta_table['Rcmd.Ldp.Sessions.Session']['meta_info'].parent =_meta_table['Rcmd.Ldp.Sessions']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaS.RemoteLfa.SessionStatistic']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaS.RemoteLfa']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaS.RemoteLfa.RemoteNode']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaS.RemoteLfa']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaS.RemoteLfa.Logs']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaS.RemoteLfa']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaS.RemoteLfa']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaS']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.SessionStatistic']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.RemoteNode']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary.Logs']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaSummaries.RemoteLfaSummary']['meta_info'].parent =_meta_table['Rcmd.Ldp.RemoteLfaSummaries']['meta_info']
_meta_table['Rcmd.Ldp.Sessions']['meta_info'].parent =_meta_table['Rcmd.Ldp']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaS']['meta_info'].parent =_meta_table['Rcmd.Ldp']['meta_info']
_meta_table['Rcmd.Ldp.RemoteLfaSummaries']['meta_info'].parent =_meta_table['Rcmd.Ldp']['meta_info']
_meta_table['Rcmd.Intf.Events.Event']['meta_info'].parent =_meta_table['Rcmd.Intf.Events']['meta_info']
_meta_table['Rcmd.Intf.Events']['meta_info'].parent =_meta_table['Rcmd.Intf']['meta_info']
_meta_table['Rcmd.Process.Isis.Process_.InstanceName.Instance']['meta_info'].parent =_meta_table['Rcmd.Process.Isis.Process_.InstanceName']['meta_info']
_meta_table['Rcmd.Process.Isis.Process_.InstanceName']['meta_info'].parent =_meta_table['Rcmd.Process.Isis.Process_']['meta_info']
_meta_table['Rcmd.Process.Isis.Process_']['meta_info'].parent =_meta_table['Rcmd.Process.Isis']['meta_info']
_meta_table['Rcmd.Process.Ospf.Process_.InstanceName.Instance']['meta_info'].parent =_meta_table['Rcmd.Process.Ospf.Process_.InstanceName']['meta_info']
_meta_table['Rcmd.Process.Ospf.Process_.InstanceName']['meta_info'].parent =_meta_table['Rcmd.Process.Ospf.Process_']['meta_info']
_meta_table['Rcmd.Process.Ospf.Process_']['meta_info'].parent =_meta_table['Rcmd.Process.Ospf']['meta_info']
_meta_table['Rcmd.Process.Ldp.Process_.InstanceName.Instance']['meta_info'].parent =_meta_table['Rcmd.Process.Ldp.Process_.InstanceName']['meta_info']
_meta_table['Rcmd.Process.Ldp.Process_.InstanceName']['meta_info'].parent =_meta_table['Rcmd.Process.Ldp.Process_']['meta_info']
_meta_table['Rcmd.Process.Ldp.Process_']['meta_info'].parent =_meta_table['Rcmd.Process.Ldp']['meta_info']
_meta_table['Rcmd.Process.Isis']['meta_info'].parent =_meta_table['Rcmd.Process']['meta_info']
_meta_table['Rcmd.Process.Ospf']['meta_info'].parent =_meta_table['Rcmd.Process']['meta_info']
_meta_table['Rcmd.Process.Ldp']['meta_info'].parent =_meta_table['Rcmd.Process']['meta_info']
_meta_table['Rcmd.Ospf']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
_meta_table['Rcmd.Server']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
_meta_table['Rcmd.Node']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
_meta_table['Rcmd.Isis']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
_meta_table['Rcmd.Memory']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
_meta_table['Rcmd.Ldp']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
_meta_table['Rcmd.Intf']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
_meta_table['Rcmd.Process']['meta_info'].parent =_meta_table['Rcmd']['meta_info']
|
raskolnikova/infomaps
|
refs/heads/master
|
node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
|
1446
|
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the MSVSSettings.py file."""
import StringIO
import unittest
import gyp.MSVSSettings as MSVSSettings
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.stderr = StringIO.StringIO()
def _ExpectedWarnings(self, expected):
"""Compares recorded lines to expected warnings."""
self.stderr.seek(0)
actual = self.stderr.read().split('\n')
actual = [line for line in actual if line]
self.assertEqual(sorted(expected), sorted(actual))
def testValidateMSVSSettings_tool_names(self):
"""Tests that only MSVS tool names are allowed."""
MSVSSettings.ValidateMSVSSettings(
{'VCCLCompilerTool': {},
'VCLinkerTool': {},
'VCMIDLTool': {},
'foo': {},
'VCResourceCompilerTool': {},
'VCLibrarianTool': {},
'VCManifestTool': {},
'ClCompile': {}},
self.stderr)
self._ExpectedWarnings([
'Warning: unrecognized tool foo',
'Warning: unrecognized tool ClCompile'])
def testValidateMSVSSettings_settings(self):
"""Tests that for invalid MSVS settings."""
MSVSSettings.ValidateMSVSSettings(
{'VCCLCompilerTool': {
'AdditionalIncludeDirectories': 'folder1;folder2',
'AdditionalOptions': ['string1', 'string2'],
'AdditionalUsingDirectories': 'folder1;folder2',
'AssemblerListingLocation': 'a_file_name',
'AssemblerOutput': '0',
'BasicRuntimeChecks': '5',
'BrowseInformation': 'fdkslj',
'BrowseInformationFile': 'a_file_name',
'BufferSecurityCheck': 'true',
'CallingConvention': '-1',
'CompileAs': '1',
'DebugInformationFormat': '2',
'DefaultCharIsUnsigned': 'true',
'Detect64BitPortabilityProblems': 'true',
'DisableLanguageExtensions': 'true',
'DisableSpecificWarnings': 'string1;string2',
'EnableEnhancedInstructionSet': '1',
'EnableFiberSafeOptimizations': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'EnablePREfast': 'true',
'Enableprefast': 'bogus',
'ErrorReporting': '1',
'ExceptionHandling': '1',
'ExpandAttributedSource': 'true',
'FavorSizeOrSpeed': '1',
'FloatingPointExceptions': 'true',
'FloatingPointModel': '1',
'ForceConformanceInForLoopScope': 'true',
'ForcedIncludeFiles': 'file1;file2',
'ForcedUsingFiles': 'file1;file2',
'GeneratePreprocessedFile': '1',
'GenerateXMLDocumentationFiles': 'true',
'IgnoreStandardIncludePath': 'true',
'InlineFunctionExpansion': '1',
'KeepComments': 'true',
'MinimalRebuild': 'true',
'ObjectFile': 'a_file_name',
'OmitDefaultLibName': 'true',
'OmitFramePointers': 'true',
'OpenMP': 'true',
'Optimization': '1',
'PrecompiledHeaderFile': 'a_file_name',
'PrecompiledHeaderThrough': 'a_file_name',
'PreprocessorDefinitions': 'string1;string2',
'ProgramDataBaseFileName': 'a_file_name',
'RuntimeLibrary': '1',
'RuntimeTypeInfo': 'true',
'ShowIncludes': 'true',
'SmallerTypeCheck': 'true',
'StringPooling': 'true',
'StructMemberAlignment': '1',
'SuppressStartupBanner': 'true',
'TreatWChar_tAsBuiltInType': 'true',
'UndefineAllPreprocessorDefinitions': 'true',
'UndefinePreprocessorDefinitions': 'string1;string2',
'UseFullPaths': 'true',
'UsePrecompiledHeader': '1',
'UseUnicodeResponseFiles': 'true',
'WarnAsError': 'true',
'WarningLevel': '1',
'WholeProgramOptimization': 'true',
'XMLDocumentationFileName': 'a_file_name',
'ZZXYZ': 'bogus'},
'VCLinkerTool': {
'AdditionalDependencies': 'file1;file2',
'AdditionalDependencies_excluded': 'file3',
'AdditionalLibraryDirectories': 'folder1;folder2',
'AdditionalManifestDependencies': 'file1;file2',
'AdditionalOptions': 'a string1',
'AddModuleNamesToAssembly': 'file1;file2',
'AllowIsolation': 'true',
'AssemblyDebug': '2',
'AssemblyLinkResource': 'file1;file2',
'BaseAddress': 'a string1',
'CLRImageType': '2',
'CLRThreadAttribute': '2',
'CLRUnmanagedCodeCheck': 'true',
'DataExecutionPrevention': '2',
'DelayLoadDLLs': 'file1;file2',
'DelaySign': 'true',
'Driver': '2',
'EmbedManagedResourceFile': 'file1;file2',
'EnableCOMDATFolding': '2',
'EnableUAC': 'true',
'EntryPointSymbol': 'a string1',
'ErrorReporting': '2',
'FixedBaseAddress': '2',
'ForceSymbolReferences': 'file1;file2',
'FunctionOrder': 'a_file_name',
'GenerateDebugInformation': 'true',
'GenerateManifest': 'true',
'GenerateMapFile': 'true',
'HeapCommitSize': 'a string1',
'HeapReserveSize': 'a string1',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreDefaultLibraryNames': 'file1;file2',
'IgnoreEmbeddedIDL': 'true',
'IgnoreImportLibrary': 'true',
'ImportLibrary': 'a_file_name',
'KeyContainer': 'a_file_name',
'KeyFile': 'a_file_name',
'LargeAddressAware': '2',
'LinkIncremental': '2',
'LinkLibraryDependencies': 'true',
'LinkTimeCodeGeneration': '2',
'ManifestFile': 'a_file_name',
'MapExports': 'true',
'MapFileName': 'a_file_name',
'MergedIDLBaseFileName': 'a_file_name',
'MergeSections': 'a string1',
'MidlCommandFile': 'a_file_name',
'ModuleDefinitionFile': 'a_file_name',
'OptimizeForWindows98': '1',
'OptimizeReferences': '2',
'OutputFile': 'a_file_name',
'PerUserRedirection': 'true',
'Profile': 'true',
'ProfileGuidedDatabase': 'a_file_name',
'ProgramDatabaseFile': 'a_file_name',
'RandomizedBaseAddress': '2',
'RegisterOutput': 'true',
'ResourceOnlyDLL': 'true',
'SetChecksum': 'true',
'ShowProgress': '2',
'StackCommitSize': 'a string1',
'StackReserveSize': 'a string1',
'StripPrivateSymbols': 'a_file_name',
'SubSystem': '2',
'SupportUnloadOfDelayLoadedDLL': 'true',
'SuppressStartupBanner': 'true',
'SwapRunFromCD': 'true',
'SwapRunFromNet': 'true',
'TargetMachine': '2',
'TerminalServerAware': '2',
'TurnOffAssemblyGeneration': 'true',
'TypeLibraryFile': 'a_file_name',
'TypeLibraryResourceID': '33',
'UACExecutionLevel': '2',
'UACUIAccess': 'true',
'UseLibraryDependencyInputs': 'true',
'UseUnicodeResponseFiles': 'true',
'Version': 'a string1'},
'VCMIDLTool': {
'AdditionalIncludeDirectories': 'folder1;folder2',
'AdditionalOptions': 'a string1',
'CPreprocessOptions': 'a string1',
'DefaultCharType': '1',
'DLLDataFileName': 'a_file_name',
'EnableErrorChecks': '1',
'ErrorCheckAllocations': 'true',
'ErrorCheckBounds': 'true',
'ErrorCheckEnumRange': 'true',
'ErrorCheckRefPointers': 'true',
'ErrorCheckStubData': 'true',
'GenerateStublessProxies': 'true',
'GenerateTypeLibrary': 'true',
'HeaderFileName': 'a_file_name',
'IgnoreStandardIncludePath': 'true',
'InterfaceIdentifierFileName': 'a_file_name',
'MkTypLibCompatible': 'true',
'notgood': 'bogus',
'OutputDirectory': 'a string1',
'PreprocessorDefinitions': 'string1;string2',
'ProxyFileName': 'a_file_name',
'RedirectOutputAndErrors': 'a_file_name',
'StructMemberAlignment': '1',
'SuppressStartupBanner': 'true',
'TargetEnvironment': '1',
'TypeLibraryName': 'a_file_name',
'UndefinePreprocessorDefinitions': 'string1;string2',
'ValidateParameters': 'true',
'WarnAsError': 'true',
'WarningLevel': '1'},
'VCResourceCompilerTool': {
'AdditionalOptions': 'a string1',
'AdditionalIncludeDirectories': 'folder1;folder2',
'Culture': '1003',
'IgnoreStandardIncludePath': 'true',
'notgood2': 'bogus',
'PreprocessorDefinitions': 'string1;string2',
'ResourceOutputFileName': 'a string1',
'ShowProgress': 'true',
'SuppressStartupBanner': 'true',
'UndefinePreprocessorDefinitions': 'string1;string2'},
'VCLibrarianTool': {
'AdditionalDependencies': 'file1;file2',
'AdditionalLibraryDirectories': 'folder1;folder2',
'AdditionalOptions': 'a string1',
'ExportNamedFunctions': 'string1;string2',
'ForceSymbolReferences': 'a string1',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreSpecificDefaultLibraries': 'file1;file2',
'LinkLibraryDependencies': 'true',
'ModuleDefinitionFile': 'a_file_name',
'OutputFile': 'a_file_name',
'SuppressStartupBanner': 'true',
'UseUnicodeResponseFiles': 'true'},
'VCManifestTool': {
'AdditionalManifestFiles': 'file1;file2',
'AdditionalOptions': 'a string1',
'AssemblyIdentity': 'a string1',
'ComponentFileName': 'a_file_name',
'DependencyInformationFile': 'a_file_name',
'GenerateCatalogFiles': 'true',
'InputResourceManifests': 'a string1',
'ManifestResourceFile': 'a_file_name',
'OutputManifestFile': 'a_file_name',
'RegistrarScriptFile': 'a_file_name',
'ReplacementsFile': 'a_file_name',
'SuppressStartupBanner': 'true',
'TypeLibraryFile': 'a_file_name',
'UpdateFileHashes': 'truel',
'UpdateFileHashesSearchPath': 'a_file_name',
'UseFAT32Workaround': 'true',
'UseUnicodeResponseFiles': 'true',
'VerboseOutput': 'true'}},
self.stderr)
self._ExpectedWarnings([
'Warning: for VCCLCompilerTool/BasicRuntimeChecks, '
'index value (5) not in expected range [0, 4)',
'Warning: for VCCLCompilerTool/BrowseInformation, '
"invalid literal for int() with base 10: 'fdkslj'",
'Warning: for VCCLCompilerTool/CallingConvention, '
'index value (-1) not in expected range [0, 4)',
'Warning: for VCCLCompilerTool/DebugInformationFormat, '
'converted value for 2 not specified.',
'Warning: unrecognized setting VCCLCompilerTool/Enableprefast',
'Warning: unrecognized setting VCCLCompilerTool/ZZXYZ',
'Warning: for VCLinkerTool/TargetMachine, '
'converted value for 2 not specified.',
'Warning: unrecognized setting VCMIDLTool/notgood',
'Warning: unrecognized setting VCResourceCompilerTool/notgood2',
'Warning: for VCManifestTool/UpdateFileHashes, '
"expected bool; got 'truel'"
''])
def testValidateMSBuildSettings_settings(self):
"""Tests that for invalid MSBuild settings."""
MSVSSettings.ValidateMSBuildSettings(
{'ClCompile': {
'AdditionalIncludeDirectories': 'folder1;folder2',
'AdditionalOptions': ['string1', 'string2'],
'AdditionalUsingDirectories': 'folder1;folder2',
'AssemblerListingLocation': 'a_file_name',
'AssemblerOutput': 'NoListing',
'BasicRuntimeChecks': 'StackFrameRuntimeCheck',
'BrowseInformation': 'false',
'BrowseInformationFile': 'a_file_name',
'BufferSecurityCheck': 'true',
'BuildingInIDE': 'true',
'CallingConvention': 'Cdecl',
'CompileAs': 'CompileAsC',
'CompileAsManaged': 'true',
'CreateHotpatchableImage': 'true',
'DebugInformationFormat': 'ProgramDatabase',
'DisableLanguageExtensions': 'true',
'DisableSpecificWarnings': 'string1;string2',
'EnableEnhancedInstructionSet': 'StreamingSIMDExtensions',
'EnableFiberSafeOptimizations': 'true',
'EnablePREfast': 'true',
'Enableprefast': 'bogus',
'ErrorReporting': 'Prompt',
'ExceptionHandling': 'SyncCThrow',
'ExpandAttributedSource': 'true',
'FavorSizeOrSpeed': 'Neither',
'FloatingPointExceptions': 'true',
'FloatingPointModel': 'Precise',
'ForceConformanceInForLoopScope': 'true',
'ForcedIncludeFiles': 'file1;file2',
'ForcedUsingFiles': 'file1;file2',
'FunctionLevelLinking': 'false',
'GenerateXMLDocumentationFiles': 'true',
'IgnoreStandardIncludePath': 'true',
'InlineFunctionExpansion': 'OnlyExplicitInline',
'IntrinsicFunctions': 'false',
'MinimalRebuild': 'true',
'MultiProcessorCompilation': 'true',
'ObjectFileName': 'a_file_name',
'OmitDefaultLibName': 'true',
'OmitFramePointers': 'true',
'OpenMPSupport': 'true',
'Optimization': 'Disabled',
'PrecompiledHeader': 'NotUsing',
'PrecompiledHeaderFile': 'a_file_name',
'PrecompiledHeaderOutputFile': 'a_file_name',
'PreprocessKeepComments': 'true',
'PreprocessorDefinitions': 'string1;string2',
'PreprocessOutputPath': 'a string1',
'PreprocessSuppressLineNumbers': 'false',
'PreprocessToFile': 'false',
'ProcessorNumber': '33',
'ProgramDataBaseFileName': 'a_file_name',
'RuntimeLibrary': 'MultiThreaded',
'RuntimeTypeInfo': 'true',
'ShowIncludes': 'true',
'SmallerTypeCheck': 'true',
'StringPooling': 'true',
'StructMemberAlignment': '1Byte',
'SuppressStartupBanner': 'true',
'TrackerLogDirectory': 'a_folder',
'TreatSpecificWarningsAsErrors': 'string1;string2',
'TreatWarningAsError': 'true',
'TreatWChar_tAsBuiltInType': 'true',
'UndefineAllPreprocessorDefinitions': 'true',
'UndefinePreprocessorDefinitions': 'string1;string2',
'UseFullPaths': 'true',
'UseUnicodeForAssemblerListing': 'true',
'WarningLevel': 'TurnOffAllWarnings',
'WholeProgramOptimization': 'true',
'XMLDocumentationFileName': 'a_file_name',
'ZZXYZ': 'bogus'},
'Link': {
'AdditionalDependencies': 'file1;file2',
'AdditionalLibraryDirectories': 'folder1;folder2',
'AdditionalManifestDependencies': 'file1;file2',
'AdditionalOptions': 'a string1',
'AddModuleNamesToAssembly': 'file1;file2',
'AllowIsolation': 'true',
'AssemblyDebug': '',
'AssemblyLinkResource': 'file1;file2',
'BaseAddress': 'a string1',
'BuildingInIDE': 'true',
'CLRImageType': 'ForceIJWImage',
'CLRSupportLastError': 'Enabled',
'CLRThreadAttribute': 'MTAThreadingAttribute',
'CLRUnmanagedCodeCheck': 'true',
'CreateHotPatchableImage': 'X86Image',
'DataExecutionPrevention': 'false',
'DelayLoadDLLs': 'file1;file2',
'DelaySign': 'true',
'Driver': 'NotSet',
'EmbedManagedResourceFile': 'file1;file2',
'EnableCOMDATFolding': 'false',
'EnableUAC': 'true',
'EntryPointSymbol': 'a string1',
'FixedBaseAddress': 'false',
'ForceFileOutput': 'Enabled',
'ForceSymbolReferences': 'file1;file2',
'FunctionOrder': 'a_file_name',
'GenerateDebugInformation': 'true',
'GenerateMapFile': 'true',
'HeapCommitSize': 'a string1',
'HeapReserveSize': 'a string1',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreEmbeddedIDL': 'true',
'IgnoreSpecificDefaultLibraries': 'a_file_list',
'ImageHasSafeExceptionHandlers': 'true',
'ImportLibrary': 'a_file_name',
'KeyContainer': 'a_file_name',
'KeyFile': 'a_file_name',
'LargeAddressAware': 'false',
'LinkDLL': 'true',
'LinkErrorReporting': 'SendErrorReport',
'LinkStatus': 'true',
'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
'ManifestFile': 'a_file_name',
'MapExports': 'true',
'MapFileName': 'a_file_name',
'MergedIDLBaseFileName': 'a_file_name',
'MergeSections': 'a string1',
'MidlCommandFile': 'a_file_name',
'MinimumRequiredVersion': 'a string1',
'ModuleDefinitionFile': 'a_file_name',
'MSDOSStubFileName': 'a_file_name',
'NoEntryPoint': 'true',
'OptimizeReferences': 'false',
'OutputFile': 'a_file_name',
'PerUserRedirection': 'true',
'PreventDllBinding': 'true',
'Profile': 'true',
'ProfileGuidedDatabase': 'a_file_name',
'ProgramDatabaseFile': 'a_file_name',
'RandomizedBaseAddress': 'false',
'RegisterOutput': 'true',
'SectionAlignment': '33',
'SetChecksum': 'true',
'ShowProgress': 'LinkVerboseREF',
'SpecifySectionAttributes': 'a string1',
'StackCommitSize': 'a string1',
'StackReserveSize': 'a string1',
'StripPrivateSymbols': 'a_file_name',
'SubSystem': 'Console',
'SupportNobindOfDelayLoadedDLL': 'true',
'SupportUnloadOfDelayLoadedDLL': 'true',
'SuppressStartupBanner': 'true',
'SwapRunFromCD': 'true',
'SwapRunFromNET': 'true',
'TargetMachine': 'MachineX86',
'TerminalServerAware': 'false',
'TrackerLogDirectory': 'a_folder',
'TreatLinkerWarningAsErrors': 'true',
'TurnOffAssemblyGeneration': 'true',
'TypeLibraryFile': 'a_file_name',
'TypeLibraryResourceID': '33',
'UACExecutionLevel': 'AsInvoker',
'UACUIAccess': 'true',
'Version': 'a string1'},
'ResourceCompile': {
'AdditionalIncludeDirectories': 'folder1;folder2',
'AdditionalOptions': 'a string1',
'Culture': '0x236',
'IgnoreStandardIncludePath': 'true',
'NullTerminateStrings': 'true',
'PreprocessorDefinitions': 'string1;string2',
'ResourceOutputFileName': 'a string1',
'ShowProgress': 'true',
'SuppressStartupBanner': 'true',
'TrackerLogDirectory': 'a_folder',
'UndefinePreprocessorDefinitions': 'string1;string2'},
'Midl': {
'AdditionalIncludeDirectories': 'folder1;folder2',
'AdditionalOptions': 'a string1',
'ApplicationConfigurationMode': 'true',
'ClientStubFile': 'a_file_name',
'CPreprocessOptions': 'a string1',
'DefaultCharType': 'Signed',
'DllDataFileName': 'a_file_name',
'EnableErrorChecks': 'EnableCustom',
'ErrorCheckAllocations': 'true',
'ErrorCheckBounds': 'true',
'ErrorCheckEnumRange': 'true',
'ErrorCheckRefPointers': 'true',
'ErrorCheckStubData': 'true',
'GenerateClientFiles': 'Stub',
'GenerateServerFiles': 'None',
'GenerateStublessProxies': 'true',
'GenerateTypeLibrary': 'true',
'HeaderFileName': 'a_file_name',
'IgnoreStandardIncludePath': 'true',
'InterfaceIdentifierFileName': 'a_file_name',
'LocaleID': '33',
'MkTypLibCompatible': 'true',
'OutputDirectory': 'a string1',
'PreprocessorDefinitions': 'string1;string2',
'ProxyFileName': 'a_file_name',
'RedirectOutputAndErrors': 'a_file_name',
'ServerStubFile': 'a_file_name',
'StructMemberAlignment': 'NotSet',
'SuppressCompilerWarnings': 'true',
'SuppressStartupBanner': 'true',
'TargetEnvironment': 'Itanium',
'TrackerLogDirectory': 'a_folder',
'TypeLibFormat': 'NewFormat',
'TypeLibraryName': 'a_file_name',
'UndefinePreprocessorDefinitions': 'string1;string2',
'ValidateAllParameters': 'true',
'WarnAsError': 'true',
'WarningLevel': '1'},
'Lib': {
'AdditionalDependencies': 'file1;file2',
'AdditionalLibraryDirectories': 'folder1;folder2',
'AdditionalOptions': 'a string1',
'DisplayLibrary': 'a string1',
'ErrorReporting': 'PromptImmediately',
'ExportNamedFunctions': 'string1;string2',
'ForceSymbolReferences': 'a string1',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreSpecificDefaultLibraries': 'file1;file2',
'LinkTimeCodeGeneration': 'true',
'MinimumRequiredVersion': 'a string1',
'ModuleDefinitionFile': 'a_file_name',
'Name': 'a_file_name',
'OutputFile': 'a_file_name',
'RemoveObjects': 'file1;file2',
'SubSystem': 'Console',
'SuppressStartupBanner': 'true',
'TargetMachine': 'MachineX86i',
'TrackerLogDirectory': 'a_folder',
'TreatLibWarningAsErrors': 'true',
'UseUnicodeResponseFiles': 'true',
'Verbose': 'true'},
'Manifest': {
'AdditionalManifestFiles': 'file1;file2',
'AdditionalOptions': 'a string1',
'AssemblyIdentity': 'a string1',
'ComponentFileName': 'a_file_name',
'EnableDPIAwareness': 'fal',
'GenerateCatalogFiles': 'truel',
'GenerateCategoryTags': 'true',
'InputResourceManifests': 'a string1',
'ManifestFromManagedAssembly': 'a_file_name',
'notgood3': 'bogus',
'OutputManifestFile': 'a_file_name',
'OutputResourceManifests': 'a string1',
'RegistrarScriptFile': 'a_file_name',
'ReplacementsFile': 'a_file_name',
'SuppressDependencyElement': 'true',
'SuppressStartupBanner': 'true',
'TrackerLogDirectory': 'a_folder',
'TypeLibraryFile': 'a_file_name',
'UpdateFileHashes': 'true',
'UpdateFileHashesSearchPath': 'a_file_name',
'VerboseOutput': 'true'},
'ProjectReference': {
'LinkLibraryDependencies': 'true',
'UseLibraryDependencyInputs': 'true'},
'ManifestResourceCompile': {
'ResourceOutputFileName': 'a_file_name'},
'': {
'EmbedManifest': 'true',
'GenerateManifest': 'true',
'IgnoreImportLibrary': 'true',
'LinkIncremental': 'false'}},
self.stderr)
self._ExpectedWarnings([
'Warning: unrecognized setting ClCompile/Enableprefast',
'Warning: unrecognized setting ClCompile/ZZXYZ',
'Warning: unrecognized setting Manifest/notgood3',
'Warning: for Manifest/GenerateCatalogFiles, '
"expected bool; got 'truel'",
'Warning: for Lib/TargetMachine, unrecognized enumerated value '
'MachineX86i',
"Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'"])
def testConvertToMSBuildSettings_empty(self):
"""Tests an empty conversion."""
msvs_settings = {}
expected_msbuild_settings = {}
actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
msvs_settings,
self.stderr)
self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
self._ExpectedWarnings([])
def testConvertToMSBuildSettings_minimal(self):
"""Tests a minimal conversion."""
msvs_settings = {
'VCCLCompilerTool': {
'AdditionalIncludeDirectories': 'dir1',
'AdditionalOptions': '/foo',
'BasicRuntimeChecks': '0',
},
'VCLinkerTool': {
'LinkTimeCodeGeneration': '1',
'ErrorReporting': '1',
'DataExecutionPrevention': '2',
},
}
expected_msbuild_settings = {
'ClCompile': {
'AdditionalIncludeDirectories': 'dir1',
'AdditionalOptions': '/foo',
'BasicRuntimeChecks': 'Default',
},
'Link': {
'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
'LinkErrorReporting': 'PromptImmediately',
'DataExecutionPrevention': 'true',
},
}
actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
msvs_settings,
self.stderr)
self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
self._ExpectedWarnings([])
def testConvertToMSBuildSettings_warnings(self):
"""Tests conversion that generates warnings."""
msvs_settings = {
'VCCLCompilerTool': {
'AdditionalIncludeDirectories': '1',
'AdditionalOptions': '2',
# These are incorrect values:
'BasicRuntimeChecks': '12',
'BrowseInformation': '21',
'UsePrecompiledHeader': '13',
'GeneratePreprocessedFile': '14'},
'VCLinkerTool': {
# These are incorrect values:
'Driver': '10',
'LinkTimeCodeGeneration': '31',
'ErrorReporting': '21',
'FixedBaseAddress': '6'},
'VCResourceCompilerTool': {
# Custom
'Culture': '1003'}}
expected_msbuild_settings = {
'ClCompile': {
'AdditionalIncludeDirectories': '1',
'AdditionalOptions': '2'},
'Link': {},
'ResourceCompile': {
# Custom
'Culture': '0x03eb'}}
actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
msvs_settings,
self.stderr)
self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
self._ExpectedWarnings([
'Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to '
'MSBuild, index value (12) not in expected range [0, 4)',
'Warning: while converting VCCLCompilerTool/BrowseInformation to '
'MSBuild, index value (21) not in expected range [0, 3)',
'Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to '
'MSBuild, index value (13) not in expected range [0, 3)',
'Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to '
'MSBuild, value must be one of [0, 1, 2]; got 14',
'Warning: while converting VCLinkerTool/Driver to '
'MSBuild, index value (10) not in expected range [0, 4)',
'Warning: while converting VCLinkerTool/LinkTimeCodeGeneration to '
'MSBuild, index value (31) not in expected range [0, 5)',
'Warning: while converting VCLinkerTool/ErrorReporting to '
'MSBuild, index value (21) not in expected range [0, 3)',
'Warning: while converting VCLinkerTool/FixedBaseAddress to '
'MSBuild, index value (6) not in expected range [0, 3)',
])
def testConvertToMSBuildSettings_full_synthetic(self):
"""Tests conversion of all the MSBuild settings."""
msvs_settings = {
'VCCLCompilerTool': {
'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string',
'AdditionalUsingDirectories': 'folder1;folder2;folder3',
'AssemblerListingLocation': 'a_file_name',
'AssemblerOutput': '0',
'BasicRuntimeChecks': '1',
'BrowseInformation': '2',
'BrowseInformationFile': 'a_file_name',
'BufferSecurityCheck': 'true',
'CallingConvention': '0',
'CompileAs': '1',
'DebugInformationFormat': '4',
'DefaultCharIsUnsigned': 'true',
'Detect64BitPortabilityProblems': 'true',
'DisableLanguageExtensions': 'true',
'DisableSpecificWarnings': 'd1;d2;d3',
'EnableEnhancedInstructionSet': '0',
'EnableFiberSafeOptimizations': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'EnablePREfast': 'true',
'ErrorReporting': '1',
'ExceptionHandling': '2',
'ExpandAttributedSource': 'true',
'FavorSizeOrSpeed': '0',
'FloatingPointExceptions': 'true',
'FloatingPointModel': '1',
'ForceConformanceInForLoopScope': 'true',
'ForcedIncludeFiles': 'file1;file2;file3',
'ForcedUsingFiles': 'file1;file2;file3',
'GeneratePreprocessedFile': '1',
'GenerateXMLDocumentationFiles': 'true',
'IgnoreStandardIncludePath': 'true',
'InlineFunctionExpansion': '2',
'KeepComments': 'true',
'MinimalRebuild': 'true',
'ObjectFile': 'a_file_name',
'OmitDefaultLibName': 'true',
'OmitFramePointers': 'true',
'OpenMP': 'true',
'Optimization': '3',
'PrecompiledHeaderFile': 'a_file_name',
'PrecompiledHeaderThrough': 'a_file_name',
'PreprocessorDefinitions': 'd1;d2;d3',
'ProgramDataBaseFileName': 'a_file_name',
'RuntimeLibrary': '0',
'RuntimeTypeInfo': 'true',
'ShowIncludes': 'true',
'SmallerTypeCheck': 'true',
'StringPooling': 'true',
'StructMemberAlignment': '1',
'SuppressStartupBanner': 'true',
'TreatWChar_tAsBuiltInType': 'true',
'UndefineAllPreprocessorDefinitions': 'true',
'UndefinePreprocessorDefinitions': 'd1;d2;d3',
'UseFullPaths': 'true',
'UsePrecompiledHeader': '1',
'UseUnicodeResponseFiles': 'true',
'WarnAsError': 'true',
'WarningLevel': '2',
'WholeProgramOptimization': 'true',
'XMLDocumentationFileName': 'a_file_name'},
'VCLinkerTool': {
'AdditionalDependencies': 'file1;file2;file3',
'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
'AdditionalLibraryDirectories_excluded': 'folder1;folder2;folder3',
'AdditionalManifestDependencies': 'file1;file2;file3',
'AdditionalOptions': 'a_string',
'AddModuleNamesToAssembly': 'file1;file2;file3',
'AllowIsolation': 'true',
'AssemblyDebug': '0',
'AssemblyLinkResource': 'file1;file2;file3',
'BaseAddress': 'a_string',
'CLRImageType': '1',
'CLRThreadAttribute': '2',
'CLRUnmanagedCodeCheck': 'true',
'DataExecutionPrevention': '0',
'DelayLoadDLLs': 'file1;file2;file3',
'DelaySign': 'true',
'Driver': '1',
'EmbedManagedResourceFile': 'file1;file2;file3',
'EnableCOMDATFolding': '0',
'EnableUAC': 'true',
'EntryPointSymbol': 'a_string',
'ErrorReporting': '0',
'FixedBaseAddress': '1',
'ForceSymbolReferences': 'file1;file2;file3',
'FunctionOrder': 'a_file_name',
'GenerateDebugInformation': 'true',
'GenerateManifest': 'true',
'GenerateMapFile': 'true',
'HeapCommitSize': 'a_string',
'HeapReserveSize': 'a_string',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreDefaultLibraryNames': 'file1;file2;file3',
'IgnoreEmbeddedIDL': 'true',
'IgnoreImportLibrary': 'true',
'ImportLibrary': 'a_file_name',
'KeyContainer': 'a_file_name',
'KeyFile': 'a_file_name',
'LargeAddressAware': '2',
'LinkIncremental': '1',
'LinkLibraryDependencies': 'true',
'LinkTimeCodeGeneration': '2',
'ManifestFile': 'a_file_name',
'MapExports': 'true',
'MapFileName': 'a_file_name',
'MergedIDLBaseFileName': 'a_file_name',
'MergeSections': 'a_string',
'MidlCommandFile': 'a_file_name',
'ModuleDefinitionFile': 'a_file_name',
'OptimizeForWindows98': '1',
'OptimizeReferences': '0',
'OutputFile': 'a_file_name',
'PerUserRedirection': 'true',
'Profile': 'true',
'ProfileGuidedDatabase': 'a_file_name',
'ProgramDatabaseFile': 'a_file_name',
'RandomizedBaseAddress': '1',
'RegisterOutput': 'true',
'ResourceOnlyDLL': 'true',
'SetChecksum': 'true',
'ShowProgress': '0',
'StackCommitSize': 'a_string',
'StackReserveSize': 'a_string',
'StripPrivateSymbols': 'a_file_name',
'SubSystem': '2',
'SupportUnloadOfDelayLoadedDLL': 'true',
'SuppressStartupBanner': 'true',
'SwapRunFromCD': 'true',
'SwapRunFromNet': 'true',
'TargetMachine': '3',
'TerminalServerAware': '2',
'TurnOffAssemblyGeneration': 'true',
'TypeLibraryFile': 'a_file_name',
'TypeLibraryResourceID': '33',
'UACExecutionLevel': '1',
'UACUIAccess': 'true',
'UseLibraryDependencyInputs': 'false',
'UseUnicodeResponseFiles': 'true',
'Version': 'a_string'},
'VCResourceCompilerTool': {
'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string',
'Culture': '1003',
'IgnoreStandardIncludePath': 'true',
'PreprocessorDefinitions': 'd1;d2;d3',
'ResourceOutputFileName': 'a_string',
'ShowProgress': 'true',
'SuppressStartupBanner': 'true',
'UndefinePreprocessorDefinitions': 'd1;d2;d3'},
'VCMIDLTool': {
'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string',
'CPreprocessOptions': 'a_string',
'DefaultCharType': '0',
'DLLDataFileName': 'a_file_name',
'EnableErrorChecks': '2',
'ErrorCheckAllocations': 'true',
'ErrorCheckBounds': 'true',
'ErrorCheckEnumRange': 'true',
'ErrorCheckRefPointers': 'true',
'ErrorCheckStubData': 'true',
'GenerateStublessProxies': 'true',
'GenerateTypeLibrary': 'true',
'HeaderFileName': 'a_file_name',
'IgnoreStandardIncludePath': 'true',
'InterfaceIdentifierFileName': 'a_file_name',
'MkTypLibCompatible': 'true',
'OutputDirectory': 'a_string',
'PreprocessorDefinitions': 'd1;d2;d3',
'ProxyFileName': 'a_file_name',
'RedirectOutputAndErrors': 'a_file_name',
'StructMemberAlignment': '3',
'SuppressStartupBanner': 'true',
'TargetEnvironment': '1',
'TypeLibraryName': 'a_file_name',
'UndefinePreprocessorDefinitions': 'd1;d2;d3',
'ValidateParameters': 'true',
'WarnAsError': 'true',
'WarningLevel': '4'},
'VCLibrarianTool': {
'AdditionalDependencies': 'file1;file2;file3',
'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
'AdditionalLibraryDirectories_excluded': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string',
'ExportNamedFunctions': 'd1;d2;d3',
'ForceSymbolReferences': 'a_string',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
'LinkLibraryDependencies': 'true',
'ModuleDefinitionFile': 'a_file_name',
'OutputFile': 'a_file_name',
'SuppressStartupBanner': 'true',
'UseUnicodeResponseFiles': 'true'},
'VCManifestTool': {
'AdditionalManifestFiles': 'file1;file2;file3',
'AdditionalOptions': 'a_string',
'AssemblyIdentity': 'a_string',
'ComponentFileName': 'a_file_name',
'DependencyInformationFile': 'a_file_name',
'EmbedManifest': 'true',
'GenerateCatalogFiles': 'true',
'InputResourceManifests': 'a_string',
'ManifestResourceFile': 'my_name',
'OutputManifestFile': 'a_file_name',
'RegistrarScriptFile': 'a_file_name',
'ReplacementsFile': 'a_file_name',
'SuppressStartupBanner': 'true',
'TypeLibraryFile': 'a_file_name',
'UpdateFileHashes': 'true',
'UpdateFileHashesSearchPath': 'a_file_name',
'UseFAT32Workaround': 'true',
'UseUnicodeResponseFiles': 'true',
'VerboseOutput': 'true'}}
expected_msbuild_settings = {
'ClCompile': {
'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string /J',
'AdditionalUsingDirectories': 'folder1;folder2;folder3',
'AssemblerListingLocation': 'a_file_name',
'AssemblerOutput': 'NoListing',
'BasicRuntimeChecks': 'StackFrameRuntimeCheck',
'BrowseInformation': 'true',
'BrowseInformationFile': 'a_file_name',
'BufferSecurityCheck': 'true',
'CallingConvention': 'Cdecl',
'CompileAs': 'CompileAsC',
'DebugInformationFormat': 'EditAndContinue',
'DisableLanguageExtensions': 'true',
'DisableSpecificWarnings': 'd1;d2;d3',
'EnableEnhancedInstructionSet': 'NotSet',
'EnableFiberSafeOptimizations': 'true',
'EnablePREfast': 'true',
'ErrorReporting': 'Prompt',
'ExceptionHandling': 'Async',
'ExpandAttributedSource': 'true',
'FavorSizeOrSpeed': 'Neither',
'FloatingPointExceptions': 'true',
'FloatingPointModel': 'Strict',
'ForceConformanceInForLoopScope': 'true',
'ForcedIncludeFiles': 'file1;file2;file3',
'ForcedUsingFiles': 'file1;file2;file3',
'FunctionLevelLinking': 'true',
'GenerateXMLDocumentationFiles': 'true',
'IgnoreStandardIncludePath': 'true',
'InlineFunctionExpansion': 'AnySuitable',
'IntrinsicFunctions': 'true',
'MinimalRebuild': 'true',
'ObjectFileName': 'a_file_name',
'OmitDefaultLibName': 'true',
'OmitFramePointers': 'true',
'OpenMPSupport': 'true',
'Optimization': 'Full',
'PrecompiledHeader': 'Create',
'PrecompiledHeaderFile': 'a_file_name',
'PrecompiledHeaderOutputFile': 'a_file_name',
'PreprocessKeepComments': 'true',
'PreprocessorDefinitions': 'd1;d2;d3',
'PreprocessSuppressLineNumbers': 'false',
'PreprocessToFile': 'true',
'ProgramDataBaseFileName': 'a_file_name',
'RuntimeLibrary': 'MultiThreaded',
'RuntimeTypeInfo': 'true',
'ShowIncludes': 'true',
'SmallerTypeCheck': 'true',
'StringPooling': 'true',
'StructMemberAlignment': '1Byte',
'SuppressStartupBanner': 'true',
'TreatWarningAsError': 'true',
'TreatWChar_tAsBuiltInType': 'true',
'UndefineAllPreprocessorDefinitions': 'true',
'UndefinePreprocessorDefinitions': 'd1;d2;d3',
'UseFullPaths': 'true',
'WarningLevel': 'Level2',
'WholeProgramOptimization': 'true',
'XMLDocumentationFileName': 'a_file_name'},
'Link': {
'AdditionalDependencies': 'file1;file2;file3',
'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
'AdditionalManifestDependencies': 'file1;file2;file3',
'AdditionalOptions': 'a_string',
'AddModuleNamesToAssembly': 'file1;file2;file3',
'AllowIsolation': 'true',
'AssemblyDebug': '',
'AssemblyLinkResource': 'file1;file2;file3',
'BaseAddress': 'a_string',
'CLRImageType': 'ForceIJWImage',
'CLRThreadAttribute': 'STAThreadingAttribute',
'CLRUnmanagedCodeCheck': 'true',
'DataExecutionPrevention': '',
'DelayLoadDLLs': 'file1;file2;file3',
'DelaySign': 'true',
'Driver': 'Driver',
'EmbedManagedResourceFile': 'file1;file2;file3',
'EnableCOMDATFolding': '',
'EnableUAC': 'true',
'EntryPointSymbol': 'a_string',
'FixedBaseAddress': 'false',
'ForceSymbolReferences': 'file1;file2;file3',
'FunctionOrder': 'a_file_name',
'GenerateDebugInformation': 'true',
'GenerateMapFile': 'true',
'HeapCommitSize': 'a_string',
'HeapReserveSize': 'a_string',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreEmbeddedIDL': 'true',
'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
'ImportLibrary': 'a_file_name',
'KeyContainer': 'a_file_name',
'KeyFile': 'a_file_name',
'LargeAddressAware': 'true',
'LinkErrorReporting': 'NoErrorReport',
'LinkTimeCodeGeneration': 'PGInstrument',
'ManifestFile': 'a_file_name',
'MapExports': 'true',
'MapFileName': 'a_file_name',
'MergedIDLBaseFileName': 'a_file_name',
'MergeSections': 'a_string',
'MidlCommandFile': 'a_file_name',
'ModuleDefinitionFile': 'a_file_name',
'NoEntryPoint': 'true',
'OptimizeReferences': '',
'OutputFile': 'a_file_name',
'PerUserRedirection': 'true',
'Profile': 'true',
'ProfileGuidedDatabase': 'a_file_name',
'ProgramDatabaseFile': 'a_file_name',
'RandomizedBaseAddress': 'false',
'RegisterOutput': 'true',
'SetChecksum': 'true',
'ShowProgress': 'NotSet',
'StackCommitSize': 'a_string',
'StackReserveSize': 'a_string',
'StripPrivateSymbols': 'a_file_name',
'SubSystem': 'Windows',
'SupportUnloadOfDelayLoadedDLL': 'true',
'SuppressStartupBanner': 'true',
'SwapRunFromCD': 'true',
'SwapRunFromNET': 'true',
'TargetMachine': 'MachineARM',
'TerminalServerAware': 'true',
'TurnOffAssemblyGeneration': 'true',
'TypeLibraryFile': 'a_file_name',
'TypeLibraryResourceID': '33',
'UACExecutionLevel': 'HighestAvailable',
'UACUIAccess': 'true',
'Version': 'a_string'},
'ResourceCompile': {
'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string',
'Culture': '0x03eb',
'IgnoreStandardIncludePath': 'true',
'PreprocessorDefinitions': 'd1;d2;d3',
'ResourceOutputFileName': 'a_string',
'ShowProgress': 'true',
'SuppressStartupBanner': 'true',
'UndefinePreprocessorDefinitions': 'd1;d2;d3'},
'Midl': {
'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string',
'CPreprocessOptions': 'a_string',
'DefaultCharType': 'Unsigned',
'DllDataFileName': 'a_file_name',
'EnableErrorChecks': 'All',
'ErrorCheckAllocations': 'true',
'ErrorCheckBounds': 'true',
'ErrorCheckEnumRange': 'true',
'ErrorCheckRefPointers': 'true',
'ErrorCheckStubData': 'true',
'GenerateStublessProxies': 'true',
'GenerateTypeLibrary': 'true',
'HeaderFileName': 'a_file_name',
'IgnoreStandardIncludePath': 'true',
'InterfaceIdentifierFileName': 'a_file_name',
'MkTypLibCompatible': 'true',
'OutputDirectory': 'a_string',
'PreprocessorDefinitions': 'd1;d2;d3',
'ProxyFileName': 'a_file_name',
'RedirectOutputAndErrors': 'a_file_name',
'StructMemberAlignment': '4',
'SuppressStartupBanner': 'true',
'TargetEnvironment': 'Win32',
'TypeLibraryName': 'a_file_name',
'UndefinePreprocessorDefinitions': 'd1;d2;d3',
'ValidateAllParameters': 'true',
'WarnAsError': 'true',
'WarningLevel': '4'},
'Lib': {
'AdditionalDependencies': 'file1;file2;file3',
'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
'AdditionalOptions': 'a_string',
'ExportNamedFunctions': 'd1;d2;d3',
'ForceSymbolReferences': 'a_string',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
'ModuleDefinitionFile': 'a_file_name',
'OutputFile': 'a_file_name',
'SuppressStartupBanner': 'true',
'UseUnicodeResponseFiles': 'true'},
'Manifest': {
'AdditionalManifestFiles': 'file1;file2;file3',
'AdditionalOptions': 'a_string',
'AssemblyIdentity': 'a_string',
'ComponentFileName': 'a_file_name',
'GenerateCatalogFiles': 'true',
'InputResourceManifests': 'a_string',
'OutputManifestFile': 'a_file_name',
'RegistrarScriptFile': 'a_file_name',
'ReplacementsFile': 'a_file_name',
'SuppressStartupBanner': 'true',
'TypeLibraryFile': 'a_file_name',
'UpdateFileHashes': 'true',
'UpdateFileHashesSearchPath': 'a_file_name',
'VerboseOutput': 'true'},
'ManifestResourceCompile': {
'ResourceOutputFileName': 'my_name'},
'ProjectReference': {
'LinkLibraryDependencies': 'true',
'UseLibraryDependencyInputs': 'false'},
'': {
'EmbedManifest': 'true',
'GenerateManifest': 'true',
'IgnoreImportLibrary': 'true',
'LinkIncremental': 'false'}}
actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
msvs_settings,
self.stderr)
self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
self._ExpectedWarnings([])
def testConvertToMSBuildSettings_actual(self):
"""Tests the conversion of an actual project.
A VS2008 project with most of the options defined was created through the
VS2008 IDE. It was then converted to VS2010. The tool settings found in
the .vcproj and .vcxproj files were converted to the two dictionaries
msvs_settings and expected_msbuild_settings.
Note that for many settings, the VS2010 converter adds macros like
%(AdditionalIncludeDirectories) to make sure than inherited values are
included. Since the Gyp projects we generate do not use inheritance,
we removed these macros. They were:
ClCompile:
AdditionalIncludeDirectories: ';%(AdditionalIncludeDirectories)'
AdditionalOptions: ' %(AdditionalOptions)'
AdditionalUsingDirectories: ';%(AdditionalUsingDirectories)'
DisableSpecificWarnings: ';%(DisableSpecificWarnings)',
ForcedIncludeFiles: ';%(ForcedIncludeFiles)',
ForcedUsingFiles: ';%(ForcedUsingFiles)',
PreprocessorDefinitions: ';%(PreprocessorDefinitions)',
UndefinePreprocessorDefinitions:
';%(UndefinePreprocessorDefinitions)',
Link:
AdditionalDependencies: ';%(AdditionalDependencies)',
AdditionalLibraryDirectories: ';%(AdditionalLibraryDirectories)',
AdditionalManifestDependencies:
';%(AdditionalManifestDependencies)',
AdditionalOptions: ' %(AdditionalOptions)',
AddModuleNamesToAssembly: ';%(AddModuleNamesToAssembly)',
AssemblyLinkResource: ';%(AssemblyLinkResource)',
DelayLoadDLLs: ';%(DelayLoadDLLs)',
EmbedManagedResourceFile: ';%(EmbedManagedResourceFile)',
ForceSymbolReferences: ';%(ForceSymbolReferences)',
IgnoreSpecificDefaultLibraries:
';%(IgnoreSpecificDefaultLibraries)',
ResourceCompile:
AdditionalIncludeDirectories: ';%(AdditionalIncludeDirectories)',
AdditionalOptions: ' %(AdditionalOptions)',
PreprocessorDefinitions: ';%(PreprocessorDefinitions)',
Manifest:
AdditionalManifestFiles: ';%(AdditionalManifestFiles)',
AdditionalOptions: ' %(AdditionalOptions)',
InputResourceManifests: ';%(InputResourceManifests)',
"""
msvs_settings = {
'VCCLCompilerTool': {
'AdditionalIncludeDirectories': 'dir1',
'AdditionalOptions': '/more',
'AdditionalUsingDirectories': 'test',
'AssemblerListingLocation': '$(IntDir)\\a',
'AssemblerOutput': '1',
'BasicRuntimeChecks': '3',
'BrowseInformation': '1',
'BrowseInformationFile': '$(IntDir)\\e',
'BufferSecurityCheck': 'false',
'CallingConvention': '1',
'CompileAs': '1',
'DebugInformationFormat': '4',
'DefaultCharIsUnsigned': 'true',
'Detect64BitPortabilityProblems': 'true',
'DisableLanguageExtensions': 'true',
'DisableSpecificWarnings': 'abc',
'EnableEnhancedInstructionSet': '1',
'EnableFiberSafeOptimizations': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'EnablePREfast': 'true',
'ErrorReporting': '2',
'ExceptionHandling': '2',
'ExpandAttributedSource': 'true',
'FavorSizeOrSpeed': '2',
'FloatingPointExceptions': 'true',
'FloatingPointModel': '1',
'ForceConformanceInForLoopScope': 'false',
'ForcedIncludeFiles': 'def',
'ForcedUsingFiles': 'ge',
'GeneratePreprocessedFile': '2',
'GenerateXMLDocumentationFiles': 'true',
'IgnoreStandardIncludePath': 'true',
'InlineFunctionExpansion': '1',
'KeepComments': 'true',
'MinimalRebuild': 'true',
'ObjectFile': '$(IntDir)\\b',
'OmitDefaultLibName': 'true',
'OmitFramePointers': 'true',
'OpenMP': 'true',
'Optimization': '3',
'PrecompiledHeaderFile': '$(IntDir)\\$(TargetName).pche',
'PrecompiledHeaderThrough': 'StdAfx.hd',
'PreprocessorDefinitions': 'WIN32;_DEBUG;_CONSOLE',
'ProgramDataBaseFileName': '$(IntDir)\\vc90b.pdb',
'RuntimeLibrary': '3',
'RuntimeTypeInfo': 'false',
'ShowIncludes': 'true',
'SmallerTypeCheck': 'true',
'StringPooling': 'true',
'StructMemberAlignment': '3',
'SuppressStartupBanner': 'false',
'TreatWChar_tAsBuiltInType': 'false',
'UndefineAllPreprocessorDefinitions': 'true',
'UndefinePreprocessorDefinitions': 'wer',
'UseFullPaths': 'true',
'UsePrecompiledHeader': '0',
'UseUnicodeResponseFiles': 'false',
'WarnAsError': 'true',
'WarningLevel': '3',
'WholeProgramOptimization': 'true',
'XMLDocumentationFileName': '$(IntDir)\\c'},
'VCLinkerTool': {
'AdditionalDependencies': 'zx',
'AdditionalLibraryDirectories': 'asd',
'AdditionalManifestDependencies': 's2',
'AdditionalOptions': '/mor2',
'AddModuleNamesToAssembly': 'd1',
'AllowIsolation': 'false',
'AssemblyDebug': '1',
'AssemblyLinkResource': 'd5',
'BaseAddress': '23423',
'CLRImageType': '3',
'CLRThreadAttribute': '1',
'CLRUnmanagedCodeCheck': 'true',
'DataExecutionPrevention': '0',
'DelayLoadDLLs': 'd4',
'DelaySign': 'true',
'Driver': '2',
'EmbedManagedResourceFile': 'd2',
'EnableCOMDATFolding': '1',
'EnableUAC': 'false',
'EntryPointSymbol': 'f5',
'ErrorReporting': '2',
'FixedBaseAddress': '1',
'ForceSymbolReferences': 'd3',
'FunctionOrder': 'fssdfsd',
'GenerateDebugInformation': 'true',
'GenerateManifest': 'false',
'GenerateMapFile': 'true',
'HeapCommitSize': '13',
'HeapReserveSize': '12',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreDefaultLibraryNames': 'flob;flok',
'IgnoreEmbeddedIDL': 'true',
'IgnoreImportLibrary': 'true',
'ImportLibrary': 'f4',
'KeyContainer': 'f7',
'KeyFile': 'f6',
'LargeAddressAware': '2',
'LinkIncremental': '0',
'LinkLibraryDependencies': 'false',
'LinkTimeCodeGeneration': '1',
'ManifestFile':
'$(IntDir)\\$(TargetFileName).2intermediate.manifest',
'MapExports': 'true',
'MapFileName': 'd5',
'MergedIDLBaseFileName': 'f2',
'MergeSections': 'f5',
'MidlCommandFile': 'f1',
'ModuleDefinitionFile': 'sdsd',
'OptimizeForWindows98': '2',
'OptimizeReferences': '2',
'OutputFile': '$(OutDir)\\$(ProjectName)2.exe',
'PerUserRedirection': 'true',
'Profile': 'true',
'ProfileGuidedDatabase': '$(TargetDir)$(TargetName).pgdd',
'ProgramDatabaseFile': 'Flob.pdb',
'RandomizedBaseAddress': '1',
'RegisterOutput': 'true',
'ResourceOnlyDLL': 'true',
'SetChecksum': 'false',
'ShowProgress': '1',
'StackCommitSize': '15',
'StackReserveSize': '14',
'StripPrivateSymbols': 'd3',
'SubSystem': '1',
'SupportUnloadOfDelayLoadedDLL': 'true',
'SuppressStartupBanner': 'false',
'SwapRunFromCD': 'true',
'SwapRunFromNet': 'true',
'TargetMachine': '1',
'TerminalServerAware': '1',
'TurnOffAssemblyGeneration': 'true',
'TypeLibraryFile': 'f3',
'TypeLibraryResourceID': '12',
'UACExecutionLevel': '2',
'UACUIAccess': 'true',
'UseLibraryDependencyInputs': 'true',
'UseUnicodeResponseFiles': 'false',
'Version': '333'},
'VCResourceCompilerTool': {
'AdditionalIncludeDirectories': 'f3',
'AdditionalOptions': '/more3',
'Culture': '3084',
'IgnoreStandardIncludePath': 'true',
'PreprocessorDefinitions': '_UNICODE;UNICODE2',
'ResourceOutputFileName': '$(IntDir)/$(InputName)3.res',
'ShowProgress': 'true'},
'VCManifestTool': {
'AdditionalManifestFiles': 'sfsdfsd',
'AdditionalOptions': 'afdsdafsd',
'AssemblyIdentity': 'sddfdsadfsa',
'ComponentFileName': 'fsdfds',
'DependencyInformationFile': '$(IntDir)\\mt.depdfd',
'EmbedManifest': 'false',
'GenerateCatalogFiles': 'true',
'InputResourceManifests': 'asfsfdafs',
'ManifestResourceFile':
'$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf',
'OutputManifestFile': '$(TargetPath).manifestdfs',
'RegistrarScriptFile': 'sdfsfd',
'ReplacementsFile': 'sdffsd',
'SuppressStartupBanner': 'false',
'TypeLibraryFile': 'sfsd',
'UpdateFileHashes': 'true',
'UpdateFileHashesSearchPath': 'sfsd',
'UseFAT32Workaround': 'true',
'UseUnicodeResponseFiles': 'false',
'VerboseOutput': 'true'}}
expected_msbuild_settings = {
'ClCompile': {
'AdditionalIncludeDirectories': 'dir1',
'AdditionalOptions': '/more /J',
'AdditionalUsingDirectories': 'test',
'AssemblerListingLocation': '$(IntDir)a',
'AssemblerOutput': 'AssemblyCode',
'BasicRuntimeChecks': 'EnableFastChecks',
'BrowseInformation': 'true',
'BrowseInformationFile': '$(IntDir)e',
'BufferSecurityCheck': 'false',
'CallingConvention': 'FastCall',
'CompileAs': 'CompileAsC',
'DebugInformationFormat': 'EditAndContinue',
'DisableLanguageExtensions': 'true',
'DisableSpecificWarnings': 'abc',
'EnableEnhancedInstructionSet': 'StreamingSIMDExtensions',
'EnableFiberSafeOptimizations': 'true',
'EnablePREfast': 'true',
'ErrorReporting': 'Queue',
'ExceptionHandling': 'Async',
'ExpandAttributedSource': 'true',
'FavorSizeOrSpeed': 'Size',
'FloatingPointExceptions': 'true',
'FloatingPointModel': 'Strict',
'ForceConformanceInForLoopScope': 'false',
'ForcedIncludeFiles': 'def',
'ForcedUsingFiles': 'ge',
'FunctionLevelLinking': 'true',
'GenerateXMLDocumentationFiles': 'true',
'IgnoreStandardIncludePath': 'true',
'InlineFunctionExpansion': 'OnlyExplicitInline',
'IntrinsicFunctions': 'true',
'MinimalRebuild': 'true',
'ObjectFileName': '$(IntDir)b',
'OmitDefaultLibName': 'true',
'OmitFramePointers': 'true',
'OpenMPSupport': 'true',
'Optimization': 'Full',
'PrecompiledHeader': 'NotUsing', # Actual conversion gives ''
'PrecompiledHeaderFile': 'StdAfx.hd',
'PrecompiledHeaderOutputFile': '$(IntDir)$(TargetName).pche',
'PreprocessKeepComments': 'true',
'PreprocessorDefinitions': 'WIN32;_DEBUG;_CONSOLE',
'PreprocessSuppressLineNumbers': 'true',
'PreprocessToFile': 'true',
'ProgramDataBaseFileName': '$(IntDir)vc90b.pdb',
'RuntimeLibrary': 'MultiThreadedDebugDLL',
'RuntimeTypeInfo': 'false',
'ShowIncludes': 'true',
'SmallerTypeCheck': 'true',
'StringPooling': 'true',
'StructMemberAlignment': '4Bytes',
'SuppressStartupBanner': 'false',
'TreatWarningAsError': 'true',
'TreatWChar_tAsBuiltInType': 'false',
'UndefineAllPreprocessorDefinitions': 'true',
'UndefinePreprocessorDefinitions': 'wer',
'UseFullPaths': 'true',
'WarningLevel': 'Level3',
'WholeProgramOptimization': 'true',
'XMLDocumentationFileName': '$(IntDir)c'},
'Link': {
'AdditionalDependencies': 'zx',
'AdditionalLibraryDirectories': 'asd',
'AdditionalManifestDependencies': 's2',
'AdditionalOptions': '/mor2',
'AddModuleNamesToAssembly': 'd1',
'AllowIsolation': 'false',
'AssemblyDebug': 'true',
'AssemblyLinkResource': 'd5',
'BaseAddress': '23423',
'CLRImageType': 'ForceSafeILImage',
'CLRThreadAttribute': 'MTAThreadingAttribute',
'CLRUnmanagedCodeCheck': 'true',
'DataExecutionPrevention': '',
'DelayLoadDLLs': 'd4',
'DelaySign': 'true',
'Driver': 'UpOnly',
'EmbedManagedResourceFile': 'd2',
'EnableCOMDATFolding': 'false',
'EnableUAC': 'false',
'EntryPointSymbol': 'f5',
'FixedBaseAddress': 'false',
'ForceSymbolReferences': 'd3',
'FunctionOrder': 'fssdfsd',
'GenerateDebugInformation': 'true',
'GenerateMapFile': 'true',
'HeapCommitSize': '13',
'HeapReserveSize': '12',
'IgnoreAllDefaultLibraries': 'true',
'IgnoreEmbeddedIDL': 'true',
'IgnoreSpecificDefaultLibraries': 'flob;flok',
'ImportLibrary': 'f4',
'KeyContainer': 'f7',
'KeyFile': 'f6',
'LargeAddressAware': 'true',
'LinkErrorReporting': 'QueueForNextLogin',
'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
'ManifestFile': '$(IntDir)$(TargetFileName).2intermediate.manifest',
'MapExports': 'true',
'MapFileName': 'd5',
'MergedIDLBaseFileName': 'f2',
'MergeSections': 'f5',
'MidlCommandFile': 'f1',
'ModuleDefinitionFile': 'sdsd',
'NoEntryPoint': 'true',
'OptimizeReferences': 'true',
'OutputFile': '$(OutDir)$(ProjectName)2.exe',
'PerUserRedirection': 'true',
'Profile': 'true',
'ProfileGuidedDatabase': '$(TargetDir)$(TargetName).pgdd',
'ProgramDatabaseFile': 'Flob.pdb',
'RandomizedBaseAddress': 'false',
'RegisterOutput': 'true',
'SetChecksum': 'false',
'ShowProgress': 'LinkVerbose',
'StackCommitSize': '15',
'StackReserveSize': '14',
'StripPrivateSymbols': 'd3',
'SubSystem': 'Console',
'SupportUnloadOfDelayLoadedDLL': 'true',
'SuppressStartupBanner': 'false',
'SwapRunFromCD': 'true',
'SwapRunFromNET': 'true',
'TargetMachine': 'MachineX86',
'TerminalServerAware': 'false',
'TurnOffAssemblyGeneration': 'true',
'TypeLibraryFile': 'f3',
'TypeLibraryResourceID': '12',
'UACExecutionLevel': 'RequireAdministrator',
'UACUIAccess': 'true',
'Version': '333'},
'ResourceCompile': {
'AdditionalIncludeDirectories': 'f3',
'AdditionalOptions': '/more3',
'Culture': '0x0c0c',
'IgnoreStandardIncludePath': 'true',
'PreprocessorDefinitions': '_UNICODE;UNICODE2',
'ResourceOutputFileName': '$(IntDir)%(Filename)3.res',
'ShowProgress': 'true'},
'Manifest': {
'AdditionalManifestFiles': 'sfsdfsd',
'AdditionalOptions': 'afdsdafsd',
'AssemblyIdentity': 'sddfdsadfsa',
'ComponentFileName': 'fsdfds',
'GenerateCatalogFiles': 'true',
'InputResourceManifests': 'asfsfdafs',
'OutputManifestFile': '$(TargetPath).manifestdfs',
'RegistrarScriptFile': 'sdfsfd',
'ReplacementsFile': 'sdffsd',
'SuppressStartupBanner': 'false',
'TypeLibraryFile': 'sfsd',
'UpdateFileHashes': 'true',
'UpdateFileHashesSearchPath': 'sfsd',
'VerboseOutput': 'true'},
'ProjectReference': {
'LinkLibraryDependencies': 'false',
'UseLibraryDependencyInputs': 'true'},
'': {
'EmbedManifest': 'false',
'GenerateManifest': 'false',
'IgnoreImportLibrary': 'true',
'LinkIncremental': ''
},
'ManifestResourceCompile': {
'ResourceOutputFileName':
'$(IntDir)$(TargetFileName).embed.manifest.resfdsf'}
}
actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
msvs_settings,
self.stderr)
self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
self._ExpectedWarnings([])
if __name__ == '__main__':
unittest.main()
|
Dhivyap/ansible
|
refs/heads/devel
|
test/units/modules/network/icx/test_icx_interface.py
|
21
|
# Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.icx import icx_interface
from units.modules.utils import set_module_args
from .icx_module import TestICXModule, load_fixture
class TestICXInterfaceModule(TestICXModule):
module = icx_interface
def setUp(self):
super(TestICXInterfaceModule, self).setUp()
self.mock_exec_command = patch('ansible.modules.network.icx.icx_interface.exec_command')
self.exec_command = self.mock_exec_command.start()
self.mock_load_config = patch('ansible.modules.network.icx.icx_interface.load_config')
self.load_config = self.mock_load_config.start()
self.mock_get_config = patch('ansible.modules.network.icx.icx_interface.get_config')
self.get_config = self.mock_get_config.start()
self.set_running_config()
def tearDown(self):
super(TestICXInterfaceModule, self).tearDown()
self.mock_exec_command.stop()
self.mock_load_config.stop()
self.mock_get_config.stop()
def load_fixtures(self, commands=None):
compares = None
def load_file(*args, **kwargs):
module, commands, val = args
for arg in args:
if arg.params['check_running_config'] is True:
self.exec_command.return_value = (0, load_fixture('icx_interface_config.cfg').strip(), None)
return load_fixture('icx_interface_config.cfg').strip()
else:
self.exec_command.return_value = 0, '', None
return ''
self.get_config.side_effect = load_file
self.load_config.return_value = None
def test_icx_interface_set_config(self):
power = dict(dict(enabled='True'))
set_module_args(dict(name='ethernet 1/1/1', description='welcome port', speed='1000-full', power=power))
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=True)
expected_commands = [
'interface ethernet 1/1/1',
'speed-duplex 1000-full',
'port-name welcome port',
'inline power',
'enable'
]
self.assertEqual(result['commands'], expected_commands)
else:
result = self.execute_module(changed=True)
expected_commands = [
'interface ethernet 1/1/1',
'speed-duplex 1000-full',
'port-name welcome port',
'inline power'
]
self.assertEqual(result['commands'], expected_commands)
def test_icx_interface_remove(self):
set_module_args(dict(name='ethernet 1/1/1', state='absent'))
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=True)
self.assertEqual(result['commands'], ['no interface ethernet 1/1/1'])
else:
result = self.execute_module(changed=True)
self.assertEqual(result['commands'], ['no interface ethernet 1/1/1'])
def test_icx_interface_disable(self):
set_module_args(dict(name='ethernet 1/1/1', enabled=False))
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=True)
self.assertEqual(result['commands'], ['interface ethernet 1/1/1', 'disable'])
else:
result = self.execute_module(changed=True)
self.assertEqual(result['commands'], ['interface ethernet 1/1/1', 'disable'])
def test_icx_interface_set_power(self):
power = dict(by_class='2')
set_module_args(dict(name='ethernet 1/1/2', power=dict(power)))
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=True)
expected_commands = [
'interface ethernet 1/1/2',
'inline power power-by-class 2',
'enable'
]
self.assertEqual(result['commands'], expected_commands)
else:
result = self.execute_module(changed=True)
expected_commands = [
'interface ethernet 1/1/2',
'inline power power-by-class 2'
]
self.assertEqual(result['commands'], expected_commands)
def test_icx_interface_aggregate(self):
power = dict(dict(enabled='True'))
aggregate = [
dict(name='ethernet 1/1/9', description='welcome port9', speed='1000-full', power=power),
dict(name='ethernet 1/1/10', description='welcome port10', speed='1000-full', power=power)
]
set_module_args(dict(aggregate=aggregate))
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=True)
expected_commands = [
'interface ethernet 1/1/9',
'speed-duplex 1000-full',
'port-name welcome port9',
'inline power',
'enable',
'interface ethernet 1/1/10',
'speed-duplex 1000-full',
'port-name welcome port10',
'inline power',
'enable'
]
self.assertEqual(result['commands'], expected_commands)
else:
result = self.execute_module(changed=True)
expected_commands = [
'interface ethernet 1/1/9',
'speed-duplex 1000-full',
'port-name welcome port9',
'inline power',
'enable',
'interface ethernet 1/1/10',
'speed-duplex 1000-full',
'port-name welcome port10',
'inline power',
'enable'
]
self.assertEqual(result['commands'], expected_commands)
def test_icx_interface_lag_config(self):
set_module_args(dict(name='lag 11', description='lag ports of id 11', speed='auto'))
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=True)
expected_commands = [
'interface lag 11',
'speed-duplex auto',
'port-name lag ports of id 11',
'enable'
]
self.assertEqual(result['commands'], expected_commands)
else:
result = self.execute_module(changed=True)
expected_commands = [
'interface lag 11',
'speed-duplex auto',
'port-name lag ports of id 11'
]
self.assertEqual(result['commands'], expected_commands)
def test_icx_interface_loopback_config(self):
set_module_args(dict(name='loopback 10', description='loopback ports', enabled=True))
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=True)
expected_commands = [
'interface loopback 10',
'port-name loopback ports',
'enable'
]
self.assertEqual(result['commands'], expected_commands)
else:
result = self.execute_module(changed=True)
expected_commands = [
'interface loopback 10',
'port-name loopback ports',
'enable'
]
self.assertEqual(result['commands'], expected_commands)
def test_icx_interface_state_up_cndt(self):
set_module_args(dict(name='ethernet 1/1/1', state='up', tx_rate='ge(0)'))
if not self.ENV_ICX_USE_DIFF:
self.assertTrue(self.execute_module(failed=True))
else:
self.assertTrue(self.execute_module(failed=False))
def test_icx_interface_lldp_neighbors_cndt(self):
set_module_args(dict(name='ethernet 1/1/48', neighbors=[dict(port='GigabitEthernet1/1/48', host='ICX7150-48 Router')]))
if not self.ENV_ICX_USE_DIFF:
self.assertTrue(self.execute_module(changed=False, failed=True))
else:
self.assertTrue(self.execute_module(changed=False, failed=False))
def test_icx_interface_disable_compare(self):
set_module_args(dict(name='ethernet 1/1/1', enabled=True, check_running_config='True'))
if self.get_running_config(compare=True):
if not self.ENV_ICX_USE_DIFF:
result = self.execute_module(changed=False)
self.assertEqual(result['commands'], [])
else:
result = self.execute_module(changed=False)
self.assertEqual(result['commands'], [])
|
wido/cloudstack
|
refs/heads/master
|
test/integration/component/test_VirtualRouter_alerts.py
|
4
|
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
""" P1 tests for alert receiving from VR on service failure in VR
"""
# Import Local Modules
# import marvin
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.lib.utils import (get_process_status,
cleanup_resources)
from marvin.lib.base import (Account,
ServiceOffering,
VirtualMachine,
Configurations)
from marvin.lib.common import (list_hosts,
list_routers,
get_zone,
get_domain,
get_template)
from nose.plugins.attrib import attr
from marvin.codes import FAILED
import time
_multiprocess_shared_ = True
class TestVRServiceFailureAlerting(cloudstackTestCase):
@classmethod
def setUpClass(cls):
cls.testClient = super(
TestVRServiceFailureAlerting,
cls).getClsTestClient()
cls.api_client = cls.testClient.getApiClient()
cls.services = cls.testClient.getParsedTestDataConfig()
cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
# Get Zone, Domain and templates
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
domain = get_domain(cls.api_client)
cls.services['mode'] = cls.zone.networktype
template = get_template(
cls.api_client,
cls.zone.id,
cls.services["ostype"]
)
if template == FAILED:
assert False, "get_template() failed to return template with \
description %s" % cls.services["ostype"]
# Set Zones and disk offerings ??
cls.services["small"]["zoneid"] = cls.zone.id
cls.services["small"]["template"] = template.id
# Create account, service offerings, vm.
cls.account = Account.create(
cls.api_client,
cls.services["account"],
domainid=domain.id
)
cls.small_offering = ServiceOffering.create(
cls.api_client,
cls.services["service_offerings"]["small"]
)
# create a virtual machine
cls.virtual_machine = VirtualMachine.create(
cls.api_client,
cls.services["small"],
accountid=cls.account.name,
domainid=cls.account.domainid,
serviceofferingid=cls.small_offering.id,
mode=cls.services["mode"]
)
cls._cleanup = [
cls.small_offering,
cls.account
]
@classmethod
def tearDownClass(cls):
cls.api_client = super(
TestVRServiceFailureAlerting,
cls).getClsTestClient().getApiClient()
cleanup_resources(cls.api_client, cls._cleanup)
return
def setUp(self):
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.hypervisor = self.testClient.getHypervisorInfo()
self.cleanup = []
def tearDown(self):
# Clean up, terminate the created ISOs
cleanup_resources(self.apiclient, self.cleanup)
return
@attr(hypervisor="xenserver")
@attr(tags=["advanced", "basic"], required_hardware="true")
def test_01_VRServiceFailureAlerting(self):
if self.zone.networktype == "Basic":
list_router_response = list_routers(
self.apiclient,
listall="true"
)
else:
list_router_response = list_routers(
self.apiclient,
account=self.account.name,
domainid=self.account.domainid
)
self.assertEqual(
isinstance(list_router_response, list),
True,
"Check list response returns a valid list"
)
router = list_router_response[0]
self.debug("Router ID: %s, state: %s" % (router.id, router.state))
self.assertEqual(
router.state,
'Running',
"Check list router response for router state"
)
alertSubject = "Monitoring Service on VR " + router.name
if self.hypervisor.lower() in ('vmware', 'hyperv'):
result = get_process_status(
self.apiclient.connection.mgtSvr,
22,
self.apiclient.connection.user,
self.apiclient.connection.passwd,
router.linklocalip,
"service dnsmasq stop",
hypervisor=self.hypervisor
)
else:
try:
hosts = list_hosts(
self.apiclient,
zoneid=router.zoneid,
type='Routing',
state='Up',
id=router.hostid
)
self.assertEqual(
isinstance(hosts, list),
True,
"Check list host returns a valid list"
)
host = hosts[0]
result = get_process_status(
host.ipaddress,
22,
self.hostConfig["username"],
self.hostConfig["password"],
router.linklocalip,
"service apache2 stop"
)
except Exception as e:
raise Exception("Exception raised in getting host\
credentials: %s " % e)
res = str(result)
self.debug("apache process status: %s" % res)
configs = Configurations.list(
self.apiclient,
name='router.alerts.check.interval'
)
# Set the value for one more minute than
# actual range to be on safer side
waitingPeriod = (
int(configs[0].value) + 60) # in seconds
time.sleep(waitingPeriod)
# wait for (router.alerts.check.interval + 10) minutes meanwhile
# monitor service on VR starts the apache service (
# router.alerts.check.interval default value is
# 30minutes)
qresultset = self.dbclient.execute(
"select id from alert where subject like\
'%{0}%' ORDER BY id DESC LIMIT 1;".format(
str(alertSubject)))
self.assertNotEqual(
len(qresultset),
0,
"Check DB Query result set"
)
return
|
jesonyang001/qarepo
|
refs/heads/master
|
askbot/migrations/0155_remove_unused_internal_tags.py
|
16
|
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
print 'Deleting unused tags added for internal bookkeeping...'
tags = orm['askbot.Tag'].objects.filter(name__startswith='_internal_')
count = tags.count()
if count > 0:
tags.delete()
print '%d tags formatted _internal_X' % count
else:
print 'None found'
def backwards(self, orm):
"Write your backwards methods here."
models = {
'askbot.activity': {
'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"},
'active_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'activity_type': ('django.db.models.fields.SmallIntegerField', [], {}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_auditted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Post']", 'null': 'True'}),
'receiving_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'received_activity'", 'symmetrical': 'False', 'to': "orm['auth.User']"}),
'recipients': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'incoming_activity'", 'symmetrical': 'False', 'through': "orm['askbot.ActivityAuditStatus']", 'to': "orm['auth.User']"}),
'summary': ('django.db.models.fields.TextField', [], {'default': "''"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
},
'askbot.activityauditstatus': {
'Meta': {'unique_together': "(('user', 'activity'),)", 'object_name': 'ActivityAuditStatus'},
'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Activity']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
},
'askbot.anonymousanswer': {
'Meta': {'object_name': 'AnonymousAnswer'},
'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'anonymous_answers'", 'to': "orm['askbot.Post']"}),
'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}),
'text': ('django.db.models.fields.TextField', [], {}),
'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'askbot.anonymousquestion': {
'Meta': {'object_name': 'AnonymousQuestion'},
'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}),
'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}),
'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
'text': ('django.db.models.fields.TextField', [], {}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'askbot.askwidget': {
'Meta': {'object_name': 'AskWidget'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Group']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'include_text_field': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'inner_style': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'outer_style': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'tag': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Tag']", 'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'askbot.award': {
'Meta': {'object_name': 'Award', 'db_table': "u'award'"},
'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['askbot.BadgeData']"}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_user'", 'to': "orm['auth.User']"})
},
'askbot.badgedata': {
'Meta': {'ordering': "('slug',)", 'object_name': 'BadgeData'},
'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['askbot.Award']", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'})
},
'askbot.draftanswer': {
'Meta': {'object_name': 'DraftAnswer'},
'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'draft_answers'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'text': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'thread': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'draft_answers'", 'to': "orm['askbot.Thread']"})
},
'askbot.draftquestion': {
'Meta': {'object_name': 'DraftQuestion'},
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125', 'null': 'True'}),
'text': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True'})
},
'askbot.emailfeedsetting': {
'Meta': {'unique_together': "(('subscriber', 'feed_type'),)", 'object_name': 'EmailFeedSetting'},
'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'feed_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'frequency': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '8'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'reported_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'subscriber': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notification_subscriptions'", 'to': "orm['auth.User']"})
},
'askbot.favoritequestion': {
'Meta': {'object_name': 'FavoriteQuestion', 'db_table': "u'favorite_question'"},
'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'thread': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Thread']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_favorite_questions'", 'to': "orm['auth.User']"})
},
'askbot.group': {
'Meta': {'object_name': 'Group', '_ormbases': ['auth.Group']},
'description': ('django.db.models.fields.related.OneToOneField', [], {'blank': 'True', 'related_name': "'described_group'", 'unique': 'True', 'null': 'True', 'to': "orm['askbot.Post']"}),
'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}),
'is_vip': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'logo_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'}),
'moderate_answers_to_enquirers': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'moderate_email': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'openness': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}),
'preapproved_email_domains': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
'preapproved_emails': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'})
},
'askbot.groupmembership': {
'Meta': {'object_name': 'GroupMembership', '_ormbases': ['auth.AuthUserGroups']},
'authusergroups_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.AuthUserGroups']", 'unique': 'True', 'primary_key': 'True'}),
'level': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'})
},
'askbot.markedtag': {
'Meta': {'object_name': 'MarkedTag'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['askbot.Tag']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['auth.User']"})
},
'askbot.post': {
'Meta': {'object_name': 'Post'},
'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'approved': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'posts'", 'to': "orm['auth.User']"}),
'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_posts'", 'null': 'True', 'to': "orm['auth.User']"}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'group_posts'", 'symmetrical': 'False', 'through': "orm['askbot.PostToGroup']", 'to': "orm['askbot.Group']"}),
'html': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_posts'", 'null': 'True', 'to': "orm['auth.User']"}),
'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_posts'", 'null': 'True', 'to': "orm['auth.User']"}),
'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'old_answer_id': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'old_comment_id': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'old_question_id': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comments'", 'null': 'True', 'to': "orm['askbot.Post']"}),
'points': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_column': "'score'"}),
'post_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
'summary': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'text': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'thread': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'posts'", 'null': 'True', 'blank': 'True', 'to': "orm['askbot.Thread']"}),
'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
},
'askbot.postflagreason': {
'Meta': {'object_name': 'PostFlagReason'},
'added_at': ('django.db.models.fields.DateTimeField', [], {}),
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
'details': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'post_reject_reasons'", 'to': "orm['askbot.Post']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '128'})
},
'askbot.postrevision': {
'Meta': {'ordering': "('-revision',)", 'unique_together': "(('post', 'revision'),)", 'object_name': 'PostRevision'},
'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
'approved_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'approved_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'postrevisions'", 'to': "orm['auth.User']"}),
'by_email': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'post': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'revisions'", 'null': 'True', 'to': "orm['askbot.Post']"}),
'revised_at': ('django.db.models.fields.DateTimeField', [], {}),
'revision': ('django.db.models.fields.PositiveIntegerField', [], {}),
'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}),
'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}),
'text': ('django.db.models.fields.TextField', [], {}),
'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'})
},
'askbot.posttogroup': {
'Meta': {'unique_together': "(('post', 'group'),)", 'object_name': 'PostToGroup', 'db_table': "'askbot_post_groups'"},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'post': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Post']"})
},
'askbot.questionview': {
'Meta': {'object_name': 'QuestionView'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'viewed'", 'to': "orm['askbot.Post']"}),
'when': ('django.db.models.fields.DateTimeField', [], {}),
'who': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_views'", 'to': "orm['auth.User']"})
},
'askbot.questionwidget': {
'Meta': {'object_name': 'QuestionWidget'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Group']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order_by': ('django.db.models.fields.CharField', [], {'default': "'-added_at'", 'max_length': '18'}),
'question_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '7'}),
'search_query': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'null': 'True', 'blank': 'True'}),
'style': ('django.db.models.fields.TextField', [], {'default': '"\\n@import url(\'http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300,400,700\');\\nbody {\\n overflow: hidden;\\n}\\n\\n#container {\\n width: 200px;\\n height: 350px;\\n}\\nul {\\n list-style: none;\\n padding: 5px;\\n margin: 5px;\\n}\\nli {\\n border-bottom: #CCC 1px solid;\\n padding-bottom: 5px;\\n padding-top: 5px;\\n}\\nli:last-child {\\n border: none;\\n}\\na {\\n text-decoration: none;\\n color: #464646;\\n font-family: \'Yanone Kaffeesatz\', sans-serif;\\n font-size: 15px;\\n}\\n"', 'blank': 'True'}),
'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'askbot.replyaddress': {
'Meta': {'object_name': 'ReplyAddress'},
'address': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '25'}),
'allowed_from_email': ('django.db.models.fields.EmailField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'post': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reply_addresses'", 'null': 'True', 'to': "orm['askbot.Post']"}),
'reply_action': ('django.db.models.fields.CharField', [], {'default': "'auto_answer_or_comment'", 'max_length': '32'}),
'response_post': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'edit_addresses'", 'null': 'True', 'to': "orm['askbot.Post']"}),
'used_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
},
'askbot.repute': {
'Meta': {'object_name': 'Repute', 'db_table': "u'repute'"},
'comment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'negative': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'positive': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Post']", 'null': 'True', 'blank': 'True'}),
'reputation': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'reputation_type': ('django.db.models.fields.SmallIntegerField', [], {}),
'reputed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
},
'askbot.tag': {
'Meta': {'ordering': "('-used_count', 'name')", 'object_name': 'Tag', 'db_table': "u'tag'"},
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['auth.User']"}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}),
'suggested_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'suggested_tags'", 'symmetrical': 'False', 'to': "orm['auth.User']"}),
'tag_wiki': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'described_tag'", 'unique': 'True', 'null': 'True', 'to': "orm['askbot.Post']"}),
'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
},
'askbot.thread': {
'Meta': {'object_name': 'Thread'},
'accepted_answer': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['askbot.Post']"}),
'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'answer_accepted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'answer_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'approved': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
'close_reason': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'closed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'closed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'favorited_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'unused_favorite_threads'", 'symmetrical': 'False', 'through': "orm['askbot.FavoriteQuestion']", 'to': "orm['auth.User']"}),
'favourite_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'followed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followed_threads'", 'symmetrical': 'False', 'to': "orm['auth.User']"}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'group_threads'", 'symmetrical': 'False', 'through': "orm['askbot.ThreadToGroup']", 'to': "orm['askbot.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'unused_last_active_in_threads'", 'to': "orm['auth.User']"}),
'points': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_column': "'score'"}),
'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),
'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'threads'", 'symmetrical': 'False', 'to': "orm['askbot.Tag']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
},
'askbot.threadtogroup': {
'Meta': {'unique_together': "(('thread', 'group'),)", 'object_name': 'ThreadToGroup', 'db_table': "'askbot_thread_groups'"},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'thread': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Thread']"}),
'visibility': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'})
},
'askbot.vote': {
'Meta': {'unique_together': "(('user', 'voted_post'),)", 'object_name': 'Vote', 'db_table': "u'vote'"},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['auth.User']"}),
'vote': ('django.db.models.fields.SmallIntegerField', [], {}),
'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'voted_post': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['askbot.Post']"})
},
'auth.authusergroups': {
'Meta': {'unique_together': "(('group', 'user'),)", 'object_name': 'AuthUserGroups', 'db_table': "'auth_user_groups'", 'managed': 'False'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
},
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}),
'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
'email_signature': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_fake': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}),
'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'show_marked_tags': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}),
'subscribed_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['askbot']
symmetrical = True
|
GeoODK/onadata
|
refs/heads/master
|
onadata/apps/main/tests/test_http_auth.py
|
13
|
from django.core.urlresolvers import reverse
from onadata.apps.main.tests.test_base import TestBase
from onadata.apps.main import views
class TestBasicHttpAuthentication(TestBase):
def setUp(self):
TestBase.setUp(self)
self._create_user_and_login(username='bob', password='bob')
self._publish_transportation_form()
self.api_url = reverse(views.api, kwargs={
'username': self.user.username,
'id_string': self.xform.id_string
})
self._logout()
def test_http_auth(self):
response = self.client.get(self.api_url)
self.assertEqual(response.status_code, 403)
# headers with invalid user/pass
response = self.client.get(self.api_url,
**self._set_auth_headers('x', 'y'))
self.assertEqual(response.status_code, 403)
# headers with valid user/pass
response = self.client.get(self.api_url,
**self._set_auth_headers('bob', 'bob'))
self.assertEqual(response.status_code, 200)
def test_http_auth_shared_data(self):
self.xform.shared_data = True
self.xform.save()
response = self.anon.get(self.api_url)
self.assertEqual(response.status_code, 200)
response = self.client.get(self.api_url)
self.assertEqual(response.status_code, 200)
|
caebr/webisoder
|
refs/heads/master
|
webisoder/resources.py
|
2
|
from pyramid.security import Allow, Authenticated
class Root(object):
__acl__ = [
(Allow, Authenticated, 'view'),
(Allow, 'Token', 'token')
]
def __init__(self, request):
pass
|
eightbitraptor/CompStats
|
refs/heads/master
|
thinkstats2.py
|
3
|
"""This file contains code for use with "Think Stats" and
"Think Bayes", both by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
"""This file contains class definitions for:
Hist: represents a histogram (map from values to integer frequencies).
Pmf: represents a probability mass function (map from values to probs).
_DictWrapper: private parent class for Hist and Pmf.
Cdf: represents a discrete cumulative distribution function
Pdf: represents a continuous probability density function
"""
import bisect
import copy
import logging
import math
import random
import re
from collections import Counter
from operator import itemgetter
import thinkplot
import numpy as np
import pandas
import scipy
from scipy import stats
from scipy import special
from scipy import ndimage
from io import open
ROOT2 = math.sqrt(2)
def RandomSeed(x):
"""Initialize the random and np.random generators.
x: int seed
"""
random.seed(x)
np.random.seed(x)
def Odds(p):
"""Computes odds for a given probability.
Example: p=0.75 means 75 for and 25 against, or 3:1 odds in favor.
Note: when p=1, the formula for odds divides by zero, which is
normally undefined. But I think it is reasonable to define Odds(1)
to be infinity, so that's what this function does.
p: float 0-1
Returns: float odds
"""
if p == 1:
return float('inf')
return p / (1 - p)
def Probability(o):
"""Computes the probability corresponding to given odds.
Example: o=2 means 2:1 odds in favor, or 2/3 probability
o: float odds, strictly positive
Returns: float probability
"""
return o / (o + 1)
def Probability2(yes, no):
"""Computes the probability corresponding to given odds.
Example: yes=2, no=1 means 2:1 odds in favor, or 2/3 probability.
yes, no: int or float odds in favor
"""
return yes / (yes + no)
class Interpolator(object):
"""Represents a mapping between sorted sequences; performs linear interp.
Attributes:
xs: sorted list
ys: sorted list
"""
def __init__(self, xs, ys):
self.xs = xs
self.ys = ys
def Lookup(self, x):
"""Looks up x and returns the corresponding value of y."""
return self._Bisect(x, self.xs, self.ys)
def Reverse(self, y):
"""Looks up y and returns the corresponding value of x."""
return self._Bisect(y, self.ys, self.xs)
def _Bisect(self, x, xs, ys):
"""Helper function."""
if x <= xs[0]:
return ys[0]
if x >= xs[-1]:
return ys[-1]
i = bisect.bisect(xs, x)
frac = 1.0 * (x - xs[i - 1]) / (xs[i] - xs[i - 1])
y = ys[i - 1] + frac * 1.0 * (ys[i] - ys[i - 1])
return y
class _DictWrapper(object):
"""An object that contains a dictionary."""
def __init__(self, obj=None, label=None):
"""Initializes the distribution.
obj: Hist, Pmf, Cdf, Pdf, dict, pandas Series, list of pairs
label: string label
"""
self.label = label if label is not None else '_nolegend_'
self.d = {}
# flag whether the distribution is under a log transform
self.log = False
if obj is None:
return
if isinstance(obj, (_DictWrapper, Cdf, Pdf)):
self.label = label if label is not None else obj.label
if isinstance(obj, dict):
self.d.update(obj.items())
elif isinstance(obj, (_DictWrapper, Cdf, Pdf)):
self.d.update(obj.Items())
elif isinstance(obj, pandas.Series):
self.d.update(obj.value_counts().iteritems())
else:
# finally, treat it like a list
self.d.update(Counter(obj))
if len(self) > 0 and isinstance(self, Pmf):
self.Normalize()
def __hash__(self):
return id(self)
def __str__(self):
cls = self.__class__.__name__
return '%s(%s)' % (cls, str(self.d))
__repr__ = __str__
def __eq__(self, other):
return self.d == other.d
def __len__(self):
return len(self.d)
def __iter__(self):
return iter(self.d)
def iterkeys(self):
"""Returns an iterator over keys."""
return iter(self.d)
def __contains__(self, value):
return value in self.d
def __getitem__(self, value):
return self.d.get(value, 0)
def __setitem__(self, value, prob):
self.d[value] = prob
def __delitem__(self, value):
del self.d[value]
def Copy(self, label=None):
"""Returns a copy.
Make a shallow copy of d. If you want a deep copy of d,
use copy.deepcopy on the whole object.
label: string label for the new Hist
returns: new _DictWrapper with the same type
"""
new = copy.copy(self)
new.d = copy.copy(self.d)
new.label = label if label is not None else self.label
return new
def Scale(self, factor):
"""Multiplies the values by a factor.
factor: what to multiply by
Returns: new object
"""
new = self.Copy()
new.d.clear()
for val, prob in self.Items():
new.Set(val * factor, prob)
return new
def Log(self, m=None):
"""Log transforms the probabilities.
Removes values with probability 0.
Normalizes so that the largest logprob is 0.
"""
if self.log:
raise ValueError("Pmf/Hist already under a log transform")
self.log = True
if m is None:
m = self.MaxLike()
for x, p in self.d.items():
if p:
self.Set(x, math.log(p / m))
else:
self.Remove(x)
def Exp(self, m=None):
"""Exponentiates the probabilities.
m: how much to shift the ps before exponentiating
If m is None, normalizes so that the largest prob is 1.
"""
if not self.log:
raise ValueError("Pmf/Hist not under a log transform")
self.log = False
if m is None:
m = self.MaxLike()
for x, p in self.d.items():
self.Set(x, math.exp(p - m))
def GetDict(self):
"""Gets the dictionary."""
return self.d
def SetDict(self, d):
"""Sets the dictionary."""
self.d = d
def Values(self):
"""Gets an unsorted sequence of values.
Note: one source of confusion is that the keys of this
dictionary are the values of the Hist/Pmf, and the
values of the dictionary are frequencies/probabilities.
"""
return self.d.keys()
def Items(self):
"""Gets an unsorted sequence of (value, freq/prob) pairs."""
return self.d.items()
def Render(self, **options):
"""Generates a sequence of points suitable for plotting.
Note: options are ignored
Returns:
tuple of (sorted value sequence, freq/prob sequence)
"""
if min(self.d.keys()) is np.nan:
logging.warning('Hist: contains NaN, may not render correctly.')
return zip(*sorted(self.Items()))
def MakeCdf(self, label=None):
"""Makes a Cdf."""
label = label if label is not None else self.label
return Cdf(self, label=label)
def Print(self):
"""Prints the values and freqs/probs in ascending order."""
for val, prob in sorted(self.d.items()):
print(val, prob)
def Set(self, x, y=0):
"""Sets the freq/prob associated with the value x.
Args:
x: number value
y: number freq or prob
"""
self.d[x] = y
def Incr(self, x, term=1):
"""Increments the freq/prob associated with the value x.
Args:
x: number value
term: how much to increment by
"""
self.d[x] = self.d.get(x, 0) + term
def Mult(self, x, factor):
"""Scales the freq/prob associated with the value x.
Args:
x: number value
factor: how much to multiply by
"""
self.d[x] = self.d.get(x, 0) * factor
def Remove(self, x):
"""Removes a value.
Throws an exception if the value is not there.
Args:
x: value to remove
"""
del self.d[x]
def Total(self):
"""Returns the total of the frequencies/probabilities in the map."""
total = sum(self.d.values())
return total
def MaxLike(self):
"""Returns the largest frequency/probability in the map."""
return max(self.d.values())
def Largest(self, n=10):
"""Returns the largest n values, with frequency/probability.
n: number of items to return
"""
return sorted(self.d.items(), reverse=True)[:n]
def Smallest(self, n=10):
"""Returns the smallest n values, with frequency/probability.
n: number of items to return
"""
return sorted(self.d.items(), reverse=False)[:n]
class Hist(_DictWrapper):
"""Represents a histogram, which is a map from values to frequencies.
Values can be any hashable type; frequencies are integer counters.
"""
def Freq(self, x):
"""Gets the frequency associated with the value x.
Args:
x: number value
Returns:
int frequency
"""
return self.d.get(x, 0)
def Freqs(self, xs):
"""Gets frequencies for a sequence of values."""
return [self.Freq(x) for x in xs]
def IsSubset(self, other):
"""Checks whether the values in this histogram are a subset of
the values in the given histogram."""
for val, freq in self.Items():
if freq > other.Freq(val):
return False
return True
def Subtract(self, other):
"""Subtracts the values in the given histogram from this histogram."""
for val, freq in other.Items():
self.Incr(val, -freq)
class Pmf(_DictWrapper):
"""Represents a probability mass function.
Values can be any hashable type; probabilities are floating-point.
Pmfs are not necessarily normalized.
"""
def Prob(self, x, default=0):
"""Gets the probability associated with the value x.
Args:
x: number value
default: value to return if the key is not there
Returns:
float probability
"""
return self.d.get(x, default)
def Probs(self, xs):
"""Gets probabilities for a sequence of values."""
return [self.Prob(x) for x in xs]
def Percentile(self, percentage):
"""Computes a percentile of a given Pmf.
Note: this is not super efficient. If you are planning
to compute more than a few percentiles, compute the Cdf.
percentage: float 0-100
returns: value from the Pmf
"""
p = percentage / 100.0
total = 0
for val, prob in sorted(self.Items()):
total += prob
if total >= p:
return val
def ProbGreater(self, x):
"""Probability that a sample from this Pmf exceeds x.
x: number
returns: float probability
"""
if isinstance(x, _DictWrapper):
return PmfProbGreater(self, x)
else:
t = [prob for (val, prob) in self.d.items() if val > x]
return sum(t)
def ProbLess(self, x):
"""Probability that a sample from this Pmf is less than x.
x: number
returns: float probability
"""
if isinstance(x, _DictWrapper):
return PmfProbLess(self, x)
else:
t = [prob for (val, prob) in self.d.items() if val < x]
return sum(t)
def __lt__(self, obj):
"""Less than.
obj: number or _DictWrapper
returns: float probability
"""
return self.ProbLess(obj)
def __gt__(self, obj):
"""Greater than.
obj: number or _DictWrapper
returns: float probability
"""
return self.ProbGreater(obj)
def __ge__(self, obj):
"""Greater than or equal.
obj: number or _DictWrapper
returns: float probability
"""
return 1 - (self < obj)
def __le__(self, obj):
"""Less than or equal.
obj: number or _DictWrapper
returns: float probability
"""
return 1 - (self > obj)
def Normalize(self, fraction=1.0):
"""Normalizes this PMF so the sum of all probs is fraction.
Args:
fraction: what the total should be after normalization
Returns: the total probability before normalizing
"""
if self.log:
raise ValueError("Normalize: Pmf is under a log transform")
total = self.Total()
if total == 0.0:
raise ValueError('Normalize: total probability is zero.')
#logging.warning('Normalize: total probability is zero.')
#return total
factor = fraction / total
for x in self.d:
self.d[x] *= factor
return total
def Random(self):
"""Chooses a random element from this PMF.
Note: this is not very efficient. If you plan to call
this more than a few times, consider converting to a CDF.
Returns:
float value from the Pmf
"""
target = random.random()
total = 0.0
for x, p in self.d.items():
total += p
if total >= target:
return x
# we shouldn't get here
raise ValueError('Random: Pmf might not be normalized.')
def Mean(self):
"""Computes the mean of a PMF.
Returns:
float mean
"""
mean = 0.0
for x, p in self.d.items():
mean += p * x
return mean
def Var(self, mu=None):
"""Computes the variance of a PMF.
mu: the point around which the variance is computed;
if omitted, computes the mean
returns: float variance
"""
if mu is None:
mu = self.Mean()
var = 0.0
for x, p in self.d.items():
var += p * (x - mu) ** 2
return var
def Std(self, mu=None):
"""Computes the standard deviation of a PMF.
mu: the point around which the variance is computed;
if omitted, computes the mean
returns: float standard deviation
"""
var = self.Var(mu)
return math.sqrt(var)
def MaximumLikelihood(self):
"""Returns the value with the highest probability.
Returns: float probability
"""
_, val = max((prob, val) for val, prob in self.Items())
return val
def CredibleInterval(self, percentage=90):
"""Computes the central credible interval.
If percentage=90, computes the 90% CI.
Args:
percentage: float between 0 and 100
Returns:
sequence of two floats, low and high
"""
cdf = self.MakeCdf()
return cdf.CredibleInterval(percentage)
def __add__(self, other):
"""Computes the Pmf of the sum of values drawn from self and other.
other: another Pmf or a scalar
returns: new Pmf
"""
try:
return self.AddPmf(other)
except AttributeError:
return self.AddConstant(other)
def AddPmf(self, other):
"""Computes the Pmf of the sum of values drawn from self and other.
other: another Pmf
returns: new Pmf
"""
pmf = Pmf()
for v1, p1 in self.Items():
for v2, p2 in other.Items():
pmf.Incr(v1 + v2, p1 * p2)
return pmf
def AddConstant(self, other):
"""Computes the Pmf of the sum a constant and values from self.
other: a number
returns: new Pmf
"""
pmf = Pmf()
for v1, p1 in self.Items():
pmf.Set(v1 + other, p1)
return pmf
def __sub__(self, other):
"""Computes the Pmf of the diff of values drawn from self and other.
other: another Pmf
returns: new Pmf
"""
try:
return self.SubPmf(other)
except AttributeError:
return self.AddConstant(-other)
def SubPmf(self, other):
"""Computes the Pmf of the diff of values drawn from self and other.
other: another Pmf
returns: new Pmf
"""
pmf = Pmf()
for v1, p1 in self.Items():
for v2, p2 in other.Items():
pmf.Incr(v1 - v2, p1 * p2)
return pmf
def __mul__(self, other):
"""Computes the Pmf of the product of values drawn from self and other.
other: another Pmf
returns: new Pmf
"""
try:
return self.MulPmf(other)
except AttributeError:
return self.MulConstant(other)
def MulPmf(self, other):
"""Computes the Pmf of the diff of values drawn from self and other.
other: another Pmf
returns: new Pmf
"""
pmf = Pmf()
for v1, p1 in self.Items():
for v2, p2 in other.Items():
pmf.Incr(v1 * v2, p1 * p2)
return pmf
def MulConstant(self, other):
"""Computes the Pmf of the product of a constant and values from self.
other: a number
returns: new Pmf
"""
pmf = Pmf()
for v1, p1 in self.Items():
pmf.Set(v1 * other, p1)
return pmf
def __div__(self, other):
"""Computes the Pmf of the ratio of values drawn from self and other.
other: another Pmf
returns: new Pmf
"""
try:
return self.DivPmf(other)
except AttributeError:
return self.MulConstant(1/other)
__truediv__ = __div__
def DivPmf(self, other):
"""Computes the Pmf of the ratio of values drawn from self and other.
other: another Pmf
returns: new Pmf
"""
pmf = Pmf()
for v1, p1 in self.Items():
for v2, p2 in other.Items():
pmf.Incr(v1 / v2, p1 * p2)
return pmf
def Max(self, k):
"""Computes the CDF of the maximum of k selections from this dist.
k: int
returns: new Cdf
"""
cdf = self.MakeCdf()
return cdf.Max(k)
class Joint(Pmf):
"""Represents a joint distribution.
The values are sequences (usually tuples)
"""
def Marginal(self, i, label=None):
"""Gets the marginal distribution of the indicated variable.
i: index of the variable we want
Returns: Pmf
"""
pmf = Pmf(label=label)
for vs, prob in self.Items():
pmf.Incr(vs[i], prob)
return pmf
def Conditional(self, i, j, val, label=None):
"""Gets the conditional distribution of the indicated variable.
Distribution of vs[i], conditioned on vs[j] = val.
i: index of the variable we want
j: which variable is conditioned on
val: the value the jth variable has to have
Returns: Pmf
"""
pmf = Pmf(label=label)
for vs, prob in self.Items():
if vs[j] != val:
continue
pmf.Incr(vs[i], prob)
pmf.Normalize()
return pmf
def MaxLikeInterval(self, percentage=90):
"""Returns the maximum-likelihood credible interval.
If percentage=90, computes a 90% CI containing the values
with the highest likelihoods.
percentage: float between 0 and 100
Returns: list of values from the suite
"""
interval = []
total = 0
t = [(prob, val) for val, prob in self.Items()]
t.sort(reverse=True)
for prob, val in t:
interval.append(val)
total += prob
if total >= percentage / 100.0:
break
return interval
def MakeJoint(pmf1, pmf2):
"""Joint distribution of values from pmf1 and pmf2.
Assumes that the PMFs represent independent random variables.
Args:
pmf1: Pmf object
pmf2: Pmf object
Returns:
Joint pmf of value pairs
"""
joint = Joint()
for v1, p1 in pmf1.Items():
for v2, p2 in pmf2.Items():
joint.Set((v1, v2), p1 * p2)
return joint
def MakeHistFromList(t, label=None):
"""Makes a histogram from an unsorted sequence of values.
Args:
t: sequence of numbers
label: string label for this histogram
Returns:
Hist object
"""
return Hist(t, label=label)
def MakeHistFromDict(d, label=None):
"""Makes a histogram from a map from values to frequencies.
Args:
d: dictionary that maps values to frequencies
label: string label for this histogram
Returns:
Hist object
"""
return Hist(d, label)
def MakePmfFromList(t, label=None):
"""Makes a PMF from an unsorted sequence of values.
Args:
t: sequence of numbers
label: string label for this PMF
Returns:
Pmf object
"""
return Pmf(t, label=label)
def MakePmfFromDict(d, label=None):
"""Makes a PMF from a map from values to probabilities.
Args:
d: dictionary that maps values to probabilities
label: string label for this PMF
Returns:
Pmf object
"""
return Pmf(d, label=label)
def MakePmfFromItems(t, label=None):
"""Makes a PMF from a sequence of value-probability pairs
Args:
t: sequence of value-probability pairs
label: string label for this PMF
Returns:
Pmf object
"""
return Pmf(dict(t), label=label)
def MakePmfFromHist(hist, label=None):
"""Makes a normalized PMF from a Hist object.
Args:
hist: Hist object
label: string label
Returns:
Pmf object
"""
if label is None:
label = hist.label
return Pmf(hist, label=label)
def MakeMixture(metapmf, label='mix'):
"""Make a mixture distribution.
Args:
metapmf: Pmf that maps from Pmfs to probs.
label: string label for the new Pmf.
Returns: Pmf object.
"""
mix = Pmf(label=label)
for pmf, p1 in metapmf.Items():
for x, p2 in pmf.Items():
mix.Incr(x, p1 * p2)
return mix
def MakeUniformPmf(low, high, n):
"""Make a uniform Pmf.
low: lowest value (inclusive)
high: highest value (inclusize)
n: number of values
"""
pmf = Pmf()
for x in np.linspace(low, high, n):
pmf.Set(x, 1)
pmf.Normalize()
return pmf
class Cdf(object):
"""Represents a cumulative distribution function.
Attributes:
xs: sequence of values
ps: sequence of probabilities
label: string used as a graph label.
"""
def __init__(self, obj=None, ps=None, label=None):
"""Initializes.
If ps is provided, obj must be the corresponding list of values.
obj: Hist, Pmf, Cdf, Pdf, dict, pandas Series, list of pairs
ps: list of cumulative probabilities
label: string label
"""
self.label = label if label is not None else '_nolegend_'
if isinstance(obj, (_DictWrapper, Cdf, Pdf)):
if not label:
self.label = label if label is not None else obj.label
if obj is None:
# caller does not provide obj, make an empty Cdf
self.xs = np.asarray([])
self.ps = np.asarray([])
if ps is not None:
logging.warning("Cdf: can't pass ps without also passing xs.")
return
else:
# if the caller provides xs and ps, just store them
if ps is not None:
if isinstance(ps, str):
logging.warning("Cdf: ps can't be a string")
self.xs = np.asarray(obj)
self.ps = np.asarray(ps)
return
# caller has provided just obj, not ps
if isinstance(obj, Cdf):
self.xs = copy.copy(obj.xs)
self.ps = copy.copy(obj.ps)
return
if isinstance(obj, _DictWrapper):
dw = obj
else:
dw = Hist(obj)
if len(dw) == 0:
self.xs = np.asarray([])
self.ps = np.asarray([])
return
xs, freqs = zip(*sorted(dw.Items()))
self.xs = np.asarray(xs)
self.ps = np.cumsum(freqs, dtype=np.float)
self.ps /= self.ps[-1]
def __str__(self):
return 'Cdf(%s, %s)' % (str(self.xs), str(self.ps))
__repr__ = __str__
def __len__(self):
return len(self.xs)
def __getitem__(self, x):
return self.Prob(x)
def __setitem__(self):
raise UnimplementedMethodException()
def __delitem__(self):
raise UnimplementedMethodException()
def __eq__(self, other):
return np.all(self.xs == other.xs) and np.all(self.ps == other.ps)
def Copy(self, label=None):
"""Returns a copy of this Cdf.
label: string label for the new Cdf
"""
if label is None:
label = self.label
return Cdf(list(self.xs), list(self.ps), label=label)
def MakePmf(self, label=None):
"""Makes a Pmf."""
if label is None:
label = self.label
return Pmf(self, label=label)
def Values(self):
"""Returns a sorted list of values.
"""
return self.xs
def Items(self):
"""Returns a sorted sequence of (value, probability) pairs.
Note: in Python3, returns an iterator.
"""
a = self.ps
b = np.roll(a, 1)
b[0] = 0
return zip(self.xs, a-b)
def Shift(self, term):
"""Adds a term to the xs.
term: how much to add
"""
new = self.Copy()
# don't use +=, or else an int array + float yields int array
new.xs = new.xs + term
return new
def Scale(self, factor):
"""Multiplies the xs by a factor.
factor: what to multiply by
"""
new = self.Copy()
# don't use *=, or else an int array * float yields int array
new.xs = new.xs * factor
return new
def Prob(self, x):
"""Returns CDF(x), the probability that corresponds to value x.
Args:
x: number
Returns:
float probability
"""
if x < self.xs[0]:
return 0.0
index = bisect.bisect(self.xs, x)
p = self.ps[index-1]
return p
def Probs(self, xs):
"""Gets probabilities for a sequence of values.
xs: any sequence that can be converted to NumPy array
returns: NumPy array of cumulative probabilities
"""
xs = np.asarray(xs)
index = np.searchsorted(self.xs, xs, side='right')
ps = self.ps[index-1]
ps[xs < self.xs[0]] = 0.0
return ps
ProbArray = Probs
def Value(self, p):
"""Returns InverseCDF(p), the value that corresponds to probability p.
Args:
p: number in the range [0, 1]
Returns:
number value
"""
if p < 0 or p > 1:
raise ValueError('Probability p must be in range [0, 1]')
index = bisect.bisect_left(self.ps, p)
return self.xs[index]
def ValueArray(self, ps):
"""Returns InverseCDF(p), the value that corresponds to probability p.
Args:
ps: NumPy array of numbers in the range [0, 1]
Returns:
NumPy array of values
"""
ps = np.asarray(ps)
if np.any(ps < 0) or np.any(ps > 1):
raise ValueError('Probability p must be in range [0, 1]')
index = np.searchsorted(self.ps, ps, side='left')
return self.xs[index]
def Percentile(self, p):
"""Returns the value that corresponds to percentile p.
Args:
p: number in the range [0, 100]
Returns:
number value
"""
return self.Value(p / 100.0)
def PercentileRank(self, x):
"""Returns the percentile rank of the value x.
x: potential value in the CDF
returns: percentile rank in the range 0 to 100
"""
return self.Prob(x) * 100.0
def Random(self):
"""Chooses a random value from this distribution."""
return self.Value(random.random())
def Sample(self, n):
"""Generates a random sample from this distribution.
n: int length of the sample
returns: NumPy array
"""
ps = np.random.random(n)
return self.ValueArray(ps)
def Mean(self):
"""Computes the mean of a CDF.
Returns:
float mean
"""
old_p = 0
total = 0.0
for x, new_p in zip(self.xs, self.ps):
p = new_p - old_p
total += p * x
old_p = new_p
return total
def CredibleInterval(self, percentage=90):
"""Computes the central credible interval.
If percentage=90, computes the 90% CI.
Args:
percentage: float between 0 and 100
Returns:
sequence of two floats, low and high
"""
prob = (1 - percentage / 100.0) / 2
interval = self.Value(prob), self.Value(1 - prob)
return interval
ConfidenceInterval = CredibleInterval
def _Round(self, multiplier=1000.0):
"""
An entry is added to the cdf only if the percentile differs
from the previous value in a significant digit, where the number
of significant digits is determined by multiplier. The
default is 1000, which keeps log10(1000) = 3 significant digits.
"""
# TODO(write this method)
raise UnimplementedMethodException()
def Render(self, **options):
"""Generates a sequence of points suitable for plotting.
An empirical CDF is a step function; linear interpolation
can be misleading.
Note: options are ignored
Returns:
tuple of (xs, ps)
"""
def interleave(a, b):
c = np.empty(a.shape[0] + b.shape[0])
c[::2] = a
c[1::2] = b
return c
a = np.array(self.xs)
xs = interleave(a, a)
shift_ps = np.roll(self.ps, 1)
shift_ps[0] = 0
ps = interleave(shift_ps, self.ps)
return xs, ps
def Max(self, k):
"""Computes the CDF of the maximum of k selections from this dist.
k: int
returns: new Cdf
"""
cdf = self.Copy()
cdf.ps **= k
return cdf
def MakeCdfFromItems(items, label=None):
"""Makes a cdf from an unsorted sequence of (value, frequency) pairs.
Args:
items: unsorted sequence of (value, frequency) pairs
label: string label for this CDF
Returns:
cdf: list of (value, fraction) pairs
"""
return Cdf(dict(items), label=label)
def MakeCdfFromDict(d, label=None):
"""Makes a CDF from a dictionary that maps values to frequencies.
Args:
d: dictionary that maps values to frequencies.
label: string label for the data.
Returns:
Cdf object
"""
return Cdf(d, label=label)
def MakeCdfFromList(seq, label=None):
"""Creates a CDF from an unsorted sequence.
Args:
seq: unsorted sequence of sortable values
label: string label for the cdf
Returns:
Cdf object
"""
return Cdf(seq, label=label)
def MakeCdfFromHist(hist, label=None):
"""Makes a CDF from a Hist object.
Args:
hist: Pmf.Hist object
label: string label for the data.
Returns:
Cdf object
"""
if label is None:
label = hist.label
return Cdf(hist, label=label)
def MakeCdfFromPmf(pmf, label=None):
"""Makes a CDF from a Pmf object.
Args:
pmf: Pmf.Pmf object
label: string label for the data.
Returns:
Cdf object
"""
if label is None:
label = pmf.label
return Cdf(pmf, label=label)
class UnimplementedMethodException(Exception):
"""Exception if someone calls a method that should be overridden."""
class Suite(Pmf):
"""Represents a suite of hypotheses and their probabilities."""
def Update(self, data):
"""Updates each hypothesis based on the data.
data: any representation of the data
returns: the normalizing constant
"""
for hypo in self.Values():
like = self.Likelihood(data, hypo)
self.Mult(hypo, like)
return self.Normalize()
def LogUpdate(self, data):
"""Updates a suite of hypotheses based on new data.
Modifies the suite directly; if you want to keep the original, make
a copy.
Note: unlike Update, LogUpdate does not normalize.
Args:
data: any representation of the data
"""
for hypo in self.Values():
like = self.LogLikelihood(data, hypo)
self.Incr(hypo, like)
def UpdateSet(self, dataset):
"""Updates each hypothesis based on the dataset.
This is more efficient than calling Update repeatedly because
it waits until the end to Normalize.
Modifies the suite directly; if you want to keep the original, make
a copy.
dataset: a sequence of data
returns: the normalizing constant
"""
for data in dataset:
for hypo in self.Values():
like = self.Likelihood(data, hypo)
self.Mult(hypo, like)
return self.Normalize()
def LogUpdateSet(self, dataset):
"""Updates each hypothesis based on the dataset.
Modifies the suite directly; if you want to keep the original, make
a copy.
dataset: a sequence of data
returns: None
"""
for data in dataset:
self.LogUpdate(data)
def Likelihood(self, data, hypo):
"""Computes the likelihood of the data under the hypothesis.
hypo: some representation of the hypothesis
data: some representation of the data
"""
raise UnimplementedMethodException()
def LogLikelihood(self, data, hypo):
"""Computes the log likelihood of the data under the hypothesis.
hypo: some representation of the hypothesis
data: some representation of the data
"""
raise UnimplementedMethodException()
def Print(self):
"""Prints the hypotheses and their probabilities."""
for hypo, prob in sorted(self.Items()):
print(hypo, prob)
def MakeOdds(self):
"""Transforms from probabilities to odds.
Values with prob=0 are removed.
"""
for hypo, prob in self.Items():
if prob:
self.Set(hypo, Odds(prob))
else:
self.Remove(hypo)
def MakeProbs(self):
"""Transforms from odds to probabilities."""
for hypo, odds in self.Items():
self.Set(hypo, Probability(odds))
def MakeSuiteFromList(t, label=None):
"""Makes a suite from an unsorted sequence of values.
Args:
t: sequence of numbers
label: string label for this suite
Returns:
Suite object
"""
hist = MakeHistFromList(t, label=label)
d = hist.GetDict()
return MakeSuiteFromDict(d)
def MakeSuiteFromHist(hist, label=None):
"""Makes a normalized suite from a Hist object.
Args:
hist: Hist object
label: string label
Returns:
Suite object
"""
if label is None:
label = hist.label
# make a copy of the dictionary
d = dict(hist.GetDict())
return MakeSuiteFromDict(d, label)
def MakeSuiteFromDict(d, label=None):
"""Makes a suite from a map from values to probabilities.
Args:
d: dictionary that maps values to probabilities
label: string label for this suite
Returns:
Suite object
"""
suite = Suite(label=label)
suite.SetDict(d)
suite.Normalize()
return suite
class Pdf(object):
"""Represents a probability density function (PDF)."""
def Density(self, x):
"""Evaluates this Pdf at x.
Returns: float or NumPy array of probability density
"""
raise UnimplementedMethodException()
def GetLinspace(self):
"""Get a linspace for plotting.
Not all subclasses of Pdf implement this.
Returns: numpy array
"""
raise UnimplementedMethodException()
def MakePmf(self, **options):
"""Makes a discrete version of this Pdf.
options can include
label: string
low: low end of range
high: high end of range
n: number of places to evaluate
Returns: new Pmf
"""
label = options.pop('label', '')
xs, ds = self.Render(**options)
return Pmf(dict(zip(xs, ds)), label=label)
def Render(self, **options):
"""Generates a sequence of points suitable for plotting.
If options includes low and high, it must also include n;
in that case the density is evaluated an n locations between
low and high, including both.
If options includes xs, the density is evaluate at those location.
Otherwise, self.GetLinspace is invoked to provide the locations.
Returns:
tuple of (xs, densities)
"""
low, high = options.pop('low', None), options.pop('high', None)
if low is not None and high is not None:
n = options.pop('n', 101)
xs = np.linspace(low, high, n)
else:
xs = options.pop('xs', None)
if xs is None:
xs = self.GetLinspace()
ds = self.Density(xs)
return xs, ds
def Items(self):
"""Generates a sequence of (value, probability) pairs.
"""
return zip(*self.Render())
class NormalPdf(Pdf):
"""Represents the PDF of a Normal distribution."""
def __init__(self, mu=0, sigma=1, label=None):
"""Constructs a Normal Pdf with given mu and sigma.
mu: mean
sigma: standard deviation
label: string
"""
self.mu = mu
self.sigma = sigma
self.label = label if label is not None else '_nolegend_'
def __str__(self):
return 'NormalPdf(%f, %f)' % (self.mu, self.sigma)
def GetLinspace(self):
"""Get a linspace for plotting.
Returns: numpy array
"""
low, high = self.mu-3*self.sigma, self.mu+3*self.sigma
return np.linspace(low, high, 101)
def Density(self, xs):
"""Evaluates this Pdf at xs.
xs: scalar or sequence of floats
returns: float or NumPy array of probability density
"""
return stats.norm.pdf(xs, self.mu, self.sigma)
class ExponentialPdf(Pdf):
"""Represents the PDF of an exponential distribution."""
def __init__(self, lam=1, label=None):
"""Constructs an exponential Pdf with given parameter.
lam: rate parameter
label: string
"""
self.lam = lam
self.label = label if label is not None else '_nolegend_'
def __str__(self):
return 'ExponentialPdf(%f)' % (self.lam)
def GetLinspace(self):
"""Get a linspace for plotting.
Returns: numpy array
"""
low, high = 0, 5.0/self.lam
return np.linspace(low, high, 101)
def Density(self, xs):
"""Evaluates this Pdf at xs.
xs: scalar or sequence of floats
returns: float or NumPy array of probability density
"""
return stats.expon.pdf(xs, scale=1.0/self.lam)
class EstimatedPdf(Pdf):
"""Represents a PDF estimated by KDE."""
def __init__(self, sample, label=None):
"""Estimates the density function based on a sample.
sample: sequence of data
label: string
"""
self.label = label if label is not None else '_nolegend_'
self.kde = stats.gaussian_kde(sample)
low = min(sample)
high = max(sample)
self.linspace = np.linspace(low, high, 101)
def __str__(self):
return 'EstimatedPdf(label=%s)' % str(self.label)
def GetLinspace(self):
"""Get a linspace for plotting.
Returns: numpy array
"""
return self.linspace
def Density(self, xs):
"""Evaluates this Pdf at xs.
returns: float or NumPy array of probability density
"""
return self.kde.evaluate(xs)
def Sample(self, n):
"""Generates a random sample from the estimated Pdf.
n: size of sample
"""
return self.kde.resample(n)
def CredibleInterval(pmf, percentage=90):
"""Computes a credible interval for a given distribution.
If percentage=90, computes the 90% CI.
Args:
pmf: Pmf object representing a posterior distribution
percentage: float between 0 and 100
Returns:
sequence of two floats, low and high
"""
cdf = pmf.MakeCdf()
prob = (1 - percentage / 100.0) / 2
interval = cdf.Value(prob), cdf.Value(1 - prob)
return interval
def PmfProbLess(pmf1, pmf2):
"""Probability that a value from pmf1 is less than a value from pmf2.
Args:
pmf1: Pmf object
pmf2: Pmf object
Returns:
float probability
"""
total = 0.0
for v1, p1 in pmf1.Items():
for v2, p2 in pmf2.Items():
if v1 < v2:
total += p1 * p2
return total
def PmfProbGreater(pmf1, pmf2):
"""Probability that a value from pmf1 is less than a value from pmf2.
Args:
pmf1: Pmf object
pmf2: Pmf object
Returns:
float probability
"""
total = 0.0
for v1, p1 in pmf1.Items():
for v2, p2 in pmf2.Items():
if v1 > v2:
total += p1 * p2
return total
def PmfProbEqual(pmf1, pmf2):
"""Probability that a value from pmf1 equals a value from pmf2.
Args:
pmf1: Pmf object
pmf2: Pmf object
Returns:
float probability
"""
total = 0.0
for v1, p1 in pmf1.Items():
for v2, p2 in pmf2.Items():
if v1 == v2:
total += p1 * p2
return total
def RandomSum(dists):
"""Chooses a random value from each dist and returns the sum.
dists: sequence of Pmf or Cdf objects
returns: numerical sum
"""
total = sum(dist.Random() for dist in dists)
return total
def SampleSum(dists, n):
"""Draws a sample of sums from a list of distributions.
dists: sequence of Pmf or Cdf objects
n: sample size
returns: new Pmf of sums
"""
pmf = Pmf(RandomSum(dists) for i in range(n))
return pmf
def EvalNormalPdf(x, mu, sigma):
"""Computes the unnormalized PDF of the normal distribution.
x: value
mu: mean
sigma: standard deviation
returns: float probability density
"""
return stats.norm.pdf(x, mu, sigma)
def MakeNormalPmf(mu, sigma, num_sigmas, n=201):
"""Makes a PMF discrete approx to a Normal distribution.
mu: float mean
sigma: float standard deviation
num_sigmas: how many sigmas to extend in each direction
n: number of values in the Pmf
returns: normalized Pmf
"""
pmf = Pmf()
low = mu - num_sigmas * sigma
high = mu + num_sigmas * sigma
for x in np.linspace(low, high, n):
p = EvalNormalPdf(x, mu, sigma)
pmf.Set(x, p)
pmf.Normalize()
return pmf
def EvalBinomialPmf(k, n, p):
"""Evaluates the binomial PMF.
Returns the probabily of k successes in n trials with probability p.
"""
return stats.binom.pmf(k, n, p)
def EvalHypergeomPmf(k, N, K, n):
"""Evaluates the hypergeometric PMF.
Returns the probabily of k successes in n trials from a population
N with K successes in it.
"""
return stats.hypergeom.pmf(k, N, K, n)
def EvalPoissonPmf(k, lam):
"""Computes the Poisson PMF.
k: number of events
lam: parameter lambda in events per unit time
returns: float probability
"""
# don't use the scipy function (yet). for lam=0 it returns NaN;
# should be 0.0
# return stats.poisson.pmf(k, lam)
return lam ** k * math.exp(-lam) / special.gamma(k+1)
def MakePoissonPmf(lam, high, step=1):
"""Makes a PMF discrete approx to a Poisson distribution.
lam: parameter lambda in events per unit time
high: upper bound of the Pmf
returns: normalized Pmf
"""
pmf = Pmf()
for k in range(0, high + 1, step):
p = EvalPoissonPmf(k, lam)
pmf.Set(k, p)
pmf.Normalize()
return pmf
def EvalExponentialPdf(x, lam):
"""Computes the exponential PDF.
x: value
lam: parameter lambda in events per unit time
returns: float probability density
"""
return lam * math.exp(-lam * x)
def EvalExponentialCdf(x, lam):
"""Evaluates CDF of the exponential distribution with parameter lam."""
return 1 - math.exp(-lam * x)
def MakeExponentialPmf(lam, high, n=200):
"""Makes a PMF discrete approx to an exponential distribution.
lam: parameter lambda in events per unit time
high: upper bound
n: number of values in the Pmf
returns: normalized Pmf
"""
pmf = Pmf()
for x in np.linspace(0, high, n):
p = EvalExponentialPdf(x, lam)
pmf.Set(x, p)
pmf.Normalize()
return pmf
def StandardNormalCdf(x):
"""Evaluates the CDF of the standard Normal distribution.
See http://en.wikipedia.org/wiki/Normal_distribution
#Cumulative_distribution_function
Args:
x: float
Returns:
float
"""
return (math.erf(x / ROOT2) + 1) / 2
def EvalNormalCdf(x, mu=0, sigma=1):
"""Evaluates the CDF of the normal distribution.
Args:
x: float
mu: mean parameter
sigma: standard deviation parameter
Returns:
float
"""
return stats.norm.cdf(x, loc=mu, scale=sigma)
def EvalNormalCdfInverse(p, mu=0, sigma=1):
"""Evaluates the inverse CDF of the normal distribution.
See http://en.wikipedia.org/wiki/Normal_distribution#Quantile_function
Args:
p: float
mu: mean parameter
sigma: standard deviation parameter
Returns:
float
"""
return stats.norm.ppf(p, loc=mu, scale=sigma)
def EvalLognormalCdf(x, mu=0, sigma=1):
"""Evaluates the CDF of the lognormal distribution.
x: float or sequence
mu: mean parameter
sigma: standard deviation parameter
Returns: float or sequence
"""
return stats.lognorm.cdf(x, loc=mu, scale=sigma)
def RenderExpoCdf(lam, low, high, n=101):
"""Generates sequences of xs and ps for an exponential CDF.
lam: parameter
low: float
high: float
n: number of points to render
returns: numpy arrays (xs, ps)
"""
xs = np.linspace(low, high, n)
ps = 1 - np.exp(-lam * xs)
#ps = stats.expon.cdf(xs, scale=1.0/lam)
return xs, ps
def RenderNormalCdf(mu, sigma, low, high, n=101):
"""Generates sequences of xs and ps for a Normal CDF.
mu: parameter
sigma: parameter
low: float
high: float
n: number of points to render
returns: numpy arrays (xs, ps)
"""
xs = np.linspace(low, high, n)
ps = stats.norm.cdf(xs, mu, sigma)
return xs, ps
def RenderParetoCdf(xmin, alpha, low, high, n=50):
"""Generates sequences of xs and ps for a Pareto CDF.
xmin: parameter
alpha: parameter
low: float
high: float
n: number of points to render
returns: numpy arrays (xs, ps)
"""
if low < xmin:
low = xmin
xs = np.linspace(low, high, n)
ps = 1 - (xs / xmin) ** -alpha
#ps = stats.pareto.cdf(xs, scale=xmin, b=alpha)
return xs, ps
class Beta(object):
"""Represents a Beta distribution.
See http://en.wikipedia.org/wiki/Beta_distribution
"""
def __init__(self, alpha=1, beta=1, label=None):
"""Initializes a Beta distribution."""
self.alpha = alpha
self.beta = beta
self.label = label if label is not None else '_nolegend_'
def Update(self, data):
"""Updates a Beta distribution.
data: pair of int (heads, tails)
"""
heads, tails = data
self.alpha += heads
self.beta += tails
def Mean(self):
"""Computes the mean of this distribution."""
return self.alpha / (self.alpha + self.beta)
def Random(self):
"""Generates a random variate from this distribution."""
return random.betavariate(self.alpha, self.beta)
def Sample(self, n):
"""Generates a random sample from this distribution.
n: int sample size
"""
size = n,
return np.random.beta(self.alpha, self.beta, size)
def EvalPdf(self, x):
"""Evaluates the PDF at x."""
return x ** (self.alpha - 1) * (1 - x) ** (self.beta - 1)
def MakePmf(self, steps=101, label=None):
"""Returns a Pmf of this distribution.
Note: Normally, we just evaluate the PDF at a sequence
of points and treat the probability density as a probability
mass.
But if alpha or beta is less than one, we have to be
more careful because the PDF goes to infinity at x=0
and x=1. In that case we evaluate the CDF and compute
differences.
"""
if self.alpha < 1 or self.beta < 1:
cdf = self.MakeCdf()
pmf = cdf.MakePmf()
return pmf
xs = [i / (steps - 1.0) for i in range(steps)]
probs = [self.EvalPdf(x) for x in xs]
pmf = Pmf(dict(zip(xs, probs)), label=label)
return pmf
def MakeCdf(self, steps=101):
"""Returns the CDF of this distribution."""
xs = [i / (steps - 1.0) for i in range(steps)]
ps = [special.betainc(self.alpha, self.beta, x) for x in xs]
cdf = Cdf(xs, ps)
return cdf
class Dirichlet(object):
"""Represents a Dirichlet distribution.
See http://en.wikipedia.org/wiki/Dirichlet_distribution
"""
def __init__(self, n, conc=1, label=None):
"""Initializes a Dirichlet distribution.
n: number of dimensions
conc: concentration parameter (smaller yields more concentration)
label: string label
"""
if n < 2:
raise ValueError('A Dirichlet distribution with '
'n<2 makes no sense')
self.n = n
self.params = np.ones(n, dtype=np.float) * conc
self.label = label if label is not None else '_nolegend_'
def Update(self, data):
"""Updates a Dirichlet distribution.
data: sequence of observations, in order corresponding to params
"""
m = len(data)
self.params[:m] += data
def Random(self):
"""Generates a random variate from this distribution.
Returns: normalized vector of fractions
"""
p = np.random.gamma(self.params)
return p / p.sum()
def Likelihood(self, data):
"""Computes the likelihood of the data.
Selects a random vector of probabilities from this distribution.
Returns: float probability
"""
m = len(data)
if self.n < m:
return 0
x = data
p = self.Random()
q = p[:m] ** x
return q.prod()
def LogLikelihood(self, data):
"""Computes the log likelihood of the data.
Selects a random vector of probabilities from this distribution.
Returns: float log probability
"""
m = len(data)
if self.n < m:
return float('-inf')
x = self.Random()
y = np.log(x[:m]) * data
return y.sum()
def MarginalBeta(self, i):
"""Computes the marginal distribution of the ith element.
See http://en.wikipedia.org/wiki/Dirichlet_distribution
#Marginal_distributions
i: int
Returns: Beta object
"""
alpha0 = self.params.sum()
alpha = self.params[i]
return Beta(alpha, alpha0 - alpha)
def PredictivePmf(self, xs, label=None):
"""Makes a predictive distribution.
xs: values to go into the Pmf
Returns: Pmf that maps from x to the mean prevalence of x
"""
alpha0 = self.params.sum()
ps = self.params / alpha0
return Pmf(zip(xs, ps), label=label)
def BinomialCoef(n, k):
"""Compute the binomial coefficient "n choose k".
n: number of trials
k: number of successes
Returns: float
"""
return scipy.misc.comb(n, k)
def LogBinomialCoef(n, k):
"""Computes the log of the binomial coefficient.
http://math.stackexchange.com/questions/64716/
approximating-the-logarithm-of-the-binomial-coefficient
n: number of trials
k: number of successes
Returns: float
"""
return n * math.log(n) - k * math.log(k) - (n - k) * math.log(n - k)
def NormalProbability(ys, jitter=0.0):
"""Generates data for a normal probability plot.
ys: sequence of values
jitter: float magnitude of jitter added to the ys
returns: numpy arrays xs, ys
"""
n = len(ys)
xs = np.random.normal(0, 1, n)
xs.sort()
if jitter:
ys = Jitter(ys, jitter)
else:
ys = np.array(ys)
ys.sort()
return xs, ys
def Jitter(values, jitter=0.5):
"""Jitters the values by adding a uniform variate in (-jitter, jitter).
values: sequence
jitter: scalar magnitude of jitter
returns: new numpy array
"""
n = len(values)
return np.random.uniform(-jitter, +jitter, n) + values
def NormalProbabilityPlot(sample, fit_color='0.8', **options):
"""Makes a normal probability plot with a fitted line.
sample: sequence of numbers
fit_color: color string for the fitted line
options: passed along to Plot
"""
xs, ys = NormalProbability(sample)
mean, var = MeanVar(sample)
std = math.sqrt(var)
fit = FitLine(xs, mean, std)
thinkplot.Plot(*fit, color=fit_color, label='model')
xs, ys = NormalProbability(sample)
thinkplot.Plot(xs, ys, **options)
def Mean(xs):
"""Computes mean.
xs: sequence of values
returns: float mean
"""
return np.mean(xs)
def Var(xs, mu=None, ddof=0):
"""Computes variance.
xs: sequence of values
mu: option known mean
ddof: delta degrees of freedom
returns: float
"""
xs = np.asarray(xs)
if mu is None:
mu = xs.mean()
ds = xs - mu
return np.dot(ds, ds) / (len(xs) - ddof)
def Std(xs, mu=None, ddof=0):
"""Computes standard deviation.
xs: sequence of values
mu: option known mean
ddof: delta degrees of freedom
returns: float
"""
var = Var(xs, mu, ddof)
return math.sqrt(var)
def MeanVar(xs, ddof=0):
"""Computes mean and variance.
Based on http://stackoverflow.com/questions/19391149/
numpy-mean-and-variance-from-single-function
xs: sequence of values
ddof: delta degrees of freedom
returns: pair of float, mean and var
"""
xs = np.asarray(xs)
mean = xs.mean()
s2 = Var(xs, mean, ddof)
return mean, s2
def Trim(t, p=0.01):
"""Trims the largest and smallest elements of t.
Args:
t: sequence of numbers
p: fraction of values to trim off each end
Returns:
sequence of values
"""
n = int(p * len(t))
t = sorted(t)[n:-n]
return t
def TrimmedMean(t, p=0.01):
"""Computes the trimmed mean of a sequence of numbers.
Args:
t: sequence of numbers
p: fraction of values to trim off each end
Returns:
float
"""
t = Trim(t, p)
return Mean(t)
def TrimmedMeanVar(t, p=0.01):
"""Computes the trimmed mean and variance of a sequence of numbers.
Side effect: sorts the list.
Args:
t: sequence of numbers
p: fraction of values to trim off each end
Returns:
float
"""
t = Trim(t, p)
mu, var = MeanVar(t)
return mu, var
def CohenEffectSize(group1, group2):
"""Compute Cohen's d.
group1: Series or NumPy array
group2: Series or NumPy array
returns: float
"""
diff = group1.mean() - group2.mean()
n1, n2 = len(group1), len(group2)
var1 = group1.var()
var2 = group2.var()
pooled_var = (n1 * var1 + n2 * var2) / (n1 + n2)
d = diff / math.sqrt(pooled_var)
return d
def Cov(xs, ys, meanx=None, meany=None):
"""Computes Cov(X, Y).
Args:
xs: sequence of values
ys: sequence of values
meanx: optional float mean of xs
meany: optional float mean of ys
Returns:
Cov(X, Y)
"""
xs = np.asarray(xs)
ys = np.asarray(ys)
if meanx is None:
meanx = np.mean(xs)
if meany is None:
meany = np.mean(ys)
cov = np.dot(xs-meanx, ys-meany) / len(xs)
return cov
def Corr(xs, ys):
"""Computes Corr(X, Y).
Args:
xs: sequence of values
ys: sequence of values
Returns:
Corr(X, Y)
"""
xs = np.asarray(xs)
ys = np.asarray(ys)
meanx, varx = MeanVar(xs)
meany, vary = MeanVar(ys)
corr = Cov(xs, ys, meanx, meany) / math.sqrt(varx * vary)
return corr
def SerialCorr(series, lag=1):
"""Computes the serial correlation of a series.
series: Series
lag: integer number of intervals to shift
returns: float correlation
"""
xs = series[lag:]
ys = series.shift(lag)[lag:]
corr = Corr(xs, ys)
return corr
def SpearmanCorr(xs, ys):
"""Computes Spearman's rank correlation.
Args:
xs: sequence of values
ys: sequence of values
Returns:
float Spearman's correlation
"""
xranks = pandas.Series(xs).rank()
yranks = pandas.Series(ys).rank()
return Corr(xranks, yranks)
def MapToRanks(t):
"""Returns a list of ranks corresponding to the elements in t.
Args:
t: sequence of numbers
Returns:
list of integer ranks, starting at 1
"""
# pair up each value with its index
pairs = enumerate(t)
# sort by value
sorted_pairs = sorted(pairs, key=itemgetter(1))
# pair up each pair with its rank
ranked = enumerate(sorted_pairs)
# sort by index
resorted = sorted(ranked, key=lambda trip: trip[1][0])
# extract the ranks
ranks = [trip[0]+1 for trip in resorted]
return ranks
def LeastSquares(xs, ys):
"""Computes a linear least squares fit for ys as a function of xs.
Args:
xs: sequence of values
ys: sequence of values
Returns:
tuple of (intercept, slope)
"""
meanx, varx = MeanVar(xs)
meany = Mean(ys)
slope = Cov(xs, ys, meanx, meany) / varx
inter = meany - slope * meanx
return inter, slope
def FitLine(xs, inter, slope):
"""Fits a line to the given data.
xs: sequence of x
returns: tuple of numpy arrays (sorted xs, fit ys)
"""
fit_xs = np.sort(xs)
fit_ys = inter + slope * fit_xs
return fit_xs, fit_ys
def Residuals(xs, ys, inter, slope):
"""Computes residuals for a linear fit with parameters inter and slope.
Args:
xs: independent variable
ys: dependent variable
inter: float intercept
slope: float slope
Returns:
list of residuals
"""
xs = np.asarray(xs)
ys = np.asarray(ys)
res = ys - (inter + slope * xs)
return res
def CoefDetermination(ys, res):
"""Computes the coefficient of determination (R^2) for given residuals.
Args:
ys: dependent variable
res: residuals
Returns:
float coefficient of determination
"""
return 1 - Var(res) / Var(ys)
def CorrelatedGenerator(rho):
"""Generates standard normal variates with serial correlation.
rho: target coefficient of correlation
Returns: iterable
"""
x = random.gauss(0, 1)
yield x
sigma = math.sqrt(1 - rho**2)
while True:
x = random.gauss(x * rho, sigma)
yield x
def CorrelatedNormalGenerator(mu, sigma, rho):
"""Generates normal variates with serial correlation.
mu: mean of variate
sigma: standard deviation of variate
rho: target coefficient of correlation
Returns: iterable
"""
for x in CorrelatedGenerator(rho):
yield x * sigma + mu
def RawMoment(xs, k):
"""Computes the kth raw moment of xs.
"""
return sum(x**k for x in xs) / len(xs)
def CentralMoment(xs, k):
"""Computes the kth central moment of xs.
"""
mean = RawMoment(xs, 1)
return sum((x - mean)**k for x in xs) / len(xs)
def StandardizedMoment(xs, k):
"""Computes the kth standardized moment of xs.
"""
var = CentralMoment(xs, 2)
std = math.sqrt(var)
return CentralMoment(xs, k) / std**k
def Skewness(xs):
"""Computes skewness.
"""
return StandardizedMoment(xs, 3)
def Median(xs):
"""Computes the median (50th percentile) of a sequence.
xs: sequence or anything else that can initialize a Cdf
returns: float
"""
cdf = Cdf(xs)
return cdf.Value(0.5)
def IQR(xs):
"""Computes the interquartile of a sequence.
xs: sequence or anything else that can initialize a Cdf
returns: pair of floats
"""
cdf = Cdf(xs)
return cdf.Value(0.25), cdf.Value(0.75)
def PearsonMedianSkewness(xs):
"""Computes the Pearson median skewness.
"""
median = Median(xs)
mean = RawMoment(xs, 1)
var = CentralMoment(xs, 2)
std = math.sqrt(var)
gp = 3 * (mean - median) / std
return gp
class FixedWidthVariables(object):
"""Represents a set of variables in a fixed width file."""
def __init__(self, variables, index_base=0):
"""Initializes.
variables: DataFrame
index_base: are the indices 0 or 1 based?
Attributes:
colspecs: list of (start, end) index tuples
names: list of string variable names
"""
self.variables = variables
# note: by default, subtract 1 from colspecs
self.colspecs = variables[['start', 'end']] - index_base
# convert colspecs to a list of pair of int
self.colspecs = self.colspecs.astype(np.int).values.tolist()
self.names = variables['name']
def ReadFixedWidth(self, filename, **options):
"""Reads a fixed width ASCII file.
filename: string filename
returns: DataFrame
"""
df = pandas.read_fwf(filename,
colspecs=self.colspecs,
names=self.names,
**options)
return df
def ReadStataDct(dct_file, **options):
"""Reads a Stata dictionary file.
dct_file: string filename
options: dict of options passed to open()
returns: FixedWidthVariables object
"""
type_map = dict(byte=int, int=int, long=int, float=float, double=float)
var_info = []
for line in open(dct_file, **options):
match = re.search( r'_column\(([^)]*)\)', line)
if match:
start = int(match.group(1))
t = line.split()
vtype, name, fstring = t[1:4]
name = name.lower()
if vtype.startswith('str'):
vtype = str
else:
vtype = type_map[vtype]
long_desc = ' '.join(t[4:]).strip('"')
var_info.append((start, vtype, name, fstring, long_desc))
columns = ['start', 'type', 'name', 'fstring', 'desc']
variables = pandas.DataFrame(var_info, columns=columns)
# fill in the end column by shifting the start column
variables['end'] = variables.start.shift(-1)
variables.loc[len(variables)-1, 'end'] = 0
dct = FixedWidthVariables(variables, index_base=1)
return dct
def Resample(xs, n=None):
"""Draw a sample from xs with the same length as xs.
xs: sequence
n: sample size (default: len(xs))
returns: NumPy array
"""
if n is None:
n = len(xs)
return np.random.choice(xs, n, replace=True)
def SampleRows(df, nrows, replace=False):
"""Choose a sample of rows from a DataFrame.
df: DataFrame
nrows: number of rows
replace: whether to sample with replacement
returns: DataDf
"""
indices = np.random.choice(df.index, nrows, replace=replace)
sample = df.loc[indices]
return sample
def ResampleRows(df):
"""Resamples rows from a DataFrame.
df: DataFrame
returns: DataFrame
"""
return SampleRows(df, len(df), replace=True)
def ResampleRowsWeighted(df, column='finalwgt'):
"""Resamples a DataFrame using probabilities proportional to given column.
df: DataFrame
column: string column name to use as weights
returns: DataFrame
"""
weights = df[column]
cdf = Cdf(dict(weights))
indices = cdf.Sample(len(weights))
sample = df.loc[indices]
return sample
def PercentileRow(array, p):
"""Selects the row from a sorted array that maps to percentile p.
p: float 0--100
returns: NumPy array (one row)
"""
rows, cols = array.shape
index = int(rows * p / 100)
return array[index,]
def PercentileRows(ys_seq, percents):
"""Given a collection of lines, selects percentiles along vertical axis.
For example, if ys_seq contains simulation results like ys as a
function of time, and percents contains (5, 95), the result would
be a 90% CI for each vertical slice of the simulation results.
ys_seq: sequence of lines (y values)
percents: list of percentiles (0-100) to select
returns: list of NumPy arrays, one for each percentile
"""
nrows = len(ys_seq)
ncols = len(ys_seq[0])
array = np.zeros((nrows, ncols))
for i, ys in enumerate(ys_seq):
array[i,] = ys
array = np.sort(array, axis=0)
rows = [PercentileRow(array, p) for p in percents]
return rows
def Smooth(xs, sigma=2, **options):
"""Smooths a NumPy array with a Gaussian filter.
xs: sequence
sigma: standard deviation of the filter
"""
return ndimage.filters.gaussian_filter1d(xs, sigma, **options)
class HypothesisTest(object):
"""Represents a hypothesis test."""
def __init__(self, data):
"""Initializes.
data: data in whatever form is relevant
"""
self.data = data
self.MakeModel()
self.actual = self.TestStatistic(data)
self.test_stats = None
self.test_cdf = None
def PValue(self, iters=1000):
"""Computes the distribution of the test statistic and p-value.
iters: number of iterations
returns: float p-value
"""
self.test_stats = [self.TestStatistic(self.RunModel())
for _ in range(iters)]
self.test_cdf = Cdf(self.test_stats)
count = sum(1 for x in self.test_stats if x >= self.actual)
return count / iters
def MaxTestStat(self):
"""Returns the largest test statistic seen during simulations.
"""
return max(self.test_stats)
def PlotCdf(self, label=None):
"""Draws a Cdf with vertical lines at the observed test stat.
"""
def VertLine(x):
"""Draws a vertical line at x."""
thinkplot.Plot([x, x], [0, 1], color='0.8')
VertLine(self.actual)
thinkplot.Cdf(self.test_cdf, label=label)
def TestStatistic(self, data):
"""Computes the test statistic.
data: data in whatever form is relevant
"""
raise UnimplementedMethodException()
def MakeModel(self):
"""Build a model of the null hypothesis.
"""
pass
def RunModel(self):
"""Run the model of the null hypothesis.
returns: simulated data
"""
raise UnimplementedMethodException()
def main():
pass
if __name__ == '__main__':
main()
|
abreen/socrates.py
|
refs/heads/master
|
yaml/serializer.py
|
293
|
__all__ = ['Serializer', 'SerializerError']
from .error import YAMLError
from .events import *
from .nodes import *
class SerializerError(YAMLError):
pass
class Serializer:
ANCHOR_TEMPLATE = 'id%03d'
def __init__(self, encoding=None,
explicit_start=None, explicit_end=None, version=None, tags=None):
self.use_encoding = encoding
self.use_explicit_start = explicit_start
self.use_explicit_end = explicit_end
self.use_version = version
self.use_tags = tags
self.serialized_nodes = {}
self.anchors = {}
self.last_anchor_id = 0
self.closed = None
def open(self):
if self.closed is None:
self.emit(StreamStartEvent(encoding=self.use_encoding))
self.closed = False
elif self.closed:
raise SerializerError("serializer is closed")
else:
raise SerializerError("serializer is already opened")
def close(self):
if self.closed is None:
raise SerializerError("serializer is not opened")
elif not self.closed:
self.emit(StreamEndEvent())
self.closed = True
#def __del__(self):
# self.close()
def serialize(self, node):
if self.closed is None:
raise SerializerError("serializer is not opened")
elif self.closed:
raise SerializerError("serializer is closed")
self.emit(DocumentStartEvent(explicit=self.use_explicit_start,
version=self.use_version, tags=self.use_tags))
self.anchor_node(node)
self.serialize_node(node, None, None)
self.emit(DocumentEndEvent(explicit=self.use_explicit_end))
self.serialized_nodes = {}
self.anchors = {}
self.last_anchor_id = 0
def anchor_node(self, node):
if node in self.anchors:
if self.anchors[node] is None:
self.anchors[node] = self.generate_anchor(node)
else:
self.anchors[node] = None
if isinstance(node, SequenceNode):
for item in node.value:
self.anchor_node(item)
elif isinstance(node, MappingNode):
for key, value in node.value:
self.anchor_node(key)
self.anchor_node(value)
def generate_anchor(self, node):
self.last_anchor_id += 1
return self.ANCHOR_TEMPLATE % self.last_anchor_id
def serialize_node(self, node, parent, index):
alias = self.anchors[node]
if node in self.serialized_nodes:
self.emit(AliasEvent(alias))
else:
self.serialized_nodes[node] = True
self.descend_resolver(parent, index)
if isinstance(node, ScalarNode):
detected_tag = self.resolve(ScalarNode, node.value, (True, False))
default_tag = self.resolve(ScalarNode, node.value, (False, True))
implicit = (node.tag == detected_tag), (node.tag == default_tag)
self.emit(ScalarEvent(alias, node.tag, implicit, node.value,
style=node.style))
elif isinstance(node, SequenceNode):
implicit = (node.tag
== self.resolve(SequenceNode, node.value, True))
self.emit(SequenceStartEvent(alias, node.tag, implicit,
flow_style=node.flow_style))
index = 0
for item in node.value:
self.serialize_node(item, node, index)
index += 1
self.emit(SequenceEndEvent())
elif isinstance(node, MappingNode):
implicit = (node.tag
== self.resolve(MappingNode, node.value, True))
self.emit(MappingStartEvent(alias, node.tag, implicit,
flow_style=node.flow_style))
for key, value in node.value:
self.serialize_node(key, node, None)
self.serialize_node(value, node, key)
self.emit(MappingEndEvent())
self.ascend_resolver()
|
RitwikGupta/pattern
|
refs/heads/master
|
examples/02-db/01-database.py
|
21
|
# -*- coding: utf-8 -*-
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
from pattern.db import Database, SQLITE, MYSQL
from pattern.db import field, pk, STRING, INTEGER, DATE, NOW
from pattern.db import assoc
from pattern.db import rel
from pattern.db import pd # pd() = parent directory of current script.
# In this example, we'll build a mini-store:
# with products, customers and orders.
# We can combine the data from the three tables in an invoice query.
# Create a new database.
# Once it is created, you can use Database(name) to access it.
# SQLite will create the database file in the current folder.
# MySQL databases require a username and a password.
# MySQL also requires that you install MySQLdb, see the installation instructions at:
# http://www.clips.ua.ac.be/pages/pattern-db
db = Database(pd("store.db"), type=SQLITE)
#db._delete()
# PRODUCTS
# Create the products table if it doesn't exist yet.
# An error will be raised if the table already exists.
# Add sample data.
if not "products" in db:
# Note: in SQLite, the STRING type is mapped to TEXT (unlimited length).
# In MySQL, the length matters. Smaller fields have faster lookup.
schema = (
pk(), # Auto-incremental id.
field("description", STRING(50)),
field("price", INTEGER)
)
db.create("products", schema)
db.products.append(description="pizza", price=15)
db.products.append(description="garlic bread", price=3)
#db.products.append({"description": "garlic bread", "price": 3})
# CUSTOMERS
# Create the customers table and add data.
if not "customers" in db:
schema = (
pk(),
field("name", STRING(50)),
field("address", STRING(200))
)
db.create("customers", schema)
db.customers.append(name=u"Schrödinger") # Unicode is supported.
db.customers.append(name=u"Hofstadter")
# ORDERS
# Create the orders table if it doesn't exist yet and add data.
if not "orders" in db:
schema = (
pk(),
field("product_id", INTEGER),
field("customer_id", INTEGER),
field("date", DATE, default=NOW) # By default, current date/time.
)
db.create("orders", schema)
db.orders.append(product_id=1, customer_id=2) # Hofstadter orders pizza.
# Show all the products in the database.
# The assoc() iterator yields each row as a dictionary.
print "There are", len(db.products), "products available:"
for row in assoc(db.products):
print row
# Note how the orders table only contains integer id's.
# This is much more efficient than storing entire strings (e.g., customer address).
# To get the related data, we can create a query with relations between the tables.
q = db.orders.search(
fields = (
"products.description",
"products.price",
"customers.name",
"date"
),
relations = (
rel("product_id", "products.id", "products"),
rel("customer_id", "customers.id", "customers")
))
print
print "Invoices:"
for row in assoc(q):
print row # (product description, product price, customer name, date created)
print
print "Invoice query SQL syntax:"
print q
print
print "Invoice query XML:"
print q.xml
# The XML can be passed to Database.create() to create a new table (with data).
# This is explained in the online documentation.
|
goinnn/deldichoalhecho
|
refs/heads/master
|
ddah_web/migrations/0006_ddahinstanceweb_style.py
|
4
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import picklefield.fields
class Migration(migrations.Migration):
dependencies = [
('ddah_web', '0005_ddahinstanceweb_contact'),
]
operations = [
migrations.AddField(
model_name='ddahinstanceweb',
name='style',
field=picklefield.fields.PickledObjectField(default={}, editable=False),
),
]
|
helixyte/tractor
|
refs/heads/master
|
setup.py
|
1
|
"""
This file is part of the everest project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Package setup file.
Created on Nov 3, 2011.
"""
import os
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup
from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
setup_requirements = []
install_requirements = [
]
tests_requirements = install_requirements + [
'nose>=1.1.0,<=1.1.99',
'nosexcover>=1.0.4,<=1.0.99',
'coverage==3.4',
]
setup(name='tractor',
version='0.1',
description=
'A Python library to manipulate Trac tickets programmatically.',
long_description=README,
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP",
],
author='Anna-Antonia Berger',
author_email='berger@cenix.com',
license="MIT",
url='https://github.com/cenix/tractor',
keywords='web trac',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
setup_requires=setup_requirements,
install_requires=install_requirements,
tests_require=tests_requirements,
test_suite="tractor/tests",
entry_points="""
"""
)
|
empaket/plugin.video.live.proyectoluzdigital1
|
refs/heads/master
|
_verdirect .py
|
1
|
import urllib,base64
import os,xbmc,xbmcaddon,xbmcgui,re,xbmcplugin,sys
#from resources.lib import commonmyFunctions as cmyFun
import commonmyFunctions as cmyFun
from bs4 import BeautifulSoup
addon = xbmcaddon.Addon('plugin.video.live.proyectoluzdigital')
profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
#LstDir = os.path.join(profile, 'xmldir')
communityfiles = os.path.join(profile, 'LivewebTV')
cacheDir = os.path.join(profile, 'cachedir')
headers=dict({'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; rv:32.0) Gecko/20100101 Firefox/32.0'})
if not cacheDir.startswith(('smb://', 'nfs://', 'upnp://', 'ftp://')) and not os.path.isdir(cacheDir):
os.mkdir(cacheDir)
if not os.path.isdir(communityfiles):
os.mkdir(communityfiles)
ref = 'http://verdirectotv.com'
channel_url = 'http://tv.verdirectotv.org/channel.php?file=%s&width=650&height=400&autostart=true'
jquery = '%s?callback=jQuery170025813597286718948_%s&v_cod1=%s&v_cod2=%s&_=%s'
final_rtmp = '%s app=tvdirecto/?token=%s playpath=%s flashver=WIN%5C2017,0,0,134 \
swfUrl=http://www.businessapp1.pw/jwplayer5/addplayer/jwplayer.flash.swf pageUrl=%s live=1 timeout=15 swfVfy=1'
def verdirect(chnum):
ch_url = channel_url %chnum
con,new= cmyFun.cache(ch_url, 0,ref=ref)
s_url = cmyFun.match1(con,'iframe\s*src="([^"]+)')
con,new= cmyFun.cache(s_url, 0.5,ref=ref)
soup = BeautifulSoup(con,'html.parser')
hidden = urllib.quote_plus(soup('input',{'type':'hidden'})[1].get('value'))
hidden2 = urllib.quote_plus(soup('input',{'type':'hidden'})[2].get('value'))
hidden3 = base64.b64decode(soup('input',{'type':'hidden'})[3].get('value'))
jquery_url = jquery %(hidden3,cmyFun.getEpocTime(milli='1'),hidden,hidden2,cmyFun.getEpocTime(milli='1'))
con,new= cmyFun.cache(jquery_url, 0.5,ref=s_url)
res = cmyFun.match1(con,'result1":"([^"]+)','result2":"([^"]+)')
if res and 'redirect' in res[1]:
token = res[1].replace('\\','').split('redirect/?')
rtmp = 'rtmp://146.185.16.34:1735/' #token[0]
else:
token = res[1].replace('\\','').split('vod/?')
rtmp = 'rtmp://146.185.16.76:1735/' #token[0]
app = 'tvdirecto?'+token[1]
return rtmp+ app +' playpath='+ res[0] +' flashver=WIN%5C2017,0,0,134 swfUrl=http://www.businessapp1.pw/jwplayer5/addplayer/jwplayer.flash.swf swfVfy=1 pageUrl='+s_url+' live=1 timeout=15'
|
jahrome/viper
|
refs/heads/master
|
modules/pymacho/MachOEncryptionInfoCommand.py
|
3
|
# encoding: utf-8
"""
Copyright 2013 Jérémie BOUTOILLE
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from struct import unpack
from modules.pymacho.MachOLoadCommand import MachOLoadCommand
from modules.pymacho.Utils import green
class MachOEncryptionInfoCommand(MachOLoadCommand):
cryptoff = 0
cryptsize = 0
cryptid = 0
def __init__(self, macho_file=None, cmd=0):
self.cmd = cmd
if macho_file is not None:
self.parse(macho_file)
def parse(self, macho_file):
self.cryptoff, self.cryptsize = unpack('<II', macho_file.read(4*2))
self.cryptid = unpack('<I', macho_file.read(4))[0]
def write(self, macho_file):
before = macho_file.tell()
macho_file.write(pack('<II', self.cmd, 0x0))
macho_file.write(pack('<III', self.cryptoff, self.cryptsize, self.cryptid))
after = macho_file.tell()
macho_file.seek(before+4)
macho_file.write(pack('<I', after-before))
macho_file.seek(after)
def display(self, before=''):
print before + green("[+]")+" LC_ENCRYPTION_INFO"
print before + "\t- cryptoff : 0x%x" % self.cryptoff
print before + "\t- cryptsize : 0x%x" % self.cryptsize
print before + "\t- crypptid : 0x%x" % self.cryptid
|
krafczyk/spack
|
refs/heads/develop
|
var/spack/repos/builtin/packages/r-genomicranges/package.py
|
2
|
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/spack/spack
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class RGenomicranges(RPackage):
"""The ability to efficiently represent and manipulate genomic annotations
and alignments is playing a central role when it comes to analyzing
high-throughput sequencing data (a.k.a. NGS data). The GenomicRanges
package defines general purpose containers for storing and manipulating
genomic intervals and variables defined along a genome. More specialized
containers for representing and manipulating short alignments against a
reference genome, or a matrix-like summarization of an experiment, are
defined in the GenomicAlignments and SummarizedExperiment packages
respectively. Both packages build on top of the GenomicRanges
infrastructure."""
homepage = "https://bioconductor.org/packages/GenomicRanges/"
git = "https://git.bioconductor.org/packages/GenomicRanges.git"
version('1.30.3', commit='e99979054bc50ed8c0109bc54563036c1b368997')
version('1.28.6', commit='197472d618f3ed04c795dc6ed435500c29619563')
depends_on('r-biocgenerics@0.21.2:', type=('build', 'run'))
depends_on('r-s4vectors@0.9.47:', type=('build', 'run'))
depends_on('r-iranges@2.9.11:', type=('build', 'run'), when='@1.28.6')
depends_on('r-iranges@2.11.16:', type=('build', 'run'), when='@1.30.3')
depends_on('r-genomeinfodb@1.11.5:', type=('build', 'run'), when='@1.28.6')
depends_on('r-genomeinfodb@1.13.1:', type=('build', 'run'), when='@1.30.3')
depends_on('r-xvector', type=('build', 'run'))
depends_on('r@3.4.0:3.4.9', when='@1.28.6:')
|
geektophe/shinken
|
refs/heads/master
|
test/test_create_link_from_ext_cmd.py
|
18
|
#!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Shinken is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Shinken. If not, see <http://www.gnu.org/licenses/>.
#
# This file is used to test reading and processing of config files
#
from shinken_test import *
class TestCreateLinkFromExtCmd(ShinkenTest):
# Uncomment this is you want to use a specific configuration
# for your test
#def setUp(self):
# self.setup_with_file('etc/shinken_1r_1h_1s.cfg')
def test_simple_host_link(self):
now = int(time.time())
h = self.sched.hosts.find_by_name('test_host_0')
self.assertIsNot(h, None)
h.act_depend_of = []
r = self.sched.hosts.find_by_name('test_router_0')
self.assertIsNot(r, None)
r.act_depend_of = []
e = ExternalCommandManager(self.conf, 'dispatcher')
cmd = "[%lu] ADD_SIMPLE_HOST_DEPENDENCY;test_host_0;test_router_0" % now
self.sched.run_external_command(cmd)
self.assertTrue(h.is_linked_with_host(r))
# Now we remove this link
cmd = "[%lu] DEL_HOST_DEPENDENCY;test_host_0;test_router_0" % now
self.sched.run_external_command(cmd)
self.assertFalse(h.is_linked_with_host(r))
if __name__ == '__main__':
unittest.main()
|
ianmiell/OLD-shutitdist
|
refs/heads/master
|
docbook/docbook.py
|
1
|
"""ShutIt module. See http://shutit.tk/
"""
from shutit_module import ShutItModule
class docbook(ShutItModule):
def is_installed(self, shutit):
return False
def build(self, shutit):
shutit.send('mkdir -p /tmp/build/docbook')
shutit.send('cd /tmp/build/docbook')
version = shutit.cfg[self.module_id]['version']
shutit.send('curl -L http://www.docbook.org/xml/' + version + '/docbook-xml-' + version + '.zip > docbook.zip')
shutit.send('unzip docbook.zip')
shutit.send('install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.78.1')
shutit.run_script('''
install -v -d -m755 /usr/share/xml/docbook/xml-dtd-4.5 &&
install -v -d -m755 /etc/xml &&
chown -R root:root . &&
cp -v -af docbook.cat *.dtd ent/ *.mod \
/usr/share/xml/docbook/xml-dtd-4.5
''')
shutit.run_script('''
if [ ! -e /etc/xml/docbook ]; then
xmlcatalog --noout --create /etc/xml/docbook
fi &&
xmlcatalog --noout --add "public" \
"-//OASIS//DTD DocBook XML V4.5//EN" \
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
/etc/xml/docbook &&
xmlcatalog --noout --add "public" \
"-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
/etc/xml/docbook &&
xmlcatalog --noout --add "rewriteSystem" \
"http://www.oasis-open.org/docbook/xml/4.5" \
"file:///usr/share/xml/docbook/xml-dtd-4.5" \
/etc/xml/docbook &&
xmlcatalog --noout --add "rewriteURI" \
"http://www.oasis-open.org/docbook/xml/4.5" \
"file:///usr/share/xml/docbook/xml-dtd-4.5" \
/etc/xml/docbook
''')
shutit.run_script('''
if [ ! -e /etc/xml/catalog ]; then
xmlcatalog --noout --create /etc/xml/catalog
fi &&
xmlcatalog --noout --add "delegatePublic" \
"-//OASIS//ENTITIES DocBook XML" \
"file:///etc/xml/docbook" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegatePublic" \
"-//OASIS//DTD DocBook XML" \
"file:///etc/xml/docbook" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegateSystem" \
"http://www.oasis-open.org/docbook/" \
"file:///etc/xml/docbook" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
"http://www.oasis-open.org/docbook/" \
"file:///etc/xml/docbook" \
/etc/xml/catalog
''')
return True
def get_config(self, shutit):
shutit.get_config(self.module_id,'version','4.5')
return True
#def check_ready(self, shutit):
# return True
#def start(self, shutit):
# return True
#def stop(self, shutit):
# return True
def finalize(self, shutit):
#shutit.send('rm -rf
return True
#def remove(self, shutit):
# return True
#def test(self, shutit):
# return True
def module():
return docbook(
'shutit.tk.sd.docbook.docbook', 158844782.0044,
description='',
maintainer='ian.miell@gmail.com',
depends=['shutit.tk.sd.sgml_common.sgml_common','shutit.tk.sd.zip.zip']
)
|
jhutar/GreenTea
|
refs/heads/master
|
apps/waiver/models.py
|
2
|
#!/bin/python
# -*- coding: utf-8 -*-
# Author: Pavel Studenik <pstudeni@redhat.com>
# Date: 2013-2015
from django.db import models
from apps.core.models import Job, Recipe, Task, Test
from django.utils import timezone
class Comment(models.Model):
ENUM_ACTION_NONE = 0
ENUM_ACTION_WAIVED = 1
ENUM_ACTION_RETURN = 2
ENUM_ACTION_RESCHEDULE = 3
ENUM_ACTION = (
(ENUM_ACTION_NONE, "just comment"),
(ENUM_ACTION_WAIVED, "mark waived"),
(ENUM_ACTION_RETURN, "return2beaker"),
(ENUM_ACTION_RESCHEDULE, "reshedule job"),
)
job = models.ForeignKey(Job, blank=True, null=True)
recipe = models.ForeignKey(Recipe, blank=True, null=True,
related_name='comments')
task = models.ForeignKey(Task, blank=True, null=True,
related_name='comments')
test = models.ForeignKey(Test, blank=True, null=True)
username = models.CharField(max_length=32)
content = models.TextField()
created_date = models.DateTimeField(auto_now_add=True)
action = models.SmallIntegerField(
choices=ENUM_ACTION, default=ENUM_ACTION_NONE)
def __unicode__(self):
return "%s %s" % (self.username, self.created_date)
def get_action(self):
return dict(self.ENUM_ACTION)[self.action]
def set_time(self, tdate=None):
if not tdate:
tdate = timezone.now()
self.created_date = tdate
self.save()
def is_waived(self):
return (self.action == self.ENUM_ACTION_WAIVED)
|
Nhoya/telegram_lamebuster
|
refs/heads/master
|
config.py
|
1
|
TOKEN=''
|
EricSekyere/airmozilla
|
refs/heads/master
|
airmozilla/cronlogger/migrations/__init__.py
|
12133432
| |
sunsrising/xnhb
|
refs/heads/master
|
qa/rpc-tests/bip68-sequence.py
|
8
|
#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test BIP68 implementation
#
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from test_framework.script import *
from test_framework.mininode import *
from test_framework.blocktools import *
COIN = 100000000
SEQUENCE_LOCKTIME_DISABLE_FLAG = (1<<31)
SEQUENCE_LOCKTIME_TYPE_FLAG = (1<<22) # this means use time (0 means height)
SEQUENCE_LOCKTIME_GRANULARITY = 9 # this is a bit-shift
SEQUENCE_LOCKTIME_MASK = 0x0000ffff
# RPC error for non-BIP68 final transactions
NOT_FINAL_ERROR = "64: non-BIP68-final"
class BIP68Test(BitcoinTestFramework):
def setup_network(self):
self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-blockprioritysize=0"]))
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-blockprioritysize=0", "-acceptnonstdtxn=0"]))
self.is_network_split = False
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]
connect_nodes(self.nodes[0], 1)
def run_test(self):
# Generate some coins
self.nodes[0].generate(110)
print "Running test disable flag"
self.test_disable_flag()
print "Running test sequence-lock-confirmed-inputs"
self.test_sequence_lock_confirmed_inputs()
print "Running test sequence-lock-unconfirmed-inputs"
self.test_sequence_lock_unconfirmed_inputs()
print "Running test BIP68 not consensus before versionbits activation"
self.test_bip68_not_consensus()
print "Verifying nVersion=2 transactions aren't standard"
self.test_version2_relay(before_activation=True)
print "Activating BIP68 (and 112/113)"
self.activateCSV()
print "Verifying nVersion=2 transactions are now standard"
self.test_version2_relay(before_activation=False)
print "Passed\n"
# Test that BIP68 is not in effect if tx version is 1, or if
# the first sequence bit is set.
def test_disable_flag(self):
# Create some unconfirmed inputs
new_addr = self.nodes[0].getnewaddress()
self.nodes[0].sendtoaddress(new_addr, 2) # send 2 BTC
utxos = self.nodes[0].listunspent(0, 0)
assert(len(utxos) > 0)
utxo = utxos[0]
tx1 = CTransaction()
value = int(satoshi_round(utxo["amount"] - self.relayfee)*COIN)
# Check that the disable flag disables relative locktime.
# If sequence locks were used, this would require 1 block for the
# input to mature.
sequence_value = SEQUENCE_LOCKTIME_DISABLE_FLAG | 1
tx1.vin = [CTxIn(COutPoint(int(utxo["txid"], 16), utxo["vout"]), nSequence=sequence_value)]
tx1.vout = [CTxOut(value, CScript([b'a']))]
tx1_signed = self.nodes[0].signrawtransaction(ToHex(tx1))["hex"]
tx1_id = self.nodes[0].sendrawtransaction(tx1_signed)
tx1_id = int(tx1_id, 16)
# This transaction will enable sequence-locks, so this transaction should
# fail
tx2 = CTransaction()
tx2.nVersion = 2
sequence_value = sequence_value & 0x7fffffff
tx2.vin = [CTxIn(COutPoint(tx1_id, 0), nSequence=sequence_value)]
tx2.vout = [CTxOut(int(value-self.relayfee*COIN), CScript([b'a']))]
tx2.rehash()
try:
self.nodes[0].sendrawtransaction(ToHex(tx2))
except JSONRPCException as exp:
assert_equal(exp.error["message"], NOT_FINAL_ERROR)
else:
assert(False)
# Setting the version back down to 1 should disable the sequence lock,
# so this should be accepted.
tx2.nVersion = 1
self.nodes[0].sendrawtransaction(ToHex(tx2))
# Calculate the median time past of a prior block ("confirmations" before
# the current tip).
def get_median_time_past(self, confirmations):
block_hash = self.nodes[0].getblockhash(self.nodes[0].getblockcount()-confirmations)
return self.nodes[0].getblockheader(block_hash)["mediantime"]
# Test that sequence locks are respected for transactions spending confirmed inputs.
def test_sequence_lock_confirmed_inputs(self):
# Create lots of confirmed utxos, and use them to generate lots of random
# transactions.
max_outputs = 50
addresses = []
while len(addresses) < max_outputs:
addresses.append(self.nodes[0].getnewaddress())
while len(self.nodes[0].listunspent()) < 200:
import random
random.shuffle(addresses)
num_outputs = random.randint(1, max_outputs)
outputs = {}
for i in xrange(num_outputs):
outputs[addresses[i]] = random.randint(1, 20)*0.01
self.nodes[0].sendmany("", outputs)
self.nodes[0].generate(1)
utxos = self.nodes[0].listunspent()
# Try creating a lot of random transactions.
# Each time, choose a random number of inputs, and randomly set
# some of those inputs to be sequence locked (and randomly choose
# between height/time locking). Small random chance of making the locks
# all pass.
for i in xrange(400):
# Randomly choose up to 10 inputs
num_inputs = random.randint(1, 10)
random.shuffle(utxos)
# Track whether any sequence locks used should fail
should_pass = True
# Track whether this transaction was built with sequence locks
using_sequence_locks = False
tx = CTransaction()
tx.nVersion = 2
value = 0
for j in xrange(num_inputs):
sequence_value = 0xfffffffe # this disables sequence locks
# 50% chance we enable sequence locks
if random.randint(0,1):
using_sequence_locks = True
# 10% of the time, make the input sequence value pass
input_will_pass = (random.randint(1,10) == 1)
sequence_value = utxos[j]["confirmations"]
if not input_will_pass:
sequence_value += 1
should_pass = False
# Figure out what the median-time-past was for the confirmed input
# Note that if an input has N confirmations, we're going back N blocks
# from the tip so that we're looking up MTP of the block
# PRIOR to the one the input appears in, as per the BIP68 spec.
orig_time = self.get_median_time_past(utxos[j]["confirmations"])
cur_time = self.get_median_time_past(0) # MTP of the tip
# can only timelock this input if it's not too old -- otherwise use height
can_time_lock = True
if ((cur_time - orig_time) >> SEQUENCE_LOCKTIME_GRANULARITY) >= SEQUENCE_LOCKTIME_MASK:
can_time_lock = False
# if time-lockable, then 50% chance we make this a time lock
if random.randint(0,1) and can_time_lock:
# Find first time-lock value that fails, or latest one that succeeds
time_delta = sequence_value << SEQUENCE_LOCKTIME_GRANULARITY
if input_will_pass and time_delta > cur_time - orig_time:
sequence_value = ((cur_time - orig_time) >> SEQUENCE_LOCKTIME_GRANULARITY)
elif (not input_will_pass and time_delta <= cur_time - orig_time):
sequence_value = ((cur_time - orig_time) >> SEQUENCE_LOCKTIME_GRANULARITY)+1
sequence_value |= SEQUENCE_LOCKTIME_TYPE_FLAG
tx.vin.append(CTxIn(COutPoint(int(utxos[j]["txid"], 16), utxos[j]["vout"]), nSequence=sequence_value))
value += utxos[j]["amount"]*COIN
# Overestimate the size of the tx - signatures should be less than 120 bytes, and leave 50 for the output
tx_size = len(ToHex(tx))//2 + 120*num_inputs + 50
tx.vout.append(CTxOut(int(value-self.relayfee*tx_size*COIN/1000), CScript([b'a'])))
rawtx = self.nodes[0].signrawtransaction(ToHex(tx))["hex"]
try:
self.nodes[0].sendrawtransaction(rawtx)
except JSONRPCException as exp:
assert(not should_pass and using_sequence_locks)
assert_equal(exp.error["message"], NOT_FINAL_ERROR)
else:
assert(should_pass or not using_sequence_locks)
# Recalculate utxos if we successfully sent the transaction
utxos = self.nodes[0].listunspent()
# Test that sequence locks on unconfirmed inputs must have nSequence
# height or time of 0 to be accepted.
# Then test that BIP68-invalid transactions are removed from the mempool
# after a reorg.
def test_sequence_lock_unconfirmed_inputs(self):
# Store height so we can easily reset the chain at the end of the test
cur_height = self.nodes[0].getblockcount()
# Create a mempool tx.
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2)
tx1 = FromHex(CTransaction(), self.nodes[0].getrawtransaction(txid))
tx1.rehash()
# Anyone-can-spend mempool tx.
# Sequence lock of 0 should pass.
tx2 = CTransaction()
tx2.nVersion = 2
tx2.vin = [CTxIn(COutPoint(tx1.sha256, 0), nSequence=0)]
tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))]
tx2_raw = self.nodes[0].signrawtransaction(ToHex(tx2))["hex"]
tx2 = FromHex(tx2, tx2_raw)
tx2.rehash()
self.nodes[0].sendrawtransaction(tx2_raw)
# Create a spend of the 0th output of orig_tx with a sequence lock
# of 1, and test what happens when submitting.
# orig_tx.vout[0] must be an anyone-can-spend output
def test_nonzero_locks(orig_tx, node, relayfee, use_height_lock):
sequence_value = 1
if not use_height_lock:
sequence_value |= SEQUENCE_LOCKTIME_TYPE_FLAG
tx = CTransaction()
tx.nVersion = 2
tx.vin = [CTxIn(COutPoint(orig_tx.sha256, 0), nSequence=sequence_value)]
tx.vout = [CTxOut(int(orig_tx.vout[0].nValue - relayfee*COIN), CScript([b'a']))]
tx.rehash()
try:
node.sendrawtransaction(ToHex(tx))
except JSONRPCException as exp:
assert_equal(exp.error["message"], NOT_FINAL_ERROR)
assert(orig_tx.hash in node.getrawmempool())
else:
# orig_tx must not be in mempool
assert(orig_tx.hash not in node.getrawmempool())
return tx
test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=True)
test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=False)
# Now mine some blocks, but make sure tx2 doesn't get mined.
# Use prioritisetransaction to lower the effective feerate to 0
self.nodes[0].prioritisetransaction(tx2.hash, -1e15, int(-self.relayfee*COIN))
cur_time = int(time.time())
for i in xrange(10):
self.nodes[0].setmocktime(cur_time + 600)
self.nodes[0].generate(1)
cur_time += 600
assert(tx2.hash in self.nodes[0].getrawmempool())
test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=True)
test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=False)
# Mine tx2, and then try again
self.nodes[0].prioritisetransaction(tx2.hash, 1e15, int(self.relayfee*COIN))
# Advance the time on the node so that we can test timelocks
self.nodes[0].setmocktime(cur_time+600)
self.nodes[0].generate(1)
assert(tx2.hash not in self.nodes[0].getrawmempool())
# Now that tx2 is not in the mempool, a sequence locked spend should
# succeed
tx3 = test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=False)
assert(tx3.hash in self.nodes[0].getrawmempool())
self.nodes[0].generate(1)
assert(tx3.hash not in self.nodes[0].getrawmempool())
# One more test, this time using height locks
tx4 = test_nonzero_locks(tx3, self.nodes[0], self.relayfee, use_height_lock=True)
assert(tx4.hash in self.nodes[0].getrawmempool())
# Now try combining confirmed and unconfirmed inputs
tx5 = test_nonzero_locks(tx4, self.nodes[0], self.relayfee, use_height_lock=True)
assert(tx5.hash not in self.nodes[0].getrawmempool())
utxos = self.nodes[0].listunspent()
tx5.vin.append(CTxIn(COutPoint(int(utxos[0]["txid"], 16), utxos[0]["vout"]), nSequence=1))
tx5.vout[0].nValue += int(utxos[0]["amount"]*COIN)
raw_tx5 = self.nodes[0].signrawtransaction(ToHex(tx5))["hex"]
try:
self.nodes[0].sendrawtransaction(raw_tx5)
except JSONRPCException as exp:
assert_equal(exp.error["message"], NOT_FINAL_ERROR)
else:
assert(False)
# Test mempool-BIP68 consistency after reorg
#
# State of the transactions in the last blocks:
# ... -> [ tx2 ] -> [ tx3 ]
# tip-1 tip
# And currently tx4 is in the mempool.
#
# If we invalidate the tip, tx3 should get added to the mempool, causing
# tx4 to be removed (fails sequence-lock).
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
assert(tx4.hash not in self.nodes[0].getrawmempool())
assert(tx3.hash in self.nodes[0].getrawmempool())
# Now mine 2 empty blocks to reorg out the current tip (labeled tip-1 in
# diagram above).
# This would cause tx2 to be added back to the mempool, which in turn causes
# tx3 to be removed.
tip = int(self.nodes[0].getblockhash(self.nodes[0].getblockcount()-1), 16)
height = self.nodes[0].getblockcount()
for i in xrange(2):
block = create_block(tip, create_coinbase(height), cur_time)
block.nVersion = 3
block.rehash()
block.solve()
tip = block.sha256
height += 1
self.nodes[0].submitblock(ToHex(block))
cur_time += 1
mempool = self.nodes[0].getrawmempool()
assert(tx3.hash not in mempool)
assert(tx2.hash in mempool)
# Reset the chain and get rid of the mocktimed-blocks
self.nodes[0].setmocktime(0)
self.nodes[0].invalidateblock(self.nodes[0].getblockhash(cur_height+1))
self.nodes[0].generate(10)
# Make sure that BIP68 isn't being used to validate blocks, prior to
# versionbits activation. If more blocks are mined prior to this test
# being run, then it's possible the test has activated the soft fork, and
# this test should be moved to run earlier, or deleted.
def test_bip68_not_consensus(self):
assert(get_bip9_status(self.nodes[0], 'csv')['status'] != 'active')
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2)
tx1 = FromHex(CTransaction(), self.nodes[0].getrawtransaction(txid))
tx1.rehash()
# Make an anyone-can-spend transaction
tx2 = CTransaction()
tx2.nVersion = 1
tx2.vin = [CTxIn(COutPoint(tx1.sha256, 0), nSequence=0)]
tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))]
# sign tx2
tx2_raw = self.nodes[0].signrawtransaction(ToHex(tx2))["hex"]
tx2 = FromHex(tx2, tx2_raw)
tx2.rehash()
self.nodes[0].sendrawtransaction(ToHex(tx2))
# Now make an invalid spend of tx2 according to BIP68
sequence_value = 100 # 100 block relative locktime
tx3 = CTransaction()
tx3.nVersion = 2
tx3.vin = [CTxIn(COutPoint(tx2.sha256, 0), nSequence=sequence_value)]
tx3.vout = [CTxOut(int(tx2.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))]
tx3.rehash()
try:
self.nodes[0].sendrawtransaction(ToHex(tx3))
except JSONRPCException as exp:
assert_equal(exp.error["message"], NOT_FINAL_ERROR)
else:
assert(False)
# make a block that violates bip68; ensure that the tip updates
tip = int(self.nodes[0].getbestblockhash(), 16)
block = create_block(tip, create_coinbase(self.nodes[0].getblockcount()+1))
block.nVersion = 3
block.vtx.extend([tx1, tx2, tx3])
block.hashMerkleRoot = block.calc_merkle_root()
block.rehash()
block.solve()
self.nodes[0].submitblock(ToHex(block))
assert_equal(self.nodes[0].getbestblockhash(), block.hash)
def activateCSV(self):
# activation should happen at block height 432 (3 periods)
min_activation_height = 432
height = self.nodes[0].getblockcount()
assert(height < 432)
self.nodes[0].generate(432-height)
assert(get_bip9_status(self.nodes[0], 'csv')['status'] == 'active')
sync_blocks(self.nodes)
# Use self.nodes[1] to test standardness relay policy
def test_version2_relay(self, before_activation):
inputs = [ ]
outputs = { self.nodes[1].getnewaddress() : 1.0 }
rawtx = self.nodes[1].createrawtransaction(inputs, outputs)
rawtxfund = self.nodes[1].fundrawtransaction(rawtx)['hex']
tx = FromHex(CTransaction(), rawtxfund)
tx.nVersion = 2
tx_signed = self.nodes[1].signrawtransaction(ToHex(tx))["hex"]
try:
tx_id = self.nodes[1].sendrawtransaction(tx_signed)
assert(before_activation == False)
except:
assert(before_activation)
if __name__ == '__main__':
BIP68Test().main()
|
ReachingOut/unisubs
|
refs/heads/staging
|
apps/videos/migrations/0155_auto__chg_field_subtitlelanguage_new_subtitle_language__add_unique_sub.py
|
5
|
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'SubtitleLanguage.new_subtitle_language'
db.alter_column('videos_subtitlelanguage', 'new_subtitle_language_id', self.gf('django.db.models.fields.related.OneToOneField')(blank=True, unique=True, null=True, to=orm['subtitles.SubtitleLanguage']))
# Adding unique constraint on 'SubtitleLanguage', fields ['new_subtitle_language']
db.create_unique('videos_subtitlelanguage', ['new_subtitle_language_id'])
def backwards(self, orm):
# Changing field 'SubtitleLanguage.new_subtitle_language'
db.alter_column('videos_subtitlelanguage', 'new_subtitle_language_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['subtitles.SubtitleLanguage'], null=True, blank=True))
# Removing unique constraint on 'SubtitleLanguage', fields ['new_subtitle_language']
db.delete_unique('videos_subtitlelanguage', ['new_subtitle_language_id'])
models = {
'accountlinker.thirdpartyaccount': {
'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
},
'auth.customuser': {
'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'can_send_messages': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'is_partner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'partner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Partner']", 'null': 'True', 'blank': 'True'}),
'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'users'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 11, 27, 11, 24, 15, 86849)'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 11, 27, 11, 24, 15, 86751)'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'comments.comment': {
'Meta': {'object_name': 'Comment'},
'content': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'object_pk': ('django.db.models.fields.TextField', [], {}),
'reply_to': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['comments.Comment']", 'null': 'True', 'blank': 'True'}),
'submit_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"})
},
'contenttypes.contenttype': {
'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'subtitles.subtitlelanguage': {
'Meta': {'unique_together': "[('video', 'language_code')]", 'object_name': 'SubtitleLanguage'},
'created': ('django.db.models.fields.DateTimeField', [], {}),
'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'new_followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'official_signoff_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'pending_signoff_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'pending_signoff_expired_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'pending_signoff_unexpired_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'subtitles_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'unofficial_signoff_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitlelanguage_set'", 'to': "orm['videos.Video']"}),
'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'writelocked_newlanguages'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
},
'subtitles.subtitleversion': {
'Meta': {'unique_together': "[('video', 'subtitle_language', 'version_number'), ('video', 'language_code', 'version_number')]", 'object_name': 'SubtitleVersion'},
'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['auth.CustomUser']"}),
'created': ('django.db.models.fields.DateTimeField', [], {}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'note': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}),
'parents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['subtitles.SubtitleVersion']", 'symmetrical': 'False', 'blank': 'True'}),
'rollback_of_version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'serialized_lineage': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'serialized_subtitles': ('django.db.models.fields.TextField', [], {}),
'subtitle_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'subtitle_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
'version_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
'video': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'newsubtitleversion_set'", 'to': "orm['videos.Video']"}),
'visibility': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '10'}),
'visibility_override': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'})
},
'teams.application': {
'Meta': {'unique_together': "(('team', 'user', 'status'),)", 'object_name': 'Application'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'history': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
},
'teams.partner': {
'Meta': {'object_name': 'Partner'},
'admins': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'managed_partners'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['auth.CustomUser']"}),
'can_request_paid_captions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
},
'teams.project': {
'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
},
'teams.team': {
'Meta': {'object_name': 'Team'},
'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'teams'", 'null': 'True', 'to': "orm['teams.Partner']"}),
'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
},
'teams.teammember': {
'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
},
'teams.teamvideo': {
'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'partner_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
},
'videos.action': {
'Meta': {'object_name': 'Action'},
'action_type': ('django.db.models.fields.IntegerField', [], {}),
'comment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['comments.Comment']", 'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
'member': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.TeamMember']", 'null': 'True', 'blank': 'True'}),
'new_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['subtitles.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
'new_video_title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']", 'null': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']", 'null': 'True', 'blank': 'True'})
},
'videos.subtitle': {
'Meta': {'unique_together': "(('version', 'subtitle_id'),)", 'object_name': 'Subtitle'},
'end_time': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'db_column': "'end_time_ms'"}),
'end_time_seconds': ('django.db.models.fields.FloatField', [], {'null': 'True', 'db_column': "'end_time'"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'start_of_paragraph': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'start_time': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'db_column': "'start_time_ms'"}),
'start_time_seconds': ('django.db.models.fields.FloatField', [], {'null': 'True', 'db_column': "'start_time'"}),
'subtitle_id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
'subtitle_order': ('django.db.models.fields.FloatField', [], {'null': 'True'}),
'subtitle_text': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}),
'version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleVersion']", 'null': 'True'})
},
'videos.subtitlelanguage': {
'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
'created': ('django.db.models.fields.DateTimeField', [], {}),
'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
'needs_sync': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'new_subtitle_language': ('django.db.models.fields.related.OneToOneField', [], {'blank': 'True', 'related_name': "'old_subtitle_version'", 'unique': 'True', 'null': 'True', 'to': "orm['subtitles.SubtitleLanguage']"}),
'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
},
'videos.subtitlemetadata': {
'Meta': {'object_name': 'SubtitleMetadata'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.PositiveIntegerField', [], {}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'subtitle': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Subtitle']"})
},
'videos.subtitleversion': {
'Meta': {'unique_together': "(('language', 'version_no'),)", 'object_name': 'SubtitleVersion'},
'datetime_started': ('django.db.models.fields.DateTimeField', [], {}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'forked_from': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleVersion']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']"}),
'moderation_status': ('django.db.models.fields.CharField', [], {'default': "'not__under_moderation'", 'max_length': '32', 'db_index': 'True'}),
'needs_sync': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'new_subtitle_version': ('django.db.models.fields.related.OneToOneField', [], {'blank': 'True', 'related_name': "'old_subtitle_version'", 'unique': 'True', 'null': 'True', 'to': "orm['subtitles.SubtitleVersion']"}),
'note': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
'notification_sent': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'result_of_rollback': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'text_change': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'time_change': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
'version_no': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
},
'videos.subtitleversionmetadata': {
'Meta': {'unique_together': "(('key', 'subtitle_version'),)", 'object_name': 'SubtitleVersionMetadata'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.PositiveIntegerField', [], {}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'subtitle_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': "orm['videos.SubtitleVersion']"})
},
'videos.usertestresult': {
'Meta': {'object_name': 'UserTestResult'},
'browser': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'get_updates': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'task1': ('django.db.models.fields.TextField', [], {}),
'task2': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'task3': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
'videos.video': {
'Meta': {'object_name': 'Video'},
'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
'primary_audio_language_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
},
'videos.videofeed': {
'Meta': {'object_name': 'VideoFeed'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'})
},
'videos.videometadata': {
'Meta': {'object_name': 'VideoMetadata'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.PositiveIntegerField', [], {}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"})
},
'videos.videourl': {
'Meta': {'object_name': 'VideoUrl'},
'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'owner_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'primary': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
'url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '255'}),
'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
'videoid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'})
}
}
complete_apps = ['videos']
|
CodeMath/jinrockets
|
refs/heads/master
|
BluePrint/lib/wtforms/ext/appengine/db.py
|
228
|
"""
Form generation utilities for App Engine's ``db.Model`` class.
The goal of ``model_form()`` is to provide a clean, explicit and predictable
way to create forms based on ``db.Model`` classes. No malabarism or black
magic should be necessary to generate a form for models, and to add custom
non-model related fields: ``model_form()`` simply generates a form class
that can be used as it is, or that can be extended directly or even be used
to create other forms using ``model_form()``.
Example usage:
.. code-block:: python
from google.appengine.ext import db
from tipfy.ext.model.form import model_form
# Define an example model and add a record.
class Contact(db.Model):
name = db.StringProperty(required=True)
city = db.StringProperty()
age = db.IntegerProperty(required=True)
is_admin = db.BooleanProperty(default=False)
new_entity = Contact(key_name='test', name='Test Name', age=17)
new_entity.put()
# Generate a form based on the model.
ContactForm = model_form(Contact)
# Get a form populated with entity data.
entity = Contact.get_by_key_name('test')
form = ContactForm(obj=entity)
Properties from the model can be excluded from the generated form, or it can
include just a set of properties. For example:
.. code-block:: python
# Generate a form based on the model, excluding 'city' and 'is_admin'.
ContactForm = model_form(Contact, exclude=('city', 'is_admin'))
# or...
# Generate a form based on the model, only including 'name' and 'age'.
ContactForm = model_form(Contact, only=('name', 'age'))
The form can be generated setting field arguments:
.. code-block:: python
ContactForm = model_form(Contact, only=('name', 'age'), field_args={
'name': {
'label': 'Full name',
'description': 'Your name',
},
'age': {
'label': 'Age',
'validators': [validators.NumberRange(min=14, max=99)],
}
})
The class returned by ``model_form()`` can be used as a base class for forms
mixing non-model fields and/or other model forms. For example:
.. code-block:: python
# Generate a form based on the model.
BaseContactForm = model_form(Contact)
# Generate a form based on other model.
ExtraContactForm = model_form(MyOtherModel)
class ContactForm(BaseContactForm):
# Add an extra, non-model related field.
subscribe_to_news = f.BooleanField()
# Add the other model form as a subform.
extra = f.FormField(ExtraContactForm)
The class returned by ``model_form()`` can also extend an existing form
class:
.. code-block:: python
class BaseContactForm(Form):
# Add an extra, non-model related field.
subscribe_to_news = f.BooleanField()
# Generate a form based on the model.
ContactForm = model_form(Contact, base_class=BaseContactForm)
"""
from wtforms import Form, validators, widgets, fields as f
from wtforms.compat import iteritems
from wtforms.ext.appengine.fields import GeoPtPropertyField, ReferencePropertyField, StringListPropertyField
def get_TextField(kwargs):
"""
Returns a ``TextField``, applying the ``db.StringProperty`` length limit
of 500 bytes.
"""
kwargs['validators'].append(validators.length(max=500))
return f.TextField(**kwargs)
def get_IntegerField(kwargs):
"""
Returns an ``IntegerField``, applying the ``db.IntegerProperty`` range
limits.
"""
v = validators.NumberRange(min=-0x8000000000000000, max=0x7fffffffffffffff)
kwargs['validators'].append(v)
return f.IntegerField(**kwargs)
def convert_StringProperty(model, prop, kwargs):
"""Returns a form field for a ``db.StringProperty``."""
if prop.multiline:
kwargs['validators'].append(validators.length(max=500))
return f.TextAreaField(**kwargs)
else:
return get_TextField(kwargs)
def convert_ByteStringProperty(model, prop, kwargs):
"""Returns a form field for a ``db.ByteStringProperty``."""
return get_TextField(kwargs)
def convert_BooleanProperty(model, prop, kwargs):
"""Returns a form field for a ``db.BooleanProperty``."""
return f.BooleanField(**kwargs)
def convert_IntegerProperty(model, prop, kwargs):
"""Returns a form field for a ``db.IntegerProperty``."""
return get_IntegerField(kwargs)
def convert_FloatProperty(model, prop, kwargs):
"""Returns a form field for a ``db.FloatProperty``."""
return f.FloatField(**kwargs)
def convert_DateTimeProperty(model, prop, kwargs):
"""Returns a form field for a ``db.DateTimeProperty``."""
if prop.auto_now or prop.auto_now_add:
return None
kwargs.setdefault('format', '%Y-%m-%d %H:%M:%S')
return f.DateTimeField(**kwargs)
def convert_DateProperty(model, prop, kwargs):
"""Returns a form field for a ``db.DateProperty``."""
if prop.auto_now or prop.auto_now_add:
return None
kwargs.setdefault('format', '%Y-%m-%d')
return f.DateField(**kwargs)
def convert_TimeProperty(model, prop, kwargs):
"""Returns a form field for a ``db.TimeProperty``."""
if prop.auto_now or prop.auto_now_add:
return None
kwargs.setdefault('format', '%H:%M:%S')
return f.DateTimeField(**kwargs)
def convert_ListProperty(model, prop, kwargs):
"""Returns a form field for a ``db.ListProperty``."""
return None
def convert_StringListProperty(model, prop, kwargs):
"""Returns a form field for a ``db.StringListProperty``."""
return StringListPropertyField(**kwargs)
def convert_ReferenceProperty(model, prop, kwargs):
"""Returns a form field for a ``db.ReferenceProperty``."""
kwargs['reference_class'] = prop.reference_class
kwargs.setdefault('allow_blank', not prop.required)
return ReferencePropertyField(**kwargs)
def convert_SelfReferenceProperty(model, prop, kwargs):
"""Returns a form field for a ``db.SelfReferenceProperty``."""
return None
def convert_UserProperty(model, prop, kwargs):
"""Returns a form field for a ``db.UserProperty``."""
return None
def convert_BlobProperty(model, prop, kwargs):
"""Returns a form field for a ``db.BlobProperty``."""
return f.FileField(**kwargs)
def convert_TextProperty(model, prop, kwargs):
"""Returns a form field for a ``db.TextProperty``."""
return f.TextAreaField(**kwargs)
def convert_CategoryProperty(model, prop, kwargs):
"""Returns a form field for a ``db.CategoryProperty``."""
return get_TextField(kwargs)
def convert_LinkProperty(model, prop, kwargs):
"""Returns a form field for a ``db.LinkProperty``."""
kwargs['validators'].append(validators.url())
return get_TextField(kwargs)
def convert_EmailProperty(model, prop, kwargs):
"""Returns a form field for a ``db.EmailProperty``."""
kwargs['validators'].append(validators.email())
return get_TextField(kwargs)
def convert_GeoPtProperty(model, prop, kwargs):
"""Returns a form field for a ``db.GeoPtProperty``."""
return GeoPtPropertyField(**kwargs)
def convert_IMProperty(model, prop, kwargs):
"""Returns a form field for a ``db.IMProperty``."""
return None
def convert_PhoneNumberProperty(model, prop, kwargs):
"""Returns a form field for a ``db.PhoneNumberProperty``."""
return get_TextField(kwargs)
def convert_PostalAddressProperty(model, prop, kwargs):
"""Returns a form field for a ``db.PostalAddressProperty``."""
return get_TextField(kwargs)
def convert_RatingProperty(model, prop, kwargs):
"""Returns a form field for a ``db.RatingProperty``."""
kwargs['validators'].append(validators.NumberRange(min=0, max=100))
return f.IntegerField(**kwargs)
class ModelConverter(object):
"""
Converts properties from a ``db.Model`` class to form fields.
Default conversions between properties and fields:
+====================+===================+==============+==================+
| Property subclass | Field subclass | datatype | notes |
+====================+===================+==============+==================+
| StringProperty | TextField | unicode | TextArea |
| | | | if multiline |
+--------------------+-------------------+--------------+------------------+
| ByteStringProperty | TextField | str | |
+--------------------+-------------------+--------------+------------------+
| BooleanProperty | BooleanField | bool | |
+--------------------+-------------------+--------------+------------------+
| IntegerProperty | IntegerField | int or long | |
+--------------------+-------------------+--------------+------------------+
| FloatProperty | TextField | float | |
+--------------------+-------------------+--------------+------------------+
| DateTimeProperty | DateTimeField | datetime | skipped if |
| | | | auto_now[_add] |
+--------------------+-------------------+--------------+------------------+
| DateProperty | DateField | date | skipped if |
| | | | auto_now[_add] |
+--------------------+-------------------+--------------+------------------+
| TimeProperty | DateTimeField | time | skipped if |
| | | | auto_now[_add] |
+--------------------+-------------------+--------------+------------------+
| ListProperty | None | list | always skipped |
+--------------------+-------------------+--------------+------------------+
| StringListProperty | TextAreaField | list of str | |
+--------------------+-------------------+--------------+------------------+
| ReferenceProperty | ReferencePropertyF| db.Model | |
+--------------------+-------------------+--------------+------------------+
| SelfReferenceP. | ReferencePropertyF| db.Model | |
+--------------------+-------------------+--------------+------------------+
| UserProperty | None | users.User | always skipped |
+--------------------+-------------------+--------------+------------------+
| BlobProperty | FileField | str | |
+--------------------+-------------------+--------------+------------------+
| TextProperty | TextAreaField | unicode | |
+--------------------+-------------------+--------------+------------------+
| CategoryProperty | TextField | unicode | |
+--------------------+-------------------+--------------+------------------+
| LinkProperty | TextField | unicode | |
+--------------------+-------------------+--------------+------------------+
| EmailProperty | TextField | unicode | |
+--------------------+-------------------+--------------+------------------+
| GeoPtProperty | TextField | db.GeoPt | |
+--------------------+-------------------+--------------+------------------+
| IMProperty | None | db.IM | always skipped |
+--------------------+-------------------+--------------+------------------+
| PhoneNumberProperty| TextField | unicode | |
+--------------------+-------------------+--------------+------------------+
| PostalAddressP. | TextField | unicode | |
+--------------------+-------------------+--------------+------------------+
| RatingProperty | IntegerField | int or long | |
+--------------------+-------------------+--------------+------------------+
| _ReverseReferenceP.| None | <iterable> | always skipped |
+====================+===================+==============+==================+
"""
default_converters = {
'StringProperty': convert_StringProperty,
'ByteStringProperty': convert_ByteStringProperty,
'BooleanProperty': convert_BooleanProperty,
'IntegerProperty': convert_IntegerProperty,
'FloatProperty': convert_FloatProperty,
'DateTimeProperty': convert_DateTimeProperty,
'DateProperty': convert_DateProperty,
'TimeProperty': convert_TimeProperty,
'ListProperty': convert_ListProperty,
'StringListProperty': convert_StringListProperty,
'ReferenceProperty': convert_ReferenceProperty,
'SelfReferenceProperty': convert_SelfReferenceProperty,
'UserProperty': convert_UserProperty,
'BlobProperty': convert_BlobProperty,
'TextProperty': convert_TextProperty,
'CategoryProperty': convert_CategoryProperty,
'LinkProperty': convert_LinkProperty,
'EmailProperty': convert_EmailProperty,
'GeoPtProperty': convert_GeoPtProperty,
'IMProperty': convert_IMProperty,
'PhoneNumberProperty': convert_PhoneNumberProperty,
'PostalAddressProperty': convert_PostalAddressProperty,
'RatingProperty': convert_RatingProperty,
}
# Don't automatically add a required validator for these properties
NO_AUTO_REQUIRED = frozenset(['ListProperty', 'StringListProperty', 'BooleanProperty'])
def __init__(self, converters=None):
"""
Constructs the converter, setting the converter callables.
:param converters:
A dictionary of converter callables for each property type. The
callable must accept the arguments (model, prop, kwargs).
"""
self.converters = converters or self.default_converters
def convert(self, model, prop, field_args):
"""
Returns a form field for a single model property.
:param model:
The ``db.Model`` class that contains the property.
:param prop:
The model property: a ``db.Property`` instance.
:param field_args:
Optional keyword arguments to construct the field.
"""
prop_type_name = type(prop).__name__
kwargs = {
'label': prop.name.replace('_', ' ').title(),
'default': prop.default_value(),
'validators': [],
}
if field_args:
kwargs.update(field_args)
if prop.required and prop_type_name not in self.NO_AUTO_REQUIRED:
kwargs['validators'].append(validators.required())
if prop.choices:
# Use choices in a select field if it was not provided in field_args
if 'choices' not in kwargs:
kwargs['choices'] = [(v, v) for v in prop.choices]
return f.SelectField(**kwargs)
else:
converter = self.converters.get(prop_type_name, None)
if converter is not None:
return converter(model, prop, kwargs)
def model_fields(model, only=None, exclude=None, field_args=None,
converter=None):
"""
Extracts and returns a dictionary of form fields for a given
``db.Model`` class.
:param model:
The ``db.Model`` class to extract fields from.
:param only:
An optional iterable with the property names that should be included in
the form. Only these properties will have fields.
:param exclude:
An optional iterable with the property names that should be excluded
from the form. All other properties will have fields.
:param field_args:
An optional dictionary of field names mapping to a keyword arguments
used to construct each field object.
:param converter:
A converter to generate the fields based on the model properties. If
not set, ``ModelConverter`` is used.
"""
converter = converter or ModelConverter()
field_args = field_args or {}
# Get the field names we want to include or exclude, starting with the
# full list of model properties.
props = model.properties()
sorted_props = sorted(iteritems(props), key=lambda prop: prop[1].creation_counter)
field_names = list(x[0] for x in sorted_props)
if only:
field_names = list(f for f in only if f in field_names)
elif exclude:
field_names = list(f for f in field_names if f not in exclude)
# Create all fields.
field_dict = {}
for name in field_names:
field = converter.convert(model, props[name], field_args.get(name))
if field is not None:
field_dict[name] = field
return field_dict
def model_form(model, base_class=Form, only=None, exclude=None, field_args=None,
converter=None):
"""
Creates and returns a dynamic ``wtforms.Form`` class for a given
``db.Model`` class. The form class can be used as it is or serve as a base
for extended form classes, which can then mix non-model related fields,
subforms with other model forms, among other possibilities.
:param model:
The ``db.Model`` class to generate a form for.
:param base_class:
Base form class to extend from. Must be a ``wtforms.Form`` subclass.
:param only:
An optional iterable with the property names that should be included in
the form. Only these properties will have fields.
:param exclude:
An optional iterable with the property names that should be excluded
from the form. All other properties will have fields.
:param field_args:
An optional dictionary of field names mapping to keyword arguments
used to construct each field object.
:param converter:
A converter to generate the fields based on the model properties. If
not set, ``ModelConverter`` is used.
"""
# Extract the fields from the model.
field_dict = model_fields(model, only, exclude, field_args, converter)
# Return a dynamically created form class, extending from base_class and
# including the created fields as properties.
return type(model.kind() + 'Form', (base_class,), field_dict)
|
python-hyper/hyper-h2
|
refs/heads/master
|
setup.py
|
1
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
from setuptools import setup, find_packages
PROJECT_ROOT = os.path.dirname(__file__)
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
long_description = file_.read()
# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open(os.path.join(PROJECT_ROOT, 'src/h2/__init__.py')) as file_:
text = file_.read()
match = re.search(version_regex, text)
if match:
version = match.group(1)
else:
raise RuntimeError("No version number found!")
setup(
name='h2',
version=version,
description='HTTP/2 State-Machine based protocol implementation',
long_description=long_description,
long_description_content_type='text/x-rst',
author='Cory Benfield',
author_email='cory@lukasa.co.uk',
url='https://github.com/python-hyper/hyper-h2',
packages=find_packages(where="src"),
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']},
package_dir={'': 'src'},
python_requires='>=3.6.1',
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
install_requires=[
'hyperframe>=6.0,<7',
'hpack>=4.0,<5',
],
)
|
akarol/cfme_tests
|
refs/heads/master
|
cfme/common/__init__.py
|
1
|
# -*- coding: utf-8 -*-
from navmazing import NavigateToSibling
from widgetastic.exceptions import NoSuchElementException, RowNotFound
from widgetastic_patternfly import BootstrapSelect, Button, CheckableBootstrapTreeview
from widgetastic.widget import Table, Text, View
from cfme.base.login import BaseLoggedInPage
from cfme.modeling.base import BaseCollection, BaseEntity
from cfme.configure.configuration.region_settings import Category, Tag
from cfme.utils.appliance.implementations.ui import navigate_to, navigator, CFMENavigateStep
from cfme.utils.wait import wait_for
from widgetastic_manageiq import BaseNonInteractiveEntitiesView, BreadCrumb
class ManagePoliciesView(BaseLoggedInPage):
"""
Manage policies page
"""
policy_profiles = CheckableBootstrapTreeview(tree_id='protectbox')
breadcrumb = BreadCrumb() # some views have breadcrumb, some not
entities = View.nested(BaseNonInteractiveEntitiesView)
save = Button('Save')
reset = Button('Reset')
cancel = Button('Cancel')
@property
def is_displayed(self):
return False
class PolicyProfileAssignable(object):
"""This class can be inherited by anything that provider load_details method.
It provides functionality to assign and unassign Policy Profiles
"""
@property
def assigned_policy_profiles(self):
try:
return self._assigned_policy_profiles
except AttributeError:
self._assigned_policy_profiles = set([])
return self._assigned_policy_profiles
def assign_policy_profiles(self, *policy_profile_names):
""" Assign Policy Profiles to this object.
Args:
policy_profile_names: :py:class:`str` with Policy Profile names. After Control/Explorer
coverage goes in, PolicyProfile objects will be also passable.
"""
map(self.assigned_policy_profiles.add, policy_profile_names)
self._assign_unassign_policy_profiles(True, *policy_profile_names)
def unassign_policy_profiles(self, *policy_profile_names):
""" Unssign Policy Profiles to this object.
Args:
policy_profile_names: :py:class:`str` with Policy Profile names. After Control/Explorer
coverage goes in, PolicyProfile objects will be also passable.
"""
for pp_name in policy_profile_names:
try:
self.assigned_policy_profiles.remove(pp_name)
except KeyError:
pass
self._assign_unassign_policy_profiles(False, *policy_profile_names)
def _assign_unassign_policy_profiles(self, assign, *policy_profile_names):
"""DRY function for managing policy profiles.
See :py:func:`assign_policy_profiles` and :py:func:`assign_policy_profiles`
Args:
assign: Wheter to assign or unassign.
policy_profile_names: :py:class:`str` with Policy Profile names.
"""
view = navigate_to(self, 'ManagePoliciesFromDetails')
policy_changed = False
for policy_profile in policy_profile_names:
if assign:
policy_changed = view.policy_profiles.fill(
view.policy_profiles.CheckNode([policy_profile])
) or policy_changed
else:
policy_changed = view.policy_profiles.fill(
view.policy_profiles.UncheckNode([policy_profile])
) or policy_changed
if policy_changed:
view.save.click()
else:
view.cancel.click()
details_view = self.create_view(navigator.get_class(self, 'Details').VIEW)
details_view.flash.assert_no_error()
def assign_policy_profiles_multiple_entities(self, entities, conditions, *policy_profile_names):
""" Assign Policy Profiles to selected entity's on Collection All view
Args:
entities: list of entity's from collection table
policy_profile_names: :py:class:`str` with Policy Profile names. After Control/Explorer
coverage goes in, PolicyProfile objects will be also passable.
conditions: entities should match to
Ex:
collection = appliance.collections.container_images
# assign OpenSCAP policy
collection.assign_policy_profiles_multiple_entities(random_image_instances,
conditions=[{'name': 'dotnet/dotnet-20-rhel7'},
{'name': 'dotnet/dotnet-20-runtime-rhel7'}],
'OpenSCAP profile')
"""
map(self.assigned_policy_profiles.add, policy_profile_names)
self._assign_or_unassign_policy_profiles_multiple_entities(
entities, True, conditions, *policy_profile_names)
def unassign_policy_profiles_multiple_entities(self, entities, conditions,
*policy_profile_names):
""" UnAssign Policy Profiles to selected entity's on Collection All view
Args:
entities: list of entity's from collection table
policy_profile_names: :py:class:`str` with Policy Profile names. After Control/Explorer
coverage goes in, PolicyProfile objects will be also passable.
conditions: entities should match to
Ex:
collection = appliance.collections.container_images
# unassign OpenSCAP policy
collection.unassign_policy_profiles_multiple_entities(random_image_instances,
conditions=[{'name': 'dotnet/dotnet-20-rhel7'},
{'name': 'dotnet/dotnet-20-runtime-rhel7'}],
'OpenSCAP profile')
"""
for pp_name in policy_profile_names:
try:
self.assigned_policy_profiles.remove(pp_name)
except KeyError:
pass
self._assign_or_unassign_policy_profiles_multiple_entities(
entities, False, conditions, *policy_profile_names)
def _assign_or_unassign_policy_profiles_multiple_entities(
self, entities, assign, conditions, *policy_profile_names):
"""DRY function for managing policy profiles.
See :py:func:`assign_policy_profiles_multiple_entities`
and :py:func:`unassign_policy_profiles_multiple_entities`
Args:
entities: list of entity's from collection table
assign: Whether to assign or unassign.
policy_profile_names: :py:class:`str` with Policy Profile names.
conditions: entities should match to
"""
view = navigate_to(self, 'All')
# set item per page for maximum value in order to avoid paging,
# that will cancel the already check entity's
items_per_page = view.paginator.items_per_page
view.paginator.set_items_per_page(1000)
# check the entity's on collection ALL view
view.entities.apply(func=lambda e: e.check(), conditions=conditions)
wait_for(lambda: view.toolbar.policy.is_enabled, num_sec=5,
message='Policy drop down menu is disabled after checking some entities')
view.toolbar.policy.item_select('Manage Policies')
# get the object of the Manage Policies view
manage_policies_view = self.create_view(navigator.get_class(self, 'ManagePolicies').VIEW)
policy_changed = False
for policy_profile in policy_profile_names:
if assign:
policy_changed = manage_policies_view.policy_profiles.fill(
manage_policies_view.policy_profiles.CheckNode([policy_profile])
) or policy_changed
else:
policy_changed = manage_policies_view.policy_profiles.fill(
manage_policies_view.policy_profiles.UncheckNode([policy_profile])
) or policy_changed
if policy_changed:
manage_policies_view.save.click()
else:
manage_policies_view.cancel.click()
view.flash.assert_no_error()
# return the previous number of items per page
view.paginator.set_items_per_page(items_per_page)
@navigator.register(PolicyProfileAssignable, 'ManagePoliciesFromDetails')
class ManagePoliciesFromDetails(CFMENavigateStep):
VIEW = ManagePoliciesView
prerequisite = NavigateToSibling('Details')
def step(self):
self.prerequisite_view.toolbar.policy.item_select('Manage Policies')
@navigator.register(PolicyProfileAssignable, 'ManagePolicies')
class ManagePolicies(CFMENavigateStep):
VIEW = ManagePoliciesView
prerequisite = NavigateToSibling('All')
def step(self):
self.prerequisite_view.entities.get_entity(name=self.obj.name, surf_pages=True).check()
self.prerequisite_view.toolbar.policy.item_select('Manage Policies')
class TagPageView(BaseLoggedInPage):
"""Class represents common tag page in CFME UI"""
title = Text('#explorer_title_text')
table_title = Text('//div[@id="tab_div"]/h3')
@View.nested
class form(View): # noqa
tags = Table("//div[@id='assignments_div']//table")
tag_category = BootstrapSelect(id='tag_cat')
tag_name = BootstrapSelect(id='tag_add')
entities = View.nested(BaseNonInteractiveEntitiesView)
save = Button('Save')
reset = Button('Reset')
cancel = Button('Cancel')
@property
def is_displayed(self):
return (
self.table_title.text == 'Tag Assignment' and
self.form.tags.is_displayed
)
class WidgetasticTaggable(object):
"""
This class can be inherited by any class that honors tagging.
Class should have following
* 'Details' navigation
* 'Details' view should have entities.smart_management SummaryTable widget
* 'EditTags' navigation
* 'EditTags' view should have nested 'form' view with 'tags' table widget
* Suggest using class cfme.common.TagPageView as view for 'EditTags' nav
This class provides functionality to assign and unassigned tags for page models with
standardized widgetastic views
"""
def add_tag(self, category=None, tag=None, cancel=False, reset=False, details=True):
""" Add tag to tested item
Args:
category: category(str)
tag: tag(str) or Tag object
cancel: set True to cancel tag assigment
reset: set True to reset already set up tag
details (bool): set False if tag should be added for list selection,
default is details page
"""
if details:
view = navigate_to(self, 'EditTagsFromDetails')
else:
view = navigate_to(self, 'EditTags')
if isinstance(tag, Tag):
category = tag.category.display_name
tag = tag.display_name
# Handle nested view.form and where the view contains form widgets
try:
updated = view.form.fill({
"tag_category": '{} *'.format(category),
"tag_name": tag
})
except NoSuchElementException:
updated = view.form.fill({
"tag_category": category,
"tag_name": tag
})
# In case if field is not updated cancel the edition
if not updated:
cancel = True
self._tags_action(view, cancel, reset)
def add_tags(self, tags):
"""Add multiple tags
Args:
tags: pass dict with category name as key, and tag as value,
or pass list with tag objects
"""
if isinstance(tags, dict):
for category, tag in tags.items():
self.add_tag(category=category, tag=tag)
elif isinstance(tags, (list, tuple)):
for tag in tags:
self.add_tag(tag=tag)
def remove_tag(self, category=None, tag=None, cancel=False, reset=False, details=True):
""" Remove tag of tested item
Args:
category: category(str)
tag: tag(str) or Tag object
cancel: set True to cancel tag deletion
reset: set True to reset tag changes
details (bool): set False if tag should be added for list selection,
default is details page
"""
if details:
view = navigate_to(self, 'EditTagsFromDetails')
else:
view = navigate_to(self, 'EditTags')
if isinstance(tag, Tag):
category = tag.category.display_name
tag = tag.display_name
try:
row = view.form.tags.row(category="{} *".format(category), assigned_value=tag)
except RowNotFound:
row = view.form.tags.row(category=category, assigned_value=tag)
row[0].click()
self._tags_action(view, cancel, reset)
def remove_tags(self, tags):
"""Remove multiple of tags
Args:
tags: pass dict with category name as key, and tag as value,
or pass list with tag objects
"""
if isinstance(tags, dict):
for category, tag in tags.items():
self.remove_tag(category=category, tag=tag)
elif isinstance(tags, (list, tuple)):
for tag in tags:
self.remove_tag(tag=tag)
def get_tags(self, tenant="My Company Tags"):
""" Get list of tags assigned to item.
Details entities should have smart_management widget
For vm, providers, and other like pages 'SummaryTable' widget should be used,
for user, group like pages(no tables on details page) use 'SummaryForm'
Args:
tenant: string, tags tenant, default is "My Company Tags"
Returns: :py:class:`list` List of Tag objects
"""
view = navigate_to(self, 'Details')
tags = []
entities = view.entities
if hasattr(entities, 'smart_management'):
tag_table = entities.smart_management
else:
tag_table = entities.summary('Smart Management')
tags_text = tag_table.get_text_of(tenant)
if tags_text != 'No {} have been assigned'.format(tenant):
for tag in list(tags_text):
tag_category, tag_name = tag.split(':')
tags.append(Tag(category=Category(display_name=tag_category),
display_name=tag_name.strip()))
return tags
def _tags_action(self, view, cancel, reset):
""" Actions on edit tags page
Args:
view: View to use these actions(tag view)
cancel: Set True to cancel all changes, will redirect to details page
reset: Set True to reset all changes, edit tag page should be opened
"""
if reset:
view.form.reset.click()
view.flash.assert_message('All changes have been reset')
if cancel:
view.form.cancel.click()
view.flash.assert_success_message('Tag Edit was cancelled by the user')
if not reset and not cancel:
view.form.save.click()
view.flash.assert_success_message('Tag edits were successfully saved')
@navigator.register(WidgetasticTaggable, 'EditTagsFromDetails')
class EditTagsFromDetails(CFMENavigateStep):
VIEW = TagPageView
prerequisite = NavigateToSibling('Details')
def step(self):
self.prerequisite_view.toolbar.policy.item_select('Edit Tags')
@navigator.register(WidgetasticTaggable, 'EditTags')
class EditTagsFromListCollection(CFMENavigateStep):
VIEW = TagPageView
def prerequisite(self):
if isinstance(self.obj, BaseCollection) or not isinstance(self.obj, BaseEntity):
return navigate_to(self.obj, 'All')
else:
return navigate_to(self.obj.parent, 'All')
def step(self, **kwargs):
"""
kwargs: pass an entities objects or entities names
Return: navigation step
"""
if kwargs:
for _, entity in kwargs.items():
name = entity.name if isinstance(entity, BaseEntity) else entity
self.prerequisite_view.entities.get_entity(
surf_pages=True, name=name).check()
else:
self.prerequisite_view.entities.get_entity(surf_pages=True, name=self.obj.name).check()
self.prerequisite_view.toolbar.policy.item_select('Edit Tags')
class Validatable(object):
"""Mixin for various validations. Requires the class to be also :py:class:`Taggable`.
:var :py:attr:`property_tuples`: Tuples which first value is the provider class's attribute
name, the second value is provider's UI summary page field key. Should have values in
child classes.
"""
property_tuples = []
def validate_properties(self):
"""Validation method which checks whether class attributes, which were used during creation
of provider, are correctly displayed in Properties section of provider UI.
The maps between class attribute and UI property is done via 'property_tuples' variable.
Fails if some property does not match.
"""
self.load_details(refresh=False)
for property_tuple in self.property_tuples:
expected_value = str(getattr(self, property_tuple[0], ''))
shown_value = self.get_detail("Properties", property_tuple[1])
assert expected_value == shown_value,\
("Property '{}' has wrong value, expected '{}' but was '{}'"
.format(property_tuple, expected_value, shown_value))
def validate_tags(self, reference_tags):
"""Validation method which check tagging between UI and provided reference_tags.
To use this method, `self`/`caller` should be extended with `Taggable` class
Args:
reference_tags: If you want to compare user input with UI, pass user input
as `reference_tags`
"""
if reference_tags and not isinstance(reference_tags, list):
raise KeyError("'reference_tags' should be an instance of list")
tags = self.get_tags()
# Verify tags
assert len(tags) == len(reference_tags), \
("Tags count between Provided and UI mismatch, expected '{}' but was '{}'"
.format(reference_tags, tags))
for ref_tag in reference_tags:
found = False
for tag in tags:
if ref_tag.category.display_name == tag.category.display_name \
and ref_tag.display_name == tag.display_name:
found = True
assert found, ("Tag '{}' not found in UI".format(ref_tag))
class TopologyMixin(object):
"""Use this mixin to have simple access to the Topology page.
To use this `TopologyMixin` you have to implement `load_topology_page`
function, which should take to topology page
Sample usage:
.. code-block:: python
# You can retrieve the elements details as it is in the UI
topology.elements # => 'hostname'
# You can do actions on topology page
topology.display_names.enable()
topology.display_names.disable()
topology.display_names.is_enabled
# You can do actions on topology search box
topology.search_box.text(text='hello')
topology.search_box.text(text='hello', submit=False)
topology.search_box.submit()
topology.search_box.clear()
# You can get legends and can perform actions
topology.legends
topology.pod.name
topology.pod.is_active
topology.pod.set_active()
# You can get elements, element parents and children
topology.elements
topology.elements[0].parents
topology.elements[0].children
topology.elements[0].double_click()
topology.elements[0].is_displayed()
"""
# @cached_property
# def topology(self):
# return Topology(self)
class UtilizationMixin(object):
"""Use this mixin to have simple access to the Utilization information of an object.
Requires that the class(page) has ``load_details(refresh)`` method
and ``taggable_type`` should be defined.
All the chart names from the UI are "attributized".
Sample usage:
.. code-block:: python
# You can list available charts
page.utilization.charts # => '[ 'jvm_heap_usage_bytes','web_sessions','transactions']'
# You can get the data from chart
page.utilization.jvm_heap_usage_bytes.list_data_chart() # => returns data as list
# You can get the data from table
provider.utilization.jvm_heap_usage_bytes.list_data_table() # => returns data as list
# You can get the data from wrapanapi
page.utilization.jvm_heap_usage_bytes.list_data_mgmt() # => returns data as list
# You can change chart option
page.utilization.jvm_non_heap_usage_bytes.option.set_by_visible_text(op_interval='Daily')
# You can list available ledgends
page.utilization.jvm_non_heap_usage_bytes.legends
# You can enable/disable legends
page.utilization.jvm_non_heap_usage_bytes.committed.set_active(active=False) # => Disables
page.utilization.jvm_non_heap_usage_bytes.committed.set_active(active=True) # => Enables
"""
# @cached_property
# def utilization(self):
# return Utilization(self)
|
nischu7/paramiko
|
refs/heads/master
|
demos/demo.py
|
1
|
#!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
import base64
from binascii import hexlify
import getpass
import os
import select
import socket
import sys
import time
import traceback
import paramiko
import interactive
def agent_auth(transport, username):
"""
Attempt to authenticate to the given transport using any of the private
keys available from an SSH agent.
"""
agent = paramiko.Agent()
agent_keys = agent.get_keys()
if len(agent_keys) == 0:
return
for key in agent_keys:
print('Trying ssh-agent key %s' % hexlify(key.get_fingerprint()).decode()),
try:
transport.auth_publickey(username, key)
print('... success!')
return
except paramiko.SSHException:
print('... nope.')
def manual_auth(username, hostname):
default_auth = 'p'
auth = input('Auth by (p)assword, (r)sa key, or (d)ss key? [%s] ' % default_auth)
if len(auth) == 0:
auth = default_auth
if auth == 'r':
default_path = os.path.join(os.environ['HOME'], '.ssh', 'id_rsa')
path = input('RSA key [%s]: ' % default_path)
if len(path) == 0:
path = default_path
try:
key = paramiko.RSAKey.from_private_key_file(path)
except paramiko.PasswordRequiredException:
password = getpass.getpass('RSA key password: ')
key = paramiko.RSAKey.from_private_key_file(path, password)
t.auth_publickey(username, key)
elif auth == 'd':
default_path = os.path.join(os.environ['HOME'], '.ssh', 'id_dsa')
path = input('DSS key [%s]: ' % default_path)
if len(path) == 0:
path = default_path
try:
key = paramiko.DSSKey.from_private_key_file(path)
except paramiko.PasswordRequiredException:
password = getpass.getpass('DSS key password: ')
key = paramiko.DSSKey.from_private_key_file(path, password)
t.auth_publickey(username, key)
else:
pw = getpass.getpass('Password for %s@%s: ' % (username, hostname))
t.auth_password(username, pw)
# setup logging
paramiko.util.log_to_file('demo.log')
username = ''
if len(sys.argv) > 1:
hostname = sys.argv[1]
if hostname.find('@') >= 0:
username, hostname = hostname.split('@')
else:
hostname = input('Hostname: ')
if len(hostname) == 0:
print('*** Hostname required.')
sys.exit(1)
port = 22
if hostname.find(':') >= 0:
hostname, portstr = hostname.split(':')
port = int(portstr)
# now connect
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((hostname, port))
except Exception as e:
print('*** Connect failed: ' + str(e))
traceback.print_exc()
sys.exit(1)
try:
t = paramiko.Transport(sock)
try:
t.start_client()
except paramiko.SSHException:
print('*** SSH negotiation failed.')
sys.exit(1)
try:
keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts'))
except IOError:
try:
keys = paramiko.util.load_host_keys(os.path.expanduser('~/ssh/known_hosts'))
except IOError:
print('*** Unable to open host keys file')
keys = {}
# check server's host key -- this is important.
key = t.get_remote_server_key()
if not hostname in keys:
print('*** WARNING: Unknown host key!')
elif not keys[hostname].has_key(key.get_name()):
print('*** WARNING: Unknown host key!')
elif keys[hostname][key.get_name()] != key:
print('*** WARNING: Host key has changed!!!')
sys.exit(1)
else:
print('*** Host key OK.')
# get username
if username == '':
default_username = getpass.getuser()
username = input('Username [%s]: ' % default_username)
if len(username) == 0:
username = default_username
agent_auth(t, username)
if not t.is_authenticated():
manual_auth(username, hostname)
if not t.is_authenticated():
print('*** Authentication failed. :(')
t.close()
sys.exit(1)
chan = t.open_session()
chan.get_pty()
chan.invoke_shell()
print('*** Here we go!')
print()
interactive.interactive_shell(chan)
chan.close()
t.close()
except Exception as e:
print('*** Caught exception: ' + str(e.__class__) + ': ' + str(e))
traceback.print_exc()
try:
t.close()
except:
pass
sys.exit(1)
|
ver228/tierpsy-tracker
|
refs/heads/master
|
tierpsy/helper/misc/misc.py
|
1
|
import shutil
import sys
import os
import tables
import warnings
from threading import Thread
from queue import Queue, Empty
from tierpsy import AUX_FILES_DIR
# get the correct path for ffmpeg. First we look in the aux
# directory, otherwise we look in the system path.
def get_local_or_sys_path(file_name):
file_source = os.path.join(AUX_FILES_DIR, file_name)
if not os.path.exists(file_source):
file_source = shutil.which(file_name)
if not file_source:
raise FileNotFoundError('command not found: %s' % file_name)
return file_source
try:
if sys.platform == 'win32':
FFMPEG_CMD = get_local_or_sys_path('ffmpeg.exe')
elif sys.platform == 'darwin':
FFMPEG_CMD = get_local_or_sys_path('ffmpeg22')
elif sys.platform == 'linux':
FFMPEG_CMD = get_local_or_sys_path('ffmpeg')
except FileNotFoundError:
FFMPEG_CMD = ''
warnings.warn('ffmpeg do not found. This might cause problems while reading .mjpeg files.')
# get the correct path for ffprobe. First we look in the aux
# directory, otherwise we look in the system path.
try:
if os.name == 'nt':
FFPROBE_CMD = get_local_or_sys_path('ffprobe.exe')
else:
FFPROBE_CMD = get_local_or_sys_path('ffprobe')
except FileNotFoundError:
FFPROBE_CMD = ''
warnings.warn('ffprobe do not found. This might cause problems while extracting the raw videos timestamps.')
WLAB = {'U': 0, 'WORM': 1, 'WORMS': 2, 'BAD': 3, 'GOOD_SKE': 4}
# pytables filters.
TABLE_FILTERS = tables.Filters(
complevel=5,
complib='zlib',
shuffle=True,
fletcher32=True)
def print_flush(msg):
print(msg)
sys.stdout.flush()
class ReadEnqueue():
def __init__(self, pipe, timeout=-1):
def _target_fun(out, queue):
for line in iter(out.readline, b''):
queue.put(line)
out.close
self.timeout = timeout
self.queue = Queue()
self.thread = Thread( target=_target_fun, args=(pipe, self.queue))
self.thread.start()
def read(self):
try:
if self.timeout > 0:
line = self.queue.get(timeout=self.timeout)
else:
line = self.queue.get_nowait()
line = line.decode("utf-8")
except Empty:
line = None
return line
|
tldavies/RackHD
|
refs/heads/master
|
test/tests/rackhd20/test_rackhd20_api_catalogs.py
|
1
|
'''
Copyright 2016, EMC, Inc.
Author(s):
George Paulos
'''
import os
import sys
import subprocess
sys.path.append(subprocess.check_output("git rev-parse --show-toplevel", shell=True).rstrip("\n") + "/test/common")
import fit_common
# Local methods
NODECATALOG = fit_common.node_select()
# Select test group here using @attr
from nose.plugins.attrib import attr
@attr(all=True, regression=True, smoke=True)
class rackhd20_api_catalogs(fit_common.unittest.TestCase):
def test_api_20_catalogs(self):
api_data = fit_common.rackhdapi('/api/2.0/catalogs')
self.assertEqual(api_data['status'], 200,
'Incorrect HTTP return code, expected 200, got:' + str(api_data['status']))
self.assertNotEqual(len(api_data['json']), 0, "Error, no catalog")
for item in api_data['json']:
# check required fields
for subitem in ['node', 'id', 'source', 'data']:
if fit_common.VERBOSITY >= 2:
print "Checking:", item['id'], subitem
self.assertIn(subitem, item, subitem + ' field error')
def test_api_20_nodes_ID_catalogs(self):
# iterate through nodes
for nodeid in NODECATALOG:
api_data = fit_common.rackhdapi("/api/2.0/nodes/" + nodeid + "/catalogs")
self.assertEqual(api_data['status'], 200, 'Incorrect HTTP return code, expected 200, got:' + str(api_data['status']))
for item in api_data['json']:
if fit_common.VERBOSITY >= 2:
print "Checking source:", item['source']
self.assertNotEqual(item, '', 'Empty JSON Field')
sourcedata = fit_common.rackhdapi("/api/2.0/nodes/" + nodeid +
"/catalogs/" + item['source'])
self.assertGreater(len(sourcedata['json']['id']), 0, 'id field error')
self.assertGreater(len(sourcedata['json']['node']), 0, 'node field error')
self.assertGreater(len(sourcedata['json']['source']), 0, 'source field error')
self.assertGreater(len(sourcedata['json']['updatedAt']), 0, 'updatedAt field error')
self.assertGreater(len(sourcedata['json']['createdAt']), 0, 'createdAt field error')
def test_api_20_nodes_ID_catalogs_source(self):
# iterate through sources
api_data = fit_common.rackhdapi('/api/2.0/catalogs')
for sourceid in api_data['json']:
# iterate through nodes
for nodeid in NODECATALOG:
api_data = fit_common.rackhdapi("/api/2.0/nodes/" + nodeid + "/catalogs/" + sourceid['source'])
self.assertIn(api_data['status'], [200, 404], 'Incorrect HTTP return code, expected 200, got:' + str(api_data['status']))
if __name__ == '__main__':
fit_common.unittest.main()
|
redbo/swift
|
refs/heads/master
|
swift/container/sync.py
|
6
|
# Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import collections
import errno
import os
import uuid
from swift import gettext_ as _
from time import ctime, time
from random import choice, random
from struct import unpack_from
from eventlet import sleep, Timeout
import swift.common.db
from swift.common.db import DatabaseConnectionError
from swift.container.backend import ContainerBroker
from swift.container.sync_store import ContainerSyncStore
from swift.common.container_sync_realms import ContainerSyncRealms
from swift.common.internal_client import (
delete_object, put_object, head_object,
InternalClient, UnexpectedResponse)
from swift.common.exceptions import ClientException
from swift.common.ring import Ring
from swift.common.ring.utils import is_local_device
from swift.common.utils import (
clean_content_type, config_true_value,
FileLikeIter, get_logger, hash_path, quote, urlparse, validate_sync_to,
whataremyips, Timestamp, decode_timestamps)
from swift.common.daemon import Daemon
from swift.common.http import HTTP_UNAUTHORIZED, HTTP_NOT_FOUND
from swift.common.wsgi import ConfigString
# The default internal client config body is to support upgrades without
# requiring deployment of the new /etc/swift/internal-client.conf
ic_conf_body = """
[DEFAULT]
# swift_dir = /etc/swift
# user = swift
# You can specify default log routing here if you want:
# log_name = swift
# log_facility = LOG_LOCAL0
# log_level = INFO
# log_address = /dev/log
#
# comma separated list of functions to call to setup custom log handlers.
# functions get passed: conf, name, log_to_console, log_route, fmt, logger,
# adapted_logger
# log_custom_handlers =
#
# If set, log_udp_host will override log_address
# log_udp_host =
# log_udp_port = 514
#
# You can enable StatsD logging here:
# log_statsd_host =
# log_statsd_port = 8125
# log_statsd_default_sample_rate = 1.0
# log_statsd_sample_rate_factor = 1.0
# log_statsd_metric_prefix =
[pipeline:main]
pipeline = catch_errors proxy-logging cache proxy-server
[app:proxy-server]
use = egg:swift#proxy
# See proxy-server.conf-sample for options
[filter:cache]
use = egg:swift#memcache
# See proxy-server.conf-sample for options
[filter:proxy-logging]
use = egg:swift#proxy_logging
[filter:catch_errors]
use = egg:swift#catch_errors
# See proxy-server.conf-sample for options
""".lstrip()
class ContainerSync(Daemon):
"""
Daemon to sync syncable containers.
This is done by scanning the local devices for container databases and
checking for x-container-sync-to and x-container-sync-key metadata values.
If they exist, newer rows since the last sync will trigger PUTs or DELETEs
to the other container.
The actual syncing is slightly more complicated to make use of the three
(or number-of-replicas) main nodes for a container without each trying to
do the exact same work but also without missing work if one node happens to
be down.
Two sync points are kept per container database. All rows between the two
sync points trigger updates. Any rows newer than both sync points cause
updates depending on the node's position for the container (primary nodes
do one third, etc. depending on the replica count of course). After a sync
run, the first sync point is set to the newest ROWID known and the second
sync point is set to newest ROWID for which all updates have been sent.
An example may help. Assume replica count is 3 and perfectly matching
ROWIDs starting at 1.
First sync run, database has 6 rows:
* SyncPoint1 starts as -1.
* SyncPoint2 starts as -1.
* No rows between points, so no "all updates" rows.
* Six rows newer than SyncPoint1, so a third of the rows are sent
by node 1, another third by node 2, remaining third by node 3.
* SyncPoint1 is set as 6 (the newest ROWID known).
* SyncPoint2 is left as -1 since no "all updates" rows were synced.
Next sync run, database has 12 rows:
* SyncPoint1 starts as 6.
* SyncPoint2 starts as -1.
* The rows between -1 and 6 all trigger updates (most of which
should short-circuit on the remote end as having already been
done).
* Six more rows newer than SyncPoint1, so a third of the rows are
sent by node 1, another third by node 2, remaining third by node
3.
* SyncPoint1 is set as 12 (the newest ROWID known).
* SyncPoint2 is set as 6 (the newest "all updates" ROWID).
In this way, under normal circumstances each node sends its share of
updates each run and just sends a batch of older updates to ensure nothing
was missed.
:param conf: The dict of configuration values from the [container-sync]
section of the container-server.conf
:param container_ring: If None, the <swift_dir>/container.ring.gz will be
loaded. This is overridden by unit tests.
"""
def __init__(self, conf, container_ring=None, logger=None):
#: The dict of configuration values from the [container-sync] section
#: of the container-server.conf.
self.conf = conf
#: Logger to use for container-sync log lines.
self.logger = logger or get_logger(conf, log_route='container-sync')
#: Path to the local device mount points.
self.devices = conf.get('devices', '/srv/node')
#: Indicates whether mount points should be verified as actual mount
#: points (normally true, false for tests and SAIO).
self.mount_check = config_true_value(conf.get('mount_check', 'true'))
#: Minimum time between full scans. This is to keep the daemon from
#: running wild on near empty systems.
self.interval = int(conf.get('interval', 300))
#: Maximum amount of time to spend syncing a container before moving on
#: to the next one. If a container sync hasn't finished in this time,
#: it'll just be resumed next scan.
self.container_time = int(conf.get('container_time', 60))
#: ContainerSyncCluster instance for validating sync-to values.
self.realms_conf = ContainerSyncRealms(
os.path.join(
conf.get('swift_dir', '/etc/swift'),
'container-sync-realms.conf'),
self.logger)
#: The list of hosts we're allowed to send syncs to. This can be
#: overridden by data in self.realms_conf
self.allowed_sync_hosts = [
h.strip()
for h in conf.get('allowed_sync_hosts', '127.0.0.1').split(',')
if h.strip()]
self.http_proxies = [
a.strip()
for a in conf.get('sync_proxy', '').split(',')
if a.strip()]
#: ContainerSyncStore instance for iterating over synced containers
self.sync_store = ContainerSyncStore(self.devices,
self.logger,
self.mount_check)
#: Number of containers with sync turned on that were successfully
#: synced.
self.container_syncs = 0
#: Number of successful DELETEs triggered.
self.container_deletes = 0
#: Number of successful PUTs triggered.
self.container_puts = 0
#: Number of containers whose sync has been turned off, but
#: are not yet cleared from the sync store.
self.container_skips = 0
#: Number of containers that had a failure of some type.
self.container_failures = 0
#: Per container stats. These are collected per container.
#: puts - the number of puts that were done for the container
#: deletes - the number of deletes that were fot the container
#: bytes - the total number of bytes transferred per the container
self.container_stats = collections.defaultdict(int)
self.container_stats.clear()
#: Time of last stats report.
self.reported = time()
self.swift_dir = conf.get('swift_dir', '/etc/swift')
#: swift.common.ring.Ring for locating containers.
self.container_ring = container_ring or Ring(self.swift_dir,
ring_name='container')
bind_ip = conf.get('bind_ip', '0.0.0.0')
self._myips = whataremyips(bind_ip)
self._myport = int(conf.get('bind_port', 6201))
swift.common.db.DB_PREALLOCATION = \
config_true_value(conf.get('db_preallocation', 'f'))
self.conn_timeout = float(conf.get('conn_timeout', 5))
request_tries = int(conf.get('request_tries') or 3)
internal_client_conf_path = conf.get('internal_client_conf_path')
if not internal_client_conf_path:
self.logger.warning(
_('Configuration option internal_client_conf_path not '
'defined. Using default configuration, See '
'internal-client.conf-sample for options'))
internal_client_conf = ConfigString(ic_conf_body)
else:
internal_client_conf = internal_client_conf_path
try:
self.swift = InternalClient(
internal_client_conf, 'Swift Container Sync', request_tries)
except IOError as err:
if err.errno != errno.ENOENT:
raise
raise SystemExit(
_('Unable to load internal client from config: '
'%(conf)r (%(error)s)')
% {'conf': internal_client_conf_path, 'error': err})
def run_forever(self, *args, **kwargs):
"""
Runs container sync scans until stopped.
"""
sleep(random() * self.interval)
while True:
begin = time()
for path in self.sync_store.synced_containers_generator():
self.container_stats.clear()
self.container_sync(path)
if time() - self.reported >= 3600: # once an hour
self.report()
elapsed = time() - begin
if elapsed < self.interval:
sleep(self.interval - elapsed)
def run_once(self, *args, **kwargs):
"""
Runs a single container sync scan.
"""
self.logger.info(_('Begin container sync "once" mode'))
begin = time()
for path in self.sync_store.synced_containers_generator():
self.container_sync(path)
if time() - self.reported >= 3600: # once an hour
self.report()
self.report()
elapsed = time() - begin
self.logger.info(
_('Container sync "once" mode completed: %.02fs'), elapsed)
def report(self):
"""
Writes a report of the stats to the logger and resets the stats for the
next report.
"""
self.logger.info(
_('Since %(time)s: %(sync)s synced [%(delete)s deletes, %(put)s '
'puts], %(skip)s skipped, %(fail)s failed'),
{'time': ctime(self.reported),
'sync': self.container_syncs,
'delete': self.container_deletes,
'put': self.container_puts,
'skip': self.container_skips,
'fail': self.container_failures})
self.reported = time()
self.container_syncs = 0
self.container_deletes = 0
self.container_puts = 0
self.container_skips = 0
self.container_failures = 0
def container_report(self, start, end, sync_point1, sync_point2, info,
max_row):
self.logger.info(_('Container sync report: %(container)s, '
'time window start: %(start)s, '
'time window end: %(end)s, '
'puts: %(puts)s, '
'posts: %(posts)s, '
'deletes: %(deletes)s, '
'bytes: %(bytes)s, '
'sync_point1: %(point1)s, '
'sync_point2: %(point2)s, '
'total_rows: %(total)s'),
{'container': '%s/%s' % (info['account'],
info['container']),
'start': start,
'end': end,
'puts': self.container_stats['puts'],
'posts': 0,
'deletes': self.container_stats['deletes'],
'bytes': self.container_stats['bytes'],
'point1': sync_point1,
'point2': sync_point2,
'total': max_row})
def container_sync(self, path):
"""
Checks the given path for a container database, determines if syncing
is turned on for that database and, if so, sends any updates to the
other container.
:param path: the path to a container db
"""
broker = None
try:
broker = ContainerBroker(path)
# The path we pass to the ContainerBroker is a real path of
# a container DB. If we get here, however, it means that this
# path is linked from the sync_containers dir. In rare cases
# of race or processes failures the link can be stale and
# the get_info below will raise a DB doesn't exist exception
# In this case we remove the stale link and raise an error
# since in most cases the db should be there.
try:
info = broker.get_info()
except DatabaseConnectionError as db_err:
if str(db_err).endswith("DB doesn't exist"):
self.sync_store.remove_synced_container(broker)
raise
x, nodes = self.container_ring.get_nodes(info['account'],
info['container'])
for ordinal, node in enumerate(nodes):
if is_local_device(self._myips, self._myport,
node['ip'], node['port']):
break
else:
return
if not broker.is_deleted():
sync_to = None
user_key = None
sync_point1 = info['x_container_sync_point1']
sync_point2 = info['x_container_sync_point2']
for key, (value, timestamp) in broker.metadata.items():
if key.lower() == 'x-container-sync-to':
sync_to = value
elif key.lower() == 'x-container-sync-key':
user_key = value
if not sync_to or not user_key:
self.container_skips += 1
self.logger.increment('skips')
return
err, sync_to, realm, realm_key = validate_sync_to(
sync_to, self.allowed_sync_hosts, self.realms_conf)
if err:
self.logger.info(
_('ERROR %(db_file)s: %(validate_sync_to_err)s'),
{'db_file': str(broker),
'validate_sync_to_err': err})
self.container_failures += 1
self.logger.increment('failures')
return
start_at = time()
stop_at = start_at + self.container_time
next_sync_point = None
sync_stage_time = start_at
try:
while time() < stop_at and sync_point2 < sync_point1:
rows = broker.get_items_since(sync_point2, 1)
if not rows:
break
row = rows[0]
if row['ROWID'] > sync_point1:
break
# This node will only initially sync out one third
# of the objects (if 3 replicas, 1/4 if 4, etc.)
# and will skip problematic rows as needed in case of
# faults.
# This section will attempt to sync previously skipped
# rows in case the previous attempts by any of the
# nodes didn't succeed.
if not self.container_sync_row(
row, sync_to, user_key, broker, info, realm,
realm_key):
if not next_sync_point:
next_sync_point = sync_point2
sync_point2 = row['ROWID']
broker.set_x_container_sync_points(None, sync_point2)
if next_sync_point:
broker.set_x_container_sync_points(None,
next_sync_point)
else:
next_sync_point = sync_point2
sync_stage_time = time()
while sync_stage_time < stop_at:
rows = broker.get_items_since(sync_point1, 1)
if not rows:
break
row = rows[0]
key = hash_path(info['account'], info['container'],
row['name'], raw_digest=True)
# This node will only initially sync out one third of
# the objects (if 3 replicas, 1/4 if 4, etc.).
# It'll come back around to the section above
# and attempt to sync previously skipped rows in case
# the other nodes didn't succeed or in case it failed
# to do so the first time.
if unpack_from('>I', key)[0] % \
len(nodes) == ordinal:
self.container_sync_row(
row, sync_to, user_key, broker, info, realm,
realm_key)
sync_point1 = row['ROWID']
broker.set_x_container_sync_points(sync_point1, None)
sync_stage_time = time()
self.container_syncs += 1
self.logger.increment('syncs')
finally:
self.container_report(start_at, sync_stage_time,
sync_point1,
next_sync_point,
info, broker.get_max_row())
except (Exception, Timeout):
self.container_failures += 1
self.logger.increment('failures')
self.logger.exception(_('ERROR Syncing %s'),
broker if broker else path)
def _update_sync_to_headers(self, name, sync_to, user_key,
realm, realm_key, method, headers):
"""
Updates container sync headers
:param name: The name of the object
:param sync_to: The URL to the remote container.
:param user_key: The X-Container-Sync-Key to use when sending requests
to the other container.
:param realm: The realm from self.realms_conf, if there is one.
If None, fallback to using the older allowed_sync_hosts
way of syncing.
:param realm_key: The realm key from self.realms_conf, if there
is one. If None, fallback to using the older
allowed_sync_hosts way of syncing.
:param method: HTTP method to create sig with
:param headers: headers to update with container sync headers
"""
if realm and realm_key:
nonce = uuid.uuid4().hex
path = urlparse(sync_to).path + '/' + quote(name)
sig = self.realms_conf.get_sig(method, path,
headers.get('x-timestamp', 0),
nonce, realm_key,
user_key)
headers['x-container-sync-auth'] = '%s %s %s' % (realm,
nonce,
sig)
else:
headers['x-container-sync-key'] = user_key
def _object_in_remote_container(self, name, sync_to, user_key,
realm, realm_key, timestamp):
"""
Performs head object on remote to eliminate extra remote put and
local get object calls
:param name: The name of the object in the updated row in the local
database triggering the sync update.
:param sync_to: The URL to the remote container.
:param user_key: The X-Container-Sync-Key to use when sending requests
to the other container.
:param realm: The realm from self.realms_conf, if there is one.
If None, fallback to using the older allowed_sync_hosts
way of syncing.
:param realm_key: The realm key from self.realms_conf, if there
is one. If None, fallback to using the older
allowed_sync_hosts way of syncing.
:param timestamp: last modified date of local object
:returns: True if object already exists in remote
"""
headers = {'x-timestamp': timestamp.internal}
self._update_sync_to_headers(name, sync_to, user_key, realm,
realm_key, 'HEAD', headers)
try:
metadata, _ = head_object(sync_to, name=name,
headers=headers,
proxy=self.select_http_proxy(),
logger=self.logger,
retries=0)
remote_ts = Timestamp(metadata.get('x-timestamp', 0))
self.logger.debug("remote obj timestamp %s local obj %s" %
(timestamp.internal, remote_ts.internal))
if timestamp <= remote_ts:
return True
# Object in remote should be updated
return False
except ClientException as http_err:
# Object not in remote
if http_err.http_status == 404:
return False
raise http_err
def container_sync_row(self, row, sync_to, user_key, broker, info,
realm, realm_key):
"""
Sends the update the row indicates to the sync_to container.
Update can be either delete or put.
:param row: The updated row in the local database triggering the sync
update.
:param sync_to: The URL to the remote container.
:param user_key: The X-Container-Sync-Key to use when sending requests
to the other container.
:param broker: The local container database broker.
:param info: The get_info result from the local container database
broker.
:param realm: The realm from self.realms_conf, if there is one.
If None, fallback to using the older allowed_sync_hosts
way of syncing.
:param realm_key: The realm key from self.realms_conf, if there
is one. If None, fallback to using the older
allowed_sync_hosts way of syncing.
:returns: True on success
"""
try:
start_time = time()
# extract last modified time from the created_at value
ts_data, ts_ctype, ts_meta = decode_timestamps(
row['created_at'])
if row['deleted']:
# when sync'ing a deleted object, use ts_data - this is the
# timestamp of the source tombstone
try:
headers = {'x-timestamp': ts_data.internal}
self._update_sync_to_headers(row['name'], sync_to,
user_key, realm, realm_key,
'DELETE', headers)
delete_object(sync_to, name=row['name'], headers=headers,
proxy=self.select_http_proxy(),
logger=self.logger,
timeout=self.conn_timeout)
except ClientException as err:
if err.http_status != HTTP_NOT_FOUND:
raise
self.container_deletes += 1
self.container_stats['deletes'] += 1
self.logger.increment('deletes')
self.logger.timing_since('deletes.timing', start_time)
else:
# when sync'ing a live object, use ts_meta - this is the time
# at which the source object was last modified by a PUT or POST
if self._object_in_remote_container(row['name'],
sync_to, user_key, realm,
realm_key, ts_meta):
return True
exc = None
# look up for the newest one
headers_out = {'X-Newest': True,
'X-Backend-Storage-Policy-Index':
str(info['storage_policy_index'])}
try:
source_obj_status, headers, body = \
self.swift.get_object(info['account'],
info['container'], row['name'],
headers=headers_out,
acceptable_statuses=(2, 4))
except (Exception, UnexpectedResponse, Timeout) as err:
headers = {}
body = None
exc = err
timestamp = Timestamp(headers.get('x-timestamp', 0))
if timestamp < ts_meta:
if exc:
raise exc
raise Exception(
_('Unknown exception trying to GET: '
'%(account)r %(container)r %(object)r'),
{'account': info['account'],
'container': info['container'],
'object': row['name']})
for key in ('date', 'last-modified'):
if key in headers:
del headers[key]
if 'etag' in headers:
headers['etag'] = headers['etag'].strip('"')
if 'content-type' in headers:
headers['content-type'] = clean_content_type(
headers['content-type'])
self._update_sync_to_headers(row['name'], sync_to, user_key,
realm, realm_key, 'PUT', headers)
put_object(sync_to, name=row['name'], headers=headers,
contents=FileLikeIter(body),
proxy=self.select_http_proxy(), logger=self.logger,
timeout=self.conn_timeout)
self.container_puts += 1
self.container_stats['puts'] += 1
self.container_stats['bytes'] += row['size']
self.logger.increment('puts')
self.logger.timing_since('puts.timing', start_time)
except ClientException as err:
if err.http_status == HTTP_UNAUTHORIZED:
self.logger.info(
_('Unauth %(sync_from)r => %(sync_to)r'),
{'sync_from': '%s/%s' %
(quote(info['account']), quote(info['container'])),
'sync_to': sync_to})
elif err.http_status == HTTP_NOT_FOUND:
self.logger.info(
_('Not found %(sync_from)r => %(sync_to)r \
- object %(obj_name)r'),
{'sync_from': '%s/%s' %
(quote(info['account']), quote(info['container'])),
'sync_to': sync_to, 'obj_name': row['name']})
else:
self.logger.exception(
_('ERROR Syncing %(db_file)s %(row)s'),
{'db_file': str(broker), 'row': row})
self.container_failures += 1
self.logger.increment('failures')
return False
except (Exception, Timeout) as err:
self.logger.exception(
_('ERROR Syncing %(db_file)s %(row)s'),
{'db_file': str(broker), 'row': row})
self.container_failures += 1
self.logger.increment('failures')
return False
return True
def select_http_proxy(self):
return choice(self.http_proxies) if self.http_proxies else None
|
nuclear-wizard/moose
|
refs/heads/devel
|
python/peacock/Input/ParamsByType.py
|
15
|
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
from PyQt5.QtWidgets import QWidget, QComboBox, QStackedWidget
from PyQt5.QtCore import pyqtSignal
from peacock.base.MooseWidget import MooseWidget
from peacock.utils import WidgetUtils
from .ParamsByGroup import ParamsByGroup
class ParamsByType(QWidget, MooseWidget):
"""
Has a QComboBox for the different allowed types.
On switching type a new ParamsByGroup is shown.
"""
needBlockList = pyqtSignal(list)
blockRenamed = pyqtSignal(object, str)
changed = pyqtSignal()
def __init__(self, block, type_block_map, **kwds):
"""
Constructor.
Input:
block[BlockInfo]: The block to show.
"""
super(ParamsByType, self).__init__(**kwds)
self.block = block
self.combo = QComboBox()
self.types = []
self.type_params_map = {}
self.type_block_map = type_block_map
self.table_stack = QStackedWidget()
self.type_table_map = {}
for t in sorted(self.block.types.keys()):
self.types.append(t)
params_list = []
for p in self.block.parameters_list:
params_list.append(self.block.parameters[p])
t_block = self.block.types[t]
for p in t_block.parameters_list:
params_list.append(t_block.parameters[p])
self.type_params_map[t] = params_list
self.combo.addItems(sorted(self.block.types.keys()))
self.combo.currentTextChanged.connect(self.setBlockType)
self.top_layout = WidgetUtils.addLayout(vertical=True)
self.top_layout.addWidget(self.combo)
self.top_layout.addWidget(self.table_stack)
self.setLayout(self.top_layout)
self.user_params = []
self.setDefaultBlockType()
self.setup()
def _syncUserParams(self, current, to):
"""
Sync user added parameters that are on the main block into
each type ParamsByGroup.
Input:
current[ParamsByGroup]: The current group parameter table
to[ParamsByGroup]: The new group parameter table
"""
ct = current.findTable("Main")
tot = to.findTable("Main")
if not ct or not tot or ct == tot:
return
tot.removeUserParams()
params = ct.getUserParams()
tot.addUserParams(params)
to.syncParamsFrom(current)
# Make sure the name parameter stays the same
idx = ct.findRow("Name")
if idx >= 0:
name = ct.item(idx, 1).text()
idx = tot.findRow("Name")
if idx >= 0:
tot.item(idx, 1).setText(name)
def currentType(self):
return self.combo.currentText()
def save(self):
"""
Look at the user params in self.block.parameters.
update the type tables
Save type on block
"""
t = self.getTable()
if t:
t.save()
self.block.setBlockType(self.combo.currentText())
def reset(self):
t = self.getTable()
t.reset()
def getOrCreateTypeTable(self, type_name):
"""
Gets the table for the type name or create it if it doesn't exist.
Input:
type_name[str]: Name of the type
Return:
ParamsByGroup: The parameters corresponding to the type
"""
t = self.type_table_map.get(type_name)
if t:
return t
t = ParamsByGroup(self.block, self.type_params_map.get(type_name, self.block.orderedParameters()), self.type_block_map)
t.needBlockList.connect(self.needBlockList)
t.blockRenamed.connect(self.blockRenamed)
t.changed.connect(self.changed)
self.type_table_map[type_name] = t
self.table_stack.addWidget(t)
return t
def setDefaultBlockType(self):
param = self.block.getParamInfo("type")
if param and param.value:
self.setBlockType(param.value)
elif self.block.types:
self.setBlockType(sorted(self.block.types.keys())[0])
def setBlockType(self, type_name):
if type_name not in self.block.types:
return
t = self.getOrCreateTypeTable(type_name)
t.updateWatchers()
self.combo.blockSignals(True)
self.combo.setCurrentText(type_name)
self.combo.blockSignals(False)
t.updateType(type_name)
current = self.table_stack.currentWidget()
self._syncUserParams(current, t)
self.table_stack.setCurrentWidget(t)
self.changed.emit()
def addUserParam(self, param):
t = self.table_stack.currentWidget()
t.addUserParam(param)
def setWatchedBlockList(self, path, children):
for i in range(self.table_stack.count()):
t = self.table_stack.widget(i)
t.setWatchedBlockList(path, children)
def updateWatchers(self):
for i in range(self.table_stack.count()):
t = self.table_stack.widget(i)
t.updateWatchers()
def getTable(self):
return self.table_stack.currentWidget()
def paramValue(self, name):
for i in range(self.table_stack.count()):
t = self.table_stack.widget(i)
if t.paramValue(name):
return t.paramValue(name)
|
Chilledheart/depot_tools
|
refs/heads/master
|
third_party/gsutil/gslib/commands/chacl.py
|
50
|
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
This module provides the chacl command to gsutil.
This command allows users to easily specify changes to access control lists.
"""
import random
import re
import time
from xml.dom import minidom
from boto.exception import GSResponseError
from boto.gs import acl
from gslib import name_expansion
from gslib.command import Command
from gslib.command import COMMAND_NAME
from gslib.command import COMMAND_NAME_ALIASES
from gslib.command import CONFIG_REQUIRED
from gslib.command import FILE_URIS_OK
from gslib.command import MAX_ARGS
from gslib.command import MIN_ARGS
from gslib.command import PROVIDER_URIS_OK
from gslib.command import SUPPORTED_SUB_ARGS
from gslib.command import URIS_START_ARG
from gslib.exception import CommandException
from gslib.help_provider import HELP_NAME
from gslib.help_provider import HELP_NAME_ALIASES
from gslib.help_provider import HELP_ONE_LINE_SUMMARY
from gslib.help_provider import HELP_TEXT
from gslib.help_provider import HELP_TYPE
from gslib.help_provider import HelpType
from gslib.util import NO_MAX
from gslib.util import Retry
class ChangeType(object):
USER = 'User'
GROUP = 'Group'
class AclChange(object):
"""Represents a logical change to an access control list."""
public_scopes = ['AllAuthenticatedUsers', 'AllUsers']
id_scopes = ['UserById', 'GroupById']
email_scopes = ['UserByEmail', 'GroupByEmail']
domain_scopes = ['GroupByDomain']
scope_types = public_scopes + id_scopes + email_scopes + domain_scopes
permission_shorthand_mapping = {
'R': 'READ',
'W': 'WRITE',
'FC': 'FULL_CONTROL',
}
def __init__(self, acl_change_descriptor, scope_type, logger):
"""Creates an AclChange object.
acl_change_descriptor: An acl change as described in chacl help.
scope_type: Either ChangeType.USER or ChangeType.GROUP, specifying the
extent of the scope.
logger: An instance of ThreadedLogger.
"""
self.logger = logger
self.identifier = ''
self.raw_descriptor = acl_change_descriptor
self._Parse(acl_change_descriptor, scope_type)
self._Validate()
def __str__(self):
return 'AclChange<{0}|{1}|{2}>'.format(self.scope_type, self.perm,
self.identifier)
def _Parse(self, change_descriptor, scope_type):
"""Parses an ACL Change descriptor."""
def _ClassifyScopeIdentifier(text):
re_map = {
'AllAuthenticatedUsers': r'^(AllAuthenticatedUsers|AllAuth)$',
'AllUsers': '^(AllUsers|All)$',
'Email': r'^.+@.+\..+$',
'Id': r'^[0-9A-Fa-f]{64}$',
'Domain': r'^[^@]+\..+$',
}
for type_string, regex in re_map.items():
if re.match(regex, text, re.IGNORECASE):
return type_string
if change_descriptor.count(':') != 1:
raise CommandException('{0} is an invalid change description.'
.format(change_descriptor))
scope_string, perm_token = change_descriptor.split(':')
perm_token = perm_token.upper()
if perm_token in self.permission_shorthand_mapping:
self.perm = self.permission_shorthand_mapping[perm_token]
else:
self.perm = perm_token
scope_class = _ClassifyScopeIdentifier(scope_string)
if scope_class == 'Domain':
# This may produce an invalid UserByDomain scope,
# which is good because then validate can complain.
self.scope_type = '{0}ByDomain'.format(scope_type)
self.identifier = scope_string
elif scope_class in ['Email', 'Id']:
self.scope_type = '{0}By{1}'.format(scope_type, scope_class)
self.identifier = scope_string
elif scope_class == 'AllAuthenticatedUsers':
self.scope_type = 'AllAuthenticatedUsers'
elif scope_class == 'AllUsers':
self.scope_type = 'AllUsers'
else:
# This is just a fallback, so we set it to something
# and the validate step has something to go on.
self.scope_type = scope_string
def _Validate(self):
"""Validates a parsed AclChange object."""
def _ThrowError(msg):
raise CommandException('{0} is not a valid ACL change\n{1}'
.format(self.raw_descriptor, msg))
if self.scope_type not in self.scope_types:
_ThrowError('{0} is not a valid scope type'.format(self.scope_type))
if self.scope_type in self.public_scopes and self.identifier:
_ThrowError('{0} requires no arguments'.format(self.scope_type))
if self.scope_type in self.id_scopes and not self.identifier:
_ThrowError('{0} requires an id'.format(self.scope_type))
if self.scope_type in self.email_scopes and not self.identifier:
_ThrowError('{0} requires an email address'.format(self.scope_type))
if self.scope_type in self.domain_scopes and not self.identifier:
_ThrowError('{0} requires domain'.format(self.scope_type))
if self.perm not in self.permission_shorthand_mapping.values():
perms = ', '.join(self.permission_shorthand_mapping.values())
_ThrowError('Allowed permissions are {0}'.format(perms))
def _YieldMatchingEntries(self, current_acl):
"""Generator that yields entries that match the change descriptor.
current_acl: An instance of bogo.gs.acl.ACL which will be searched
for matching entries.
"""
for entry in current_acl.entries.entry_list:
if entry.scope.type == self.scope_type:
if self.scope_type in ['UserById', 'GroupById']:
if self.identifier == entry.scope.id:
yield entry
elif self.scope_type in ['UserByEmail', 'GroupByEmail']:
if self.identifier == entry.scope.email_address:
yield entry
elif self.scope_type == 'GroupByDomain':
if self.identifier == entry.scope.domain:
yield entry
elif self.scope_type in ['AllUsers', 'AllAuthenticatedUsers']:
yield entry
else:
raise CommandException('Found an unrecognized ACL '
'entry type, aborting.')
def _AddEntry(self, current_acl):
"""Adds an entry to an ACL."""
if self.scope_type in ['UserById', 'UserById', 'GroupById']:
entry = acl.Entry(type=self.scope_type, permission=self.perm,
id=self.identifier)
elif self.scope_type in ['UserByEmail', 'GroupByEmail']:
entry = acl.Entry(type=self.scope_type, permission=self.perm,
email_address=self.identifier)
elif self.scope_type == 'GroupByDomain':
entry = acl.Entry(type=self.scope_type, permission=self.perm,
domain=self.identifier)
else:
entry = acl.Entry(type=self.scope_type, permission=self.perm)
current_acl.entries.entry_list.append(entry)
def Execute(self, uri, current_acl):
"""Executes the described change on an ACL.
uri: The URI object to change.
current_acl: An instance of boto.gs.acl.ACL to permute.
"""
self.logger.debug('Executing {0} on {1}'
.format(self.raw_descriptor, uri))
if self.perm == 'WRITE' and uri.names_object():
self.logger.warn(
'Skipping {0} on {1}, as WRITE does not apply to objects'
.format(self.raw_descriptor, uri))
return 0
matching_entries = list(self._YieldMatchingEntries(current_acl))
change_count = 0
if matching_entries:
for entry in matching_entries:
if entry.permission != self.perm:
entry.permission = self.perm
change_count += 1
else:
self._AddEntry(current_acl)
change_count = 1
parsed_acl = minidom.parseString(current_acl.to_xml())
self.logger.debug('New Acl:\n{0}'.format(parsed_acl.toprettyxml()))
return change_count
class AclDel(AclChange):
"""Represents a logical change from an access control list."""
scope_regexes = {
r'All(Users)?': 'AllUsers',
r'AllAuth(enticatedUsers)?': 'AllAuthenticatedUsers',
}
def __init__(self, identifier, logger):
self.raw_descriptor = '-d {0}'.format(identifier)
self.logger = logger
self.identifier = identifier
for regex, scope in self.scope_regexes.items():
if re.match(regex, self.identifier, re.IGNORECASE):
self.identifier = scope
self.scope_type = 'Any'
self.perm = 'NONE'
def _YieldMatchingEntries(self, current_acl):
for entry in current_acl.entries.entry_list:
if self.identifier == entry.scope.id:
yield entry
elif self.identifier == entry.scope.email_address:
yield entry
elif self.identifier == entry.scope.domain:
yield entry
elif self.identifier == 'AllUsers' and entry.scope.type == 'AllUsers':
yield entry
elif (self.identifier == 'AllAuthenticatedUsers'
and entry.scope.type == 'AllAuthenticatedUsers'):
yield entry
def Execute(self, uri, current_acl):
self.logger.debug('Executing {0} on {1}'
.format(self.raw_descriptor, uri))
matching_entries = list(self._YieldMatchingEntries(current_acl))
for entry in matching_entries:
current_acl.entries.entry_list.remove(entry)
parsed_acl = minidom.parseString(current_acl.to_xml())
self.logger.debug('New Acl:\n{0}'.format(parsed_acl.toprettyxml()))
return len(matching_entries)
_detailed_help_text = ("""
<B>SYNOPSIS</B>
gsutil chacl [-R] -u|-g|-d <grant>... uri...
where each <grant> is one of the following forms:
-u <id|email>:<perm>
-g <id|email|domain|All|AllAuth>:<perm>
-d <id|email|domain|All|AllAuth>
<B>DESCRIPTION</B>
The chacl command updates access control lists, similar in spirit to the Linux
chmod command. You can specify multiple access grant additions and deletions
in a single command run; all changes will be made atomically to each object in
turn. For example, if the command requests deleting one grant and adding a
different grant, the ACLs being updated will never be left in an intermediate
state where one grant has been deleted but the second grant not yet added.
Each change specifies a user or group grant to add or delete, and for grant
additions, one of R, W, FC (for the permission to be granted). A more formal
description is provided in a later section; below we provide examples.
Note: If you want to set a simple "canned" ACL on each object (such as
project-private or public), or if you prefer to edit the XML representation
for ACLs, you can do that with the setacl command (see 'gsutil help setacl').
<B>EXAMPLES</B>
Grant the user john.doe@example.com WRITE access to the bucket
example-bucket:
gsutil chacl -u john.doe@example.com:WRITE gs://example-bucket
Grant the group admins@example.com FULL_CONTROL access to all jpg files in
the top level of example-bucket:
gsutil chacl -g admins@example.com:FC gs://example-bucket/*.jpg
Grant the user with the specified canonical ID READ access to all objects in
example-bucket that begin with folder/:
gsutil chacl -R \\
-u 84fac329bceSAMPLE777d5d22b8SAMPLE77d85ac2SAMPLE2dfcf7c4adf34da46:R \\
gs://example-bucket/folder/
Grant all users from my-domain.org READ access to the bucket
gcs.my-domain.org:
gsutil chacl -g my-domain.org:R gs://gcs.my-domain.org
Remove any current access by john.doe@example.com from the bucket
example-bucket:
gsutil chacl -d john.doe@example.com gs://example-bucket
If you have a large number of objects to update, enabling multi-threading with
the gsutil -m flag can significantly improve performance. The following
command adds FULL_CONTROL for admin@example.org using multi-threading:
gsutil -m chacl -R -u admin@example.org:FC gs://example-bucket
Grant READ access to everyone from my-domain.org and to all authenticated
users, and grant FULL_CONTROL to admin@mydomain.org, for the buckets
my-bucket and my-other-bucket, with multi-threading enabled:
gsutil -m chacl -R -g my-domain.org:R -g AllAuth:R \\
-u admin@mydomain.org:FC gs://my-bucket/ gs://my-other-bucket
<B>SCOPES</B>
There are four different scopes: Users, Groups, All Authenticated Users, and
All Users.
Users are added with -u and a plain ID or email address, as in
"-u john-doe@gmail.com:r"
Groups are like users, but specified with the -g flag, as in
"-g power-users@example.com:fc". Groups may also be specified as a full
domain, as in "-g my-company.com:r".
AllAuthenticatedUsers and AllUsers are specified directly, as
in "-g AllUsers:R" or "-g AllAuthenticatedUsers:FC". These are case
insensitive, and may be shortened to "all" and "allauth", respectively.
Removing permissions is specified with the -d flag and an ID, email
address, domain, or one of AllUsers or AllAuthenticatedUsers.
Many scopes can be specified on the same command line, allowing bundled
changes to be executed in a single run. This will reduce the number of
requests made to the server.
<B>PERMISSIONS</B>
You may specify the following permissions with either their shorthand or
their full name:
R: READ
W: WRITE
FC: FULL_CONTROL
<B>OPTIONS</B>
-R, -r Performs chacl request recursively, to all objects under the
specified URI.
-u Add or modify a user permission as specified in the SCOPES
and PERMISSIONS sections.
-g Add or modify a group permission as specified in the SCOPES
and PERMISSIONS sections.
-d Remove all permissions associated with the matching argument, as
specified in the SCOPES and PERMISSIONS sections.
""")
class ChAclCommand(Command):
"""Implementation of gsutil chacl command."""
# Command specification (processed by parent class).
command_spec = {
# Name of command.
COMMAND_NAME : 'chacl',
# List of command name aliases.
COMMAND_NAME_ALIASES : [],
# Min number of args required by this command.
MIN_ARGS : 1,
# Max number of args required by this command, or NO_MAX.
MAX_ARGS : NO_MAX,
# Getopt-style string specifying acceptable sub args.
SUPPORTED_SUB_ARGS : 'Rrfg:u:d:',
# True if file URIs acceptable for this command.
FILE_URIS_OK : False,
# True if provider-only URIs acceptable for this command.
PROVIDER_URIS_OK : False,
# Index in args of first URI arg.
URIS_START_ARG : 1,
# True if must configure gsutil before running command.
CONFIG_REQUIRED : True,
}
help_spec = {
# Name of command or auxiliary help info for which this help applies.
HELP_NAME : 'chacl',
# List of help name aliases.
HELP_NAME_ALIASES : ['chmod'],
# Type of help:
HELP_TYPE : HelpType.COMMAND_HELP,
# One line summary of this help.
HELP_ONE_LINE_SUMMARY : 'Add / remove entries on bucket and/or object ACLs',
# The full help text.
HELP_TEXT : _detailed_help_text,
}
# Command entry point.
def RunCommand(self):
"""This is the point of entry for the chacl command."""
self.parse_versions = True
self.changes = []
if self.sub_opts:
for o, a in self.sub_opts:
if o == '-g':
self.changes.append(AclChange(a, scope_type=ChangeType.GROUP,
logger=self.THREADED_LOGGER))
if o == '-u':
self.changes.append(AclChange(a, scope_type=ChangeType.USER,
logger=self.THREADED_LOGGER))
if o == '-d':
self.changes.append(AclDel(a, logger=self.THREADED_LOGGER))
if not self.changes:
raise CommandException(
'Please specify at least one access change '
'with the -g, -u, or -d flags')
storage_uri = self.UrisAreForSingleProvider(self.args)
if not (storage_uri and storage_uri.get_provider().name == 'google'):
raise CommandException('The "{0}" command can only be used with gs:// URIs'
.format(self.command_name))
bulk_uris = set()
for uri_arg in self.args:
for result in self.WildcardIterator(uri_arg):
uri = result.uri
if uri.names_bucket():
if self.recursion_requested:
bulk_uris.add(uri.clone_replace_name('*').uri)
else:
# If applying to a bucket directly, the threading machinery will
# break, so we have to apply now, in the main thread.
self.ApplyAclChanges(uri)
else:
bulk_uris.add(uri_arg)
try:
name_expansion_iterator = name_expansion.NameExpansionIterator(
self.command_name, self.proj_id_handler, self.headers, self.debug,
self.bucket_storage_uri_class, bulk_uris, self.recursion_requested)
except CommandException as e:
# NameExpansionIterator will complain if there are no URIs, but we don't
# want to throw an error if we handled bucket URIs.
if e.reason == 'No URIs matched':
return 0
else:
raise e
self.everything_set_okay = True
self.Apply(self.ApplyAclChanges,
name_expansion_iterator,
self._ApplyExceptionHandler)
if not self.everything_set_okay:
raise CommandException('ACLs for some objects could not be set.')
return 0
def _ApplyExceptionHandler(self, exception):
self.THREADED_LOGGER.error('Encountered a problem: {0}'.format(exception))
self.everything_set_okay = False
@Retry(GSResponseError, tries=3, delay=1, backoff=2)
def ApplyAclChanges(self, uri_or_expansion_result):
"""Applies the changes in self.changes to the provided URI."""
if isinstance(uri_or_expansion_result, name_expansion.NameExpansionResult):
uri = self.suri_builder.StorageUri(
uri_or_expansion_result.expanded_uri_str)
else:
uri = uri_or_expansion_result
try:
current_acl = uri.get_acl()
except GSResponseError as e:
self.THREADED_LOGGER.warning('Failed to set acl for {0}: {1}'
.format(uri, e.reason))
return
modification_count = 0
for change in self.changes:
modification_count += change.Execute(uri, current_acl)
if modification_count == 0:
self.THREADED_LOGGER.info('No changes to {0}'.format(uri))
return
# TODO: Remove the concept of forcing when boto provides access to
# bucket generation and meta_generation.
headers = dict(self.headers)
force = uri.names_bucket()
if not force:
key = uri.get_key()
headers['x-goog-if-generation-match'] = key.generation
headers['x-goog-if-metageneration-match'] = key.meta_generation
# If this fails because of a precondition, it will raise a
# GSResponseError for @Retry to handle.
uri.set_acl(current_acl, uri.object_name, False, headers)
self.THREADED_LOGGER.info('Updated ACL on {0}'.format(uri))
|
jburel/openmicroscopy
|
refs/heads/develop_merge_trigger
|
components/tools/OmeroFS/src/fsWin-XP-Monitor.py
|
15
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
OMERO.fs Monitor module for Window XP.
Copyright 2009 University of Dundee. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""
import logging
import threading
import os
import time
# Third party path package. It provides much of the
# functionality of os.path but without the complexity.
# Imported as pathModule to avoid clashes.
import path as pathModule
__import__("omero.all")
import omero.grid.monitors as monitors
from fsAbstractPlatformMonitor import AbstractPlatformMonitor
import win32file
import win32con
class PlatformMonitor(AbstractPlatformMonitor):
"""
A Thread to monitor a path.
:group Constructor: __init__
:group Other methods: run, stop
"""
def __init__(self, eventTypes, pathMode, pathString, whitelist, blacklist,
ignoreSysFiles, ignoreDirEvents, proxy):
"""
Set-up Monitor thread.
After initialising the superclass and some instance variables
try to create an FSEventStream. Throw an exeption if this fails.
:Parameters:
eventTypes :
A list of the event types to be monitored.
pathMode :
The mode of directory monitoring:
flat, recursive or following.
pathString : string
A string representing a path to be monitored.
whitelist : list<string>
A list of files and extensions of interest.
blacklist : list<string>
A list of subdirectories to be excluded.
ignoreSysFiles :
If true platform dependent sys files should be ignored.
monitorId :
Unique id for the monitor included in callbacks.
proxy :
A proxy to be informed of events
"""
AbstractPlatformMonitor.__init__(
self, eventTypes, pathMode, pathString, whitelist, blacklist,
ignoreSysFiles, ignoreDirEvents, proxy)
self.log = logging.getLogger("fsserver." + __name__)
self.actions = {
1: monitors.EventType.Create, # Created
2: monitors.EventType.Delete, # Deleted
3: monitors.EventType.Modify, # Updated
4: monitors.EventType.Modify, # Renamed to something
5: monitors.EventType.Modify # Renamed from something
}
self.recurse = not (self.pathMode == "Flat")
self.event = threading.Event()
self.log.info('Monitor set-up on %s', str(self.pathsToMonitor))
self.log.info('Monitoring %s events', str(self.eTypes))
def run(self):
"""
Start monitoring.
:return: No explicit return value.
"""
# Blocks
self.watch() # for now
def stop(self):
"""
Stop monitoring
:return: No explicit return value.
"""
self.event.set()
def watch(self):
"""
Create a monitor on created files.
Callback on file events.
"""
FILE_LIST_DIRECTORY = 0x0001
hDir = win32file.CreateFile(
self.pathsToMonitor,
FILE_LIST_DIRECTORY,
win32con.FILE_SHARE_READ | win32con.FILE_SHARE_WRITE,
None,
win32con.OPEN_EXISTING,
win32con.FILE_FLAG_BACKUP_SEMANTICS,
None)
while not self.event.isSet():
results = win32file.ReadDirectoryChangesW(
hDir,
4096,
self.recurse, # recurse
win32con.FILE_NOTIFY_CHANGE_FILE_NAME |
win32con.FILE_NOTIFY_CHANGE_DIR_NAME |
win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES |
win32con.FILE_NOTIFY_CHANGE_SIZE |
win32con.FILE_NOTIFY_CHANGE_LAST_WRITE |
win32con.FILE_NOTIFY_CHANGE_SECURITY,
None,
None)
eventList = []
if results:
for action, file in results:
filename = os.path.join(self.pathsToMonitor, file)
self.log.info(
"Event : %s %s", str(self.actions[action]), filename)
if (self.ignoreDirEvents
and pathModule.path(filename).isdir()):
self.log.info('Directory event, not propagated.')
else:
if action == 1:
if "Creation" in self.eTypes:
# Ignore default name for GUI created folders.
if (self.ignoreSysFiles
and filename.find('New Folder') >= 0):
self.log.info(
'Created "New Folder" ignored.')
else:
eventType = self.actions[action]
# Should have richer filename matching
# here.
if (len(self.whitelist) == 0
or pathModule.path(filename).ext
in self.whitelist):
eventList.append(
(filename.replace(
'\\\\', '\\').replace(
'\\', '/'), eventType))
else:
self.log.info('Not propagated.')
elif action == 2:
if "Deletion" in self.eTypes:
# Ignore default name for GUI created folders.
if (self.ignoreSysFiles
and filename.find('New Folder') >= 0):
self.log.info(
'Deleted "New Folder" ignored.')
else:
eventType = self.actions[action]
# Should have richer filename matching
# here.
if (len(self.whitelist) == 0
or pathModule.path(filename).ext
in self.whitelist):
eventList.append(
(filename.replace(
'\\\\', '\\').replace(
'\\', '/'), eventType))
else:
self.log.info('Not propagated.')
elif action in (3, 4, 5):
if "Modification" in self.eTypes:
# Ignore default name for GUI created folders.
if (self.ignoreSysFiles
and filename.find('New Folder') >= 0):
self.log.info(
'Modified "New Folder" ignored.')
else:
eventType = self.actions[action]
# Should have richer filename matching
# here.
if (len(self.whitelist) == 0
or pathModule.path(filename).ext
in self.whitelist):
eventList.append(
(filename.replace(
'\\\\', '\\').replace(
'\\', '/'), eventType))
else:
self.log.info('Not propagated.')
else:
self.log.error('Unknown event type.')
self.propagateEvents(eventList)
if __name__ == "__main__":
class Proxy(object):
def callback(self, eventList):
for event in eventList:
# pass
log.info("EVENT_RECORD::%s::%s::%s" %
(time.time(), event[1], event[0]))
log = logging.getLogger("fstestserver")
file_handler = logging.FileHandler("/TEST/logs/fstestserver.out")
file_handler.setFormatter(
logging.Formatter("%(asctime)s %(levelname)s: %(name)s - %(message)s"))
log.addHandler(file_handler)
log.setLevel(logging.INFO)
log = logging.getLogger("fstestserver." + __name__)
p = Proxy()
m = PlatformMonitor(
[monitors.WatchEventType.Creation,
monitors.WatchEventType.Modification],
monitors.PathMode.Follow, "C:\OMERO\DropBox", [], [], True, True, p)
try:
m.start()
except:
m.stop()
|
patricmutwiri/pombola
|
refs/heads/master
|
pombola/projects/migrations/0001_initial.py
|
5
|
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
depends_on = (
("core", "0024_auto__add_field_positiontitle_requires_place"),
)
def forwards(self, orm):
# Adding model 'Project'
db.create_table('projects_project', (
('sector', self.gf('django.db.models.fields.CharField')(max_length=400)),
('status', self.gf('django.db.models.fields.CharField')(max_length=400)),
('updated', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2011, 9, 27, 10, 57, 26, 57463), auto_now=True, blank=True)),
('project_name', self.gf('django.db.models.fields.CharField')(max_length=400)),
('location_name', self.gf('django.db.models.fields.CharField')(max_length=400)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2011, 9, 27, 10, 57, 26, 56035), auto_now_add=True, blank=True)),
('estimated_cost', self.gf('django.db.models.fields.FloatField')()),
('cdf_index', self.gf('django.db.models.fields.IntegerField')(unique=True)),
('expected_output', self.gf('django.db.models.fields.CharField')(max_length=400)),
('econ2', self.gf('django.db.models.fields.CharField')(max_length=400)),
('total_cost', self.gf('django.db.models.fields.FloatField')()),
('location', self.gf('django.contrib.gis.db.models.fields.PointField')()),
('activity_to_be_done', self.gf('django.db.models.fields.CharField')(max_length=400)),
('remarks', self.gf('django.db.models.fields.CharField')(max_length=400)),
('econ1', self.gf('django.db.models.fields.CharField')(max_length=400)),
('constituency', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Place'])),
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('mtfe_sector', self.gf('django.db.models.fields.CharField')(max_length=400)),
))
db.send_create_signal('projects', ['Project'])
def backwards(self, orm):
# Deleting model 'Project'
db.delete_table('projects_project')
models = {
'contenttypes.contenttype': {
'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'core.contact': {
'Meta': {'object_name': 'Contact'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37650)', 'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'kind': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.ContactKind']"}),
'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'source': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '500', 'blank': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37784)', 'auto_now': 'True', 'blank': 'True'}),
'value': ('django.db.models.fields.TextField', [], {})
},
'core.contactkind': {
'Meta': {'object_name': 'ContactKind'},
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37650)', 'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37784)', 'auto_now': 'True', 'blank': 'True'})
},
'core.organisation': {
'Meta': {'object_name': 'Organisation'},
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37650)', 'auto_now_add': 'True', 'blank': 'True'}),
'ended': ('django_date_extensions.fields.ApproximateDateField', [], {'max_length': '10', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'kind': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.OrganisationKind']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'original_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'started': ('django_date_extensions.fields.ApproximateDateField', [], {'max_length': '10', 'blank': 'True'}),
'summary': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37784)', 'auto_now': 'True', 'blank': 'True'})
},
'core.organisationkind': {
'Meta': {'object_name': 'OrganisationKind'},
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37650)', 'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37784)', 'auto_now': 'True', 'blank': 'True'})
},
'core.place': {
'Meta': {'object_name': 'Place'},
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37650)', 'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'kind': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.PlaceKind']"}),
'location': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}),
'mapit_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'organisation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Organisation']", 'null': 'True', 'blank': 'True'}),
'original_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'parent_place': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'child_places'", 'null': 'True', 'to': "orm['core.Place']"}),
'shape_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37784)', 'auto_now': 'True', 'blank': 'True'})
},
'core.placekind': {
'Meta': {'object_name': 'PlaceKind'},
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37650)', 'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 37784)', 'auto_now': 'True', 'blank': 'True'})
},
'projects.project': {
'Meta': {'object_name': 'Project'},
'activity_to_be_done': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'cdf_index': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
'constituency': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Place']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 56035)', 'auto_now_add': 'True', 'blank': 'True'}),
'econ1': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'econ2': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'estimated_cost': ('django.db.models.fields.FloatField', [], {}),
'expected_output': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'location': ('django.contrib.gis.db.models.fields.PointField', [], {}),
'location_name': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'mtfe_sector': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'project_name': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'remarks': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'sector': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'status': ('django.db.models.fields.CharField', [], {'max_length': '400'}),
'total_cost': ('django.db.models.fields.FloatField', [], {}),
'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 9, 27, 10, 57, 26, 57463)', 'auto_now': 'True', 'blank': 'True'})
}
}
complete_apps = ['projects']
|
seler/djoauth2
|
refs/heads/master
|
djoauth2/tests/abstractions.py
|
3
|
# coding: utf-8
import json
from base64 import b64encode
from hashlib import md5
from random import random
from django.conf import settings
from django.contrib.auth.models import User
from django.test import Client as TestClient
from django.test import TestCase
from django.test.client import RequestFactory
from djoauth2.conf import DJOAuth2Conf
from djoauth2.models import AccessToken
from djoauth2.models import AuthorizationCode
from djoauth2.models import Client
from djoauth2.models import Scope
def remove_empty_parameters(params):
for key, value in params.items():
if value is None:
del params[key]
class DJOAuth2TestClient(TestClient):
def __init__(self, scope_names=None, **kwargs):
# OAuth-related settings.
self.authorization_endpoint = '/oauth2/authorization/'
self.token_endpoint = '/oauth2/token/'
self.scope_names = scope_names or []
# For internal use.
self.history = []
self.access_token_value = None
self.access_token_lifetime = None
self.refresh_token_value = None
kwargs.setdefault('SERVER_NAME', 'locu.com')
super(DJOAuth2TestClient, self).__init__(**kwargs)
@property
def ssl_only(self):
return settings.DJOAUTH2_SSL_ONLY
@property
def scope_string(self):
return ' '.join(self.scope_names)
@property
def scope_objects(self):
return Scope.objects.filter(name__in=self.scope_names)
@property
def last_response(self):
return self.history[-1] if self.history else None
def make_authorization_request(self,
client_id,
scope_string,
custom=None,
endpoint='/fake/endpoint/',
method='GET',
use_ssl=None):
if use_ssl is None:
use_ssl = self.ssl_only
data = {
'scope': scope_string,
'response_type': 'code',
'client_id': client_id,
'state': 'statevalue',
}
data.update(custom or {})
remove_empty_parameters(data)
headers = {
'wsgi.url_scheme': 'https' if use_ssl else 'http',
}
request_method = getattr(self, method.lower())
api_request = request_method(endpoint, data, **headers)
return api_request
def confirm_authorization_request(self,
form_action,
custom=None,
method='POST',
use_ssl=None):
if use_ssl is None:
use_ssl = self.ssl_only
data = {}
data.update(custom or {})
remove_empty_parameters(data)
headers = {
'wsgi.url_scheme': 'https' if use_ssl else 'http',
}
request_method = getattr(self, method.lower())
api_request = request_method(form_action, data, **headers)
return api_request
def make_api_request(self,
access_token,
data=None,
method='GET',
header_data=None,
meta=None,
use_ssl=True):
# Respect default ssl settings if no value is passed.
if use_ssl is None:
use_ssl = self.ssl_only
request_method = getattr(RequestFactory(), method.lower())
data = data or {}
remove_empty_parameters(data)
headers = {
# From http://codeinthehole.com/writing/testing-https-handling-in-django/
'wsgi.url_scheme': 'https' if use_ssl else 'http',
}
headers.update(header_data or {})
remove_empty_parameters(headers)
api_request = request_method('/url/does/not/matter', data, **headers)
api_request.META['HTTP_AUTHORIZATION'] = 'Bearer ' + access_token.value
api_request.META.update(meta or {})
remove_empty_parameters(api_request.META)
return api_request
def access_token_request(self,
client,
method,
data=None,
header_data=None,
use_header_auth=True,
use_ssl=None,
endpoint_uri=None):
# Respect default ssl settings if no value is passed.
if use_ssl is None:
use_ssl = self.ssl_only
params = {
'client_id': client.key,
'client_secret': client.secret,
'redirect_uri': client.redirect_uri,
}
params.update(data or {})
remove_empty_parameters(params)
headers = {
# From http://codeinthehole.com/writing/testing-https-handling-in-django/
'wsgi.url_scheme': 'https' if use_ssl else 'http',
}
if use_header_auth:
client_id = params.pop('client_id', '')
client_secret = params.pop('client_secret', '')
headers.update({'HTTP_AUTHORIZATION': 'Basic ' + b64encode(
'{}:{}'.format(client_id, client_secret))})
headers.update(header_data or {})
remove_empty_parameters(headers)
request_method = getattr(self, method.lower())
response = request_method(
endpoint_uri or self.token_endpoint,
params,
**headers)
self.load_token_data(response)
return response
def request_token_from_authcode(self,
client,
authorization_code_value,
method='POST',
use_ssl=True,
**kwargs):
data = {
'grant_type': 'authorization_code',
'code': authorization_code_value,
}
data.update(kwargs.pop('data', {}))
kwargs['data'] = data
kwargs['use_ssl'] = use_ssl
return self.access_token_request(client, method, **kwargs)
def request_token_from_refresh_token(self,
client,
refresh_token_value,
method='POST',
use_ssl=True,
**kwargs):
data = {
'grant_type': 'refresh_token',
'refresh_token': refresh_token_value,
}
data.update(kwargs.pop('data', {}))
kwargs['data'] = data
kwargs['use_ssl'] = use_ssl
return self.access_token_request(client, method, **kwargs)
def load_token_data(self, response=None):
response = response or self.last_response
if not response:
raise ValueError('No Response object form which to load data.')
if response.status_code == 200:
data = json.loads(response.content)
self.access_token_value = data.get('access_token')
self.access_token_lifetime = data.get('expires_in')
self.refresh_token_value = data.get('refresh_token')
return data
else:
self.access_token_value = None
self.access_token_lifetime = None
self.refresh_token_value = None
return None
class DJOAuth2TestCase(TestCase):
urls = 'djoauth2.tests.urls'
def setUp(self):
# Use all of the default settings for testing, regardless of what is
# currently set.
for key, value in DJOAuth2Conf._meta.defaults.iteritems():
setattr(settings, key, value)
assert getattr(settings, key) == value
# Create objects to be used in the tests.
self.user = User.objects.create(
email='testuser@locu.com',
first_name='Test',
last_name='User',
password='password',
username='testuser@locu.com')
# Calling `set_password` stores a hashed version of the password in a hash
# format that will allow authentication to work.
self.user.set_password(self.user.password)
self.user.save()
self.client = Client.objects.create(
key='be6f31235c6118273918c4c70f6768',
secret='89dcee4e6fe655377a19944c2bee9b',
name='Client 1',
description='Client 1',
redirect_uri='https://locu.com',
user=self.user)
self.client2 = Client.objects.create(
key='5cf2a7ce5e13ee4dde88717e48fcc6',
secret='4cf14dc7e7c539047e3d2afb0bdba5',
name='Client 2',
description='Client 2',
redirect_uri='https://locu.com',
user=self.user)
Scope.objects.create(
name='autologin',
description='Log you in automatically')
Scope.objects.create(
name='verify',
description='Verify your business on your behalf')
Scope.objects.create(
name='example',
description='User your business as an example')
def initialize(self, **kwargs):
self.oauth_client = DJOAuth2TestClient(**kwargs)
def create_authorization_code(self, user, client, custom=None):
object_params = {
'user' : user,
'client' : client,
'redirect_uri' : client.redirect_uri,
'scopes' : self.oauth_client.scope_objects,
}
object_params.update(custom or {})
# Cannot create a new Django object with a ManyToMany relationship defined
# in the __init__ method, so the 'scopes' parameter is set after
# instantiation.
scopes = object_params.pop('scopes')
authorization_code = AuthorizationCode.objects.create(**object_params)
if scopes:
authorization_code.scopes = scopes
authorization_code.save()
return authorization_code
def create_access_token(self, user, client, custom=None):
params = {
'user' : user,
'client' : client,
'scopes' : self.oauth_client.scope_objects
}
params.update(custom or {})
# Cannot create a new Django object with a ManyToMany relationship defined
# in the __init__ method, so the 'scopes' parameter is set after
# instantiation.
scopes = params.pop('scopes')
access_token = AccessToken.objects.create(**params)
if scopes:
access_token.scopes = scopes
access_token.save()
return access_token
def create_scope(self, custom=None):
random_string = md5(str(random())).hexdigest()
params = {
'name' : 'test-scope-' + random_string,
'description' : 'an example test scope',
}
params.update(custom or {})
return Scope.objects.create(**params)
def assert_token_success(self, response):
self.assertEqual(response.status_code, 200, response)
# Check the response contents
self.assertTrue(self.oauth_client.access_token_value)
self.assertTrue(self.oauth_client.access_token_lifetime)
self.assertTrue(self.oauth_client.refresh_token_value)
def assert_token_failure(self, response, expected_error_code=None):
if expected_error_code:
self.assertEqual(response.status_code, expected_error_code)
else:
# Should have received a 4XX HTTP status code
self.assertNotEqual(response.status_code, 200, response)
self.assertTrue(str(response.status_code)[0] == '4')
# Check the response contents
self.assertIsNone(self.oauth_client.access_token_value)
self.assertIsNone(self.oauth_client.access_token_lifetime)
self.assertIsNone(self.oauth_client.refresh_token_value)
|
DataONEorg/d1Login
|
refs/heads/master
|
d1_certificate/__init__.py
|
1
|
'''
grid_shib: helper for downloading client certificate from CILogon
'''
import os
import time
import logging
import webbrowser
from . import grid_shib
from .certinfo import *
LOGIN_SERVICE = {
'production':'https://cilogon.org/?skin=dataone',
'stage':'https://cilogon.org/?skin=dataonestage',
'stage-2':'https://cilogon.org/?skin=dataonestage2',
'sandbox':'https://cilogon.org/?skin=dataonesandbox',
'sandbox-2':'https://cilogon.org/?skin=dataonesandbox2',
'dev':'https://cilogon.org/?skin=dataonedev',
'dev-2':'https://cilogon.org/?skin=dataonedev2',
}
def getDefaultCertificatePath():
'''Return the default path for a user certificate, creating the expected
location if necessary.
Default client certificate path:
${HOME}/.dataone/certificates
Default client certificate name:
x509up_u + uid
'''
fdest = os.path.expanduser(os.path.join("~", ".dataone", "certificates"))
if not os.path.exists(fdest):
logging.info("Certificate folder %s does not exist. Creating...", fdest)
os.makedirs(fdest)
os.chmod(fdest, 0o700)
fname = "x509up_u%d" % os.getuid()
fdest = os.path.join(fdest, fname)
return fdest
def defaultBrowserAction(service):
'''Open a web browser at the URL service.
'''
ui = webbrowser.open(service, new=1, autoraise=True)
return ui
def login(openbrowser=defaultBrowserAction,
service=LOGIN_SERVICE['dev'],
downloadfile=os.path.expanduser(os.path.join('~', 'Downloads', 'shibCILaunchGSCA.jnlp')),
overwrite=False,
waitseconds=60,
certdest=getDefaultCertificatePath(),
lifetime_seconds=None):
'''Open a browser at the CILogon site and wait for the .jnlp file to be
downloaded. Note that this process is fragile because it relies on the
name of the file and its location to be consistent. Could probably rig up
something with inotify or mdfind to improve this.
@param openbrowser is an optional callback that if set, initiates a process
that logs in the user and initiates download of the .jnlp file. If None,
then it is assumed that some other mechanism will cause the .jnlp
to be present in the expected location.
@param service: The URL of the service to contact for logging in
@param downloadfile: The path and name of the file that is to be downloaded.
@param overwrite: True if an existing file of that name should be replaced,
applies to the .jnlp file and the target certificate file.
@param waitseconds: The number of seconds that the method will wait for the
downloaded file to be available in the expected location.
@param certdest: The path and filename of the location where the certificate
will be placed after downloading. An existing file of that name will be
overwritten if overwrite is True.
@param lifetime_seconds: Certificate lifetime in seconds. If None, then the
default value specified in the downloaded .jnlp file will be used (64800)
@return Path to the retrieved certificate
'''
if not openbrowser is None:
openbrowser(service)
if os.path.exists(certdest) and not overwrite:
raise IOError("Certificate file exists and overwrite not specified.")
counter = 0
increment = 2
while not os.path.exists(downloadfile):
time.sleep(increment)
counter = counter + increment
logging.info("Timer %d of %d seconds elapsed", counter, waitseconds)
if counter > waitseconds:
raise Exception("Timed out waiting for login to complete")
res = grid_shib.retrieveCertificate(downloadfile,
certdest,
lifetime_seconds=lifetime_seconds)
os.remove(downloadfile)
logging.info(res)
return res
|
kittiu/odoo
|
refs/heads/8.0
|
openerp/cli/__init__.py
|
185
|
import logging
import sys
import os
import openerp
from openerp import tools
from openerp.modules import module
_logger = logging.getLogger(__name__)
commands = {}
class CommandType(type):
def __init__(cls, name, bases, attrs):
super(CommandType, cls).__init__(name, bases, attrs)
name = getattr(cls, name, cls.__name__.lower())
cls.name = name
if name != 'command':
commands[name] = cls
class Command(object):
"""Subclass this class to define new openerp subcommands """
__metaclass__ = CommandType
def run(self, args):
pass
class Help(Command):
"""Display the list of available commands"""
def run(self, args):
print "Available commands:\n"
padding = max([len(k) for k in commands.keys()]) + 2
for k, v in commands.items():
print " %s%s" % (k.ljust(padding, ' '), v.__doc__ or '')
print "\nUse '%s <command> --help' for individual command help." % sys.argv[0].split(os.path.sep)[-1]
import server
import deploy
import scaffold
import start
def main():
args = sys.argv[1:]
# The only shared option is '--addons-path=' needed to discover additional
# commands from modules
if len(args) > 1 and args[0].startswith('--addons-path=') and not args[1].startswith("-"):
# parse only the addons-path, do not setup the logger...
tools.config._parse_config([args[0]])
args = args[1:]
# Default legacy command
command = "server"
# Subcommand discovery
if len(args) and not args[0].startswith("-"):
logging.disable(logging.CRITICAL)
for m in module.get_modules():
m_path = module.get_module_path(m)
if os.path.isdir(os.path.join(m_path, 'cli')):
__import__('openerp.addons.' + m)
logging.disable(logging.NOTSET)
command = args[0]
args = args[1:]
if command in commands:
o = commands[command]()
o.run(args)
# vim:et:ts=4:sw=4:
|
denny820909/builder
|
refs/heads/master
|
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/_signals.py
|
25
|
# -*- test-case-name: twisted.test.test_process,twisted.internet.test.test_process -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
This module provides a uniform interface to the several mechanisms which are
possibly available for dealing with signals.
This module is used to integrate child process termination into a
reactor event loop. This is a challenging feature to provide because
most platforms indicate process termination via SIGCHLD and do not
provide a way to wait for that signal and arbitrary I/O events at the
same time. The naive implementation involves installing a Python
SIGCHLD handler; unfortunately this leads to other syscalls being
interrupted (whenever SIGCHLD is received) and failing with EINTR
(which almost no one is prepared to handle). This interruption can be
disabled via siginterrupt(2) (or one of the equivalent mechanisms);
however, if the SIGCHLD is delivered by the platform to a non-main
thread (not a common occurrence, but difficult to prove impossible),
the main thread (waiting on select() or another event notification
API) may not wake up leading to an arbitrary delay before the child
termination is noticed.
The basic solution to all these issues involves enabling SA_RESTART
(ie, disabling system call interruption) and registering a C signal
handler which writes a byte to a pipe. The other end of the pipe is
registered with the event loop, allowing it to wake up shortly after
SIGCHLD is received. See L{twisted.internet.posixbase._SIGCHLDWaker}
for the implementation of the event loop side of this solution. The
use of a pipe this way is known as the U{self-pipe
trick<http://cr.yp.to/docs/selfpipe.html>}.
The actual solution implemented in this module depends on the version
of Python. From version 2.6, C{signal.siginterrupt} and
C{signal.set_wakeup_fd} allow the necessary C signal handler which
writes to the pipe to be registered with C{SA_RESTART}. Prior to 2.6,
the L{twisted.internet._sigchld} extension module provides similar
functionality.
If neither of these is available, a Python signal handler is used
instead. This is essentially the naive solution mentioned above and
has the problems described there.
"""
import os
try:
from signal import set_wakeup_fd, siginterrupt
except ImportError:
set_wakeup_fd = siginterrupt = None
try:
import signal
except ImportError:
signal = None
from twisted.python.log import msg
try:
from twisted.internet._sigchld import installHandler as _extInstallHandler, \
isDefaultHandler as _extIsDefaultHandler
except ImportError:
_extInstallHandler = _extIsDefaultHandler = None
class _Handler(object):
"""
L{_Handler} is a signal handler which writes a byte to a file descriptor
whenever it is invoked.
@ivar fd: The file descriptor to which to write. If this is C{None},
nothing will be written.
"""
def __init__(self, fd):
self.fd = fd
def __call__(self, *args):
"""
L{_Handler.__call__} is the signal handler. It will write a byte to
the wrapped file descriptor, if there is one.
"""
if self.fd is not None:
try:
os.write(self.fd, '\0')
except:
pass
def _installHandlerUsingSignal(fd):
"""
Install a signal handler which will write a byte to C{fd} when
I{SIGCHLD} is received.
This is implemented by creating an instance of L{_Handler} with C{fd}
and installing it as the signal handler.
@param fd: The file descriptor to which to write when I{SIGCHLD} is
received.
@type fd: C{int}
"""
if fd == -1:
previous = signal.signal(signal.SIGCHLD, signal.SIG_DFL)
else:
previous = signal.signal(signal.SIGCHLD, _Handler(fd))
if isinstance(previous, _Handler):
return previous.fd
return -1
def _installHandlerUsingSetWakeup(fd):
"""
Install a signal handler which will write a byte to C{fd} when
I{SIGCHLD} is received.
This is implemented by installing an instance of L{_Handler} wrapped
around C{None}, setting the I{SIGCHLD} handler as not allowed to
interrupt system calls, and using L{signal.set_wakeup_fd} to do the
actual writing.
@param fd: The file descriptor to which to write when I{SIGCHLD} is
received.
@type fd: C{int}
"""
if fd == -1:
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
else:
signal.signal(signal.SIGCHLD, _Handler(None))
siginterrupt(signal.SIGCHLD, False)
return set_wakeup_fd(fd)
def _isDefaultHandler():
"""
Determine whether the I{SIGCHLD} handler is the default or not.
"""
return signal.getsignal(signal.SIGCHLD) == signal.SIG_DFL
def _cannotInstallHandler(fd):
"""
Fail to install a signal handler for I{SIGCHLD}.
This implementation is used when the supporting code for the other
implementations is unavailable (on Python versions 2.5 and older where
neither the L{twisted.internet._sigchld} extension nor the standard
L{signal} module is available).
@param fd: Ignored; only for compatibility with the other
implementations of this interface.
@raise RuntimeError: Always raised to indicate no I{SIGCHLD} handler can
be installed.
"""
raise RuntimeError("Cannot install a SIGCHLD handler")
def _cannotDetermineDefault():
raise RuntimeError("No usable signal API available")
if set_wakeup_fd is not None:
msg('using set_wakeup_fd')
installHandler = _installHandlerUsingSetWakeup
isDefaultHandler = _isDefaultHandler
elif _extInstallHandler is not None:
msg('using _sigchld')
installHandler = _extInstallHandler
isDefaultHandler = _extIsDefaultHandler
elif signal is not None:
msg('using signal module')
installHandler = _installHandlerUsingSignal
isDefaultHandler = _isDefaultHandler
else:
msg('nothing unavailable')
installHandler = _cannotInstallHandler
isDefaultHandler = _cannotDetermineDefault
|
insiderr/insiderr-app
|
refs/heads/master
|
ios-patches/basemodules/twisted/trial/test/suppression.py
|
35
|
# -*- test-case-name: twisted.trial.test.test_tests -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases used to make sure that warning supression works at the module,
method, and class levels.
See the L{twisted.trial.test.test_tests} module docstring for details about how
this code is arranged.
"""
from __future__ import division, absolute_import
import warnings
from twisted.python.compat import _PY3
from twisted.trial import unittest, util
METHOD_WARNING_MSG = "method warning message"
CLASS_WARNING_MSG = "class warning message"
MODULE_WARNING_MSG = "module warning message"
class MethodWarning(Warning):
pass
class ClassWarning(Warning):
pass
class ModuleWarning(Warning):
pass
class EmitMixin:
def _emit(self):
warnings.warn(METHOD_WARNING_MSG, MethodWarning)
warnings.warn(CLASS_WARNING_MSG, ClassWarning)
warnings.warn(MODULE_WARNING_MSG, ModuleWarning)
class SuppressionMixin(EmitMixin):
suppress = [util.suppress(message=CLASS_WARNING_MSG)]
def testSuppressMethod(self):
self._emit()
testSuppressMethod.suppress = [util.suppress(message=METHOD_WARNING_MSG)]
def testSuppressClass(self):
self._emit()
def testOverrideSuppressClass(self):
self._emit()
testOverrideSuppressClass.suppress = []
class SetUpSuppressionMixin(object):
def setUp(self):
self._emit()
class TearDownSuppressionMixin(object):
def tearDown(self):
self._emit()
class TestSuppression2Mixin(EmitMixin):
def testSuppressModule(self):
self._emit()
suppress = [util.suppress(message=MODULE_WARNING_MSG)]
class SynchronousTestSuppression(SuppressionMixin, unittest.SynchronousTestCase):
pass
class SynchronousTestSetUpSuppression(SetUpSuppressionMixin, SynchronousTestSuppression):
pass
class SynchronousTestTearDownSuppression(TearDownSuppressionMixin, SynchronousTestSuppression):
pass
class SynchronousTestSuppression2(TestSuppression2Mixin, unittest.SynchronousTestCase):
pass
class AsynchronousTestSuppression(SuppressionMixin, unittest.TestCase):
pass
class AsynchronousTestSetUpSuppression(SetUpSuppressionMixin, AsynchronousTestSuppression):
pass
class AsynchronousTestTearDownSuppression(TearDownSuppressionMixin, AsynchronousTestSuppression):
pass
class AsynchronousTestSuppression2(TestSuppression2Mixin, unittest.TestCase):
pass
|
40223150/2015cd_midterm
|
refs/heads/master
|
static/Brython3.1.0-20150301-090019/Lib/formatter.py
|
751
|
"""Generic output formatting.
Formatter objects transform an abstract flow of formatting events into
specific output events on writer objects. Formatters manage several stack
structures to allow various properties of a writer object to be changed and
restored; writers need not be able to handle relative changes nor any sort
of ``change back'' operation. Specific writer properties which may be
controlled via formatter objects are horizontal alignment, font, and left
margin indentations. A mechanism is provided which supports providing
arbitrary, non-exclusive style settings to a writer as well. Additional
interfaces facilitate formatting events which are not reversible, such as
paragraph separation.
Writer objects encapsulate device interfaces. Abstract devices, such as
file formats, are supported as well as physical devices. The provided
implementations all work with abstract devices. The interface makes
available mechanisms for setting the properties which formatter objects
manage and inserting data into the output.
"""
import sys
AS_IS = None
class NullFormatter:
"""A formatter which does nothing.
If the writer parameter is omitted, a NullWriter instance is created.
No methods of the writer are called by NullFormatter instances.
Implementations should inherit from this class if implementing a writer
interface but don't need to inherit any implementation.
"""
def __init__(self, writer=None):
if writer is None:
writer = NullWriter()
self.writer = writer
def end_paragraph(self, blankline): pass
def add_line_break(self): pass
def add_hor_rule(self, *args, **kw): pass
def add_label_data(self, format, counter, blankline=None): pass
def add_flowing_data(self, data): pass
def add_literal_data(self, data): pass
def flush_softspace(self): pass
def push_alignment(self, align): pass
def pop_alignment(self): pass
def push_font(self, x): pass
def pop_font(self): pass
def push_margin(self, margin): pass
def pop_margin(self): pass
def set_spacing(self, spacing): pass
def push_style(self, *styles): pass
def pop_style(self, n=1): pass
def assert_line_data(self, flag=1): pass
class AbstractFormatter:
"""The standard formatter.
This implementation has demonstrated wide applicability to many writers,
and may be used directly in most circumstances. It has been used to
implement a full-featured World Wide Web browser.
"""
# Space handling policy: blank spaces at the boundary between elements
# are handled by the outermost context. "Literal" data is not checked
# to determine context, so spaces in literal data are handled directly
# in all circumstances.
def __init__(self, writer):
self.writer = writer # Output device
self.align = None # Current alignment
self.align_stack = [] # Alignment stack
self.font_stack = [] # Font state
self.margin_stack = [] # Margin state
self.spacing = None # Vertical spacing state
self.style_stack = [] # Other state, e.g. color
self.nospace = 1 # Should leading space be suppressed
self.softspace = 0 # Should a space be inserted
self.para_end = 1 # Just ended a paragraph
self.parskip = 0 # Skipped space between paragraphs?
self.hard_break = 1 # Have a hard break
self.have_label = 0
def end_paragraph(self, blankline):
if not self.hard_break:
self.writer.send_line_break()
self.have_label = 0
if self.parskip < blankline and not self.have_label:
self.writer.send_paragraph(blankline - self.parskip)
self.parskip = blankline
self.have_label = 0
self.hard_break = self.nospace = self.para_end = 1
self.softspace = 0
def add_line_break(self):
if not (self.hard_break or self.para_end):
self.writer.send_line_break()
self.have_label = self.parskip = 0
self.hard_break = self.nospace = 1
self.softspace = 0
def add_hor_rule(self, *args, **kw):
if not self.hard_break:
self.writer.send_line_break()
self.writer.send_hor_rule(*args, **kw)
self.hard_break = self.nospace = 1
self.have_label = self.para_end = self.softspace = self.parskip = 0
def add_label_data(self, format, counter, blankline = None):
if self.have_label or not self.hard_break:
self.writer.send_line_break()
if not self.para_end:
self.writer.send_paragraph((blankline and 1) or 0)
if isinstance(format, str):
self.writer.send_label_data(self.format_counter(format, counter))
else:
self.writer.send_label_data(format)
self.nospace = self.have_label = self.hard_break = self.para_end = 1
self.softspace = self.parskip = 0
def format_counter(self, format, counter):
label = ''
for c in format:
if c == '1':
label = label + ('%d' % counter)
elif c in 'aA':
if counter > 0:
label = label + self.format_letter(c, counter)
elif c in 'iI':
if counter > 0:
label = label + self.format_roman(c, counter)
else:
label = label + c
return label
def format_letter(self, case, counter):
label = ''
while counter > 0:
counter, x = divmod(counter-1, 26)
# This makes a strong assumption that lowercase letters
# and uppercase letters form two contiguous blocks, with
# letters in order!
s = chr(ord(case) + x)
label = s + label
return label
def format_roman(self, case, counter):
ones = ['i', 'x', 'c', 'm']
fives = ['v', 'l', 'd']
label, index = '', 0
# This will die of IndexError when counter is too big
while counter > 0:
counter, x = divmod(counter, 10)
if x == 9:
label = ones[index] + ones[index+1] + label
elif x == 4:
label = ones[index] + fives[index] + label
else:
if x >= 5:
s = fives[index]
x = x-5
else:
s = ''
s = s + ones[index]*x
label = s + label
index = index + 1
if case == 'I':
return label.upper()
return label
def add_flowing_data(self, data):
if not data: return
prespace = data[:1].isspace()
postspace = data[-1:].isspace()
data = " ".join(data.split())
if self.nospace and not data:
return
elif prespace or self.softspace:
if not data:
if not self.nospace:
self.softspace = 1
self.parskip = 0
return
if not self.nospace:
data = ' ' + data
self.hard_break = self.nospace = self.para_end = \
self.parskip = self.have_label = 0
self.softspace = postspace
self.writer.send_flowing_data(data)
def add_literal_data(self, data):
if not data: return
if self.softspace:
self.writer.send_flowing_data(" ")
self.hard_break = data[-1:] == '\n'
self.nospace = self.para_end = self.softspace = \
self.parskip = self.have_label = 0
self.writer.send_literal_data(data)
def flush_softspace(self):
if self.softspace:
self.hard_break = self.para_end = self.parskip = \
self.have_label = self.softspace = 0
self.nospace = 1
self.writer.send_flowing_data(' ')
def push_alignment(self, align):
if align and align != self.align:
self.writer.new_alignment(align)
self.align = align
self.align_stack.append(align)
else:
self.align_stack.append(self.align)
def pop_alignment(self):
if self.align_stack:
del self.align_stack[-1]
if self.align_stack:
self.align = align = self.align_stack[-1]
self.writer.new_alignment(align)
else:
self.align = None
self.writer.new_alignment(None)
def push_font(self, font):
size, i, b, tt = font
if self.softspace:
self.hard_break = self.para_end = self.softspace = 0
self.nospace = 1
self.writer.send_flowing_data(' ')
if self.font_stack:
csize, ci, cb, ctt = self.font_stack[-1]
if size is AS_IS: size = csize
if i is AS_IS: i = ci
if b is AS_IS: b = cb
if tt is AS_IS: tt = ctt
font = (size, i, b, tt)
self.font_stack.append(font)
self.writer.new_font(font)
def pop_font(self):
if self.font_stack:
del self.font_stack[-1]
if self.font_stack:
font = self.font_stack[-1]
else:
font = None
self.writer.new_font(font)
def push_margin(self, margin):
self.margin_stack.append(margin)
fstack = [m for m in self.margin_stack if m]
if not margin and fstack:
margin = fstack[-1]
self.writer.new_margin(margin, len(fstack))
def pop_margin(self):
if self.margin_stack:
del self.margin_stack[-1]
fstack = [m for m in self.margin_stack if m]
if fstack:
margin = fstack[-1]
else:
margin = None
self.writer.new_margin(margin, len(fstack))
def set_spacing(self, spacing):
self.spacing = spacing
self.writer.new_spacing(spacing)
def push_style(self, *styles):
if self.softspace:
self.hard_break = self.para_end = self.softspace = 0
self.nospace = 1
self.writer.send_flowing_data(' ')
for style in styles:
self.style_stack.append(style)
self.writer.new_styles(tuple(self.style_stack))
def pop_style(self, n=1):
del self.style_stack[-n:]
self.writer.new_styles(tuple(self.style_stack))
def assert_line_data(self, flag=1):
self.nospace = self.hard_break = not flag
self.para_end = self.parskip = self.have_label = 0
class NullWriter:
"""Minimal writer interface to use in testing & inheritance.
A writer which only provides the interface definition; no actions are
taken on any methods. This should be the base class for all writers
which do not need to inherit any implementation methods.
"""
def __init__(self): pass
def flush(self): pass
def new_alignment(self, align): pass
def new_font(self, font): pass
def new_margin(self, margin, level): pass
def new_spacing(self, spacing): pass
def new_styles(self, styles): pass
def send_paragraph(self, blankline): pass
def send_line_break(self): pass
def send_hor_rule(self, *args, **kw): pass
def send_label_data(self, data): pass
def send_flowing_data(self, data): pass
def send_literal_data(self, data): pass
class AbstractWriter(NullWriter):
"""A writer which can be used in debugging formatters, but not much else.
Each method simply announces itself by printing its name and
arguments on standard output.
"""
def new_alignment(self, align):
print("new_alignment(%r)" % (align,))
def new_font(self, font):
print("new_font(%r)" % (font,))
def new_margin(self, margin, level):
print("new_margin(%r, %d)" % (margin, level))
def new_spacing(self, spacing):
print("new_spacing(%r)" % (spacing,))
def new_styles(self, styles):
print("new_styles(%r)" % (styles,))
def send_paragraph(self, blankline):
print("send_paragraph(%r)" % (blankline,))
def send_line_break(self):
print("send_line_break()")
def send_hor_rule(self, *args, **kw):
print("send_hor_rule()")
def send_label_data(self, data):
print("send_label_data(%r)" % (data,))
def send_flowing_data(self, data):
print("send_flowing_data(%r)" % (data,))
def send_literal_data(self, data):
print("send_literal_data(%r)" % (data,))
class DumbWriter(NullWriter):
"""Simple writer class which writes output on the file object passed in
as the file parameter or, if file is omitted, on standard output. The
output is simply word-wrapped to the number of columns specified by
the maxcol parameter. This class is suitable for reflowing a sequence
of paragraphs.
"""
def __init__(self, file=None, maxcol=72):
self.file = file or sys.stdout
self.maxcol = maxcol
NullWriter.__init__(self)
self.reset()
def reset(self):
self.col = 0
self.atbreak = 0
def send_paragraph(self, blankline):
self.file.write('\n'*blankline)
self.col = 0
self.atbreak = 0
def send_line_break(self):
self.file.write('\n')
self.col = 0
self.atbreak = 0
def send_hor_rule(self, *args, **kw):
self.file.write('\n')
self.file.write('-'*self.maxcol)
self.file.write('\n')
self.col = 0
self.atbreak = 0
def send_literal_data(self, data):
self.file.write(data)
i = data.rfind('\n')
if i >= 0:
self.col = 0
data = data[i+1:]
data = data.expandtabs()
self.col = self.col + len(data)
self.atbreak = 0
def send_flowing_data(self, data):
if not data: return
atbreak = self.atbreak or data[0].isspace()
col = self.col
maxcol = self.maxcol
write = self.file.write
for word in data.split():
if atbreak:
if col + len(word) >= maxcol:
write('\n')
col = 0
else:
write(' ')
col = col + 1
write(word)
col = col + len(word)
atbreak = 1
self.col = col
self.atbreak = data[-1].isspace()
def test(file = None):
w = DumbWriter()
f = AbstractFormatter(w)
if file is not None:
fp = open(file)
elif sys.argv[1:]:
fp = open(sys.argv[1])
else:
fp = sys.stdin
for line in fp:
if line == '\n':
f.end_paragraph(1)
else:
f.add_flowing_data(line)
f.end_paragraph(0)
if __name__ == '__main__':
test()
|
vijayanandnandam/youtube-dl
|
refs/heads/master
|
youtube_dl/extractor/spankwire.py
|
53
|
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_unquote,
compat_urllib_parse_urlparse,
)
from ..utils import (
sanitized_Request,
str_to_int,
unified_strdate,
)
from ..aes import aes_decrypt_text
class SpankwireIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?(?P<url>spankwire\.com/[^/]*/video(?P<id>[0-9]+)/?)'
_TESTS = [{
# download URL pattern: */<height>P_<tbr>K_<video_id>.mp4
'url': 'http://www.spankwire.com/Buckcherry-s-X-Rated-Music-Video-Crazy-Bitch/video103545/',
'md5': '8bbfde12b101204b39e4b9fe7eb67095',
'info_dict': {
'id': '103545',
'ext': 'mp4',
'title': 'Buckcherry`s X Rated Music Video Crazy Bitch',
'description': 'Crazy Bitch X rated music video.',
'uploader': 'oreusz',
'uploader_id': '124697',
'upload_date': '20070507',
'age_limit': 18,
}
}, {
# download URL pattern: */mp4_<format_id>_<video_id>.mp4
'url': 'http://www.spankwire.com/Titcums-Compiloation-I/video1921551/',
'md5': '09b3c20833308b736ae8902db2f8d7e6',
'info_dict': {
'id': '1921551',
'ext': 'mp4',
'title': 'Titcums Compiloation I',
'description': 'cum on tits',
'uploader': 'dannyh78999',
'uploader_id': '3056053',
'upload_date': '20150822',
'age_limit': 18,
},
}]
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
req = sanitized_Request('http://www.' + mobj.group('url'))
req.add_header('Cookie', 'age_verified=1')
webpage = self._download_webpage(req, video_id)
title = self._html_search_regex(
r'<h1>([^<]+)', webpage, 'title')
description = self._html_search_regex(
r'(?s)<div\s+id="descriptionContent">(.+?)</div>',
webpage, 'description', fatal=False)
thumbnail = self._html_search_regex(
r'playerData\.screenShot\s*=\s*["\']([^"\']+)["\']',
webpage, 'thumbnail', fatal=False)
uploader = self._html_search_regex(
r'by:\s*<a [^>]*>(.+?)</a>',
webpage, 'uploader', fatal=False)
uploader_id = self._html_search_regex(
r'by:\s*<a href="/(?:user/viewProfile|Profile\.aspx)\?.*?UserId=(\d+).*?"',
webpage, 'uploader id', fatal=False)
upload_date = unified_strdate(self._html_search_regex(
r'</a> on (.+?) at \d+:\d+',
webpage, 'upload date', fatal=False))
view_count = str_to_int(self._html_search_regex(
r'<div id="viewsCounter"><span>([\d,\.]+)</span> views</div>',
webpage, 'view count', fatal=False))
comment_count = str_to_int(self._html_search_regex(
r'<span\s+id="spCommentCount"[^>]*>([\d,\.]+)</span>',
webpage, 'comment count', fatal=False))
videos = re.findall(
r'playerData\.cdnPath([0-9]{3,})\s*=\s*(?:encodeURIComponent\()?["\']([^"\']+)["\']', webpage)
heights = [int(video[0]) for video in videos]
video_urls = list(map(compat_urllib_parse_unquote, [video[1] for video in videos]))
if webpage.find(r'flashvars\.encrypted = "true"') != -1:
password = self._search_regex(
r'flashvars\.video_title = "([^"]+)',
webpage, 'password').replace('+', ' ')
video_urls = list(map(
lambda s: aes_decrypt_text(s, password, 32).decode('utf-8'),
video_urls))
formats = []
for height, video_url in zip(heights, video_urls):
path = compat_urllib_parse_urlparse(video_url).path
m = re.search(r'/(?P<height>\d+)[pP]_(?P<tbr>\d+)[kK]', path)
if m:
tbr = int(m.group('tbr'))
height = int(m.group('height'))
else:
tbr = None
formats.append({
'url': video_url,
'format_id': '%dp' % height,
'height': height,
'tbr': tbr,
})
self._sort_formats(formats)
age_limit = self._rta_search(webpage)
return {
'id': video_id,
'title': title,
'description': description,
'thumbnail': thumbnail,
'uploader': uploader,
'uploader_id': uploader_id,
'upload_date': upload_date,
'view_count': view_count,
'comment_count': comment_count,
'formats': formats,
'age_limit': age_limit,
}
|
herilalaina/scikit-learn
|
refs/heads/master
|
examples/plot_anomaly_comparison.py
|
17
|
"""
============================================================================
Comparing anomaly detection algorithms for outlier detection on toy datasets
============================================================================
This example shows characteristics of different anomaly detection algorithms
on 2D datasets. Datasets contain one or two modes (regions of high density)
to illustrate the ability of algorithms to cope with multimodal data.
For each dataset, 15% of samples are generated as random uniform noise. This
proportion is the value given to the nu parameter of the OneClassSVM and the
contamination parameter of the other outlier detection algorithms.
Decision boundaries between inliers and outliers are displayed in black.
Local Outlier Factor (LOF) does not show a decision boundary in black as it
has no predict method to be applied on new data.
While these examples give some intuition about the algorithms, this
intuition might not apply to very high dimensional data.
Finally, note that parameters of the models have been here handpicked but
that in practice they need to be adjusted. In the absence of labelled data,
the problem is completely unsupervised so model selection can be a challenge.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Albert Thomas <albert.thomas@telecom-paristech.fr>
# License: BSD 3 clause
import time
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from sklearn import svm
from sklearn.datasets import make_moons, make_blobs
from sklearn.covariance import EllipticEnvelope
from sklearn.ensemble import IsolationForest
from sklearn.neighbors import LocalOutlierFactor
print(__doc__)
matplotlib.rcParams['contour.negative_linestyle'] = 'solid'
# Example settings
n_samples = 300
outliers_fraction = 0.15
n_outliers = int(outliers_fraction * n_samples)
n_inliers = n_samples - n_outliers
# define outlier/anomaly detection methods to be compared
anomaly_algorithms = [
("Robust covariance", EllipticEnvelope(contamination=outliers_fraction)),
("One-Class SVM", svm.OneClassSVM(nu=outliers_fraction, kernel="rbf",
gamma=0.1)),
("Isolation Forest", IsolationForest(contamination=outliers_fraction,
random_state=42)),
("Local Outlier Factor", LocalOutlierFactor(
n_neighbors=35, contamination=outliers_fraction))]
# Define datasets
blobs_params = dict(random_state=0, n_samples=n_inliers, n_features=2)
datasets = [
make_blobs(centers=[[0, 0], [0, 0]], cluster_std=0.5,
**blobs_params)[0],
make_blobs(centers=[[2, 2], [-2, -2]], cluster_std=[1.5, .3],
**blobs_params)[0],
4. * (make_moons(n_samples=n_samples, noise=.05, random_state=0)[0] -
np.array([0.5, 0.25])),
14. * (np.random.RandomState(42).rand(n_samples, 2) - 0.5)]
# Compare given classifiers under given settings
xx, yy = np.meshgrid(np.linspace(-7, 7, 150),
np.linspace(-7, 7, 150))
plt.figure(figsize=(len(anomaly_algorithms) * 2 + 3, 12.5))
plt.subplots_adjust(left=.02, right=.98, bottom=.001, top=.96, wspace=.05,
hspace=.01)
plot_num = 1
rng = np.random.RandomState(42)
for i_dataset, X in enumerate(datasets):
# Add outliers
X = np.concatenate([X, rng.uniform(low=-6, high=6,
size=(n_outliers, 2))], axis=0)
for name, algorithm in anomaly_algorithms:
t0 = time.time()
algorithm.fit(X)
t1 = time.time()
plt.subplot(len(datasets), len(anomaly_algorithms), plot_num)
if i_dataset == 0:
plt.title(name, size=18)
# fit the data and tag outliers
if name == "Local Outlier Factor":
y_pred = algorithm.fit_predict(X)
else:
y_pred = algorithm.fit(X).predict(X)
# plot the levels lines and the points
if name != "Local Outlier Factor": # LOF does not implement predict
Z = algorithm.predict(np.c_[xx.ravel(), yy.ravel()])
Z = Z.reshape(xx.shape)
plt.contour(xx, yy, Z, levels=[0], linewidths=2, colors='black')
colors = np.array(['#377eb8', '#ff7f00'])
plt.scatter(X[:, 0], X[:, 1], s=10, color=colors[(y_pred + 1) // 2])
plt.xlim(-7, 7)
plt.ylim(-7, 7)
plt.xticks(())
plt.yticks(())
plt.text(.99, .01, ('%.2fs' % (t1 - t0)).lstrip('0'),
transform=plt.gca().transAxes, size=15,
horizontalalignment='right')
plot_num += 1
plt.show()
|
Laeeth/stanford-corenlp-python
|
refs/heads/master
|
setup.py
|
4
|
import sys
from setuptools import setup, find_packages
PACKAGE = "corenlp"
NAME = "stanford-corenlp-python"
DESCRIPTION = "A Stanford Core NLP wrapper (wordseer fork)"
AUTHOR = "Hiroyoshi Komatsu, Dustin Smith, Aditi Muralidharan, Ian MacFarland"
AUTHOR_EMAIL = "aditi.shrikumar@gmail.com"
URL = "https://github.com/Wordseer/stanford-corenlp-python"
VERSION = "3.3.10"
INSTALLATION_REQS = ["unidecode >= 0.04.12", "xmltodict >= 0.4.6"]
PEXPECT = "pexpect >= 2.4"
WINPEXPECT = "winpexpect >= 1.5"
if "win32" in sys.platform or "cygwin" in sys.platform:
INSTALLATION_REQS.append(WINPEXPECT)
else:
INSTALLATION_REQS.append(PEXPECT)
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=find_packages(),
package_data = {"": ["*.properties"],
"corenlp": ["*.properties"]},
install_requires=INSTALLATION_REQS,
classifiers=[
("License :: OSI Approved :: GNU General Public License v2 or later "
"(GPLv2+)"),
"Programming Language :: Python",
],
)
|
chanul13/django-basic-apps
|
refs/heads/master
|
setup.py
|
8
|
import os
from distutils.core import setup
def fullsplit(path, result=None):
"""
Split a pathname into components (the opposite of os.path.join) in a
platform-neutral way.
"""
if result is None:
result = []
head, tail = os.path.split(path)
if head == "":
return [tail] + result
if head == path:
return result
return fullsplit(head, [tail] + result)
package_dir = "basic"
packages = []
for dirpath, dirnames, filenames in os.walk(package_dir):
# ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith("."):
del dirnames[i]
if "__init__.py" in filenames:
packages.append(".".join(fullsplit(dirpath)))
setup(name='django-basic-apps',
version='0.7',
description='Django Basic Apps',
author='Nathan Borror',
url='http://github.com/nathanborror/django-basic-apps',
packages=packages)
|
xmission/d-note
|
refs/heads/master
|
venv/lib/python2.7/site-packages/requests/packages/urllib3/contrib/__init__.py
|
12133432
| |
350dotorg/Django
|
refs/heads/master
|
django/conf/locale/lt/__init__.py
|
12133432
| |
ajufrancis/neutronmap
|
refs/heads/master
|
neutronmap/tests/__init__.py
|
12133432
| |
nangia/django-allauth
|
refs/heads/master
|
allauth/socialaccount/providers/hubic/__init__.py
|
12133432
| |
ic-hep/DIRAC
|
refs/heads/rel-v6r15
|
RequestManagementSystem/Agent/RequestOperations/ForwardDISET.py
|
3
|
########################################################################
# $HeadURL $
# File: ForwardDISET.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/22 12:40:06
########################################################################
""" :mod: ForwardDISET
==================
.. module: ForwardDISET
:synopsis: DISET forwarding operation handler
.. moduleauthor:: Krzysztof.Ciba@NOSPAMgmail.com
DISET forwarding operation handler
"""
__RCSID__ = "$Id $"
# #
# @file ForwardDISET.py
# @author Krzysztof.Ciba@NOSPAMgmail.com
# @date 2013/03/22 12:40:22
# @brief Definition of ForwardDISET class.
# # imports
from DIRAC import S_OK, S_ERROR, gConfig
from DIRAC.RequestManagementSystem.private.OperationHandlerBase import OperationHandlerBase
from DIRAC.Core.DISET.RPCClient import executeRPCStub
from DIRAC.Core.Utilities import DEncode
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData
########################################################################
class ForwardDISET( OperationHandlerBase ):
"""
.. class:: ForwardDISET
functor forwarding DISET operations
"""
def __init__( self, operation = None, csPath = None ):
""" c'tor
:param Operation operation: an Operation instance
:param str csPath: CS path for this handler
"""
# # call base class c'tor
OperationHandlerBase.__init__( self, operation, csPath )
def __call__( self ):
""" execute RPC stub """
# # decode arguments
try:
decode, length = DEncode.decode( self.operation.Arguments )
self.log.debug( "decoded len=%s val=%s" % ( length, decode ) )
except ValueError, error:
self.log.exception( error )
self.operation.Error = str( error )
self.operation.Status = "Failed"
return S_ERROR( str( error ) )
# ForwardDiset is supposed to be used with a host certificate
useServerCertificate = gConfig.useServerCertificate()
gConfigurationData.setOptionInCFG( '/DIRAC/Security/UseServerCertificate', 'true' )
forward = executeRPCStub( decode )
if not useServerCertificate:
gConfigurationData.setOptionInCFG( '/DIRAC/Security/UseServerCertificate', 'false' )
if not forward["OK"]:
self.log.error( "unable to execute operation", "'%s' : %s" % ( self.operation.Type, forward["Message"] ) )
self.operation.Error = forward["Message"]
return forward
self.log.info( "DISET forwarding done" )
self.operation.Status = "Done"
return S_OK()
|
letsencrypt/letsencrypt
|
refs/heads/master
|
certbot-dns-nsone/docs/conf.py
|
3
|
# -*- coding: utf-8 -*-
#
# certbot-dns-nsone documentation build configuration file, created by
# sphinx-quickstart on Wed May 10 18:30:40 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode']
autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'certbot-dns-nsone'
copyright = u'2017, Certbot Project'
author = u'Certbot Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0'
# The full version, including alpha/beta/rc tags.
release = u'0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
default_role = 'py:obj'
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'certbot-dns-nsonedoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'certbot-dns-nsone.tex', u'certbot-dns-nsone Documentation',
u'Certbot Project', 'manual'),
]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'certbot-dns-nsone', u'certbot-dns-nsone Documentation',
[author], 1)
]
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'certbot-dns-nsone', u'certbot-dns-nsone Documentation',
author, 'certbot-dns-nsone', 'One line description of project.',
'Miscellaneous'),
]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/', None),
'acme': ('https://acme-python.readthedocs.org/en/latest/', None),
'certbot': ('https://certbot.eff.org/docs/', None),
}
|
linktlh/Toontown-journey
|
refs/heads/master
|
toontown/dna/DNAGroup.py
|
3
|
from panda3d.core import PandaNode
import DNAUtil
class DNAGroup:
COMPONENT_CODE = 1
def __init__(self, name):
self.name = name
self.children = []
self.parent = None
self.visGroup = None
def add(self, child):
self.children += [child]
def remove(self, child):
self.children.remove(child)
def at(self, index):
return self.children[index]
def setParent(self, parent):
self.parent = parent
self.visGroup = parent.getVisGroup()
def getParent(self):
return self.parent
def clearParent(self):
self.parent = None
self.visGroup = None
def getVisGroup(self):
return self.visGroup
def getNumChildren(self):
return len(self.children)
def getName(self):
return self.name
def setName(self, name):
self.name = name
def makeFromDGI(self, dgi):
self.name = DNAUtil.dgiExtractString8(dgi)
DNAUtil.dgiExtractString8(dgi)
DNAUtil.dgiExtractString8(dgi)
def traverse(self, nodePath, dnaStorage):
node = PandaNode(self.name)
nodePath = nodePath.attachNewNode(node, 0)
for child in self.children:
child.traverse(nodePath, dnaStorage)
|
matheuskiser/pdx_code_guild
|
refs/heads/master
|
python/to_to_app/utils.py
|
1
|
import datetime
class Utils(object):
# Convert argument to a different format. Returns string
def format_str(self, from_var):
return from_var.strftime('%m/%d/%Y')
# Convert argument to datetime format
def to_date_format(self, from_var):
return datetime.datetime.strptime(str(from_var), '%m/%d/%Y')
|
JamesMura/furry-meme-py
|
refs/heads/master
|
stackclient/forms.py
|
1
|
from django import forms
from django.core.exceptions import ValidationError
class UserRegistrationForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget=forms.PasswordInput(), required=True, min_length=6)
confirmPassword = forms.CharField(widget=forms.PasswordInput(), label="Password Confirmation", required=True,
min_length=6)
def clean_confirmPassword(self):
if 'password' in self.cleaned_data:
if self.cleaned_data["confirmPassword"] != self.cleaned_data["password"]:
raise ValidationError("Passwords do not match.")
return True
|
fbocharov/au-linux-kernel-spring-2016
|
refs/heads/master
|
linux/scripts/gdb/vmlinux-gdb.py
|
593
|
#
# gdb helper commands and functions for Linux kernel debugging
#
# loader module
#
# Copyright (c) Siemens AG, 2012, 2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import os
sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb")
try:
gdb.parse_and_eval("0")
gdb.execute("", to_string=True)
except:
gdb.write("NOTE: gdb 7.2 or later required for Linux helper scripts to "
"work.\n")
else:
import linux.utils
import linux.symbols
import linux.modules
import linux.dmesg
import linux.tasks
import linux.cpus
import linux.lists
|
tewk/parrot-select
|
refs/heads/tewk/select
|
examples/benchmarks/oofib.py
|
8
|
#! python
# Copyright (C) 2004-2011, Parrot Foundation.
import sys
class A:
def fib(self,n):
if (n < 2):
return(n)
return( self.fibA(n-2) + self.fibB(n-1) )
def fibA(self,n):
if (n < 2):
return(n)
return( self.fib(n-2) + self.fibB(n-1) )
class B (A):
def fibB(self,n):
if (n < 2):
return(n)
return( self.fib(n-2) + self.fibA(n-1) )
N = int(len(sys.argv) == 2 and sys.argv[1] or 24)
b = B()
print "fib(%d) = %d" %( N, b.fib(N) )
|
Liamraystanley/dropb.in
|
refs/heads/master
|
lib/requests/packages/urllib3/__init__.py
|
156
|
"""
urllib3 - Thread-safe connection pooling and re-using.
"""
__author__ = 'Andrey Petrov (andrey.petrov@shazow.net)'
__license__ = 'MIT'
__version__ = 'dev'
from .connectionpool import (
HTTPConnectionPool,
HTTPSConnectionPool,
connection_from_url
)
from . import exceptions
from .filepost import encode_multipart_formdata
from .poolmanager import PoolManager, ProxyManager, proxy_from_url
from .response import HTTPResponse
from .util.request import make_headers
from .util.url import get_host
from .util.timeout import Timeout
from .util.retry import Retry
# Set default logging handler to avoid "No handler found" warnings.
import logging
try: # Python 2.7+
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
logging.getLogger(__name__).addHandler(NullHandler())
def add_stderr_logger(level=logging.DEBUG):
"""
Helper for quickly adding a StreamHandler to the logger. Useful for
debugging.
Returns the handler after adding it.
"""
# This method needs to be in this __init__.py to get the __name__ correct
# even if urllib3 is vendored within another package.
logger = logging.getLogger(__name__)
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s'))
logger.addHandler(handler)
logger.setLevel(level)
logger.debug('Added a stderr logging handler to logger: %s' % __name__)
return handler
# ... Clean up.
del NullHandler
# Set security warning to only go off once by default.
import warnings
warnings.simplefilter('always', exceptions.SecurityWarning)
def disable_warnings(category=exceptions.HTTPWarning):
"""
Helper for quickly disabling all urllib3 warnings.
"""
warnings.simplefilter('ignore', category)
|
jas02/easybuild-easyblocks
|
refs/heads/master
|
easybuild/easyblocks/m/mcr.py
|
4
|
##
# Copyright 2009-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://www.herculesstichting.be/in_English)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# http://github.com/hpcugent/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for installing MCR, implemented as an easyblock
@author: Stijn De Weirdt (Ghent University)
@author: Dries Verdegem (Ghent University)
@author: Kenneth Hoste (Ghent University)
@author: Pieter De Baets (Ghent University)
@author: Jens Timmerman (Ghent University)
@author: Fotis Georgatos (Uni.Lu, NTUA)
@author: Balazs Hajgato (Vrije Universiteit Brussel)
"""
import re
import os
import shutil
import stat
from distutils.version import LooseVersion
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import adjust_permissions, read_file, write_file
from easybuild.tools.run import run_cmd
class EB_MCR(EasyBlock):
"""Support for installing MCR."""
def __init__(self, *args, **kwargs):
"""Add extra config options specific to MCR."""
super(EB_MCR, self).__init__(*args, **kwargs)
self.comp_fam = None
self.configfilename = "my_installer_input.txt"
self.subdir = ''
@staticmethod
def extra_options():
"""Custom easyconfig parameters for MCR."""
extra_vars = {
'java_options': ['-Xmx256m', "$_JAVA_OPTIONS value set for install and in module file.", CUSTOM],
}
return EasyBlock.extra_options(extra_vars)
def configure_step(self):
"""Configure MCR installation: create license file."""
configfile = os.path.join(self.builddir, self.configfilename)
if LooseVersion(self.version) < LooseVersion('2015a'):
shutil.copyfile(os.path.join(self.cfg['start_dir'], 'installer_input.txt'), configfile)
config = read_file(configfile)
config = re.sub(r"^# destinationFolder=.*", "destinationFolder=%s" % self.installdir, config, re.M)
config = re.sub(r"^# agreeToLicense=.*", "agreeToLicense=Yes", config, re.M)
config = re.sub(r"^# mode=.*", "mode=silent", config, re.M)
else:
config = '\n'.join([
"destinationFolder=%s" % self.installdir,
"agreeToLicense=Yes",
"mode=silent",
])
write_file(configfile, config)
self.log.debug("configuration file written to %s:\n %s", configfile, config)
def build_step(self):
"""No building of MCR, no sources available."""
pass
def install_step(self):
"""MCR install procedure using 'install' command."""
src = os.path.join(self.cfg['start_dir'], 'install')
# make sure install script is executable
adjust_permissions(src, stat.S_IXUSR)
# make sure $DISPLAY is not defined, which may lead to (hard to trace) problems
# this is a workaround for not being able to specify --nodisplay to the install scripts
if 'DISPLAY' in os.environ:
os.environ.pop('DISPLAY')
if not '_JAVA_OPTIONS' in self.cfg['preinstallopts']:
java_options = 'export _JAVA_OPTIONS="%s" && ' % self.cfg['java_options']
self.cfg['preinstallopts'] = java_options + self.cfg['preinstallopts']
configfile = "%s/%s" % (self.builddir, self.configfilename)
cmd = "%s ./install -v -inputFile %s %s" % (self.cfg['preinstallopts'], configfile, self.cfg['installopts'])
run_cmd(cmd, log_all=True, simple=True)
# determine subdirectory (e.g. v84 (2014a, 2014b), v85 (2015a), ...)
subdirs = os.listdir(self.installdir)
if len(subdirs) == 1:
self.subdir = subdirs[0]
else:
raise EasyBuildError("Found multiple subdirectories, don't know which one to pick: %s", subdirs)
def sanity_check_step(self):
"""Custom sanity check for MCR."""
custom_paths = {
'files': [],
'dirs': [os.path.join(self.subdir, x, 'glnxa64') for x in ['runtime', 'bin', 'sys/os']],
}
super(EB_MCR, self).sanity_check_step(custom_paths=custom_paths)
def make_module_extra(self):
"""Extend PATH and set proper _JAVA_OPTIONS (e.g., -Xmx)."""
txt = super(EB_MCR, self).make_module_extra()
xapplresdir = os.path.join(self.installdir, self.subdir, 'X11', 'app-defaults')
txt += self.module_generator.set_environment('XAPPLRESDIR', xapplresdir)
for ldlibdir in ['runtime', 'bin', os.path.join('sys', 'os')]:
libdir = os.path.join(self.subdir, ldlibdir, 'glnxa64')
txt += self.module_generator.prepend_paths('LD_LIBRARY_PATH', libdir)
txt += self.module_generator.set_environment('_JAVA_OPTIONS', self.cfg['java_options'])
return txt
|
Changaco/oh-mainline
|
refs/heads/master
|
vendor/packages/celery/funtests/suite/test_basic.py
|
18
|
import operator
import os
import sys
import time
# funtest config
sys.path.insert(0, os.getcwd())
sys.path.insert(0, os.path.join(os.getcwd(), os.pardir))
import suite
from celery.tests.utils import unittest
from celery.tests.functional import tasks
from celery.tests.functional.case import WorkerCase
from celery.task.control import broadcast
class test_basic(WorkerCase):
def test_started(self):
self.assertWorkerAlive()
def test_roundtrip_simple_task(self):
publisher = tasks.add.get_publisher()
results = [(tasks.add.apply_async(i, publisher=publisher), i)
for i in zip(xrange(100), xrange(100))]
for result, i in results:
self.assertEqual(result.get(timeout=10), operator.add(*i))
def test_dump_active(self, sleep=1):
r1 = tasks.sleeptask.delay(sleep)
r2 = tasks.sleeptask.delay(sleep)
self.ensure_accepted(r1.task_id)
active = self.inspect().active(safe=True)
self.assertTrue(active)
active = active[self.worker.hostname]
self.assertEqual(len(active), 2)
self.assertEqual(active[0]["name"], tasks.sleeptask.name)
self.assertEqual(active[0]["args"], [sleep])
def test_dump_reserved(self, sleep=1):
r1 = tasks.sleeptask.delay(sleep)
r2 = tasks.sleeptask.delay(sleep)
r3 = tasks.sleeptask.delay(sleep)
r4 = tasks.sleeptask.delay(sleep)
self.ensure_accepted(r1.task_id)
reserved = self.inspect().reserved(safe=True)
self.assertTrue(reserved)
reserved = reserved[self.worker.hostname]
self.assertEqual(reserved[0]["name"], tasks.sleeptask.name)
self.assertEqual(reserved[0]["args"], [sleep])
def test_dump_schedule(self, countdown=1):
r1 = tasks.add.apply_async((2, 2), countdown=countdown)
r2 = tasks.add.apply_async((2, 2), countdown=countdown)
self.ensure_scheduled(r1.task_id, interval=0.1)
schedule = self.inspect().scheduled(safe=True)
self.assertTrue(schedule)
schedule = schedule[self.worker.hostname]
self.assertTrue(len(schedule), 2)
self.assertEqual(schedule[0]["request"]["name"], tasks.add.name)
self.assertEqual(schedule[0]["request"]["args"], [2, 2])
if __name__ == "__main__":
unittest.main()
|
babyliynfg/cross
|
refs/heads/master
|
tools/project-creator/Python2.6.6/Lib/distutils/tests/test_unixccompiler.py
|
6
|
"""Tests for distutils.unixccompiler."""
import sys
import unittest
from distutils import sysconfig
from distutils.unixccompiler import UnixCCompiler
class UnixCCompilerTestCase(unittest.TestCase):
def setUp(self):
self._backup_platform = sys.platform
self._backup_get_config_var = sysconfig.get_config_var
class CompilerWrapper(UnixCCompiler):
def rpath_foo(self):
return self.runtime_library_dir_option('/foo')
self.cc = CompilerWrapper()
def tearDown(self):
sys.platform = self._backup_platform
sysconfig.get_config_var = self._backup_get_config_var
def test_runtime_libdir_option(self):
# not tested under windows
if sys.platform == 'win32':
return
# Issue#5900
#
# Ensure RUNPATH is added to extension modules with RPATH if
# GNU ld is used
# darwin
sys.platform = 'darwin'
self.assertEqual(self.cc.rpath_foo(), '-L/foo')
# hp-ux
sys.platform = 'hp-ux'
old_gcv = sysconfig.get_config_var
def gcv(v):
return 'xxx'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo'])
def gcv(v):
return 'gcc'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo'])
def gcv(v):
return 'g++'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo'])
sysconfig.get_config_var = old_gcv
# irix646
sys.platform = 'irix646'
self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
# osf1V5
sys.platform = 'osf1V5'
self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
# GCC GNULD
sys.platform = 'bar'
def gcv(v):
if v == 'CC':
return 'gcc'
elif v == 'GNULD':
return 'yes'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo')
# GCC non-GNULD
sys.platform = 'bar'
def gcv(v):
if v == 'CC':
return 'gcc'
elif v == 'GNULD':
return 'no'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo')
# GCC GNULD with fully qualified configuration prefix
# see #7617
sys.platform = 'bar'
def gcv(v):
if v == 'CC':
return 'x86_64-pc-linux-gnu-gcc-4.4.2'
elif v == 'GNULD':
return 'yes'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo')
# non-GCC GNULD
sys.platform = 'bar'
def gcv(v):
if v == 'CC':
return 'cc'
elif v == 'GNULD':
return 'yes'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), '-R/foo')
# non-GCC non-GNULD
sys.platform = 'bar'
def gcv(v):
if v == 'CC':
return 'cc'
elif v == 'GNULD':
return 'no'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), '-R/foo')
# AIX C/C++ linker
sys.platform = 'aix'
def gcv(v):
return 'xxx'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), '-R/foo')
def test_suite():
return unittest.makeSuite(UnixCCompilerTestCase)
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
|
jotes/moto
|
refs/heads/master
|
moto/ec2/responses/placement_groups.py
|
21
|
from __future__ import unicode_literals
from moto.core.responses import BaseResponse
class PlacementGroups(BaseResponse):
def create_placement_group(self):
raise NotImplementedError('PlacementGroups.create_placement_group is not yet implemented')
def delete_placement_group(self):
raise NotImplementedError('PlacementGroups.delete_placement_group is not yet implemented')
def describe_placement_groups(self):
raise NotImplementedError('PlacementGroups.describe_placement_groups is not yet implemented')
|
holmes/intellij-community
|
refs/heads/master
|
python/testData/intentions/afterTypeInDocstring5.py
|
83
|
def foo3(param):
"""
:type param: object
"""
i = param.unresolved()
|
ProjectSWGCore/NGECore2
|
refs/heads/master
|
scripts/loot/lootItems/collections/nightsister_valuables/singing_mountain_clan_bracelet.py
|
2
|
def itemTemplate():
return ['object/tangible/loot/creature_loot/collections/shared_nightsister_bracelet.iff']
def STFparams():
return ['static_item_n','col_nightsister_bracelet_01','static_item_d','col_nightsister_bracelet_01']
def AddToCollection():
return 'col_nightsister_valuables'
def CollectionItemName():
return 'nightsister_bracelet_01'
def stackable():
return 1
|
ibinti/intellij-community
|
refs/heads/master
|
python/lib/Lib/site-packages/django/contrib/gis/geos/prototypes/topology.py
|
311
|
"""
This module houses the GEOS ctypes prototype functions for the
topological operations on geometries.
"""
__all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull',
'geos_difference', 'geos_envelope', 'geos_intersection',
'geos_linemerge', 'geos_pointonsurface', 'geos_preservesimplify',
'geos_simplify', 'geos_symdifference', 'geos_union', 'geos_relate']
from ctypes import c_char_p, c_double, c_int
from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOS_PREPARE
from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_string
from django.contrib.gis.geos.prototypes.geom import geos_char_p
from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc
def topology(func, *args):
"For GEOS unary topology functions."
argtypes = [GEOM_PTR]
if args: argtypes += args
func.argtypes = argtypes
func.restype = GEOM_PTR
func.errcheck = check_geom
return func
### Topology Routines ###
geos_boundary = topology(GEOSFunc('GEOSBoundary'))
geos_buffer = topology(GEOSFunc('GEOSBuffer'), c_double, c_int)
geos_centroid = topology(GEOSFunc('GEOSGetCentroid'))
geos_convexhull = topology(GEOSFunc('GEOSConvexHull'))
geos_difference = topology(GEOSFunc('GEOSDifference'), GEOM_PTR)
geos_envelope = topology(GEOSFunc('GEOSEnvelope'))
geos_intersection = topology(GEOSFunc('GEOSIntersection'), GEOM_PTR)
geos_linemerge = topology(GEOSFunc('GEOSLineMerge'))
geos_pointonsurface = topology(GEOSFunc('GEOSPointOnSurface'))
geos_preservesimplify = topology(GEOSFunc('GEOSTopologyPreserveSimplify'), c_double)
geos_simplify = topology(GEOSFunc('GEOSSimplify'), c_double)
geos_symdifference = topology(GEOSFunc('GEOSSymDifference'), GEOM_PTR)
geos_union = topology(GEOSFunc('GEOSUnion'), GEOM_PTR)
# GEOSRelate returns a string, not a geometry.
geos_relate = GEOSFunc('GEOSRelate')
geos_relate.argtypes = [GEOM_PTR, GEOM_PTR]
geos_relate.restype = geos_char_p
geos_relate.errcheck = check_string
# Routines only in GEOS 3.1+
if GEOS_PREPARE:
geos_cascaded_union = GEOSFunc('GEOSUnionCascaded')
geos_cascaded_union.argtypes = [GEOM_PTR]
geos_cascaded_union.restype = GEOM_PTR
__all__.append('geos_cascaded_union')
|
xforce/diorama-native-modding
|
refs/heads/master
|
tools/gyp/test/win/gyptest-link-force-symbol-reference.py
|
237
|
#!/usr/bin/env python
# Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Make sure ForceSymbolReference is translated properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
CHDIR = 'linker-flags'
test.run_gyp('force-symbol-reference.gyp', chdir=CHDIR)
test.build('force-symbol-reference.gyp', test.ALL, chdir=CHDIR)
output = test.run_dumpbin(
'/disasm', test.built_file_path('test_force_reference.exe', chdir=CHDIR))
if '?x@@YAHXZ:' not in output or '?y@@YAHXZ:' not in output:
test.fail_test()
test.pass_test()
|
savi-dev/quantum
|
refs/heads/master
|
quantum/plugins/ryu/nova/__init__.py
|
12133432
| |
EdDev/vdsm
|
refs/heads/master
|
lib/vdsm/network/netinfo/bonding.py
|
1
|
#
# Copyright 2015-2017 Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Refer to the README and COPYING files for full details of the license
from __future__ import absolute_import
from functools import partial
import logging
import os
import six
from vdsm.network.ipwrapper import Link
from .misc import visible_devs
from . import nics
from vdsm.network.link.bond import Bond
# In order to limit the scope of change, this module is now acting as a proxy
# to the link.bond.sysfs_options module.
from vdsm.network.link.bond import sysfs_options
from vdsm.network.link.bond.sysfs_options import properties
from vdsm.network.link.bond.sysfs_options import getDefaultBondingOptions
from vdsm.network.link.bond.sysfs_options import getAllDefaultBondingOptions
from vdsm.network.link.setup import parse_bond_options
getDefaultBondingOptions
getAllDefaultBondingOptions
parse_bond_options
BONDING_ACTIVE_SLAVE = '/sys/class/net/%s/bonding/active_slave'
BONDING_FAILOVER_MODES = frozenset(('1', '3'))
BONDING_LOADBALANCE_MODES = frozenset(('0', '2', '4', '5', '6'))
BONDING_OPT = '/sys/class/net/%s/bonding/%s'
BONDING_SLAVES = '/sys/class/net/%s/bonding/slaves'
BONDING_SLAVE_OPT = '/sys/class/net/%s/bonding_slave/%s'
bondings = partial(visible_devs, Link.isBOND)
def _file_value(path):
if os.path.exists(path):
with open(path, 'r') as f:
return f.read().replace('N/A', '').strip()
def get_bond_slave_agg_info(nic_name):
agg_id_path = BONDING_SLAVE_OPT % (nic_name, 'ad_aggregator_id')
agg_id = _file_value(agg_id_path)
return {'ad_aggregator_id': agg_id} if agg_id else {}
def get_bond_agg_info(bond_name):
agg_id_path = BONDING_OPT % (bond_name, 'ad_aggregator')
ad_mac_path = BONDING_OPT % (bond_name, 'ad_partner_mac')
agg_id = _file_value(agg_id_path)
agg_mac = _file_value(ad_mac_path)
return {
'ad_aggregator_id': agg_id, 'ad_partner_mac': agg_mac
} if agg_id and agg_mac else {}
def info(link):
bond = Bond(link.name)
return {'hwaddr': link.address, 'slaves': list(bond.slaves),
'active_slave': bond.active_slave(),
'opts': bond.options}
def speed(bond_name):
"""Returns the bond speed if bondName refers to a bond, 0 otherwise."""
opts = properties(bond_name,
filter_properties=('slaves', 'active_slave', 'mode'))
try:
if opts['slaves']:
if opts['mode'][1] in BONDING_FAILOVER_MODES:
active_slave = opts['active_slave']
s = nics.speed(active_slave[0]) if active_slave else 0
elif opts['mode'][1] in BONDING_LOADBALANCE_MODES:
s = sum(nics.speed(slave) for slave in opts['slaves'])
return s
except Exception:
logging.exception('cannot read %s speed', bond_name)
return 0
def bondOptsForIfcfg(opts):
"""
Options having symbolic values, e.g. 'mode', are presented by sysfs in
the order symbolic name, numeric value, e.g. 'balance-rr 0'.
Choose the numeric value from a list given by bondOpts().
"""
return ' '.join((opt + '=' + val for (opt, val)
in sorted(six.iteritems(opts))))
def permanent_address():
paddr = {}
for b in Bond.bonds():
with open('/proc/net/bonding/' + b) as f:
for line in f:
if line.startswith('Slave Interface: '):
slave = line[len('Slave Interface: '):-1]
elif line.startswith('Permanent HW addr: ') and slave:
paddr[slave] = line[len('Permanent HW addr: '):-1]
return paddr
def numerize_bond_mode(mode):
return sysfs_options.numerize_bond_mode(mode)
|
gilneidp/FinalProject
|
refs/heads/master
|
ALL_FILES/pox/datapaths/__init__.py
|
44
|
# Copyright 2013 James McCauley
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Lets you start a default instance of the datapath, for what it's worth.
Example:
./pox.py --no-openflow datapaths:softwareswitch --address=localhost
"""
from pox.lib.ioworker.workers import BackoffWorker
from pox.datapaths.switch import SoftwareSwitch, OFConnection
from pox.datapaths.switch import ExpireMixin
from pox.lib.util import dpid_to_str, str_to_dpid
class OpenFlowWorker (BackoffWorker):
def __init__ (self, switch=None, **kw):
self.switch = switch
self.connection = None
from pox.core import core
self.log = core.getLogger("dp." + dpid_to_str(self.switch.dpid))
super(OpenFlowWorker, self).__init__(switch=switch,**kw)
self._info("Connecting to %s:%s", kw.get('addr'), kw.get('port'))
def _handle_close (self):
super(OpenFlowWorker, self)._handle_close()
def _handle_connect (self):
super(OpenFlowWorker, self)._handle_connect()
self.connection = OFConnection(self)
self.switch.set_connection(self.connection)
self._info("Connected to controller")
def _error (self, *args, **kw):
self.log.error(*args,**kw)
def _warn (self, *args, **kw):
self.log.warn(*args,**kw)
def _info (self, *args, **kw):
self.log.info(*args,**kw)
def _debug (self, *args, **kw):
self.log.debug(*args,**kw)
def do_launch (cls, address = '127.0.0.1', port = 6633, max_retry_delay = 16,
dpid = None, extra_args = None, **kw):
"""
Used for implementing custom switch launching functions
cls is the class of the switch you want to add.
Returns switch instance.
"""
if extra_args is not None:
import ast
extra_args = ast.literal_eval('{%s}' % (extra_args,))
kw.update(extra_args)
from pox.core import core
if not core.hasComponent('datapaths'):
core.register("datapaths", {})
_switches = core.datapaths
if dpid is None:
for dpid in range(1,256):
if dpid not in _switches: break
if dpid in _switches:
raise RuntimeError("Out of DPIDs")
else:
dpid = str_to_dpid(dpid)
switch = cls(dpid=dpid, name="sw"+str(dpid), **kw)
_switches[dpid] = switch
port = int(port)
max_retry_delay = int(max_retry_delay)
def up (event):
import pox.lib.ioworker
global loop
loop = pox.lib.ioworker.RecocoIOLoop()
#loop.more_debugging = True
loop.start()
OpenFlowWorker.begin(loop=loop, addr=address, port=port,
max_retry_delay=max_retry_delay, switch=switch)
from pox.core import core
core.addListenerByName("UpEvent", up)
return switch
def softwareswitch (address='127.0.0.1', port = 6633, max_retry_delay = 16,
dpid = None, extra = None, __INSTANCE__ = None):
"""
Launches a SoftwareSwitch
Not particularly useful, since SoftwareSwitch doesn't do much.
"""
from pox.core import core
core.register("datapaths", {})
class ExpiringSwitch(ExpireMixin, SoftwareSwitch):
pass
do_launch(ExpiringSwitch, address, port, max_retry_delay, dpid,
extra_args = extra)
|
Tranzystorek/servo
|
refs/heads/master
|
tests/wpt/css-tests/tools/pytest/testing/test_config.py
|
166
|
import py, pytest
import _pytest._code
from _pytest.config import getcfg, get_common_ancestor, determine_setup
from _pytest.main import EXIT_NOTESTSCOLLECTED
class TestParseIni:
def test_getcfg_and_config(self, testdir, tmpdir):
sub = tmpdir.mkdir("sub")
sub.chdir()
tmpdir.join("setup.cfg").write(_pytest._code.Source("""
[pytest]
name = value
"""))
rootdir, inifile, cfg = getcfg([sub], ["setup.cfg"])
assert cfg['name'] == "value"
config = testdir.parseconfigure(sub)
assert config.inicfg['name'] == 'value'
def test_getcfg_empty_path(self, tmpdir):
getcfg([''], ['setup.cfg']) #happens on py.test ""
def test_append_parse_args(self, testdir, tmpdir, monkeypatch):
monkeypatch.setenv('PYTEST_ADDOPTS', '--color no -rs --tb="short"')
tmpdir.join("setup.cfg").write(_pytest._code.Source("""
[pytest]
addopts = --verbose
"""))
config = testdir.parseconfig(tmpdir)
assert config.option.color == 'no'
assert config.option.reportchars == 's'
assert config.option.tbstyle == 'short'
assert config.option.verbose
#config = testdir.Config()
#args = [tmpdir,]
#config._preparse(args, addopts=False)
#assert len(args) == 1
def test_tox_ini_wrong_version(self, testdir):
testdir.makefile('.ini', tox="""
[pytest]
minversion=9.0
""")
result = testdir.runpytest()
assert result.ret != 0
result.stderr.fnmatch_lines([
"*tox.ini:2*requires*9.0*actual*"
])
@pytest.mark.parametrize("name", "setup.cfg tox.ini pytest.ini".split())
def test_ini_names(self, testdir, name):
testdir.tmpdir.join(name).write(py.std.textwrap.dedent("""
[pytest]
minversion = 1.0
"""))
config = testdir.parseconfig()
assert config.getini("minversion") == "1.0"
def test_toxini_before_lower_pytestini(self, testdir):
sub = testdir.tmpdir.mkdir("sub")
sub.join("tox.ini").write(py.std.textwrap.dedent("""
[pytest]
minversion = 2.0
"""))
testdir.tmpdir.join("pytest.ini").write(py.std.textwrap.dedent("""
[pytest]
minversion = 1.5
"""))
config = testdir.parseconfigure(sub)
assert config.getini("minversion") == "2.0"
@pytest.mark.xfail(reason="probably not needed")
def test_confcutdir(self, testdir):
sub = testdir.mkdir("sub")
sub.chdir()
testdir.makeini("""
[pytest]
addopts = --qwe
""")
result = testdir.inline_run("--confcutdir=.")
assert result.ret == 0
class TestConfigCmdlineParsing:
def test_parsing_again_fails(self, testdir):
config = testdir.parseconfig()
pytest.raises(AssertionError, lambda: config.parse([]))
def test_explicitly_specified_config_file_is_loaded(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("custom", "")
""")
testdir.makeini("""
[pytest]
custom = 0
""")
testdir.makefile(".cfg", custom = """
[pytest]
custom = 1
""")
config = testdir.parseconfig("-c", "custom.cfg")
assert config.getini("custom") == "1"
class TestConfigAPI:
def test_config_trace(self, testdir):
config = testdir.parseconfig()
l = []
config.trace.root.setwriter(l.append)
config.trace("hello")
assert len(l) == 1
assert l[0] == "hello [config]\n"
def test_config_getoption(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addoption("--hello", "-X", dest="hello")
""")
config = testdir.parseconfig("--hello=this")
for x in ("hello", "--hello", "-X"):
assert config.getoption(x) == "this"
pytest.raises(ValueError, "config.getoption('qweqwe')")
@pytest.mark.skipif('sys.version_info[:2] not in [(2, 6), (2, 7)]')
def test_config_getoption_unicode(self, testdir):
testdir.makeconftest("""
from __future__ import unicode_literals
def pytest_addoption(parser):
parser.addoption('--hello', type='string')
""")
config = testdir.parseconfig('--hello=this')
assert config.getoption('hello') == 'this'
def test_config_getvalueorskip(self, testdir):
config = testdir.parseconfig()
pytest.raises(pytest.skip.Exception,
"config.getvalueorskip('hello')")
verbose = config.getvalueorskip("verbose")
assert verbose == config.option.verbose
def test_config_getvalueorskip_None(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addoption("--hello")
""")
config = testdir.parseconfig()
with pytest.raises(pytest.skip.Exception):
config.getvalueorskip('hello')
def test_getoption(self, testdir):
config = testdir.parseconfig()
with pytest.raises(ValueError):
config.getvalue('x')
assert config.getoption("x", 1) == 1
def test_getconftest_pathlist(self, testdir, tmpdir):
somepath = tmpdir.join("x", "y", "z")
p = tmpdir.join("conftest.py")
p.write("pathlist = ['.', %r]" % str(somepath))
config = testdir.parseconfigure(p)
assert config._getconftest_pathlist('notexist', path=tmpdir) is None
pl = config._getconftest_pathlist('pathlist', path=tmpdir)
print(pl)
assert len(pl) == 2
assert pl[0] == tmpdir
assert pl[1] == somepath
def test_addini(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("myname", "my new ini value")
""")
testdir.makeini("""
[pytest]
myname=hello
""")
config = testdir.parseconfig()
val = config.getini("myname")
assert val == "hello"
pytest.raises(ValueError, config.getini, 'other')
def test_addini_pathlist(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("paths", "my new ini value", type="pathlist")
parser.addini("abc", "abc value")
""")
p = testdir.makeini("""
[pytest]
paths=hello world/sub.py
""")
config = testdir.parseconfig()
l = config.getini("paths")
assert len(l) == 2
assert l[0] == p.dirpath('hello')
assert l[1] == p.dirpath('world/sub.py')
pytest.raises(ValueError, config.getini, 'other')
def test_addini_args(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("args", "new args", type="args")
parser.addini("a2", "", "args", default="1 2 3".split())
""")
testdir.makeini("""
[pytest]
args=123 "123 hello" "this"
""")
config = testdir.parseconfig()
l = config.getini("args")
assert len(l) == 3
assert l == ["123", "123 hello", "this"]
l = config.getini("a2")
assert l == list("123")
def test_addini_linelist(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("xy", "", type="linelist")
parser.addini("a2", "", "linelist")
""")
testdir.makeini("""
[pytest]
xy= 123 345
second line
""")
config = testdir.parseconfig()
l = config.getini("xy")
assert len(l) == 2
assert l == ["123 345", "second line"]
l = config.getini("a2")
assert l == []
@pytest.mark.parametrize('str_val, bool_val',
[('True', True), ('no', False), ('no-ini', True)])
def test_addini_bool(self, testdir, str_val, bool_val):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("strip", "", type="bool", default=True)
""")
if str_val != 'no-ini':
testdir.makeini("""
[pytest]
strip=%s
""" % str_val)
config = testdir.parseconfig()
assert config.getini("strip") is bool_val
def test_addinivalue_line_existing(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("xy", "", type="linelist")
""")
testdir.makeini("""
[pytest]
xy= 123
""")
config = testdir.parseconfig()
l = config.getini("xy")
assert len(l) == 1
assert l == ["123"]
config.addinivalue_line("xy", "456")
l = config.getini("xy")
assert len(l) == 2
assert l == ["123", "456"]
def test_addinivalue_line_new(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
parser.addini("xy", "", type="linelist")
""")
config = testdir.parseconfig()
assert not config.getini("xy")
config.addinivalue_line("xy", "456")
l = config.getini("xy")
assert len(l) == 1
assert l == ["456"]
config.addinivalue_line("xy", "123")
l = config.getini("xy")
assert len(l) == 2
assert l == ["456", "123"]
class TestConfigFromdictargs:
def test_basic_behavior(self):
from _pytest.config import Config
option_dict = {
'verbose': 444,
'foo': 'bar',
'capture': 'no',
}
args = ['a', 'b']
config = Config.fromdictargs(option_dict, args)
with pytest.raises(AssertionError):
config.parse(['should refuse to parse again'])
assert config.option.verbose == 444
assert config.option.foo == 'bar'
assert config.option.capture == 'no'
assert config.args == args
def test_origargs(self):
"""Show that fromdictargs can handle args in their "orig" format"""
from _pytest.config import Config
option_dict = {}
args = ['-vvvv', '-s', 'a', 'b']
config = Config.fromdictargs(option_dict, args)
assert config.args == ['a', 'b']
assert config._origargs == args
assert config.option.verbose == 4
assert config.option.capture == 'no'
def test_inifilename(self, tmpdir):
tmpdir.join("foo/bar.ini").ensure().write(_pytest._code.Source("""
[pytest]
name = value
"""))
from _pytest.config import Config
inifile = '../../foo/bar.ini'
option_dict = {
'inifilename': inifile,
'capture': 'no',
}
cwd = tmpdir.join('a/b')
cwd.join('pytest.ini').ensure().write(_pytest._code.Source("""
[pytest]
name = wrong-value
should_not_be_set = true
"""))
with cwd.ensure(dir=True).as_cwd():
config = Config.fromdictargs(option_dict, ())
assert config.args == [str(cwd)]
assert config.option.inifilename == inifile
assert config.option.capture == 'no'
# this indicates this is the file used for getting configuration values
assert config.inifile == inifile
assert config.inicfg.get('name') == 'value'
assert config.inicfg.get('should_not_be_set') is None
def test_options_on_small_file_do_not_blow_up(testdir):
def runfiletest(opts):
reprec = testdir.inline_run(*opts)
passed, skipped, failed = reprec.countoutcomes()
assert failed == 2
assert skipped == passed == 0
path = testdir.makepyfile("""
def test_f1(): assert 0
def test_f2(): assert 0
""")
for opts in ([], ['-l'], ['-s'], ['--tb=no'], ['--tb=short'],
['--tb=long'], ['--fulltrace'], ['--nomagic'],
['--traceconfig'], ['-v'], ['-v', '-v']):
runfiletest(opts + [path])
def test_preparse_ordering_with_setuptools(testdir, monkeypatch):
pkg_resources = pytest.importorskip("pkg_resources")
def my_iter(name):
assert name == "pytest11"
class EntryPoint:
name = "mytestplugin"
class dist:
pass
def load(self):
class PseudoPlugin:
x = 42
return PseudoPlugin()
return iter([EntryPoint()])
monkeypatch.setattr(pkg_resources, 'iter_entry_points', my_iter)
testdir.makeconftest("""
pytest_plugins = "mytestplugin",
""")
monkeypatch.setenv("PYTEST_PLUGINS", "mytestplugin")
config = testdir.parseconfig()
plugin = config.pluginmanager.getplugin("mytestplugin")
assert plugin.x == 42
def test_plugin_preparse_prevents_setuptools_loading(testdir, monkeypatch):
pkg_resources = pytest.importorskip("pkg_resources")
def my_iter(name):
assert name == "pytest11"
class EntryPoint:
name = "mytestplugin"
def load(self):
assert 0, "should not arrive here"
return iter([EntryPoint()])
monkeypatch.setattr(pkg_resources, 'iter_entry_points', my_iter)
config = testdir.parseconfig("-p", "no:mytestplugin")
plugin = config.pluginmanager.getplugin("mytestplugin")
assert plugin is None
def test_cmdline_processargs_simple(testdir):
testdir.makeconftest("""
def pytest_cmdline_preparse(args):
args.append("-h")
""")
result = testdir.runpytest()
result.stdout.fnmatch_lines([
"*pytest*",
"*-h*",
])
def test_invalid_options_show_extra_information(testdir):
"""display extra information when pytest exits due to unrecognized
options in the command-line"""
testdir.makeini("""
[pytest]
addopts = --invalid-option
""")
result = testdir.runpytest()
result.stderr.fnmatch_lines([
"*error: unrecognized arguments: --invalid-option*",
"* inifile: %s*" % testdir.tmpdir.join('tox.ini'),
"* rootdir: %s*" % testdir.tmpdir,
])
@pytest.mark.parametrize('args', [
['dir1', 'dir2', '-v'],
['dir1', '-v', 'dir2'],
['dir2', '-v', 'dir1'],
['-v', 'dir2', 'dir1'],
])
def test_consider_args_after_options_for_rootdir_and_inifile(testdir, args):
"""
Consider all arguments in the command-line for rootdir and inifile
discovery, even if they happen to occur after an option. #949
"""
# replace "dir1" and "dir2" from "args" into their real directory
root = testdir.tmpdir.mkdir('myroot')
d1 = root.mkdir('dir1')
d2 = root.mkdir('dir2')
for i, arg in enumerate(args):
if arg == 'dir1':
args[i] = d1
elif arg == 'dir2':
args[i] = d2
result = testdir.runpytest(*args)
result.stdout.fnmatch_lines(['*rootdir: *myroot, inifile: '])
@pytest.mark.skipif("sys.platform == 'win32'")
def test_toolongargs_issue224(testdir):
result = testdir.runpytest("-m", "hello" * 500)
assert result.ret == EXIT_NOTESTSCOLLECTED
def test_notify_exception(testdir, capfd):
config = testdir.parseconfig()
excinfo = pytest.raises(ValueError, "raise ValueError(1)")
config.notify_exception(excinfo)
out, err = capfd.readouterr()
assert "ValueError" in err
class A:
def pytest_internalerror(self, excrepr):
return True
config.pluginmanager.register(A())
config.notify_exception(excinfo)
out, err = capfd.readouterr()
assert not err
def test_load_initial_conftest_last_ordering(testdir):
from _pytest.config import get_config
pm = get_config().pluginmanager
class My:
def pytest_load_initial_conftests(self):
pass
m = My()
pm.register(m)
hc = pm.hook.pytest_load_initial_conftests
l = hc._nonwrappers + hc._wrappers
assert l[-1].function.__module__ == "_pytest.capture"
assert l[-2].function == m.pytest_load_initial_conftests
assert l[-3].function.__module__ == "_pytest.config"
class TestWarning:
def test_warn_config(self, testdir):
testdir.makeconftest("""
l = []
def pytest_configure(config):
config.warn("C1", "hello")
def pytest_logwarning(code, message):
if message == "hello" and code == "C1":
l.append(1)
""")
testdir.makepyfile("""
def test_proper(pytestconfig):
import conftest
assert conftest.l == [1]
""")
reprec = testdir.inline_run()
reprec.assertoutcome(passed=1)
def test_warn_on_test_item_from_request(self, testdir):
testdir.makepyfile("""
import pytest
@pytest.fixture
def fix(request):
request.node.warn("T1", "hello")
def test_hello(fix):
pass
""")
result = testdir.runpytest()
assert result.parseoutcomes()["pytest-warnings"] > 0
assert "hello" not in result.stdout.str()
result = testdir.runpytest("-rw")
result.stdout.fnmatch_lines("""
===*pytest-warning summary*===
*WT1*test_warn_on_test_item*:5*hello*
""")
class TestRootdir:
def test_simple_noini(self, tmpdir):
assert get_common_ancestor([tmpdir]) == tmpdir
assert get_common_ancestor([tmpdir.mkdir("a"), tmpdir]) == tmpdir
assert get_common_ancestor([tmpdir, tmpdir.join("a")]) == tmpdir
with tmpdir.as_cwd():
assert get_common_ancestor([]) == tmpdir
@pytest.mark.parametrize("name", "setup.cfg tox.ini pytest.ini".split())
def test_with_ini(self, tmpdir, name):
inifile = tmpdir.join(name)
inifile.write("[pytest]\n")
a = tmpdir.mkdir("a")
b = a.mkdir("b")
for args in ([tmpdir], [a], [b]):
rootdir, inifile, inicfg = determine_setup(None, args)
assert rootdir == tmpdir
assert inifile == inifile
rootdir, inifile, inicfg = determine_setup(None, [b,a])
assert rootdir == tmpdir
assert inifile == inifile
@pytest.mark.parametrize("name", "setup.cfg tox.ini".split())
def test_pytestini_overides_empty_other(self, tmpdir, name):
inifile = tmpdir.ensure("pytest.ini")
a = tmpdir.mkdir("a")
a.ensure(name)
rootdir, inifile, inicfg = determine_setup(None, [a])
assert rootdir == tmpdir
assert inifile == inifile
def test_setuppy_fallback(self, tmpdir):
a = tmpdir.mkdir("a")
a.ensure("setup.cfg")
tmpdir.ensure("setup.py")
rootdir, inifile, inicfg = determine_setup(None, [a])
assert rootdir == tmpdir
assert inifile is None
assert inicfg == {}
def test_nothing(self, tmpdir):
rootdir, inifile, inicfg = determine_setup(None, [tmpdir])
assert rootdir == tmpdir
assert inifile is None
assert inicfg == {}
def test_with_specific_inifile(self, tmpdir):
inifile = tmpdir.ensure("pytest.ini")
rootdir, inifile, inicfg = determine_setup(inifile, [tmpdir])
assert rootdir == tmpdir
|
dbbhattacharya/kitsune
|
refs/heads/master
|
vendor/packages/pyes/pyes/query.py
|
2
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Alberto Paro'
import logging
try:
# For Python >= 2.6
import json
except ImportError:
# For Python < 2.6 or people using a newer version of simplejson
import simplejson as json
from es import ESJsonEncoder
from utils import clean_string, ESRange
from facets import FacetFactory
from highlight import HighLighter
from scriptfields import ScriptFields
from pyes.exceptions import InvalidQuery, InvalidParameterQuery, QueryError, ScriptFieldsError
log = logging.getLogger('pyes')
class FieldParameter:
def __init__(self, field,
query,
default_operator="OR",
analyzer=None,
allow_leading_wildcard=True,
lowercase_expanded_terms=True,
enable_position_increments=True,
fuzzy_prefix_length=0,
fuzzy_min_sim=0.5,
phrase_slop=0,
boost=1.0):
self.query = query
self.field = field
self.default_operator = default_operator
self.analyzer = analyzer
self.allow_leading_wildcard = allow_leading_wildcard
self.lowercase_expanded_terms = lowercase_expanded_terms
self.enable_position_increments = enable_position_increments
self.fuzzy_prefix_length = fuzzy_prefix_length
self.fuzzy_min_sim = fuzzy_min_sim
self.phrase_slop = phrase_slop
self.boost = boost
def serialize(self):
filters = {}
if self.default_operator != "OR":
filters["default_operator"] = self.default_operator
if self.analyzer:
filters["analyzer"] = self.analyzer
if not self.allow_leading_wildcard:
filters["allow_leading_wildcard"] = self.allow_leading_wildcard
if not self.lowercase_expanded_terms:
filters["lowercase_expanded_terms"] = self.lowercase_expanded_terms
if not self.enable_position_increments:
filters["enable_position_increments"] = self.enable_position_increments
if self.fuzzy_prefix_length:
filters["fuzzy_prefix_length"] = self.fuzzy_prefix_length
if self.fuzzy_min_sim != 0.5:
filters["fuzzy_min_sim"] = self.fuzzy_min_sim
if self.phrase_slop:
filters["phrase_slop"] = self.phrase_slop
if self.boost != 1.0:
filters["boost"] = self.boost
if filters:
filters["query"] = self.query
else:
filters = self.query
return self.field, filters
class Search(object):
"""A search to be performed.
This contains a query, and has additional parameters which are used to
control how the search works, what it should return, etc.
"""
def __init__(self,
query=None,
fields=None,
start=None,
size=None,
highlight=None,
sort=None,
explain=False,
facet=None,
version=None,
track_scores=None,
script_fields=None,
index_boost={}):
"""
fields: if is [], the _source is not returned
"""
self.query = query
self.fields = fields
self.start = start
self.size = size
self.highlight = highlight
self.sort = sort
self.explain = explain
self.facet = facet or FacetFactory()
self.version = version
self.track_scores = track_scores
self.script_fields = script_fields
self.index_boost = index_boost
def get_facet_factory(self):
"""
Returns the facet factory
"""
return self.facet
@property
def q(self):
return self.serialize()
def serialize(self):
"""Serialize the search to a structure as passed for a search body.
"""
res = {"query": self.query.serialize()}
if self.fields is not None:
res['fields'] = self.fields
if self.size is not None:
res['size'] = self.size
if self.start is not None:
res['from'] = self.start
if self.highlight:
res['highlight'] = self.highlight.serialize()
if self.sort:
res['sort'] = self.sort
if self.explain:
res['explain'] = self.explain
if self.version:
res['version'] = self.version
if self.track_scores:
res['track_scores'] = self.track_scores
if self.script_fields:
if isinstance(self.script_fields, ScriptFields):
res['script_fields'] = self.script_fields.serialize()
else:
raise ScriptFieldsError("Parameter script_fields should of type ScriptFields")
if self.index_boost:
res['indices_boost'] = self.index_boost
if self.facet.facets:
res.update(self.facet.q)
return res
def add_highlight(self, field, fragment_size=None, number_of_fragments=None):
"""Add a highlight field.
The Search object will be returned, so calls to this can be chained.
"""
if self.highlight is None:
self.highlight = HighLighter("<b>", "</b>")
self.highlight.add_field(field, fragment_size, number_of_fragments)
return self
def add_index_boost(self, index, boost):
"""Add a boost on an index.
The Search object will be returned, so calls to this can be chained.
"""
if boost is None:
if self.index_boost.has_key(index):
del(self.index_boost[index])
else:
self.index_boost[index] = boost
return self
def __repr__(self):
return str(self.q)
def to_search_json(self):
"""Convert the search to JSON.
The output of this is suitable for using as the request body for
search.
"""
return json.dumps(self.q, cls=ESJsonEncoder)
class Query(object):
"""Base class for all queries.
"""
def __init__(self, *args, **kwargs):
if len(args) > 0 or len(kwargs) > 0:
raise RuntimeWarning("No all parameters are processed by derivated query object")
def serialize(self):
"""Serialize the query to a structure using the query DSL.
"""
raise NotImplementedError()
def search(self, **kwargs):
"""Return this query wrapped in a Search object.
Any keyword arguments supplied to this call will be passed to the
Search object.
"""
return Search(query=self, **kwargs)
def to_search_json(self):
"""Convert the query to JSON suitable for searching with.
The output of this is suitable for using as the request body for
search.
"""
return json.dumps(dict(query=self.serialize()), cls=ESJsonEncoder)
def to_query_json(self):
"""Convert the query to JSON using the query DSL.
The output of this is suitable for using as the request body for count,
delete_by_query and reindex.
"""
return json.dumps(self.serialize(), cls=ESJsonEncoder)
class BoolQuery(Query):
"""A boolean combination of other queries.
BoolQuery maps to Lucene **BooleanQuery**. It is built using one or more
boolean clauses, each clause with a typed occurrence. The occurrence types
are:
================ ========================================================
Occur Description
================ ========================================================
**must** The clause (query) must appear in matching documents.
**should** The clause (query) should appear in the matching
document. A boolean query with no **must** clauses, one
or more **should** clauses must match a document. The
minimum number of should clauses to match can be set
using **minimum_number_should_match** parameter.
**must_not** The clause (query) must not appear in the matching
documents. Note that it is not possible to search on
documents that only consists of a **must_not** clauses.
================ ========================================================
The bool query also supports **disable_coord** parameter (defaults to
**false**).
"""
def __init__(self, must=None, must_not=None, should=None,
boost=None, minimum_number_should_match=1,
disable_coord=None,
**kwargs):
super(BoolQuery, self).__init__(**kwargs)
self._must = []
self._must_not = []
self._should = []
self.boost = boost
self.minimum_number_should_match = minimum_number_should_match
self.disable_coord = None
if must:
self.add_must(must)
if must_not:
self.add_must_not(must_not)
if should:
self.add_should(should)
def add_must(self, queries):
"""Add a query to the "must" clause of the query.
The Query object will be returned, so calls to this can be chained.
"""
if isinstance(queries, list):
self._must.extend(queries)
else:
self._must.append(queries)
return self
def add_should(self, queries):
"""Add a query to the "should" clause of the query.
The Query object will be returned, so calls to this can be chained.
"""
if isinstance(queries, list):
self._should.extend(queries)
else:
self._should.append(queries)
return self
def add_must_not(self, queries):
"""Add a query to the "must_not" clause of the query.
The Query object will be returned, so calls to this can be chained.
"""
if isinstance(queries, list):
self._must_not.extend(queries)
else:
self._must_not.append(queries)
return self
def is_empty(self):
if self._must:
return False
if self._must_not:
return False
if self._should:
return False
return True
def serialize(self):
filters = {}
if self._must:
filters['must'] = [f.serialize() for f in self._must]
if self._must_not:
filters['must_not'] = [f.serialize() for f in self._must_not]
if self._should:
filters['should'] = [f.serialize() for f in self._should]
filters['minimum_number_should_match'] = self.minimum_number_should_match
if self.boost:
filters['boost'] = self.boost
if self.disable_coord is not None:
filters['disable_coord'] = self.disable_coord
if not filters:
raise RuntimeError("A least a filter must be declared")
return {"bool":filters}
class ConstantScoreQuery(Query):
"""Returns a constant score for all documents matching a filter.
Multiple filters may be supplied by passing a sequence or iterator as the
filter parameter. If multiple filters are supplied, documents must match
all of them to be matched by this query.
"""
_internal_name = "constant_score"
def __init__(self, filter=None, boost=1.0, **kwargs):
super(ConstantScoreQuery, self).__init__(**kwargs)
self.filters = []
self.boost = boost
if filter:
self.add(filter)
def add(self, filter):
"""Add a filter, or a list of filters, to the query.
If a sequence of filters is supplied, they are all added, and will be
combined with an ANDFilter.
"""
from pyes.filters import Filter
if isinstance(filter, Filter):
self.filters.append(filter)
else:
self.filters.extend(filter)
return self
def is_empty(self):
"""Returns True if the query is empty.
"""
if self.filters:
return False
return True
def serialize(self):
data = {}
if self.boost != 1.0:
data["boost"] = self.boost
filters = {}
if len(self.filters) == 1:
filters.update(self.filters[0].serialize())
else:
from pyes import ANDFilter
filters.update(ANDFilter(self.filters).serialize())
if not filters:
raise QueryError("A filter is required")
data['filter'] = filters
return {self._internal_name:data}
class HasChildQuery(Query):
_internal_name = "has_child"
def __init__(self, type, query, _scope=None, **kwargs):
super(HasChildQuery, self).__init__(**kwargs)
self.type = type
self._scope = _scope
self.query = query
def serialize(self):
data = {
'type':self.type,
'query':self.query.serialize()}
if self._scope is not None:
data['_scope'] = self._scope
return {self._internal_name:data}
class TopChildrenQuery(ConstantScoreQuery):
_internal_name = "top_children"
def __init__(self, type, score="max", factor=5, incremental_factor=2,
**kwargs):
super(TopChildrenQuery, self).__init__(**kwargs)
self.type = type
self.score = score
self.factor = factor
self.incremental_factor = incremental_factor
def serialize(self):
filters = {}
if self.boost != 1.0:
filters["boost"] = self.boost
for f in self.filters:
filters.update(f.serialize())
if self.score not in ["max", "min", "avg"]:
raise InvalidParameterQuery("Invalid value '%s' for score" % self.score)
return {self._internal_name:{
'type':self.type,
'query':filters,
'score':self.score,
'factor':self.factor,
"incremental_factor":self.incremental_factor}}
class DisMaxQuery(Query):
_internal_name = "dis_max"
def __init__(self, query=None, tie_breaker=0.0, boost=1.0, queries=None, **kwargs):
super(DisMaxQuery, self).__init__(**kwargs)
self.queries = queries or []
self.tie_breaker = tie_breaker
self.boost = boost
if query:
self.add(query)
def add(self, query):
if isinstance(query, list):
self.queries.extend(query)
else:
self.queries.append(query)
return self
def serialize(self):
filters = {}
if self.tie_breaker != 0.0:
filters["tie_breaker"] = self.tie_breaker
if self.boost != 1.0:
filters["boost"] = self.boost
filters["queries"] = [q.serialize() for q in self.queries]
if not filters["queries"]:
raise InvalidQuery("A least a query is required")
return {self._internal_name:filters}
class FieldQuery(Query):
_internal_name = "field"
def __init__(self, fieldparameters=None, default_operator="OR",
analyzer=None,
allow_leading_wildcard=True,
lowercase_expanded_terms=True,
enable_position_increments=True,
fuzzy_prefix_length=0,
fuzzy_min_sim=0.5,
phrase_slop=0,
boost=1.0,
use_dis_max=True,
tie_breaker=0, **kwargs):
super(FieldQuery, self).__init__(**kwargs)
self.field_parameters = []
self.default_operator = default_operator
self.analyzer = analyzer
self.allow_leading_wildcard = allow_leading_wildcard
self.lowercase_expanded_terms = lowercase_expanded_terms
self.enable_position_increments = enable_position_increments
self.fuzzy_prefix_length = enable_position_increments
self.fuzzy_min_sim = fuzzy_min_sim
self.phrase_slop = phrase_slop
self.boost = boost
self.use_dis_max = use_dis_max
self.tie_breaker = tie_breaker
if fieldparameters:
if isinstance(fieldparameters, list):
self.field_parameters.extend(fieldparameters)
else:
self.field_parameters.append(fieldparameters)
def add(self, field, query, **kwargs):
fp = FieldParameter(field, query, **kwargs)
self.field_parameters.append(fp)
def serialize(self):
result = {}
for f in self.field_parameters:
val, filters = f.serialize()
result[val] = filters
return {self._internal_name:result}
class FilteredQuery(Query):
_internal_name = "filtered"
def __init__(self, query, filter, **kwargs):
super(FilteredQuery, self).__init__(**kwargs)
self.query = query
self.filter = filter
def serialize(self):
filters = {
'query':self.query.serialize(),
'filter':self.filter.serialize(),
}
return {self._internal_name:filters}
class MoreLikeThisFieldQuery(Query):
_internal_name = "more_like_this_field"
def __init__(self, field, like_text,
percent_terms_to_match=0.3,
min_term_freq=2,
max_query_terms=25,
stop_words=None,
min_doc_freq=5,
max_doc_freq=None,
min_word_len=0,
max_word_len=0,
boost_terms=1,
boost=1.0,
**kwargs):
super(MoreLikeThisFieldQuery, self).__init__(**kwargs)
self.field = field
self.like_text = like_text
self.percent_terms_to_match = percent_terms_to_match
self.min_term_freq = min_term_freq
self.max_query_terms = max_query_terms
self.stop_words = stop_words or []
self.min_doc_freq = min_doc_freq
self.max_doc_freq = max_doc_freq
self.min_word_len = min_word_len
self.max_word_len = max_word_len
self.boost_terms = boost_terms
self.boost = boost
def serialize(self):
filters = {'like_text':self.like_text}
if self.percent_terms_to_match != 0.3:
filters["percent_terms_to_match"] = self.percent_terms_to_match
if self.min_term_freq != 2:
filters["min_term_freq"] = self.min_term_freq
if self.max_query_terms != 25:
filters["max_query_terms"] = self.max_query_terms
if self.stop_words:
filters["stop_words"] = self.stop_words
if self.min_doc_freq != 5:
filters["min_doc_freq"] = self.min_doc_freq
if self.max_doc_freq:
filters["max_doc_freq"] = self.max_doc_freq
if self.min_word_len:
filters["min_word_len"] = self.min_word_len
if self.max_word_len:
filters["max_word_len"] = self.max_word_len
if self.boost_terms:
filters["boost_terms"] = self.boost_terms
if self.boost != 1.0:
filters["boost"] = self.boost
return {self._internal_name:{self.field:filters}}
class FuzzyLikeThisQuery(Query):
_internal_name = "fuzzy_like_this"
def __init__(self, fields, like_text,
ignore_tf=False, max_query_terms=25,
min_similarity=0.5, prefix_length=0,
boost=1.0, **kwargs):
super(FuzzyLikeThisQuery, self).__init__(**kwargs)
self.fields = fields
self.like_text = like_text
self.ignore_tf = ignore_tf
self.max_query_terms = max_query_terms
self.min_similarity = min_similarity
self.prefix_length = prefix_length
self.boost = boost
def serialize(self):
filters = {'fields':self.fields,
'like_text':self.like_text}
if self.ignore_tf:
filters["ignore_tf"] = self.ignore_tf
if self.max_query_terms != 25:
filters["max_query_terms"] = self.max_query_terms
if self.min_similarity != 0.5:
filters["min_similarity"] = self.min_similarity
if self.prefix_length != 0:
filters["prefix_length"] = self.prefix_length
if self.boost != 1.0:
filters["boost"] = self.boost
return {self._internal_name:filters}
class FuzzyQuery(Query):
"""
A fuzzy based query that uses similarity based on Levenshtein (edit distance) algorithm.
Note
Warning: this query is not very scalable with its default prefix length of 0 - in this case, every term will be enumerated and cause an edit score calculation. Here is a simple example:
"""
_internal_name = "fuzzy"
def __init__(self, field, value, boost=None,
min_similarity=0.5, prefix_length=0,
**kwargs):
super(FuzzyQuery, self).__init__(**kwargs)
self.field = field
self.value = value
self.boost = boost
self.min_similarity = min_similarity
self.prefix_length = prefix_length
def serialize(self):
data = {
'field':self.field,
'value':self.value,
'min_similarity':self.min_similarity,
'prefix_length':self.prefix_length,
}
if self.boost:
data['boost'] = self.boost
return {self._internal_name:data}
class FuzzyLikeThisFieldQuery(Query):
_internal_name = "fuzzy_like_this_field"
def __init__(self, field, like_text,
ignore_tf=False, max_query_terms=25,
boost=1.0, **kwargs):
super(FuzzyLikeThisFieldQuery, self).__init__(**kwargs)
self.field = field
self.like_text = like_text
self.ignore_tf = ignore_tf
self.max_query_terms = max_query_terms
self.boost = boost
def serialize(self):
filters = {'like_text':self.like_text}
if self.ignore_tf:
filters["ignore_tf"] = self.ignore_tf
if self.max_query_terms != 25:
filters["max_query_terms"] = self.max_query_terms
if self.boost != 1.0:
filters["boost"] = self.boost
return {self._internal_name:{self.field:filters}}
class MatchAllQuery(Query):
_internal_name = "match_all"
def __init__(self, boost=None, **kwargs):
super(MatchAllQuery, self).__init__(**kwargs)
self.boost = boost
def serialize(self):
filters = {}
if self.boost:
if isinstance(self.boost, (float, int)):
filters['boost'] = self.boost
else:
filters['boost'] = float(self.boost)
return {self._internal_name:filters}
class MoreLikeThisQuery(Query):
_internal_name = "more_like_this"
def __init__(self, fields, like_text,
percent_terms_to_match=0.3,
min_term_freq=2,
max_query_terms=25,
stop_words=None,
min_doc_freq=5,
max_doc_freq=None,
min_word_len=0,
max_word_len=0,
boost_terms=1,
boost=1.0, **kwargs):
super(MoreLikeThisQuery, self).__init__(**kwargs)
self.fields = fields
self.like_text = like_text
self.stop_words = stop_words or []
self.percent_terms_to_match = percent_terms_to_match
self.min_term_freq = min_term_freq
self.max_query_terms = max_query_terms
self.min_doc_freq = min_doc_freq
self.max_doc_freq = max_doc_freq
self.min_word_len = min_word_len
self.max_word_len = max_word_len
self.boost_terms = boost_terms
self.boost = boost
def serialize(self):
filters = {'fields':self.fields,
'like_text':self.like_text}
if self.percent_terms_to_match != 0.3:
filters["percent_terms_to_match"] = self.percent_terms_to_match
if self.min_term_freq != 2:
filters["min_term_freq"] = self.min_term_freq
if self.max_query_terms != 25:
filters["max_query_terms"] = self.max_query_terms
if self.stop_words:
filters["stop_words"] = self.stop_words
if self.min_doc_freq != 5:
filters["min_doc_freq"] = self.min_doc_freq
if self.max_doc_freq:
filters["max_doc_freq"] = self.max_doc_freq
if self.min_word_len:
filters["min_word_len"] = self.min_word_len
if self.max_word_len:
filters["max_word_len"] = self.max_word_len
if self.boost_terms:
filters["boost_terms"] = self.boost_terms
if self.boost != 1.0:
filters["boost"] = self.boost
return {self._internal_name:filters}
class FilterQuery(Query):
_internal_name = "query"
def __init__(self, filters=None, **kwargs):
super(FilterQuery, self).__init__(**kwargs)
self._filters = []
if filters is not None:
self.add(filters)
def add(self, filterquery):
if isinstance(filterquery, list):
self._filters.extend(filterquery)
else:
self._filters.append(filterquery)
def serialize(self):
filters = [f.serialize() for f in self._filters]
if not filters:
raise RuntimeError("A least one filter must be declared")
return {self._internal_name:{"filter":filters}}
def __repr__(self):
return str(self.q)
class PrefixQuery(Query):
def __init__(self, field=None, prefix=None, boost=None, **kwargs):
super(PrefixQuery, self).__init__(**kwargs)
self._values = {}
if field is not None and prefix is not None:
self.add(field, prefix, boost)
def add(self, field, prefix, boost=None):
match = {'prefix':prefix}
if boost:
if isinstance(boost, (float, int)):
match['boost'] = boost
else:
match['boost'] = float(boost)
self._values[field] = match
def serialize(self):
if not self._values:
raise RuntimeError("A least a field/prefix pair must be added")
return {"prefix":self._values}
class TermQuery(Query):
"""Match documents that have fields that contain a term (not analyzed).
A boost may be supplied.
"""
_internal_name = "term"
def __init__(self, field=None, value=None, boost=None, **kwargs):
super(TermQuery, self).__init__(**kwargs)
self._values = {}
if field is not None and value is not None:
self.add(field, value, boost)
def add(self, field, value, boost=None):
if not value.strip():
raise InvalidParameterQuery("value %r must be valid text" % value)
match = {'value':value}
if boost:
if isinstance(boost, (float, int)):
match['boost'] = boost
else:
match['boost'] = float(boost)
self._values[field] = match
return
self._values[field] = value
def serialize(self):
if not self._values:
raise RuntimeError("A least a field/value pair must be added")
return {self._internal_name:self._values}
class TermsQuery(TermQuery):
_internal_name = "terms"
def __init__(self, *args, **kwargs):
super(TermsQuery, self).__init__(*args, **kwargs)
def add(self, field, value, minimum_match=1):
if not isinstance(value, list):
raise InvalidParameterQuery("value %r must be valid list" % value)
self._values[field] = value
if minimum_match:
if isinstance(minimum_match, int):
self._values['minimum_match'] = minimum_match
else:
self._values['minimum_match'] = int(minimum_match)
class TextQuery(Query):
"""
A new family of text queries that accept text, analyzes it, and constructs a query out of it.
"""
_internal_name = "text"
_valid_types = ['boolean', "phrase", "phrase_prefix"]
_valid_operators = ['or', "and"]
def __init__(self, text, type="boolean", slop=0, fuzziness=None,
prefix_length=0, max_expansions=2147483647,
operator="or", **kwargs):
super(TextQuery, self).__init__(**kwargs)
self.text = text
self.type = type
self.slop = slop
self.fuzziness = fuzziness
self.prefix_lenght = prefix_length
self.max_expansions = max_expansions
self.operator = operator
def serialize(self):
if self.type not in self._valid_types:
raise QueryError("Invalid value '%s' for type: allowed values are %s" % (self.type, self._valid_types))
if self.operator not in self._valid_operators:
raise QueryError("Invalid value '%s' for operator: allowed values are %s" % (self.operator, self._valid_operators))
options = {'type':self.type,
"query":self.text}
if self.slop != 0:
options["slop"] = self.slop
if self.fuzziness is not None:
options["fuzziness"] = self.fuzziness
if self.slop != 0:
options["prefix_length"] = self.prefix_length
if self.max_expansions != 2147483647:
options["max_expansions"] = self.max_expansions
if self.operator:
options["operator"] = self.operator
return {self._internal_name:options}
class RegexTermQuery(TermQuery):
_internal_name = "regex_term"
def __init__(self, *args, **kwargs):
super(RegexTermQuery, self).__init__(*args, **kwargs)
class StringQuery(Query):
_internal_name = "query_string"
def __init__(self, query, default_field=None,
search_fields=None,
default_operator="OR",
analyzer=None,
allow_leading_wildcard=True,
lowercase_expanded_terms=True,
enable_position_increments=True,
fuzzy_prefix_length=0,
fuzzy_min_sim=0.5,
phrase_slop=0,
boost=1.0,
analyze_wildcard=False,
use_dis_max=True,
tie_breaker=0,
clean_text=False,
**kwargs):
super(StringQuery, self).__init__(**kwargs)
self.clean_text = clean_text
self.search_fields = search_fields or []
self.query = query
self.default_field = default_field
self.default_operator = default_operator
self.analyzer = analyzer
self.allow_leading_wildcard = allow_leading_wildcard
self.lowercase_expanded_terms = lowercase_expanded_terms
self.enable_position_increments = enable_position_increments
self.fuzzy_prefix_length = fuzzy_prefix_length
self.fuzzy_min_sim = fuzzy_min_sim
self.phrase_slop = phrase_slop
self.boost = boost
self.analyze_wildcard = analyze_wildcard
self.use_dis_max = use_dis_max
self.tie_breaker = tie_breaker
def serialize(self):
filters = {}
if self.default_field:
filters["default_field"] = self.default_field
if not isinstance(self.default_field, (str, unicode)) and isinstance(self.default_field, list):
if not self.use_dis_max:
filters["use_dis_max"] = self.use_dis_max
if self.tie_breaker != 0:
filters["tie_breaker"] = self.tie_breaker
if self.default_operator != "OR":
filters["default_operator"] = self.default_operator
if self.analyzer:
filters["analyzer"] = self.analyzer
if not self.allow_leading_wildcard:
filters["allow_leading_wildcard"] = self.allow_leading_wildcard
if not self.lowercase_expanded_terms:
filters["lowercase_expanded_terms"] = self.lowercase_expanded_terms
if not self.enable_position_increments:
filters["enable_position_increments"] = self.enable_position_increments
if self.fuzzy_prefix_length:
filters["fuzzy_prefix_length"] = self.fuzzy_prefix_length
if self.fuzzy_min_sim != 0.5:
filters["fuzzy_min_sim"] = self.fuzzy_min_sim
if self.phrase_slop:
filters["phrase_slop"] = self.phrase_slop
if self.search_fields:
if isinstance(self.search_fields, (str, unicode)):
filters["fields"] = [self.search_fields]
else:
filters["fields"] = self.search_fields
if len(filters["fields"]) > 1:
if not self.use_dis_max:
filters["use_dis_max"] = self.use_dis_max
if self.tie_breaker != 0:
filters["tie_breaker"] = self.tie_breaker
if self.boost != 1.0:
filters["boost"] = self.boost
if self.analyze_wildcard:
filters["analyze_wildcard"] = self.analyze_wildcard
if self.clean_text:
query = clean_string(self.query)
if not query:
raise InvalidQuery("The query is empty")
filters["query"] = query
else:
if not self.query.strip():
raise InvalidQuery("The query is empty")
filters["query"] = self.query
return {self._internal_name:filters}
class RangeQuery(Query):
def __init__(self, qrange=None, **kwargs):
super(RangeQuery, self).__init__(**kwargs)
self.ranges = []
if qrange:
self.add(qrange)
def add(self, qrange):
if isinstance(qrange, list):
self.ranges.extend(qrange)
elif isinstance(qrange, ESRange):
self.ranges.append(qrange)
def serialize(self):
if not self.ranges:
raise RuntimeError("A least a range must be declared")
filters = dict([r.serialize() for r in self.ranges])
return {"range":filters}
class SpanFirstQuery(TermQuery):
_internal_name = "span_first"
def __init__(self, field=None, value=None, end=3, **kwargs):
super(SpanFirstQuery, self).__init__(**kwargs)
self._values = {}
self.end = end
if field is not None and value is not None:
self.add(field, value)
def serialize(self):
if not self._values:
raise RuntimeError("A least a field/value pair must be added")
return {self._internal_name:{"match":{"span_first":self._values},
"end":self.end}}
class SpanNearQuery(Query):
"""
Matches spans which are near one another. One can specify _slop_,
the maximum number of intervening unmatched positions, as well as
whether matches are required to be in-order.
The clauses element is a list of one or more other span type queries and
the slop controls the maximum number of intervening unmatched positions
permitted.
"""
_internal_name = "span_near"
def __init__(self, clauses=None, slop=None,
in_order=None,
collect_payloads=None, **kwargs):
super(SpanNotQuery, self).__init__(**kwargs)
self.clauses = clauses or []
self.slop = slop
self.in_order = in_order
self.collect_payloads = collect_payloads
def _validate(self):
for clause in self.clauses:
if not is_a_spanquery(clause):
raise RuntimeError("Invalid clause:%r" % clause)
def serialize(self):
if not self.clauses or len(self.clauses) == 0:
raise RuntimeError("A least a Span*Query must be added to clauses")
data = {}
if self.slop is not None:
data["slop"] = self.slop
if self.in_order is not None:
data["in_order"] = self.in_order
if self.collect_payloads is not None:
data["collect_payloads"] = self.collect_payloads
data['clauses'] = [clause.serialize() for clause in self.clauses]
return {self._internal_name:data}
class SpanNotQuery(Query):
"""
Removes matches which overlap with another span query.
The include and exclude clauses can be any span type query. The include
clause is the span query whose matches are filtered, and the exclude
clause is the span query whose matches must not overlap those returned.
"""
_internal_name = "span_not"
def __init__(self, include, exclude, **kwargs):
super(SpanNotQuery, self).__init__(**kwargs)
self.include = include
self.exclude = exclude
def _validate(self):
if not is_a_spanquery(self.include):
raise RuntimeError("Invalid clause:%r" % self.include)
if not is_a_spanquery(self.exclude):
raise RuntimeError("Invalid clause:%r" % self.exclude)
def serialize(self):
self._validate()
data = {}
data['include'] = self.include.serialize()
data['exclude'] = self.exclude.serialize()
return {self._internal_name:data}
def is_a_spanquery(obj):
"""
Returns if the object is a span query
"""
return isinstance(obj, (SpanTermQuery, SpanFirstQuery, SpanOrQuery))
class SpanOrQuery(Query):
"""
Matches the union of its span clauses.
The clauses element is a list of one or more other span type queries.
"""
_internal_name = "span_or"
def __init__(self, clauses=None, **kwargs):
super(SpanOrQuery, self).__init__(**kwargs)
self.clauses = clauses or []
def _validate(self):
for clause in self.clauses:
if not is_a_spanquery(clause):
raise RuntimeError("Invalid clause:%r" % clause)
def serialize(self):
if not self.clauses or len(self.clauses) == 0:
raise RuntimeError("A least a Span*Query must be added to clauses")
clauses = [clause.serialize() for clause in self.clauses]
return {self._internal_name:{"clauses":clauses}}
class SpanTermQuery(TermQuery):
_internal_name = "span_term"
def __init__(self, **kwargs):
super(SpanTermQuery, self).__init__(**kwargs)
class WildcardQuery(TermQuery):
_internal_name = "wildcard"
def __init__(self, *args, **kwargs):
super(WildcardQuery, self).__init__(*args, **kwargs)
class CustomScoreQuery(Query):
_internal_name = "custom_score"
def __init__(self, query=None, script=None, params=None, lang=None,
**kwargs):
super(CustomScoreQuery, self).__init__(**kwargs)
self.query = query
self.script = script
self.lang = lang
if params is None:
params = {}
self.params = params
def add_param(self, name, value):
"""
Add a parameter
"""
self.params[name] = value
def serialize(self):
data = {}
if not self.query:
raise RuntimeError("A least a query must be declared")
data['query'] = self.query.serialize()
if not self.script:
raise RuntimeError("A script must be provided")
data['script'] = self.script
if self.params:
data['params'] = self.params
if self.lang:
data['lang'] = self.lang
return {self._internal_name:data}
def __repr__(self):
return str(self.q)
class IdsQuery(Query):
_internal_name = "ids"
def __init__(self, type, values, **kwargs):
super(IdsQuery, self).__init__(**kwargs)
self.type = type
self.values = values
def serialize(self):
data = {}
if self.type:
data['type'] = self.type
if isinstance(self.values, basestring):
data['values'] = [self.values]
else:
data['values'] = self.values
return {self._internal_name:data}
class PercolatorQuery(Query):
"""A percolator query is used to determine which registered
PercolatorDoc's match the document supplied.
"""
def __init__(self, doc, query=None, **kwargs):
"""Constructor
doc - the doc to match against, dict
query - an additional query that can be used to filter the percolated
queries used to match against.
"""
super(PercolatorQuery, self).__init__(**kwargs)
self.doc = doc
self.query = query
def serialize(self):
"""Serialize the query to a structure using the query DSL.
"""
data = {}
data['doc'] = self.doc
if hasattr(self.query, 'serialize'):
data['query'] = self.query.serialize()
return data
def search(self, **kwargs):
"""Disable this as it is not allowed in percolator queries."""
raise NotImplementedError()
def to_search_json(self):
"""Disable this as it is not allowed in percolator queries."""
raise NotImplementedError()
|
Axam/nsx-web
|
refs/heads/master
|
fuelclient/fuelclient/objects/__init__.py
|
3
|
# Copyright 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""fuelclient.objects sub-module contains classes that mirror
functionality from nailgun objects.
"""
from fuelclient.objects.base import BaseObject
from fuelclient.objects.environment import Environment
from fuelclient.objects.node import Node
from fuelclient.objects.node import NodeCollection
from fuelclient.objects.release import Release
from fuelclient.objects.task import DeployTask
from fuelclient.objects.task import SnapshotTask
from fuelclient.objects.task import Task
|
sharkykh/SickRage
|
refs/heads/develop
|
lib/oauthlib/oauth2/rfc6749/parameters.py
|
86
|
# -*- coding: utf-8 -*-
"""
oauthlib.oauth2.rfc6749.parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains methods related to `Section 4`_ of the OAuth 2 RFC.
.. _`Section 4`: http://tools.ietf.org/html/rfc6749#section-4
"""
from __future__ import absolute_import, unicode_literals
import json
import os
import time
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
from oauthlib.common import add_params_to_uri, add_params_to_qs, unicode_type
from oauthlib.signals import scope_changed
from .errors import raise_from_error, MissingTokenError, MissingTokenTypeError
from .errors import MismatchingStateError, MissingCodeError
from .errors import InsecureTransportError
from .tokens import OAuth2Token
from .utils import list_to_scope, scope_to_list, is_secure_transport
def prepare_grant_uri(uri, client_id, response_type, redirect_uri=None,
scope=None, state=None, **kwargs):
"""Prepare the authorization grant request URI.
The client constructs the request URI by adding the following
parameters to the query component of the authorization endpoint URI
using the ``application/x-www-form-urlencoded`` format as defined by
[`W3C.REC-html401-19991224`_]:
:param response_type: To indicate which OAuth 2 grant/flow is required,
"code" and "token".
:param client_id: The client identifier as described in `Section 2.2`_.
:param redirect_uri: The client provided URI to redirect back to after
authorization as described in `Section 3.1.2`_.
:param scope: The scope of the access request as described by
`Section 3.3`_.
:param state: An opaque value used by the client to maintain
state between the request and callback. The authorization
server includes this value when redirecting the user-agent
back to the client. The parameter SHOULD be used for
preventing cross-site request forgery as described in
`Section 10.12`_.
:param kwargs: Extra arguments to embed in the grant/authorization URL.
An example of an authorization code grant authorization URL:
.. code-block:: http
GET /authorize?response_type=code&client_id=s6BhdRkqt3&state=xyz
&redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1
Host: server.example.com
.. _`W3C.REC-html401-19991224`: http://tools.ietf.org/html/rfc6749#ref-W3C.REC-html401-19991224
.. _`Section 2.2`: http://tools.ietf.org/html/rfc6749#section-2.2
.. _`Section 3.1.2`: http://tools.ietf.org/html/rfc6749#section-3.1.2
.. _`Section 3.3`: http://tools.ietf.org/html/rfc6749#section-3.3
.. _`section 10.12`: http://tools.ietf.org/html/rfc6749#section-10.12
"""
if not is_secure_transport(uri):
raise InsecureTransportError()
params = [(('response_type', response_type)),
(('client_id', client_id))]
if redirect_uri:
params.append(('redirect_uri', redirect_uri))
if scope:
params.append(('scope', list_to_scope(scope)))
if state:
params.append(('state', state))
for k in kwargs:
if kwargs[k]:
params.append((unicode_type(k), kwargs[k]))
return add_params_to_uri(uri, params)
def prepare_token_request(grant_type, body='', **kwargs):
"""Prepare the access token request.
The client makes a request to the token endpoint by adding the
following parameters using the ``application/x-www-form-urlencoded``
format in the HTTP request entity-body:
:param grant_type: To indicate grant type being used, i.e. "password",
"authorization_code" or "client_credentials".
:param body: Existing request body to embed parameters in.
:param code: If using authorization code grant, pass the previously
obtained authorization code as the ``code`` argument.
:param redirect_uri: If the "redirect_uri" parameter was included in the
authorization request as described in
`Section 4.1.1`_, and their values MUST be identical.
:param kwargs: Extra arguments to embed in the request body.
An example of an authorization code token request body:
.. code-block:: http
grant_type=authorization_code&code=SplxlOBeZQQYbYS6WxSbIA
&redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb
.. _`Section 4.1.1`: http://tools.ietf.org/html/rfc6749#section-4.1.1
"""
params = [('grant_type', grant_type)]
if 'scope' in kwargs:
kwargs['scope'] = list_to_scope(kwargs['scope'])
for k in kwargs:
if kwargs[k]:
params.append((unicode_type(k), kwargs[k]))
return add_params_to_qs(body, params)
def prepare_token_revocation_request(url, token, token_type_hint="access_token",
callback=None, body='', **kwargs):
"""Prepare a token revocation request.
The client constructs the request by including the following parameters
using the "application/x-www-form-urlencoded" format in the HTTP request
entity-body:
token REQUIRED. The token that the client wants to get revoked.
token_type_hint OPTIONAL. A hint about the type of the token submitted
for revocation. Clients MAY pass this parameter in order to help the
authorization server to optimize the token lookup. If the server is unable
to locate the token using the given hint, it MUST extend its search across
all of its supported token types. An authorization server MAY ignore this
parameter, particularly if it is able to detect the token type
automatically. This specification defines two such values:
* access_token: An access token as defined in [RFC6749],
`Section 1.4`_
* refresh_token: A refresh token as defined in [RFC6749],
`Section 1.5`_
Specific implementations, profiles, and extensions of this
specification MAY define other values for this parameter using the
registry defined in `Section 4.1.2`_.
.. _`Section 1.4`: http://tools.ietf.org/html/rfc6749#section-1.4
.. _`Section 1.5`: http://tools.ietf.org/html/rfc6749#section-1.5
.. _`Section 4.1.2`: http://tools.ietf.org/html/rfc7009#section-4.1.2
"""
if not is_secure_transport(url):
raise InsecureTransportError()
params = [('token', token)]
if token_type_hint:
params.append(('token_type_hint', token_type_hint))
for k in kwargs:
if kwargs[k]:
params.append((unicode_type(k), kwargs[k]))
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
if callback:
params.append(('callback', callback))
return add_params_to_uri(url, params), headers, body
else:
return url, headers, add_params_to_qs(body, params)
def parse_authorization_code_response(uri, state=None):
"""Parse authorization grant response URI into a dict.
If the resource owner grants the access request, the authorization
server issues an authorization code and delivers it to the client by
adding the following parameters to the query component of the
redirection URI using the ``application/x-www-form-urlencoded`` format:
**code**
REQUIRED. The authorization code generated by the
authorization server. The authorization code MUST expire
shortly after it is issued to mitigate the risk of leaks. A
maximum authorization code lifetime of 10 minutes is
RECOMMENDED. The client MUST NOT use the authorization code
more than once. If an authorization code is used more than
once, the authorization server MUST deny the request and SHOULD
revoke (when possible) all tokens previously issued based on
that authorization code. The authorization code is bound to
the client identifier and redirection URI.
**state**
REQUIRED if the "state" parameter was present in the client
authorization request. The exact value received from the
client.
:param uri: The full redirect URL back to the client.
:param state: The state parameter from the authorization request.
For example, the authorization server redirects the user-agent by
sending the following HTTP response:
.. code-block:: http
HTTP/1.1 302 Found
Location: https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA
&state=xyz
"""
if not is_secure_transport(uri):
raise InsecureTransportError()
query = urlparse.urlparse(uri).query
params = dict(urlparse.parse_qsl(query))
if not 'code' in params:
raise MissingCodeError("Missing code parameter in response.")
if state and params.get('state', None) != state:
raise MismatchingStateError()
return params
def parse_implicit_response(uri, state=None, scope=None):
"""Parse the implicit token response URI into a dict.
If the resource owner grants the access request, the authorization
server issues an access token and delivers it to the client by adding
the following parameters to the fragment component of the redirection
URI using the ``application/x-www-form-urlencoded`` format:
**access_token**
REQUIRED. The access token issued by the authorization server.
**token_type**
REQUIRED. The type of the token issued as described in
Section 7.1. Value is case insensitive.
**expires_in**
RECOMMENDED. The lifetime in seconds of the access token. For
example, the value "3600" denotes that the access token will
expire in one hour from the time the response was generated.
If omitted, the authorization server SHOULD provide the
expiration time via other means or document the default value.
**scope**
OPTIONAL, if identical to the scope requested by the client,
otherwise REQUIRED. The scope of the access token as described
by Section 3.3.
**state**
REQUIRED if the "state" parameter was present in the client
authorization request. The exact value received from the
client.
Similar to the authorization code response, but with a full token provided
in the URL fragment:
.. code-block:: http
HTTP/1.1 302 Found
Location: http://example.com/cb#access_token=2YotnFZFEjr1zCsicMWpAA
&state=xyz&token_type=example&expires_in=3600
"""
if not is_secure_transport(uri):
raise InsecureTransportError()
fragment = urlparse.urlparse(uri).fragment
params = dict(urlparse.parse_qsl(fragment, keep_blank_values=True))
if 'scope' in params:
params['scope'] = scope_to_list(params['scope'])
if 'expires_in' in params:
params['expires_at'] = time.time() + int(params['expires_in'])
if state and params.get('state', None) != state:
raise ValueError("Mismatching or missing state in params.")
params = OAuth2Token(params, old_scope=scope)
validate_token_parameters(params)
return params
def parse_token_response(body, scope=None):
"""Parse the JSON token response body into a dict.
The authorization server issues an access token and optional refresh
token, and constructs the response by adding the following parameters
to the entity body of the HTTP response with a 200 (OK) status code:
access_token
REQUIRED. The access token issued by the authorization server.
token_type
REQUIRED. The type of the token issued as described in
`Section 7.1`_. Value is case insensitive.
expires_in
RECOMMENDED. The lifetime in seconds of the access token. For
example, the value "3600" denotes that the access token will
expire in one hour from the time the response was generated.
If omitted, the authorization server SHOULD provide the
expiration time via other means or document the default value.
refresh_token
OPTIONAL. The refresh token which can be used to obtain new
access tokens using the same authorization grant as described
in `Section 6`_.
scope
OPTIONAL, if identical to the scope requested by the client,
otherwise REQUIRED. The scope of the access token as described
by `Section 3.3`_.
The parameters are included in the entity body of the HTTP response
using the "application/json" media type as defined by [`RFC4627`_]. The
parameters are serialized into a JSON structure by adding each
parameter at the highest structure level. Parameter names and string
values are included as JSON strings. Numerical values are included
as JSON numbers. The order of parameters does not matter and can
vary.
:param body: The full json encoded response body.
:param scope: The scope requested during authorization.
For example:
.. code-block:: http
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"example",
"expires_in":3600,
"refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA",
"example_parameter":"example_value"
}
.. _`Section 7.1`: http://tools.ietf.org/html/rfc6749#section-7.1
.. _`Section 6`: http://tools.ietf.org/html/rfc6749#section-6
.. _`Section 3.3`: http://tools.ietf.org/html/rfc6749#section-3.3
.. _`RFC4627`: http://tools.ietf.org/html/rfc4627
"""
try:
params = json.loads(body)
except ValueError:
# Fall back to URL-encoded string, to support old implementations,
# including (at time of writing) Facebook. See:
# https://github.com/idan/oauthlib/issues/267
params = dict(urlparse.parse_qsl(body))
for key in ('expires_in', 'expires'):
if key in params: # cast a couple things to int
params[key] = int(params[key])
if 'scope' in params:
params['scope'] = scope_to_list(params['scope'])
if 'expires' in params:
params['expires_in'] = params.pop('expires')
if 'expires_in' in params:
params['expires_at'] = time.time() + int(params['expires_in'])
params = OAuth2Token(params, old_scope=scope)
validate_token_parameters(params)
return params
def validate_token_parameters(params):
"""Ensures token precence, token type, expiration and scope in params."""
if 'error' in params:
raise_from_error(params.get('error'), params)
if not 'access_token' in params:
raise MissingTokenError(description="Missing access token parameter.")
if not 'token_type' in params:
if os.environ.get('OAUTHLIB_STRICT_TOKEN_TYPE'):
raise MissingTokenTypeError()
# If the issued access token scope is different from the one requested by
# the client, the authorization server MUST include the "scope" response
# parameter to inform the client of the actual scope granted.
# http://tools.ietf.org/html/rfc6749#section-3.3
if params.scope_changed:
message = 'Scope has changed from "{old}" to "{new}".'.format(
old=params.old_scope, new=params.scope,
)
scope_changed.send(message=message, old=params.old_scopes, new=params.scopes)
if not os.environ.get('OAUTHLIB_RELAX_TOKEN_SCOPE', None):
w = Warning(message)
w.token = params
w.old_scope = params.old_scopes
w.new_scope = params.scopes
raise w
|
heisencoder/route-finder
|
refs/heads/master
|
third_party/lib/python/django/contrib/formtools/tests/forms.py
|
123
|
from django import forms
class TestForm(forms.Form):
field1 = forms.CharField()
field1_ = forms.CharField()
bool1 = forms.BooleanField(required=False)
date1 = forms.DateField(required=False)
class HashTestForm(forms.Form):
name = forms.CharField()
bio = forms.CharField()
class HashTestBlankForm(forms.Form):
name = forms.CharField(required=False)
bio = forms.CharField(required=False)
|
tangyiyong/odoo
|
refs/heads/8.0
|
addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
|
384
|
#########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# See: http://www.gnu.org/licenses/lgpl.html
#
#############################################################################
import uno
import string
import unohelper
import xmlrpclib
from com.sun.star.task import XJobExecutor
if __name__<>"package":
from lib.gui import *
from lib.functions import *
from lib.error import ErrorDialog
from LoginTest import *
from lib.rpc import *
database="test_001"
uid = 3
class AddLang(unohelper.Base, XJobExecutor ):
def __init__(self, sVariable="", sFields="", sDisplayName="", bFromModify=False):
LoginTest()
if not loginstatus and __name__=="package":
exit(1)
global passwd
self.password = passwd
self.win = DBModalDialog(60, 50, 180, 225, "Set Lang Builder")
self.win.addFixedText("lblVariable", 27, 12, 60, 15, "Variable :")
self.win.addComboBox("cmbVariable", 180-120-2, 10, 120, 15,True,
itemListenerProc=self.cmbVariable_selected)
self.insVariable = self.win.getControl( "cmbVariable" )
self.win.addFixedText("lblFields", 10, 32, 60, 15, "Variable Fields :")
self.win.addComboListBox("lstFields", 180-120-2, 30, 120, 150, False,itemListenerProc=self.lstbox_selected)
self.insField = self.win.getControl( "lstFields" )
self.win.addFixedText("lblUName", 8, 187, 60, 15, "Displayed name :")
self.win.addEdit("txtUName", 180-120-2, 185, 120, 15,)
self.win.addButton('btnOK',-5 ,-5, 45, 15, 'Ok', actionListenerProc = self.btnOk_clicked )
self.win.addButton('btnCancel',-5 - 45 - 5 ,-5,45,15,'Cancel', actionListenerProc = self.btnCancel_clicked )
self.sValue=None
self.sObj=None
self.aSectionList=[]
self.sGDisplayName=sDisplayName
self.aItemList=[]
self.aComponentAdd=[]
self.aObjectList=[]
self.aListFields=[]
self.aVariableList=[]
EnumDocument(self.aItemList,self.aComponentAdd)
desktop=getDesktop()
doc =desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
self.sMyHost= ""
global url
self.sock=RPCSession(url)
if not docinfo.getUserFieldValue(3) == "" and not docinfo.getUserFieldValue(0)=="":
self.sMyHost= docinfo.getUserFieldValue(0)
self.count=0
oParEnum = doc.getTextFields().createEnumeration()
while oParEnum.hasMoreElements():
oPar = oParEnum.nextElement()
if oPar.supportsService("com.sun.star.text.TextField.DropDown"):
self.count += 1
getList(self.aObjectList, self.sMyHost,self.count)
cursor = doc.getCurrentController().getViewCursor()
text=cursor.getText()
tcur=text.createTextCursorByRange(cursor)
self.aVariableList.extend( filter( lambda obj: obj[:obj.find("(")] == "Objects", self.aObjectList ) )
for i in range(len(self.aItemList)):
anItem = self.aItemList[i][1]
component = self.aComponentAdd[i]
if component == "Document":
sLVal = anItem[anItem.find(",'") + 2:anItem.find("')")]
self.aVariableList.extend( filter( lambda obj: obj[:obj.find("(")] == sLVal, self.aObjectList ) )
if tcur.TextSection:
getRecersiveSection(tcur.TextSection,self.aSectionList)
if component in self.aSectionList:
sLVal = anItem[anItem.find(",'") + 2:anItem.find("')")]
self.aVariableList.extend( filter( lambda obj: obj[:obj.find("(")] == sLVal, self.aObjectList ) )
if tcur.TextTable:
if not component == "Document" and component[component.rfind(".") + 1:] == tcur.TextTable.Name:
VariableScope(tcur,self.insVariable,self.aObjectList,self.aComponentAdd,self.aItemList,component)
self.bModify=bFromModify
if self.bModify==True:
sItem=""
for anObject in self.aObjectList:
if anObject[:anObject.find("(")] == sVariable:
sItem = anObject
self.insVariable.setText( sItem )
genTree(sItem[sItem.find("(")+1:sItem.find(")")],self.aListFields, self.insField,self.sMyHost,2,ending_excl=['one2many','many2one','many2many','reference'], recur=['many2one'])
self.sValue= self.win.getListBoxItem("lstFields",self.aListFields.index(sFields))
for var in self.aVariableList:
self.model_ids = self.sock.execute(database, uid, self.password, 'ir.model' , 'search', [('model','=',var[var.find("(")+1:var.find(")")])])
fields=['name','model']
self.model_res = self.sock.execute(database, uid, self.password, 'ir.model', 'read', self.model_ids,fields)
if self.model_res <> []:
self.insVariable.addItem(var[:var.find("(")+1] + self.model_res[0]['name'] + ")" ,self.insVariable.getItemCount())
else:
self.insVariable.addItem(var ,self.insVariable.getItemCount())
self.win.doModalDialog("lstFields",self.sValue)
else:
ErrorDialog("Please insert user define field Field-1 or Field-4","Just go to File->Properties->User Define \nField-1 E.g. http://localhost:8069 \nOR \nField-4 E.g. account.invoice")
self.win.endExecute()
def lstbox_selected(self, oItemEvent):
try:
desktop=getDesktop()
doc =desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
sItem= self.win.getComboBoxText("cmbVariable")
for var in self.aVariableList:
if var[:var.find("(")+1]==sItem[:sItem.find("(")+1]:
sItem = var
sMain=self.aListFields[self.win.getListBoxSelectedItemPos("lstFields")]
t=sMain.rfind('/lang')
if t!=-1:
sObject=self.getRes(self.sock,sItem[sItem.find("(")+1:-1],sMain[1:])
ids = self.sock.execute(database, uid, self.password, sObject , 'search', [])
res = self.sock.execute(database, uid, self.password, sObject , 'read',[ids[0]])
self.win.setEditText("txtUName",res[0][sMain[sMain.rfind("/")+1:]])
else:
ErrorDialog("Please select a language.")
except:
import traceback;traceback.print_exc()
self.win.setEditText("txtUName","TTT")
if self.bModify:
self.win.setEditText("txtUName",self.sGDisplayName)
def getRes(self, sock, sObject, sVar):
desktop=getDesktop()
doc =desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
res = sock.execute(database, uid, self.password, sObject , 'fields_get')
key = res.keys()
key.sort()
myval=None
if not sVar.find("/")==-1:
myval=sVar[:sVar.find("/")]
else:
myval=sVar
if myval in key:
if (res[myval]['type'] in ['many2one']):
sObject = res[myval]['relation']
return self.getRes(sock,res[myval]['relation'], sVar[sVar.find("/")+1:])
else:
return sObject
def cmbVariable_selected(self, oItemEvent):
if self.count > 0 :
try:
desktop=getDesktop()
doc =desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
self.win.removeListBoxItems("lstFields", 0, self.win.getListBoxItemCount("lstFields"))
self.aListFields=[]
tempItem = self.win.getComboBoxText("cmbVariable")
for var in self.aVariableList:
if var[:var.find("(")] == tempItem[:tempItem.find("(")]:
sItem=var
genTree(
sItem[ sItem.find("(") + 1:sItem.find(")")],
self.aListFields,
self.insField,
self.sMyHost,
2,
ending_excl=['one2many','many2one','many2many','reference'],
recur=['many2one']
)
except:
import traceback;traceback.print_exc()
def btnOk_clicked(self, oActionEvent):
self.bOkay = True
desktop=getDesktop()
doc = desktop.getCurrentComponent()
cursor = doc.getCurrentController().getViewCursor()
itemSelected = self.win.getListBoxSelectedItem( "lstFields" )
itemSelectedPos = self.win.getListBoxSelectedItemPos( "lstFields" )
txtUName = self.win.getEditText("txtUName")
sKey=u""+ txtUName
if itemSelected != "" and txtUName != "" and self.bModify==True :
oCurObj=cursor.TextField
sObjName=self.insVariable.getText()
sObjName=sObjName[:sObjName.find("(")]
sValue=u"[[ setLang" + sObjName + self.aListFields[itemSelectedPos].replace("/",".") + ")" " ]]"
oCurObj.Items = (sKey,sValue)
oCurObj.update()
self.win.endExecute()
elif itemSelected != "" and txtUName != "" :
oInputList = doc.createInstance("com.sun.star.text.TextField.DropDown")
sObjName=self.win.getComboBoxText("cmbVariable")
sObjName=sObjName[:sObjName.find("(")]
widget = ( cursor.TextTable and cursor.TextTable.getCellByName( cursor.Cell.CellName ) or doc.Text )
sValue = u"[[setLang" + "(" + sObjName + self.aListFields[itemSelectedPos].replace("/",".") +")" " ]]"
oInputList.Items = (sKey,sValue)
widget.insertTextContent(cursor,oInputList,False)
self.win.endExecute()
else:
ErrorDialog("Please fill appropriate data in name field \nor select particular value from the list of fields.")
def btnCancel_clicked(self, oActionEvent):
self.win.endExecute()
if __name__<>"package" and __name__=="__main__":
AddLang()
elif __name__=="package":
g_ImplementationHelper.addImplementation( AddLang, "org.openoffice.openerp.report.langtag", ("com.sun.star.task.Job",),)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
misska/shopo
|
refs/heads/master
|
importers/MetropoleImporter.py
|
1
|
#!/usr/bin/env python
# coding=utf-8
from Importer import Importer
class MetropoleImporter(Importer):
name = 'Metropole Zličín'
url = 'http://www.metropole.cz/obchody.html'
def parse(self):
for shopList in self.soup.findAll("ul",{"class":"mt5"}):
for link in shopList.findAll("a"):
if isinstance(link.text, basestring):
self.shops.append(link.text)
|
cdaf/cbe
|
refs/heads/master
|
cbe/cbe/credit/migrations/0001_initial.py
|
2
|
# Generated by Django 2.0.1 on 2018-01-31 15:25
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Credit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('credit_limit', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
('credit_status', models.CharField(choices=[('active', 'active'), ('stop', 'stop')], max_length=100)),
('credit_balance', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
('transaction_limit', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
],
),
migrations.CreateModel(
name='CreditAlert',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('alert_type', models.CharField(choices=[('risk', 'risk'), ('threshold', 'threshold'), ('breech', 'breech'), ('other', 'other')], max_length=300)),
('description', models.TextField(blank=True)),
],
options={
'ordering': ['id'],
},
),
migrations.CreateModel(
name='CreditBalanceEvent',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('datetime', models.DateTimeField(auto_now_add=True)),
('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
('balance', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
],
options={
'ordering': ['id'],
},
),
migrations.CreateModel(
name='CreditProfile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('valid_from', models.DateField(blank=True, null=True)),
('valid_to', models.DateField(blank=True, null=True)),
('created', models.DateField(auto_now_add=True)),
('credit_risk_rating', models.IntegerField(blank=True, null=True)),
('credit_score', models.IntegerField(blank=True, null=True)),
],
options={
'ordering': ['id'],
},
),
]
|
ebukoz/thrive
|
refs/heads/develop
|
erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
|
5
|
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import today
from erpnext.accounts.utils import get_fiscal_year
test_dependencies = ["Supplier Group"]
class TestTaxWithholdingCategory(unittest.TestCase):
@classmethod
def setUpClass(self):
# create relevant supplier, etc
create_records()
create_tax_with_holding_category()
def test_cumulative_threshold_tds(self):
frappe.db.set_value("Supplier", "Test TDS Supplier", "tax_withholding_category", "Cumulative Threshold TDS")
invoices = []
# create invoices for lower than single threshold tax rate
for _ in range(2):
pi = create_purchase_invoice(supplier = "Test TDS Supplier")
pi.submit()
invoices.append(pi)
# create another invoice whose total when added to previously created invoice,
# surpasses cumulative threshhold
pi = create_purchase_invoice(supplier = "Test TDS Supplier")
pi.submit()
# assert equal tax deduction on total invoice amount uptil now
self.assertEqual(pi.taxes_and_charges_deducted, 3000)
self.assertEqual(pi.grand_total, 7000)
invoices.append(pi)
# TDS is already deducted, so from onward system will deduct the TDS on every invoice
pi = create_purchase_invoice(supplier = "Test TDS Supplier", rate=5000)
pi.submit()
# assert equal tax deduction on total invoice amount uptil now
self.assertEqual(pi.taxes_and_charges_deducted, 500)
invoices.append(pi)
#delete invoices to avoid clashing
for d in invoices:
d.cancel()
def test_single_threshold_tds(self):
invoices = []
frappe.db.set_value("Supplier", "Test TDS Supplier1", "tax_withholding_category", "Single Threshold TDS")
pi = create_purchase_invoice(supplier = "Test TDS Supplier1", rate = 20000)
pi.submit()
invoices.append(pi)
self.assertEqual(pi.taxes_and_charges_deducted, 2000)
self.assertEqual(pi.grand_total, 18000)
# check gl entry for the purchase invoice
gl_entries = frappe.db.get_all('GL Entry', filters={'voucher_no': pi.name}, fields=["*"])
self.assertEqual(len(gl_entries), 3)
for d in gl_entries:
if d.account == pi.credit_to:
self.assertEqual(d.credit, 18000)
elif d.account == pi.items[0].get("expense_account"):
self.assertEqual(d.debit, 20000)
elif d.account == pi.taxes[0].get("account_head"):
self.assertEqual(d.credit, 2000)
else:
raise ValueError("Account head does not match.")
pi = create_purchase_invoice(supplier = "Test TDS Supplier1")
pi.submit()
invoices.append(pi)
# TDS amount is 1000 because in previous invoices it's already deducted
self.assertEqual(pi.taxes_and_charges_deducted, 1000)
# delete invoices to avoid clashing
for d in invoices:
d.cancel()
def test_single_threshold_tds_with_previous_vouchers(self):
invoices = []
frappe.db.set_value("Supplier", "Test TDS Supplier2", "tax_withholding_category", "Single Threshold TDS")
pi = create_purchase_invoice(supplier="Test TDS Supplier2")
pi.submit()
invoices.append(pi)
pi = create_purchase_invoice(supplier="Test TDS Supplier2")
pi.submit()
invoices.append(pi)
self.assertEqual(pi.taxes_and_charges_deducted, 2000)
self.assertEqual(pi.grand_total, 8000)
# delete invoices to avoid clashing
for d in invoices:
d.cancel()
def create_purchase_invoice(**args):
# return sales invoice doc object
item = frappe.get_doc('Item', {'item_name': 'TDS Item'})
args = frappe._dict(args)
pi = frappe.get_doc({
"doctype": "Purchase Invoice",
"posting_date": today(),
"apply_tds": 1,
"supplier": args.supplier,
"company": '_Test Company',
"taxes_and_charges": "",
"currency": "INR",
"credit_to": "Creditors - _TC",
"taxes": [],
"items": [{
'doctype': 'Purchase Invoice Item',
'item_code': item.name,
'qty': args.qty or 1,
'rate': args.rate or 10000,
'cost_center': 'Main - _TC',
'expense_account': 'Stock Received But Not Billed - _TC'
}]
})
pi.save()
return pi
def create_records():
# create a new suppliers
for name in ['Test TDS Supplier', 'Test TDS Supplier1', 'Test TDS Supplier2']:
if frappe.db.exists('Supplier', name):
continue
frappe.get_doc({
"supplier_group": "_Test Supplier Group",
"supplier_name": name,
"doctype": "Supplier",
}).insert()
# create an item
if not frappe.db.exists('Item', "TDS Item"):
frappe.get_doc({
"doctype": "Item",
"item_code": "TDS Item",
"item_name": "TDS Item",
"item_group": "All Item Groups",
"is_stock_item": 0,
}).insert()
# create an account
if not frappe.db.exists("Account", "TDS - _TC"):
frappe.get_doc({
'doctype': 'Account',
'company': '_Test Company',
'account_name': 'TDS',
'parent_account': 'Tax Assets - _TC',
'report_type': 'Balance Sheet',
'root_type': 'Asset'
}).insert()
def create_tax_with_holding_category():
fiscal_year = get_fiscal_year(today(), company="_Test Company")[0]
# Cummulative thresold
if not frappe.db.exists("Tax Withholding Category", "Cumulative Threshold TDS"):
frappe.get_doc({
"doctype": "Tax Withholding Category",
"name": "Cumulative Threshold TDS",
"category_name": "10% TDS",
"rates": [{
'fiscal_year': fiscal_year,
'tax_withholding_rate': 10,
'single_threshold': 0,
'cumulative_threshold': 30000.00
}],
"accounts": [{
'company': '_Test Company',
'account': 'TDS - _TC'
}]
}).insert()
# Single thresold
if not frappe.db.exists("Tax Withholding Category", "Single Threshold TDS"):
frappe.get_doc({
"doctype": "Tax Withholding Category",
"name": "Single Threshold TDS",
"category_name": "10% TDS",
"rates": [{
'fiscal_year': fiscal_year,
'tax_withholding_rate': 10,
'single_threshold': 20000.00,
'cumulative_threshold': 0
}],
"accounts": [{
'company': '_Test Company',
'account': 'TDS - _TC'
}]
}).insert()
|
open-synergy/hr
|
refs/heads/8.0
|
hr_employee_phone_extension/__openerp__.py
|
13
|
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Employee Phone Extension',
'version': '8.0.1.0.0',
'category': 'Human Resources',
'author': "Savoir-faire Linux,Odoo Community Association (OCA)",
'website': 'http://www.savoirfairelinux.com',
'license': 'AGPL-3',
'depends': ['hr', ],
'data': [
'views/hr_employee_view.xml',
],
'demo': [],
'test': [],
'installable': True,
'auto_install': False,
}
|
TomasTomecek/trello-reporter
|
refs/heads/master
|
trello_reporter/wsgi.py
|
1
|
"""
WSGI config for trello_reporter project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "trello_reporter.settings")
application = get_wsgi_application()
|
fladi/django-github-webhook
|
refs/heads/master
|
src/django_github_webhook/views.py
|
1
|
# -*- coding: utf-8 -*-
import hashlib
import hmac
import json
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponseBadRequest, JsonResponse
from django.views.generic import View
class WebHookView(View):
secret = None
allowed_events = [
'commit_comment',
'create',
'delete',
'deployment',
'deployment_status',
'fork',
'gollum',
'issue_comment',
'issues',
'member',
'membership',
'page_build',
'ping',
'public',
'pull_request',
'pull_request_review_comment',
'push',
'release',
'repository',
'status',
'team_add',
'watch',
]
def get_secret(self):
return self.secret
def get_allowed_events(self):
return self.allowed_events
@method_decorator(csrf_exempt)
def dispatch(self, request, *args, **kwargs):
return super(WebHookView, self).dispatch(request, *args, **kwargs)
def post(self, request, *args, **kwargs):
secret = self.get_secret()
if not secret:
raise ImproperlyConfigured('GitHub webhook secret ist not defined.')
if 'HTTP_X_HUB_SIGNATURE' not in request.META:
return HttpResponseBadRequest('Request does not contain X-GITHUB-SIGNATURE header')
if 'HTTP_X_GITHUB_EVENT' not in request.META:
return HttpResponseBadRequest('Request does not contain X-GITHUB-EVENT header')
digest_name, signature = request.META['HTTP_X_HUB_SIGNATURE'].split('=')
if digest_name != 'sha1':
return HttpResponseBadRequest('Unsupported X-HUB-SIGNATURE digest mode found: {}'.format(digest_name))
mac = hmac.new(
secret.encode('utf-8'),
msg=request.body,
digestmod=hashlib.sha1
)
if not hmac.compare_digest(mac.hexdigest(), signature):
return HttpResponseBadRequest('Invalid X-HUB-SIGNATURE header found')
event = request.META['HTTP_X_GITHUB_EVENT']
if event not in self.get_allowed_events():
return HttpResponseBadRequest('Unsupported X-GITHUB-EVENT header found: {}'.format(event))
handler = getattr(self, event, None)
if not handler:
return HttpResponseBadRequest('Unsupported X-GITHUB-EVENT header found: {}'.format(event))
payload = json.loads(request.body.decode('utf-8'))
response = handler(payload, request, *args, **kwargs)
return JsonResponse(response)
|
dakcarto/QGIS
|
refs/heads/master
|
python/plugins/processing/algs/qgis/DensifyGeometries.py
|
10
|
# -*- coding: utf-8 -*-
"""
***************************************************************************
DensifyGeometries.py
---------------------
Date : October 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Victor Olaya'
__date__ = 'October 2012'
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'
from qgis.core import QGis, QgsFeature, QgsGeometry, QgsPoint
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
class DensifyGeometries(GeoAlgorithm):
INPUT = 'INPUT'
VERTICES = 'VERTICES'
OUTPUT = 'OUTPUT'
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Densify geometries')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')
self.addParameter(ParameterVector(self.INPUT,
self.tr('Input layer'),
[ParameterVector.VECTOR_TYPE_POLYGON, ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterNumber(self.VERTICES,
self.tr('Vertices to add'), 1, 10000000, 1))
self.addOutput(OutputVector(self.OUTPUT,
self.tr('Densified')))
def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
self.getParameterValue(self.INPUT))
vertices = self.getParameterValue(self.VERTICES)
isPolygon = layer.geometryType() == QGis.Polygon
writer = self.getOutputFromName(
self.OUTPUT).getVectorWriter(layer.pendingFields().toList(),
layer.wkbType(), layer.crs())
features = vector.features(layer)
total = 100.0 / float(len(features))
current = 0
for f in features:
featGeometry = QgsGeometry(f.geometry())
attrs = f.attributes()
newGeometry = self.densifyGeometry(featGeometry, int(vertices),
isPolygon)
feature = QgsFeature()
feature.setGeometry(newGeometry)
feature.setAttributes(attrs)
writer.addFeature(feature)
current += 1
progress.setPercentage(int(current * total))
del writer
def densifyGeometry(self, geometry, pointsNumber, isPolygon):
output = []
if isPolygon:
if geometry.isMultipart():
polygons = geometry.asMultiPolygon()
for poly in polygons:
p = []
for ring in poly:
p.append(self.densify(ring, pointsNumber))
output.append(p)
return QgsGeometry.fromMultiPolygon(output)
else:
rings = geometry.asPolygon()
for ring in rings:
output.append(self.densify(ring, pointsNumber))
return QgsGeometry.fromPolygon(output)
else:
if geometry.isMultipart():
lines = geometry.asMultiPolyline()
for points in lines:
output.append(self.densify(points, pointsNumber))
return QgsGeometry.fromMultiPolyline(output)
else:
points = geometry.asPolyline()
output = self.densify(points, pointsNumber)
return QgsGeometry.fromPolyline(output)
def densify(self, polyline, pointsNumber):
output = []
if pointsNumber != 1:
multiplier = 1.0 / float(pointsNumber + 1)
else:
multiplier = 1
for i in xrange(len(polyline) - 1):
p1 = polyline[i]
p2 = polyline[i + 1]
output.append(p1)
for j in xrange(pointsNumber):
delta = multiplier * (j + 1)
x = p1.x() + delta * (p2.x() - p1.x())
y = p1.y() + delta * (p2.y() - p1.y())
output.append(QgsPoint(x, y))
if j + 1 == pointsNumber:
break
output.append(polyline[len(polyline) - 1])
return output
|
dednal/chromium.src
|
refs/heads/nw12
|
tools/telemetry/telemetry/image_processing/image_util.py
|
9
|
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides implementations of basic image processing functions.
Implements basic image processing functions, such as reading/writing images,
cropping, finding the bounding box of a color and diffing images.
When numpy is present, image_util_numpy_impl is used for the implementation of
this interface. The old bitmap implementation (image_util_bitmap_impl) is used
as a fallback when numpy is not present."""
import base64
from telemetry.util import external_modules
np = external_modules.ImportOptionalModule('numpy')
if np is None:
from telemetry.image_processing import image_util_bitmap_impl
impl = image_util_bitmap_impl
else:
from telemetry.image_processing import image_util_numpy_impl
impl = image_util_numpy_impl
def Channels(image):
"""Number of color channels in the image."""
return impl.Channels(image)
def Width(image):
"""Width of the image."""
return impl.Width(image)
def Height(image):
"""Height of the image."""
return impl.Height(image)
def Pixels(image):
"""Flat RGB pixel array of the image."""
return impl.Pixels(image)
def GetPixelColor(image, x, y):
"""Returns a RgbaColor for the pixel at (x, y)."""
return impl.GetPixelColor(image, x, y)
def WritePngFile(image, path):
return impl.WritePngFile(image, path)
def FromRGBPixels(width, height, pixels, bpp=3):
"""Create an image from an array of rgb pixels.
Ignores alpha channel if present.
Args:
width, height: int, the width and height of the image.
pixels: The flat array of pixels in the form of [r,g,b[,a],r,g,b[,a],...]
bpp: 3 for RGB, 4 for RGBA."""
return impl.FromRGBPixels(width, height, pixels, bpp)
def FromPng(png_data):
"""Create an image from raw PNG data."""
return impl.FromPng(png_data)
def FromPngFile(path):
"""Create an image from a PNG file.
Args:
path: The path to the PNG file."""
return impl.FromPngFile(path)
def FromBase64Png(base64_png):
"""Create an image from raw PNG data encoded in base64."""
return FromPng(base64.b64decode(base64_png))
def AreEqual(image1, image2, tolerance=0, likely_equal=True):
"""Determines whether two images are identical within a given tolerance.
Setting likely_equal to False enables short-circuit equality testing, which
is about 2-3x slower for equal images, but can be image height times faster
if the images are not equal."""
return impl.AreEqual(image1, image2, tolerance, likely_equal)
def Diff(image1, image2):
"""Returns a new image that represents the difference between this image
and another image."""
return impl.Diff(image1, image2)
def GetBoundingBox(image, color, tolerance=0):
"""Finds the minimum box surrounding all occurrences of bgr |color|.
Ignores the alpha channel.
Args:
color: RbgaColor, bounding box color.
tolerance: int, per-channel tolerance for the bounding box color.
Returns:
(top, left, width, height), match_count"""
return impl.GetBoundingBox(image, color, tolerance)
def Crop(image, left, top, width, height):
"""Crops the current image down to the specified box."""
return impl.Crop(image, left, top, width, height)
def GetColorHistogram(image, ignore_color=None, tolerance=0):
"""Computes a histogram of the pixel colors in this image.
Args:
ignore_color: An RgbaColor to exclude from the bucket counts.
tolerance: A tolerance for the ignore_color.
Returns:
A ColorHistogram namedtuple with 256 integers in each field: r, g, and b."""
return impl.GetColorHistogram(image, ignore_color, tolerance)
|
theochem/horton
|
refs/heads/master
|
horton/meanfield/libxc.py
|
2
|
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# HORTON is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
#
# --
"""Interface to LDA, GGA and hybrid functionals from LibXC"""
from horton.log import timer, biblio
from horton.utils import doc_inherit
from horton.meanfield.gridgroup import GridObservable, DF_LEVEL_LDA, \
DF_LEVEL_GGA, DF_LEVEL_MGGA
from horton.meanfield.cext import RLibXCWrapper, ULibXCWrapper
__all__ = [
'LibXCEnergy',
'RLibXCLDA', 'ULibXCLDA',
'RLibXCGGA', 'ULibXCGGA',
'RLibXCHybridGGA', 'ULibXCHybridGGA',
'RLibXCMGGA', 'ULibXCMGGA',
'RLibXCHybridMGGA', 'ULibXCHybridMGGA',
]
class LibXCEnergy(GridObservable):
"""Base class for LibXC functionals."""
prefix = None
LibXCWrapper = None
def __init__(self, name):
"""Initialize a LibXCEnergy instance.
Parameters
----------
name : str
The name of the functional in LibXC, without the ``lda_``, ``gga_`` or
``hyb_gga_`` prefix. (The type of functional is determined by the subclass.)
"""
name = '%s_%s' % (self.prefix, name)
self._name = name
self._libxc_wrapper = self.LibXCWrapper(name)
biblio.cite('lehtola2018', 'using LibXC, the library of exchange and correlation functionals')
GridObservable.__init__(self, 'libxc_%s' % name)
class RLibXCLDA(LibXCEnergy):
"""Any LDA functional from LibXC for restricted wavefunctions."""
df_level = DF_LEVEL_LDA
prefix = 'lda'
LibXCWrapper = RLibXCWrapper
@timer.with_section('LDA edens')
@doc_inherit(LibXCEnergy)
def compute_energy(self, cache, grid):
# LibXC expects the following input:
# - total density
# LibXC computes:
# - the energy density per electron.
rho_full = cache['rho_full']
edens, new = cache.load('edens_libxc_%s_full' % self._name, alloc=grid.size)
if new:
self._libxc_wrapper.compute_lda_exc(rho_full, edens)
return grid.integrate(edens, rho_full)
@timer.with_section('LDA pot')
@doc_inherit(LibXCEnergy)
def add_pot(self, cache, grid, pots_alpha):
# LibXC expects the following input:
# - total density
# LibXC computes:
# - the potential for the alpha electrons.
pot, new = cache.load('pot_libxc_%s_alpha' % self._name, alloc=grid.size)
if new:
self._libxc_wrapper.compute_lda_vxc(cache['rho_full'], pot)
pots_alpha[:, 0] += pot
@timer.with_section('LDA dot')
@doc_inherit(LibXCEnergy)
def add_dot(self, cache, grid, dots_alpha):
# LibXC expects the following input:
# - total density
# This method also uses
# - change in total density
# LibXC computes:
# - the diagonal second order derivative of the energy towards the
# density
kernel, new = cache.load('kernel_libxc_%s_alpha' % self._name, alloc=grid.size)
if new:
self._libxc_wrapper.compute_lda_fxc(cache['rho_full'], kernel)
dots_alpha[:, 0] += kernel*cache['delta_rho_full']
class ULibXCLDA(LibXCEnergy):
"""Any LDA functional from LibXC for unrestricted wavefunctions."""
df_level = DF_LEVEL_LDA
prefix = 'lda'
LibXCWrapper = ULibXCWrapper
@timer.with_section('LDA edens')
@doc_inherit(LibXCEnergy)
def compute_energy(self, cache, grid):
# LibXC expects the following input:
# - alpha density
# - beta density
# LibXC computes:
# - the energy density per electron.
# In case of spin-polarized computations, alpha and beta densities
# go in and the 'total' energy density comes out.
edens, new = cache.load('edens_libxc_%s_full' % self._name, alloc=grid.size)
if new:
self._libxc_wrapper.compute_lda_exc(cache['rho_both'], edens)
return grid.integrate(edens, cache['rho_full'])
@timer.with_section('LDA pot')
@doc_inherit(LibXCEnergy)
def add_pot(self, cache, grid, pots_alpha, pots_beta):
# LibXC expects the following input:
# - alpha density
# - beta density
# LibXC computes:
# - potential for the alpha electrons
# - potential for the beta electrons
pot_both, new = cache.load('pot_libxc_%s_both' % self._name, alloc=(grid.size, 2))
if new:
self._libxc_wrapper.compute_lda_vxc(cache['rho_both'], pot_both)
pots_alpha[:, 0] += pot_both[:, 0]
pots_beta[:, 0] += pot_both[:, 1]
class RLibXCGGA(LibXCEnergy):
"""Any pure GGA functional from LibXC for restricted wavefunctions."""
df_level = DF_LEVEL_GGA
prefix = 'gga'
LibXCWrapper = RLibXCWrapper
@timer.with_section('GGA edens')
@doc_inherit(LibXCEnergy)
def compute_energy(self, cache, grid):
# LibXC expects the following input:
# - total density
# - norm squared of the gradient of the total density
# LibXC computes:
# - energy density per electron
rho_full = cache['rho_full']
edens, new = cache.load('edens_libxc_%s_full' % self._name, alloc=grid.size)
if new:
sigma_full = cache['sigma_full']
self._libxc_wrapper.compute_gga_exc(rho_full, sigma_full, edens)
return grid.integrate(edens, rho_full)
def _compute_dpot_spot(self, cache, grid):
"""Helper function to compute potential resutls with LibXC.
This is needed for add_pot and add_dot.
Parameters
----------
cache : Cache
Used to share intermediate results.
grid : IntGrid
A numerical integration grid.
"""
dpot, newd = cache.load('dpot_libxc_%s_alpha' % self._name, alloc=grid.size)
spot, news = cache.load('spot_libxc_%s_alpha' % self._name, alloc=grid.size)
if newd or news:
rho_full = cache['rho_full']
sigma_full = cache['sigma_full']
self._libxc_wrapper.compute_gga_vxc(rho_full, sigma_full, dpot, spot)
return dpot, spot
@timer.with_section('GGA pot')
@doc_inherit(LibXCEnergy)
def add_pot(self, cache, grid, pots_alpha):
# LibXC expects the following input:
# - total density
# - norm squared of the gradient of the total density
# LibXC computes:
# - the derivative of the energy towards the alpha density.
# - the derivative of the energy towards the norm squared of the alpha density.
dpot, spot = self._compute_dpot_spot(cache, grid)
# Chain rule: convert derivative toward sigma into a derivative toward
# the gradients.
my_gga_pot_alpha, new = cache.load('gga_pot_libxc_%s_alpha' % self._name,
alloc=(grid.size, 4))
if new:
my_gga_pot_alpha[:, 0] = dpot
grad_rho = cache['grad_rho_full']
my_gga_pot_alpha[:, 1:4] = grad_rho*spot.reshape(-1, 1)
my_gga_pot_alpha[:, 1:4] *= 2
# Add to the output argument
pots_alpha[:, :4] += my_gga_pot_alpha
@timer.with_section('GGA dot')
@doc_inherit(LibXCEnergy)
def add_dot(self, cache, grid, dots_alpha):
# LibXC expects the following input:
# - total density
# - norm squared of the gradient of the total density
# This method also uses
# - change in total density
# - change in total gradient
# LibXC computes:
# - the diagonal second order derivative of the energy towards the
# density and the gradient
# if False:
# # Finite difference method. One day, this should become a end-user option.
# eps = 1e-5
# dpot_p = np.zeros(grid.size)
# dpot_m = np.zeros(grid.size)
# spot_p = np.zeros(grid.size)
# spot_m = np.zeros(grid.size)
#
# rho = cache['rho_full']
# grad_rho = cache['grad_rho_full']
# sigma = cache['sigma_full']
# delta_rho = cache['delta_rho_full']
# delta_grad_rho = cache['delta_grad_rho_full']
# delta_sigma = cache['delta_sigma_full']
#
# rho_p = rho + eps*delta_rho
# rho_m = rho - eps*delta_rho
# grad_rho_p = grad_rho + eps*delta_grad_rho
# grad_rho_m = grad_rho - eps*delta_grad_rho
# sigma_p = sigma + eps*delta_sigma
# sigma_m = sigma - eps*delta_sigma
# self._libxc_wrapper.compute_gga_vxc(rho_p, sigma_p, dpot_p, spot_p)
# self._libxc_wrapper.compute_gga_vxc(rho_m, sigma_m, dpot_m, spot_m)
# gpot_p = 2*(grad_rho_p*spot_p.reshape(-1, 1))
# gpot_m = 2*(grad_rho_m*spot_m.reshape(-1, 1))
# dots_alpha[:, 0] += (dpot_p - dpot_m)/(2*eps)
# dots_alpha[:, 1:4] += (gpot_p - gpot_m)/(2*eps)
# else:
kernel_dd, new1 = cache.load('kernel_dd_libxc_%s_alpha' % self._name, alloc=grid.size)
kernel_ds, new2 = cache.load('kernel_ds_libxc_%s_alpha' % self._name, alloc=grid.size)
kernel_ss, new3 = cache.load('kernel_ss_libxc_%s_alpha' % self._name, alloc=grid.size)
if new1 or new2 or new3:
rho_full = cache['rho_full']
sigma_full = cache['sigma_full']
self._libxc_wrapper.compute_gga_fxc(rho_full, sigma_full, kernel_dd,
kernel_ds, kernel_ss)
# Chain rule
my_gga_dot_alpha, new = cache.load('gga_dot_libxc_%s_alpha' % self._name,
alloc=(grid.size, 4), tags='d')
if new:
grad_rho = cache['grad_rho_full']
delta_rho = cache['delta_rho_full']
delta_grad_rho = cache['delta_grad_rho_full']
delta_sigma = cache['delta_sigma_full']
my_gga_dot_alpha[:, 0] = kernel_dd*delta_rho + kernel_ds*delta_sigma
my_gga_dot_alpha[:, 1:4] = 2*(kernel_ds*delta_rho +
kernel_ss*delta_sigma).reshape(-1, 1) * \
grad_rho
# the easy-to-forget contribution
spot = self._compute_dpot_spot(cache, grid)[1]
my_gga_dot_alpha[:, 1:4] += 2*spot.reshape(-1, 1)*delta_grad_rho
# Add to the output argument
dots_alpha[:, :4] += my_gga_dot_alpha
class ULibXCGGA(LibXCEnergy):
"""Any pure GGA functional from LibXC for unrestricted wavefunctions."""
df_level = DF_LEVEL_GGA
prefix = 'gga'
LibXCWrapper = ULibXCWrapper
@timer.with_section('GGA edens')
@doc_inherit(LibXCEnergy)
def compute_energy(self, cache, grid):
# LibXC expects the following input:
# - alpha density
# - beta density
# - norm squared of the gradient of the alpha density
# - dot product of the gradient of the alpha and beta densities
# - norm squared of the gradient of the beta density
# LibXC computes:
# - energy density per electron
edens, new = cache.load('edens_libxc_%s_full' % self._name, alloc=grid.size)
if new:
rho_both = cache['rho_both']
sigma_all = cache['sigma_all']
self._libxc_wrapper.compute_gga_exc(rho_both, sigma_all, edens)
rho_full = cache['rho_full']
return grid.integrate(edens, rho_full)
@timer.with_section('GGA pot')
@doc_inherit(LibXCEnergy)
def add_pot(self, cache, grid, pots_alpha, pots_beta):
# LibXC expects the following input:
# - alpha density
# - beta density
# - norm squared of the gradient of the alpha density
# - dot product of the gradient of the alpha and beta densities
# - norm squared of the gradient of the beta density
# LibXC computes:
# - the derivative of the energy towards the alpha density.
# - the derivative of the energy towards the beta density.
# - the derivative of the energy towards the norm squared of the alpha density.
# - the derivative of the energy towards the dot product of the alpha and beta
# densities.
# - the derivative of the energy towards the norm squared of the beta density.
dpot_both, newd = cache.load('dpot_libxc_%s_both' % self._name,
alloc=(grid.size, 2))
spot_all, newt = cache.load('spot_libxc_%s_all' % self._name,
alloc=(grid.size, 3))
if newd or newt:
rho_both = cache['rho_both']
sigma_all = cache['sigma_all']
self._libxc_wrapper.compute_gga_vxc(rho_both, sigma_all, dpot_both, spot_all)
# Chain rules: convert derivatives toward sigma into a derivative toward
# the gradients.
grad_alpha = cache['all_alpha'][:, 1:4]
grad_beta = cache['all_beta'][:, 1:4]
my_gga_pot_alpha, new = cache.load('gga_pot_libxc_%s_alpha' % self._name,
alloc=(grid.size, 4))
if new:
my_gga_pot_alpha[:, 0] = dpot_both[:, 0]
my_gga_pot_alpha[:, 1:4] = (2*spot_all[:, 0].reshape(-1, 1))*grad_alpha
my_gga_pot_alpha[:, 1:4] += (spot_all[:, 1].reshape(-1, 1))*grad_beta
my_gga_pot_beta, new = cache.load('gga_pot_libxc_%s_beta' % self._name,
alloc=(grid.size, 4))
if new:
my_gga_pot_beta[:, 0] = dpot_both[:, 1]
my_gga_pot_beta[:, 1:4] = (2*spot_all[:, 2].reshape(-1, 1))*grad_beta
my_gga_pot_beta[:, 1:4] += (spot_all[:, 1].reshape(-1, 1))*grad_alpha
pots_alpha[:, :4] += my_gga_pot_alpha
pots_beta[:, :4] += my_gga_pot_beta
class RLibXCHybridGGA(RLibXCGGA):
"""Any hybrid GGA functional from LibXC for restricted wavefunctions."""
prefix = 'hyb_gga'
def get_exx_fraction(self):
"""Return the fraction of Hartree-Fock exchange for this functional."""
return self._libxc_wrapper.get_hyb_exx_fraction()
def get_cam_coeffs(self):
"""Return the range-separation parameters: omega, alpha and beta."""
return self._libxc_wrapper.get_hyb_cam_coefs()
class ULibXCHybridGGA(ULibXCGGA):
"""Any hybrid GGA functional from LibXC for unrestricted wavefunctions."""
prefix = 'hyb_gga'
def get_exx_fraction(self):
"""Return the fraction of Hartree-Fock exchange for this functional."""
return self._libxc_wrapper.get_hyb_exx_fraction()
def get_cam_coeffs(self):
"""Return the range-separation parameters: omega, alpha and beta."""
return self._libxc_wrapper.get_hyb_cam_coefs()
class RLibXCMGGA(LibXCEnergy):
"""Any pure MGGA functional from LibXC for restricted wavefunctions."""
df_level = DF_LEVEL_MGGA
prefix = 'mgga'
LibXCWrapper = RLibXCWrapper
@timer.with_section('MGGA edens')
@doc_inherit(LibXCEnergy)
def compute_energy(self, cache, grid):
# LibXC expects the following input:
# - total density
# - norm squared of the gradient of the total density
# - the laplacian of the density
# - the kinetic energy density
# LibXC computes:
# - energy density per electron
rho_full = cache['rho_full']
edens, new = cache.load('edens_libxc_%s_full' % self._name, alloc=grid.size)
if new:
sigma_full = cache['sigma_full']
lapl_full = cache['lapl_full']
tau_full = cache['tau_full']
self._libxc_wrapper.compute_mgga_exc(rho_full, sigma_full, lapl_full,
tau_full, edens)
return grid.integrate(edens, rho_full)
@timer.with_section('MGGA pot')
@doc_inherit(LibXCEnergy)
def add_pot(self, cache, grid, pots_alpha):
# LibXC expects the following input:
# - total density
# - norm squared of the gradient of the total density
# - the laplacian of the density
# - the kinetic energy density
# LibXC computes:
# - the derivative of the energy towards the alpha density.
# - the derivative of the energy towards the norm squared of the alpha density.
# - the derivative of the energy towards the laplacian of the density
# - the derivative of the energy towards the kinetic energy density
dpot, newd = cache.load('dpot_libxc_%s_alpha' % self._name, alloc=grid.size)
spot, news = cache.load('spot_libxc_%s_alpha' % self._name, alloc=grid.size)
lpot, news = cache.load('lpot_libxc_%s_alpha' % self._name, alloc=grid.size)
tpot, news = cache.load('tpot_libxc_%s_alpha' % self._name, alloc=grid.size)
if newd or news:
rho_full = cache['rho_full']
sigma_full = cache['sigma_full']
lapl_full = cache['lapl_full']
tau_full = cache['tau_full']
self._libxc_wrapper.compute_mgga_vxc(rho_full, sigma_full, lapl_full,
tau_full, dpot, spot, lpot, tpot)
# Chain rule: convert derivative toward sigma into a derivative toward
# the gradients.
my_mgga_pot_alpha, new = cache.load('mgga_pot_libxc_%s_alpha' % self._name,
alloc=(grid.size, 6))
if new:
my_mgga_pot_alpha[:, 0] = dpot
grad_rho = cache['grad_rho_full']
my_mgga_pot_alpha[:, 1:4] = grad_rho*spot.reshape(-1, 1)
my_mgga_pot_alpha[:, 1:4] *= 2
my_mgga_pot_alpha[:, 4] = lpot
my_mgga_pot_alpha[:, 5] = tpot
# Add to the output argument
pots_alpha[:, :6] += my_mgga_pot_alpha
class ULibXCMGGA(LibXCEnergy):
"""Any pure MGGA functional from LibXC for unrestricted wavefunctions."""
df_level = DF_LEVEL_MGGA
prefix = 'mgga'
LibXCWrapper = ULibXCWrapper
@timer.with_section('MGGA edens')
@doc_inherit(LibXCEnergy)
def compute_energy(self, cache, grid):
# LibXC expects the following input:
# - alpha density
# - beta density
# - norm squared of the gradient of the alpha density
# - dot product of the gradient of the alpha and beta densities
# - norm squared of the gradient of the beta density
# - the laplacian of the alpha density
# - the laplacian of the beta density
# - the alpha kinetic energy density
# - the beta kinetic energy density
# LibXC computes:
# - energy density per electron
edens, new = cache.load('edens_libxc_%s_full' % self._name, alloc=grid.size)
if new:
rho_both = cache['rho_both']
sigma_all = cache['sigma_all']
lapl_both = cache['lapl_both']
tau_both = cache['tau_both']
self._libxc_wrapper.compute_mgga_exc(rho_both, sigma_all, lapl_both,
tau_both, edens)
rho_full = cache['rho_full']
return grid.integrate(edens, rho_full)
@timer.with_section('MGGA pot')
@doc_inherit(LibXCEnergy)
def add_pot(self, cache, grid, pots_alpha, pots_beta):
# LibXC expects the following input:
# - alpha density
# - beta density
# - norm squared of the gradient of the alpha density
# - dot product of the gradient of the alpha and beta densities
# - norm squared of the gradient of the beta density
# - the laplacian of the alpha density
# - the laplacian of the beta density
# - the alpha kinetic energy density
# - the beta kinetic energy density
# LibXC computes:
# - the derivative of the energy towards the alpha density.
# - the derivative of the energy towards the beta density.
# - the derivative of the energy towards the norm squared of the alpha density.
# - the derivative of the energy towards the dot product of the alpha and beta
# densities.
# - the derivative of the energy towards the norm squared of the beta density.
# - the derivative of the energy towards the laplacian of the alpha density
# - the derivative of the energy towards the laplacian of the beta density
# - the derivative of the energy towards the alpha kinetic energy density
# - the derivative of the energy towards the beta kinetic energy density
dpot_both, newd = cache.load('dpot_libxc_%s_both' % self._name, alloc=(grid.size, 2))
spot_all, newt = cache.load('spot_libxc_%s_all' % self._name, alloc=(grid.size, 3))
lpot_both, newd = cache.load('lpot_libxc_%s_both' % self._name, alloc=(grid.size, 2))
tpot_both, newd = cache.load('tpot_libxc_%s_both' % self._name, alloc=(grid.size, 2))
if newd or newt:
rho_both = cache['rho_both']
sigma_all = cache['sigma_all']
lapl_both = cache['lapl_both']
tau_both = cache['tau_both']
self._libxc_wrapper.compute_mgga_vxc(rho_both, sigma_all, lapl_both, tau_both,
dpot_both, spot_all, lpot_both, tpot_both)
# Chain rules: convert derivatives toward sigma into a derivative toward
# the gradients.
grad_alpha = cache['all_alpha'][:, 1:4]
grad_beta = cache['all_beta'][:, 1:4]
my_mgga_pot_alpha, new = cache.load('gga_pot_libxc_%s_alpha' % self._name,
alloc=(grid.size, 6))
if new:
my_mgga_pot_alpha[:, 0] = dpot_both[:, 0]
my_mgga_pot_alpha[:, 1:4] = (2*spot_all[:, 0].reshape(-1, 1))*grad_alpha
my_mgga_pot_alpha[:, 1:4] += (spot_all[:, 1].reshape(-1, 1))*grad_beta
my_mgga_pot_alpha[:, 4] = lpot_both[:, 0]
my_mgga_pot_alpha[:, 5] = tpot_both[:, 0]
my_mgga_pot_beta, new = cache.load('gga_pot_libxc_%s_beta' % self._name,
alloc=(grid.size, 6))
if new:
my_mgga_pot_beta[:, 0] = dpot_both[:, 1]
my_mgga_pot_beta[:, 1:4] = (2*spot_all[:, 2].reshape(-1, 1))*grad_beta
my_mgga_pot_beta[:, 1:4] += (spot_all[:, 1].reshape(-1, 1))*grad_alpha
my_mgga_pot_beta[:, 4] = lpot_both[:, 1]
my_mgga_pot_beta[:, 5] = tpot_both[:, 1]
pots_alpha[:, :6] += my_mgga_pot_alpha
pots_beta[:, :6] += my_mgga_pot_beta
class RLibXCHybridMGGA(RLibXCMGGA):
"""Any hybrid MGGA functional from LibXC for restricted wavefunctions."""
prefix = 'hyb_mgga'
def get_exx_fraction(self):
"""Return the fraction of Hartree-Fock exchange for this functional."""
return self._libxc_wrapper.get_hyb_exx_fraction()
def get_cam_coeffs(self):
"""Return the range-separation parameters: omega, alpha and beta."""
return self._libxc_wrapper.get_hyb_cam_coefs()
class ULibXCHybridMGGA(ULibXCMGGA):
"""Any hybrid GGA functional from LibXC for unrestricted wavefunctions."""
prefix = 'hyb_mgga'
def get_exx_fraction(self):
"""Return the fraction of Hartree-Fock exchange for this functional."""
return self._libxc_wrapper.get_hyb_exx_fraction()
def get_cam_coeffs(self):
"""Return the range-separation parameters: omega, alpha and beta."""
return self._libxc_wrapper.get_hyb_cam_coefs()
|
brunosantos/Bsan-kodi-repo
|
refs/heads/master
|
plugin.video.kodi/dns/rcode.py
|
100
|
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""DNS Result Codes."""
import dns.exception
NOERROR = 0
FORMERR = 1
SERVFAIL = 2
NXDOMAIN = 3
NOTIMP = 4
REFUSED = 5
YXDOMAIN = 6
YXRRSET = 7
NXRRSET = 8
NOTAUTH = 9
NOTZONE = 10
BADVERS = 16
_by_text = {
'NOERROR' : NOERROR,
'FORMERR' : FORMERR,
'SERVFAIL' : SERVFAIL,
'NXDOMAIN' : NXDOMAIN,
'NOTIMP' : NOTIMP,
'REFUSED' : REFUSED,
'YXDOMAIN' : YXDOMAIN,
'YXRRSET' : YXRRSET,
'NXRRSET' : NXRRSET,
'NOTAUTH' : NOTAUTH,
'NOTZONE' : NOTZONE,
'BADVERS' : BADVERS
}
# We construct the inverse mapping programmatically to ensure that we
# cannot make any mistakes (e.g. omissions, cut-and-paste errors) that
# would cause the mapping not to be a true inverse.
_by_value = dict([(y, x) for x, y in _by_text.iteritems()])
class UnknownRcode(dns.exception.DNSException):
"""Raised if an rcode is unknown."""
pass
def from_text(text):
"""Convert text into an rcode.
@param text: the texual rcode
@type text: string
@raises UnknownRcode: the rcode is unknown
@rtype: int
"""
if text.isdigit():
v = int(text)
if v >= 0 and v <= 4095:
return v
v = _by_text.get(text.upper())
if v is None:
raise UnknownRcode
return v
def from_flags(flags, ednsflags):
"""Return the rcode value encoded by flags and ednsflags.
@param flags: the DNS flags
@type flags: int
@param ednsflags: the EDNS flags
@type ednsflags: int
@raises ValueError: rcode is < 0 or > 4095
@rtype: int
"""
value = (flags & 0x000f) | ((ednsflags >> 20) & 0xff0)
if value < 0 or value > 4095:
raise ValueError('rcode must be >= 0 and <= 4095')
return value
def to_flags(value):
"""Return a (flags, ednsflags) tuple which encodes the rcode.
@param value: the rcode
@type value: int
@raises ValueError: rcode is < 0 or > 4095
@rtype: (int, int) tuple
"""
if value < 0 or value > 4095:
raise ValueError('rcode must be >= 0 and <= 4095')
v = value & 0xf
ev = long(value & 0xff0) << 20
return (v, ev)
def to_text(value):
"""Convert rcode into text.
@param value: the rcode
@type value: int
@rtype: string
"""
text = _by_value.get(value)
if text is None:
text = str(value)
return text
|
postatum/ra
|
refs/heads/master
|
ra/request.py
|
3
|
import fnmatch
import simplejson as json
import webtest
from .utils import listify
from .validate import RAMLValidator
def make_request_class(app, base=None):
"""Create a callable, app-bound request class from a base request class.
Request objects built from this class are passed to test functions.
The request object is callable with this signature:
req(validate=True, **req_params)
When called, a request is made against app, passing the object as
the request to send, applying any additional request parameters passed.
It also takes a ``validate`` keyword to determine if RAML validation
assertions should be automatically made on the response before
returning it (default is True).
The request object expects to be assigned a ``raml`` attribute with
the ra.raml.ResourceNode to validate against as the value.
:param app: the app we want to make requests to, generally an
instance of ``webtest.TestApp`` but can be anything
that responds to request() taking a webob-like request
object as a first positional argument, and accepts
request parameters as keyword args.
:param base: the base request class
(default ``webtest.TestRequest``).
:return: a new class for callable requests bound to :app: and pre-set
with :req_params:
"""
if base is None:
base = webtest.TestRequest
ResponseClass = getattr(base, 'ResponseClass', webtest.TestResponse)
def __call__(self, validate=True, **req_params):
resp = app.request(self, **req_params)
if validate:
RAMLValidator(resp, self.raml).validate(validate)
return resp
def encode_data(self, JSONEncoder=None):
if JSONEncoder is None:
JSONEncoder = self.JSONEncoder
import codecs
self.body = codecs.encode(json.dumps(self.data, cls=JSONEncoder),
'utf-8')
def match(self, only=None, exclude=None):
"""Returns True if this request's method and path match conditions.
Conditions are strings or lists of strings of the form 'METHOD /path'.
Either method or path can be omitted to match solely on the other.
If :only: is provided, request must match at least one of the provided
strings.
If :exclude: is provided, request must not match any of the provided
strings.
"""
# using self.scope.path because we want to match on the path
# before uri_params are filled or base_uri is prepended
return _match_request(self.scope.path, self.method, only, exclude)
RequestClass = type(
'Request',
(base,),
{
'data': None,
'factory': None,
'raml': None,
'scope': None,
'JSONEncoder': None,
'__call__': __call__,
'encode_data': encode_data,
'match': match,
'ResponseClass': ResponseClass
})
return RequestClass
def _match_request(path, method, only=None, exclude=None):
only, exclude = listify(only), listify(exclude)
if only:
if not any(_condition_match(pattern, method, path)
for pattern in only):
return False
if exclude:
if any(_condition_match(pattern, method, path)
for pattern in exclude):
return False
return True
def _condition_match(pattern, method, path):
"""Check if method and path of request match condition pattern.
"""
if ' ' in pattern:
pmethod, ppath = pattern.split(' ', 1)
elif pattern.startswith('/'):
pmethod, ppath = None, pattern
else:
pmethod, ppath = pattern, None
if pmethod:
if pmethod.upper() != method.upper():
return False
if ppath:
if not fnmatch.fnmatch(path, ppath):
return False
return True
|
abridgett/boto
|
refs/heads/develop
|
tests/integration/sqs/test_connection.py
|
77
|
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, dis-
# tribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the fol-
# lowing conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
"""
Some unit tests for the SQSConnection
"""
import time
from threading import Timer
from tests.unit import unittest
from boto.sqs.connection import SQSConnection
from boto.sqs.message import Message
from boto.sqs.message import MHMessage
from boto.exception import SQSError
class SQSConnectionTest(unittest.TestCase):
sqs = True
def test_1_basic(self):
print('--- running SQSConnection tests ---')
c = SQSConnection()
rs = c.get_all_queues()
num_queues = 0
for q in rs:
num_queues += 1
# try illegal name
try:
queue = c.create_queue('bad*queue*name')
self.fail('queue name should have been bad')
except SQSError:
pass
# now create one that should work and should be unique (i.e. a new one)
queue_name = 'test%d' % int(time.time())
timeout = 60
queue_1 = c.create_queue(queue_name, timeout)
self.addCleanup(c.delete_queue, queue_1, True)
time.sleep(60)
rs = c.get_all_queues()
i = 0
for q in rs:
i += 1
assert i == num_queues + 1
assert queue_1.count_slow() == 0
# check the visibility timeout
t = queue_1.get_timeout()
assert t == timeout, '%d != %d' % (t, timeout)
# now try to get queue attributes
a = q.get_attributes()
assert 'ApproximateNumberOfMessages' in a
assert 'VisibilityTimeout' in a
a = q.get_attributes('ApproximateNumberOfMessages')
assert 'ApproximateNumberOfMessages' in a
assert 'VisibilityTimeout' not in a
a = q.get_attributes('VisibilityTimeout')
assert 'ApproximateNumberOfMessages' not in a
assert 'VisibilityTimeout' in a
# now change the visibility timeout
timeout = 45
queue_1.set_timeout(timeout)
time.sleep(60)
t = queue_1.get_timeout()
assert t == timeout, '%d != %d' % (t, timeout)
# now add a message
message_body = 'This is a test\n'
message = queue_1.new_message(message_body)
queue_1.write(message)
time.sleep(60)
assert queue_1.count_slow() == 1
time.sleep(90)
# now read the message from the queue with a 10 second timeout
message = queue_1.read(visibility_timeout=10)
assert message
assert message.get_body() == message_body
# now immediately try another read, shouldn't find anything
message = queue_1.read()
assert message == None
# now wait 30 seconds and try again
time.sleep(30)
message = queue_1.read()
assert message
# now delete the message
queue_1.delete_message(message)
time.sleep(30)
assert queue_1.count_slow() == 0
# try a batch write
num_msgs = 10
msgs = [(i, 'This is message %d' % i, 0) for i in range(num_msgs)]
queue_1.write_batch(msgs)
# try to delete all of the messages using batch delete
deleted = 0
while deleted < num_msgs:
time.sleep(5)
msgs = queue_1.get_messages(num_msgs)
if msgs:
br = queue_1.delete_message_batch(msgs)
deleted += len(br.results)
# create another queue so we can test force deletion
# we will also test MHMessage with this queue
queue_name = 'test%d' % int(time.time())
timeout = 60
queue_2 = c.create_queue(queue_name, timeout)
self.addCleanup(c.delete_queue, queue_2, True)
queue_2.set_message_class(MHMessage)
time.sleep(30)
# now add a couple of messages
message = queue_2.new_message()
message['foo'] = 'bar'
queue_2.write(message)
message_body = {'fie': 'baz', 'foo': 'bar'}
message = queue_2.new_message(body=message_body)
queue_2.write(message)
time.sleep(30)
m = queue_2.read()
assert m['foo'] == 'bar'
print('--- tests completed ---')
def test_sqs_timeout(self):
c = SQSConnection()
queue_name = 'test_sqs_timeout_%s' % int(time.time())
queue = c.create_queue(queue_name)
self.addCleanup(c.delete_queue, queue, True)
start = time.time()
poll_seconds = 2
response = queue.read(visibility_timeout=None,
wait_time_seconds=poll_seconds)
total_time = time.time() - start
self.assertTrue(total_time > poll_seconds,
"SQS queue did not block for at least %s seconds: %s" %
(poll_seconds, total_time))
self.assertIsNone(response)
# Now that there's an element in the queue, we should not block for 2
# seconds.
c.send_message(queue, 'test message')
start = time.time()
poll_seconds = 2
message = c.receive_message(
queue, number_messages=1,
visibility_timeout=None, attributes=None,
wait_time_seconds=poll_seconds)[0]
total_time = time.time() - start
self.assertTrue(total_time < poll_seconds,
"SQS queue blocked longer than %s seconds: %s" %
(poll_seconds, total_time))
self.assertEqual(message.get_body(), 'test message')
attrs = c.get_queue_attributes(queue, 'ReceiveMessageWaitTimeSeconds')
self.assertEqual(attrs['ReceiveMessageWaitTimeSeconds'], '0')
def test_sqs_longpoll(self):
c = SQSConnection()
queue_name = 'test_sqs_longpoll_%s' % int(time.time())
queue = c.create_queue(queue_name)
self.addCleanup(c.delete_queue, queue, True)
messages = []
# The basic idea is to spawn a timer thread that will put something
# on the queue in 5 seconds and verify that our long polling client
# sees the message after waiting for approximately that long.
def send_message():
messages.append(
queue.write(queue.new_message('this is a test message')))
t = Timer(5.0, send_message)
t.start()
self.addCleanup(t.join)
start = time.time()
response = queue.read(wait_time_seconds=10)
end = time.time()
t.join()
self.assertEqual(response.id, messages[0].id)
self.assertEqual(response.get_body(), messages[0].get_body())
# The timer thread should send the message in 5 seconds, so
# we're giving +- 1 second for the total time the queue
# was blocked on the read call.
self.assertTrue(4.0 <= (end - start) <= 6.0)
def test_queue_deletion_affects_full_queues(self):
conn = SQSConnection()
initial_count = len(conn.get_all_queues())
empty = conn.create_queue('empty%d' % int(time.time()))
full = conn.create_queue('full%d' % int(time.time()))
time.sleep(60)
# Make sure they're both around.
self.assertEqual(len(conn.get_all_queues()), initial_count + 2)
# Put a message in the full queue.
m1 = Message()
m1.set_body('This is a test message.')
full.write(m1)
self.assertEqual(full.count(), 1)
self.assertTrue(conn.delete_queue(empty))
# Here's the regression for the docs. SQS will delete a queue with
# messages in it, no ``force_deletion`` needed.
self.assertTrue(conn.delete_queue(full))
# Wait long enough for SQS to finally remove the queues.
time.sleep(90)
self.assertEqual(len(conn.get_all_queues()), initial_count)
def test_get_messages_attributes(self):
conn = SQSConnection()
current_timestamp = int(time.time())
test = self.create_temp_queue(conn)
time.sleep(65)
# Put a message in the queue.
self.put_queue_message(test)
self.assertEqual(test.count(), 1)
# Check all attributes.
msgs = test.get_messages(
num_messages=1,
attributes='All'
)
for msg in msgs:
self.assertEqual(msg.attributes['ApproximateReceiveCount'], '1')
first_rec = msg.attributes['ApproximateFirstReceiveTimestamp']
first_rec = int(first_rec) / 1000
self.assertTrue(first_rec >= current_timestamp)
# Put another message in the queue.
self.put_queue_message(test)
self.assertEqual(test.count(), 1)
# Check a specific attribute.
msgs = test.get_messages(
num_messages=1,
attributes='ApproximateReceiveCount'
)
for msg in msgs:
self.assertEqual(msg.attributes['ApproximateReceiveCount'], '1')
with self.assertRaises(KeyError):
msg.attributes['ApproximateFirstReceiveTimestamp']
def test_queue_purge(self):
conn = SQSConnection()
test = self.create_temp_queue(conn)
time.sleep(65)
# Put some messages in the queue.
for x in range(0, 4):
self.put_queue_message(test)
self.assertEqual(test.count(), 4)
# Now purge the queue
conn.purge_queue(test)
# Now assert queue count is 0
self.assertEqual(test.count(), 0)
def create_temp_queue(self, conn):
current_timestamp = int(time.time())
queue_name = 'test%d' % int(time.time())
test = conn.create_queue(queue_name)
self.addCleanup(conn.delete_queue, test)
return test
def put_queue_message(self, queue):
m1 = Message()
m1.set_body('This is a test message.')
queue.write(m1)
|
rogerhu/django
|
refs/heads/master
|
tests/view_tests/tests/__init__.py
|
12133432
| |
elkingtonmcb/django
|
refs/heads/master
|
django/conf/locale/is/__init__.py
|
12133432
| |
apporc/cinder
|
refs/heads/master
|
cinder/backup/rpcapi.py
|
14
|
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""
Client side of the volume backup RPC API.
"""
from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging as messaging
from cinder.objects import base as objects_base
from cinder import rpc
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
class BackupAPI(object):
"""Client side of the volume rpc API.
API version history:
1.0 - Initial version.
1.1 - Changed methods to accept backup objects instead of IDs.
"""
BASE_RPC_API_VERSION = '1.0'
RPC_API_VERSION = '1.1'
def __init__(self):
super(BackupAPI, self).__init__()
target = messaging.Target(topic=CONF.backup_topic,
version=self.BASE_RPC_API_VERSION)
serializer = objects_base.CinderObjectSerializer()
self.client = rpc.get_client(target, self.RPC_API_VERSION,
serializer=serializer)
def create_backup(self, ctxt, backup):
LOG.debug("create_backup in rpcapi backup_id %s", backup.id)
cctxt = self.client.prepare(server=backup.host)
cctxt.cast(ctxt, 'create_backup', backup=backup)
def restore_backup(self, ctxt, volume_host, backup, volume_id):
LOG.debug("restore_backup in rpcapi backup_id %s", backup.id)
cctxt = self.client.prepare(server=volume_host)
cctxt.cast(ctxt, 'restore_backup', backup=backup,
volume_id=volume_id)
def delete_backup(self, ctxt, backup):
LOG.debug("delete_backup rpcapi backup_id %s", backup.id)
cctxt = self.client.prepare(server=backup.host)
cctxt.cast(ctxt, 'delete_backup', backup=backup)
def export_record(self, ctxt, backup):
LOG.debug("export_record in rpcapi backup_id %(id)s "
"on host %(host)s.",
{'id': backup.id,
'host': backup.host})
cctxt = self.client.prepare(server=backup.host)
return cctxt.call(ctxt, 'export_record', backup=backup)
def import_record(self,
ctxt,
host,
backup,
backup_service,
backup_url,
backup_hosts):
LOG.debug("import_record rpcapi backup id %(id)s "
"on host %(host)s for backup_url %(url)s.",
{'id': backup.id,
'host': host,
'url': backup_url})
cctxt = self.client.prepare(server=host)
cctxt.cast(ctxt, 'import_record',
backup=backup,
backup_service=backup_service,
backup_url=backup_url,
backup_hosts=backup_hosts)
def reset_status(self, ctxt, backup, status):
LOG.debug("reset_status in rpcapi backup_id %(id)s "
"on host %(host)s.",
{'id': backup.id,
'host': backup.host})
cctxt = self.client.prepare(server=backup.host)
return cctxt.cast(ctxt, 'reset_status', backup=backup, status=status)
def check_support_to_force_delete(self, ctxt, host):
LOG.debug("Check if backup driver supports force delete "
"on host %(host)s.", {'host': host})
cctxt = self.client.prepare(server=host)
return cctxt.call(ctxt, 'check_support_to_force_delete')
|
lxieyang/simple-amt
|
refs/heads/master
|
show_hit_progress.py
|
4
|
import argparse
from collections import Counter
import simpleamt
if __name__ == '__main__':
parser = argparse.ArgumentParser(parents=[simpleamt.get_parent_parser()])
args = parser.parse_args()
mtc = simpleamt.get_mturk_connection_from_args(args)
if args.hit_ids_file is None:
parser.error('Must specify hit_ids_file')
with open(args.hit_ids_file, 'r') as f:
hit_ids = [line.strip() for line in f]
counter = Counter()
for idx, hit_id in enumerate(hit_ids):
hit = mtc.get_hit(hit_id)[0]
total = int(hit.MaxAssignments)
completed = 0
for a in mtc.get_assignments(hit_id):
s = a.AssignmentStatus
if s == 'Submitted' or s == 'Approved':
completed += 1
print 'HIT %d/%d: %d/%d assignments completed.' % (idx+1, len(hit_ids), completed, total)
counter.update([(completed, total)])
for (completed, total), count in counter.most_common():
print ' completed %d / %d, count: %d' % (completed, total, count)
|
Ahmad31/Web_Flask_Cassandra
|
refs/heads/master
|
flask/lib/python2.7/site-packages/cqlengine/tests/test_consistency.py
|
2
|
from cqlengine.management import sync_table, drop_table
from cqlengine.tests.base import BaseCassEngTestCase
from cqlengine.models import Model
from uuid import uuid4
from cqlengine import columns
import mock
from cqlengine import ALL, BatchQuery
class TestConsistencyModel(Model):
id = columns.UUID(primary_key=True, default=lambda:uuid4())
count = columns.Integer()
text = columns.Text(required=False)
class BaseConsistencyTest(BaseCassEngTestCase):
@classmethod
def setUpClass(cls):
super(BaseConsistencyTest, cls).setUpClass()
sync_table(TestConsistencyModel)
@classmethod
def tearDownClass(cls):
super(BaseConsistencyTest, cls).tearDownClass()
drop_table(TestConsistencyModel)
class TestConsistency(BaseConsistencyTest):
def test_create_uses_consistency(self):
qs = TestConsistencyModel.consistency(ALL)
with mock.patch.object(self.session, 'execute') as m:
qs.create(text="i am not fault tolerant this way")
args = m.call_args
self.assertEqual(ALL, args[0][0].consistency_level)
def test_queryset_is_returned_on_create(self):
qs = TestConsistencyModel.consistency(ALL)
self.assertTrue(isinstance(qs, TestConsistencyModel.__queryset__), type(qs))
def test_update_uses_consistency(self):
t = TestConsistencyModel.create(text="bacon and eggs")
t.text = "ham sandwich"
with mock.patch.object(self.session, 'execute') as m:
t.consistency(ALL).save()
args = m.call_args
self.assertEqual(ALL, args[0][0].consistency_level)
def test_batch_consistency(self):
with mock.patch.object(self.session, 'execute') as m:
with BatchQuery(consistency=ALL) as b:
TestConsistencyModel.batch(b).create(text="monkey")
args = m.call_args
self.assertEqual(ALL, args[0][0].consistency_level)
with mock.patch.object(self.session, 'execute') as m:
with BatchQuery() as b:
TestConsistencyModel.batch(b).create(text="monkey")
args = m.call_args
self.assertNotEqual(ALL, args[0][0].consistency_level)
def test_blind_update(self):
t = TestConsistencyModel.create(text="bacon and eggs")
t.text = "ham sandwich"
uid = t.id
with mock.patch.object(self.session, 'execute') as m:
TestConsistencyModel.objects(id=uid).consistency(ALL).update(text="grilled cheese")
args = m.call_args
self.assertEqual(ALL, args[0][0].consistency_level)
def test_delete(self):
# ensures we always carry consistency through on delete statements
t = TestConsistencyModel.create(text="bacon and eggs")
t.text = "ham and cheese sandwich"
uid = t.id
with mock.patch.object(self.session, 'execute') as m:
t.consistency(ALL).delete()
with mock.patch.object(self.session, 'execute') as m:
TestConsistencyModel.objects(id=uid).consistency(ALL).delete()
args = m.call_args
self.assertEqual(ALL, args[0][0].consistency_level)
|
xme1226/horizon
|
refs/heads/master
|
openstack_dashboard/usage/tables.py
|
3
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from django.core import urlresolvers
from django.template.defaultfilters import floatformat # noqa
from django.template.defaultfilters import timesince # noqa
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from horizon.templatetags import sizeformat
from horizon.utils import filters
class CSVSummary(tables.LinkAction):
name = "csv_summary"
verbose_name = _("Download CSV Summary")
icon = "download"
def get_link_url(self, usage=None):
return self.table.kwargs['usage'].csv_link()
class BaseUsageTable(tables.DataTable):
vcpus = tables.Column('vcpus', verbose_name=_("VCPUs"))
disk = tables.Column('local_gb', verbose_name=_("Disk"),
filters=(sizeformat.diskgbformat,))
memory = tables.Column('memory_mb',
verbose_name=_("RAM"),
filters=(sizeformat.mbformat,),
attrs={"data-type": "size"})
hours = tables.Column('vcpu_hours', verbose_name=_("VCPU Hours"),
filters=(lambda v: floatformat(v, 2),))
class GlobalUsageTable(BaseUsageTable):
project = tables.Column('project_name', verbose_name=_("Project Name"))
disk_hours = tables.Column('disk_gb_hours',
verbose_name=_("Disk GB Hours"),
help_text=_("Total disk usage (GB * "
"Hours Used) for the project"),
filters=(lambda v: floatformat(v, 2),))
def get_object_id(self, datum):
return datum.tenant_id
class Meta:
name = "global_usage"
hidden_title = False
verbose_name = _("Usage")
columns = ("project", "vcpus", "disk", "memory",
"hours", "disk_hours")
table_actions = (CSVSummary,)
multi_select = False
def get_instance_link(datum):
view = "horizon:project:instances:detail"
if datum.get('instance_id', False):
return urlresolvers.reverse(view, args=(datum.get('instance_id'),))
else:
return None
class ProjectUsageTable(BaseUsageTable):
instance = tables.Column('name',
verbose_name=_("Instance Name"),
link=get_instance_link)
uptime = tables.Column('uptime_at',
verbose_name=_("Time since created"),
filters=(filters.timesince_sortable,),
attrs={'data-type': 'timesince'})
def get_object_id(self, datum):
return datum.get('instance_id', id(datum))
class Meta:
name = "project_usage"
hidden_title = False
verbose_name = _("Usage")
columns = ("instance", "vcpus", "disk", "memory", "uptime")
table_actions = (CSVSummary,)
multi_select = False
|
anarang/robottelo
|
refs/heads/master
|
robottelo/cli/activationkey.py
|
7
|
# -*- encoding: utf-8 -*-
"""
Usage::
hammer activation-key [OPTIONS] SUBCOMMAND [ARG] ...
Parameters::
SUBCOMMAND subcommand
[ARG] ... subcommand arguments
Subcommands::
add-host-collection Associate a resource
add-subscription Add subscription
content-override Override product content defaults
copy Copy an activation key
create Create an activation key
delete Destroy an activation key
host-collections List associated host collections
info Show an activation key
list List activation keys
product-content List associated products
remove-host-collection Disassociate a resource
remove-subscription Remove subscription
subscriptions List associated subscriptions
update Update an activation key
"""
from robottelo.cli.base import Base
class ActivationKey(Base):
"""Manipulates Katello's activation-key."""
command_base = 'activation-key'
@classmethod
def add_host_collection(cls, options=None):
"""Associate a resource"""
cls.command_sub = 'add-host-collection'
return cls.execute(cls._construct_command(options))
@classmethod
def add_subscription(cls, options=None):
"""Add subscription"""
cls.command_sub = 'add-subscription'
return cls.execute(cls._construct_command(options))
@classmethod
def content_override(cls, options=None):
"""Override product content defaults"""
cls.command_sub = 'content-override'
return cls.execute(cls._construct_command(options))
@classmethod
def copy(cls, options=None):
"""Copy an activation key"""
cls.command_sub = 'copy'
return cls.execute(cls._construct_command(options))
@classmethod
def host_collection(cls, options=None):
"""List associated host collections"""
cls.command_sub = 'host-collections'
return cls.execute(cls._construct_command(options))
@classmethod
def product_content(cls, options=None):
"""List associated products"""
cls.command_sub = 'product-content'
return cls.execute(
cls._construct_command(options),
output_format='csv'
)
@classmethod
def remove_host_collection(cls, options=None):
"""Remove the associated resource"""
cls.command_sub = 'remove-host-collection'
return cls.execute(cls._construct_command(options))
@classmethod
def remove_repository(cls, options=None):
"""Disassociate a resource"""
cls.command_sub = 'remove-repository'
return cls.execute(cls._construct_command(options))
@classmethod
def remove_subscription(cls, options=None):
"""Remove subscription"""
cls.command_sub = 'remove-subscription'
return cls.execute(cls._construct_command(options))
@classmethod
def subscriptions(cls, options=None):
"""List associated subscriptions"""
cls.command_sub = 'subscriptions'
return cls.execute(cls._construct_command(options))
|
wouwei/PiLapse
|
refs/heads/master
|
picam/picamEnv/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py
|
1734
|
from __future__ import absolute_import, division, unicode_literals
from . import _base
from ..sanitizer import HTMLSanitizerMixin
class Filter(_base.Filter, HTMLSanitizerMixin):
def __iter__(self):
for token in _base.Filter.__iter__(self):
token = self.sanitize_token(token)
if token:
yield token
|
nuwainfo/treeio
|
refs/heads/master
|
minidetector/useragents.py
|
13
|
import os.path
def load_from_search_strings_file():
f = None
try:
f = open(os.path.join(os.path.dirname(__file__), 'search_strings.txt'))
ss = f.readlines()
finally:
if f:
f.close()
return [s.strip() for s in ss if not s.startswith('#')]
search_strings = load_from_search_strings_file()
|
koalalorenzo/CacheLayer
|
refs/heads/master
|
cachelayer/celery.py
|
1
|
from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cachelayer.settings.default')
app = Celery('cachelayer')
# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
app.conf.update(
BROKER_URL=settings.CACHES["celery"]["LOCATION"],
CELERY_RESULT_BACKEND=settings.CACHES["celery"]["LOCATION"],
CELERY_TASK_SERIALIZER='pickle',
CELERY_RESULT_SERIALIZER='pickle',
)
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.request))
|
stonegithubs/odoo
|
refs/heads/8.0
|
addons/account_cancel/models/__init__.py
|
243
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import account_bank_statement
|
catapult-project/catapult-csm
|
refs/heads/master
|
third_party/google-endpoints/cachetools/func.py
|
9
|
"""`functools.lru_cache` compatible memoizing function decorators."""
import collections
import functools
import random
import time
import warnings
try:
from threading import RLock
except ImportError:
from dummy_threading import RLock
from .keys import hashkey, typedkey
__all__ = ('lfu_cache', 'lru_cache', 'rr_cache', 'ttl_cache')
class _NLock:
def __enter__(self):
pass
def __exit__(self, *exc):
pass
_CacheInfo = collections.namedtuple('CacheInfo', [
'hits', 'misses', 'maxsize', 'currsize'
])
_marker = object()
def _deprecated(message, level=2):
warnings.warn('%s is deprecated' % message, DeprecationWarning, level)
def _cache(cache, typed=False, context=_marker):
def decorator(func):
key = typedkey if typed else hashkey
if context is _marker:
lock = RLock()
elif context is None:
lock = _NLock()
else:
lock = context()
stats = [0, 0]
def cache_info():
with lock:
hits, misses = stats
maxsize = cache.maxsize
currsize = cache.currsize
return _CacheInfo(hits, misses, maxsize, currsize)
def cache_clear():
with lock:
try:
cache.clear()
finally:
stats[:] = [0, 0]
def wrapper(*args, **kwargs):
k = key(*args, **kwargs)
with lock:
try:
v = cache[k]
stats[0] += 1
return v
except KeyError:
stats[1] += 1
v = func(*args, **kwargs)
try:
with lock:
cache[k] = v
except ValueError:
pass # value too large
return v
functools.update_wrapper(wrapper, func)
if not hasattr(wrapper, '__wrapped__'):
wrapper.__wrapped__ = func # Python < 3.2
wrapper.cache_info = cache_info
wrapper.cache_clear = cache_clear
return wrapper
return decorator
def lfu_cache(maxsize=128, typed=False, getsizeof=None, lock=_marker):
"""Decorator to wrap a function with a memoizing callable that saves
up to `maxsize` results based on a Least Frequently Used (LFU)
algorithm.
"""
from .lfu import LFUCache
if lock is not _marker:
_deprecated("Passing 'lock' to lfu_cache()", 3)
return _cache(LFUCache(maxsize, getsizeof), typed, lock)
def lru_cache(maxsize=128, typed=False, getsizeof=None, lock=_marker):
"""Decorator to wrap a function with a memoizing callable that saves
up to `maxsize` results based on a Least Recently Used (LRU)
algorithm.
"""
from .lru import LRUCache
if lock is not _marker:
_deprecated("Passing 'lock' to lru_cache()", 3)
return _cache(LRUCache(maxsize, getsizeof), typed, lock)
def rr_cache(maxsize=128, choice=random.choice, typed=False, getsizeof=None,
lock=_marker):
"""Decorator to wrap a function with a memoizing callable that saves
up to `maxsize` results based on a Random Replacement (RR)
algorithm.
"""
from .rr import RRCache
if lock is not _marker:
_deprecated("Passing 'lock' to rr_cache()", 3)
return _cache(RRCache(maxsize, choice, getsizeof), typed, lock)
def ttl_cache(maxsize=128, ttl=600, timer=time.time, typed=False,
getsizeof=None, lock=_marker):
"""Decorator to wrap a function with a memoizing callable that saves
up to `maxsize` results based on a Least Recently Used (LRU)
algorithm with a per-item time-to-live (TTL) value.
"""
from .ttl import TTLCache
if lock is not _marker:
_deprecated("Passing 'lock' to ttl_cache()", 3)
return _cache(TTLCache(maxsize, ttl, timer, getsizeof), typed, lock)
|
trulow/namebench
|
refs/heads/master
|
libnamebench/config_test.py
|
173
|
#!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the config module."""
__author__ = 'tstromberg@google.com (Thomas Stromberg)'
import unittest
import config
import sys
sys.path.append('..')
import third_party
class ConfigTest(unittest.TestCase):
def testParseFullLine(self):
line = 'NTT (2) # y.ns.gin.ntt.net,39.569,-104.8582 (Englewood/CO/US)'
expected = {'name': 'NTT (2)', 'service': 'NTT',
'lon': '-104.8582', 'instance': '2', 'country_code': 'US',
'lat': '39.569', 'hostname': 'y.ns.gin.ntt.net'}
self.assertEquals(config._ParseServerValue(line), expected)
def testOpenDNSLine(self):
line = 'OpenDNS # resolver2.opendns.com'
expected = {'name': 'OpenDNS', 'service': 'OpenDNS', 'ip': '208.67.220.220',
'lon': None, 'instance': None, 'country_code': None,
'lat': None, 'hostname': 'resolver2.opendns.com'}
self.assertEquals(config._ParseServerValue(line), expected)
def testLineWithNoRegion(self):
line = 'Level/GTEI-2 (3) # vnsc-bak.sys.gtei.net,38.0,-97.0 (US) '
expected = {'name': 'Level/GTEI-2 (3)', 'service': 'Level/GTEI-2',
'lon': '-97.0', 'instance': '3',
'country_code': 'US', 'lat': '38.0',
'hostname': 'vnsc-bak.sys.gtei.net'}
self.assertEquals(config._ParseServerValue(line), expected)
if __name__ == '__main__':
unittest.main()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.