code stringlengths 3 1.05M | repo_name stringlengths 5 104 | path stringlengths 4 251 | language stringclasses 1 value | license stringclasses 15 values | size int64 3 1.05M |
|---|---|---|---|---|---|
# (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP
#
# 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.
PANEL = 'form_builder'
PANEL_GROUP = 'default'
PANEL_DASHBOARD = 'developer'
ADD_PANEL = \
'openstack_dashboard.contrib.developer.form_builder.panel.FormBuilder'
| openstack/horizon | openstack_dashboard/contrib/developer/enabled/_9040_form_builder.py | Python | apache-2.0 | 783 |
# -*- coding: utf-8 -*-
# Copyright (C) 2016 Bastian Kleineidam
#
# 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/>.
"""Archive commands for the 7zr program.
7zr is a light executable supporting only the 7z archive format.
"""
from .p7zip import \
extract_7z, \
list_7z, \
test_7z, \
create_7z
| wummel/patool | patoolib/programs/p7rzip.py | Python | gpl-3.0 | 887 |
MICROSERVICES = {
# Map locations to their microservices
"LOCATION_MICROSERVICES": [
{
"module": "intelligence.last_seen.location_lastseen_microservice",
"class": "LocationLastSeenMicroservice"
}
]
}
| peoplepower/botlab | com.ppc.Microservices/intelligence/last_seen/index.py | Python | apache-2.0 | 250 |
#! /usr/bin/env python
"""Generate C code from an ASDL description."""
# TO DO
# handle fields that have a type but no name
import os, sys
import asdl
TABSIZE = 8
MAX_COL = 80
def get_c_type(name):
"""Return a string for the C name of the type.
This function special cases the default types provided by asdl:
identifier, string, int.
"""
# XXX ack! need to figure out where Id is useful and where string
if isinstance(name, asdl.Id):
name = name.value
if name in asdl.builtin_types:
return name
else:
return "%s_ty" % name
def reflow_lines(s, depth):
"""Reflow the line s indented depth tabs.
Return a sequence of lines where no line extends beyond MAX_COL
when properly indented. The first line is properly indented based
exclusively on depth * TABSIZE. All following lines -- these are
the reflowed lines generated by this function -- start at the same
column as the first character beyond the opening { in the first
line.
"""
size = MAX_COL - depth * TABSIZE
if len(s) < size:
return [s]
lines = []
cur = s
padding = ""
while len(cur) > size:
i = cur.rfind(' ', 0, size)
# XXX this should be fixed for real
if i == -1 and 'GeneratorExp' in cur:
i = size + 3
assert i != -1, "Impossible line %d to reflow: %r" % (size, s)
lines.append(padding + cur[:i])
if len(lines) == 1:
# find new size based on brace
j = cur.find('{', 0, i)
if j >= 0:
j += 2 # account for the brace and the space after it
size -= j
padding = " " * j
else:
j = cur.find('(', 0, i)
if j >= 0:
j += 1 # account for the paren (no space after it)
size -= j
padding = " " * j
cur = cur[i+1:]
else:
lines.append(padding + cur)
return lines
def is_simple(sum):
"""Return True if a sum is a simple.
A sum is simple if its types have no fields, e.g.
unaryop = Invert | Not | UAdd | USub
"""
for t in sum.types:
if t.fields:
return False
return True
class EmitVisitor(asdl.VisitorBase):
"""Visit that emits lines"""
def __init__(self, file):
self.file = file
super(EmitVisitor, self).__init__()
def emit(self, s, depth, reflow=True):
# XXX reflow long lines?
if reflow:
lines = reflow_lines(s, depth)
else:
lines = [s]
for line in lines:
line = (" " * TABSIZE * depth) + line + "\n"
self.file.write(line)
class TypeDefVisitor(EmitVisitor):
def visitModule(self, mod):
for dfn in mod.dfns:
self.visit(dfn)
def visitType(self, type, depth=0):
self.visit(type.value, type.name, depth)
def visitSum(self, sum, name, depth):
if is_simple(sum):
self.simple_sum(sum, name, depth)
else:
self.sum_with_constructors(sum, name, depth)
def simple_sum(self, sum, name, depth):
enum = []
for i in range(len(sum.types)):
type = sum.types[i]
enum.append("%s=%d" % (type.name, i + 1))
enums = ", ".join(enum)
ctype = get_c_type(name)
s = "typedef enum _%s { %s } %s;" % (name, enums, ctype)
self.emit(s, depth)
self.emit("", depth)
def sum_with_constructors(self, sum, name, depth):
ctype = get_c_type(name)
s = "typedef struct _%(name)s *%(ctype)s;" % locals()
self.emit(s, depth)
self.emit("", depth)
def visitProduct(self, product, name, depth):
ctype = get_c_type(name)
s = "typedef struct _%(name)s *%(ctype)s;" % locals()
self.emit(s, depth)
self.emit("", depth)
class StructVisitor(EmitVisitor):
"""Visitor to generate typdefs for AST."""
def visitModule(self, mod):
for dfn in mod.dfns:
self.visit(dfn)
def visitType(self, type, depth=0):
self.visit(type.value, type.name, depth)
def visitSum(self, sum, name, depth):
if not is_simple(sum):
self.sum_with_constructors(sum, name, depth)
def sum_with_constructors(self, sum, name, depth):
def emit(s, depth=depth):
self.emit(s % sys._getframe(1).f_locals, depth)
enum = []
for i in range(len(sum.types)):
type = sum.types[i]
enum.append("%s_kind=%d" % (type.name, i + 1))
emit("enum _%(name)s_kind {" + ", ".join(enum) + "};")
emit("struct _%(name)s {")
emit("enum _%(name)s_kind kind;", depth + 1)
emit("union {", depth + 1)
for t in sum.types:
self.visit(t, depth + 2)
emit("} v;", depth + 1)
for field in sum.attributes:
# rudimentary attribute handling
type = str(field.type)
assert type in asdl.builtin_types, type
emit("%s %s;" % (type, field.name), depth + 1);
emit("};")
emit("")
def visitConstructor(self, cons, depth):
if cons.fields:
self.emit("struct {", depth)
for f in cons.fields:
self.visit(f, depth + 1)
self.emit("} %s;" % cons.name, depth)
self.emit("", depth)
else:
# XXX not sure what I want here, nothing is probably fine
pass
def visitField(self, field, depth):
# XXX need to lookup field.type, because it might be something
# like a builtin...
ctype = get_c_type(field.type)
name = field.name
if field.seq:
if field.type.value in ('cmpop',):
self.emit("asdl_int_seq *%(name)s;" % locals(), depth)
else:
self.emit("asdl_seq *%(name)s;" % locals(), depth)
else:
self.emit("%(ctype)s %(name)s;" % locals(), depth)
def visitProduct(self, product, name, depth):
self.emit("struct _%(name)s {" % locals(), depth)
for f in product.fields:
self.visit(f, depth + 1)
self.emit("};", depth)
self.emit("", depth)
class PrototypeVisitor(EmitVisitor):
"""Generate function prototypes for the .h file"""
def visitModule(self, mod):
for dfn in mod.dfns:
self.visit(dfn)
def visitType(self, type):
self.visit(type.value, type.name)
def visitSum(self, sum, name):
if is_simple(sum):
pass # XXX
else:
for t in sum.types:
self.visit(t, name, sum.attributes)
def get_args(self, fields):
"""Return list of C argument into, one for each field.
Argument info is 3-tuple of a C type, variable name, and flag
that is true if type can be NULL.
"""
args = []
unnamed = {}
for f in fields:
if f.name is None:
name = f.type
c = unnamed[name] = unnamed.get(name, 0) + 1
if c > 1:
name = "name%d" % (c - 1)
else:
name = f.name
# XXX should extend get_c_type() to handle this
if f.seq:
if f.type.value in ('cmpop',):
ctype = "asdl_int_seq *"
else:
ctype = "asdl_seq *"
else:
ctype = get_c_type(f.type)
args.append((ctype, name, f.opt or f.seq))
return args
def visitConstructor(self, cons, type, attrs):
args = self.get_args(cons.fields)
attrs = self.get_args(attrs)
ctype = get_c_type(type)
self.emit_function(cons.name, ctype, args, attrs)
def emit_function(self, name, ctype, args, attrs, union=True):
args = args + attrs
if args:
argstr = ", ".join(["%s %s" % (atype, aname)
for atype, aname, opt in args])
argstr += ", PyArena *arena"
else:
argstr = "PyArena *arena"
margs = "a0"
for i in range(1, len(args)+1):
margs += ", a%d" % i
self.emit("#define %s(%s) _Py_%s(%s)" % (name, margs, name, margs), 0,
reflow=False)
self.emit("%s _Py_%s(%s);" % (ctype, name, argstr), False)
def visitProduct(self, prod, name):
self.emit_function(name, get_c_type(name),
self.get_args(prod.fields), [], union=False)
class FunctionVisitor(PrototypeVisitor):
"""Visitor to generate constructor functions for AST."""
def emit_function(self, name, ctype, args, attrs, union=True):
def emit(s, depth=0, reflow=True):
self.emit(s, depth, reflow)
argstr = ", ".join(["%s %s" % (atype, aname)
for atype, aname, opt in args + attrs])
if argstr:
argstr += ", PyArena *arena"
else:
argstr = "PyArena *arena"
self.emit("%s" % ctype, 0)
emit("%s(%s)" % (name, argstr))
emit("{")
emit("%s p;" % ctype, 1)
for argtype, argname, opt in args:
if not opt and argtype != "int":
emit("if (!%s) {" % argname, 1)
emit("PyErr_SetString(PyExc_ValueError,", 2)
msg = "field %s is required for %s" % (argname, name)
emit(' "%s");' % msg,
2, reflow=False)
emit('return NULL;', 2)
emit('}', 1)
emit("p = (%s)PyArena_Malloc(arena, sizeof(*p));" % ctype, 1);
emit("if (!p)", 1)
emit("return NULL;", 2)
if union:
self.emit_body_union(name, args, attrs)
else:
self.emit_body_struct(name, args, attrs)
emit("return p;", 1)
emit("}")
emit("")
def emit_body_union(self, name, args, attrs):
def emit(s, depth=0, reflow=True):
self.emit(s, depth, reflow)
emit("p->kind = %s_kind;" % name, 1)
for argtype, argname, opt in args:
emit("p->v.%s.%s = %s;" % (name, argname, argname), 1)
for argtype, argname, opt in attrs:
emit("p->%s = %s;" % (argname, argname), 1)
def emit_body_struct(self, name, args, attrs):
def emit(s, depth=0, reflow=True):
self.emit(s, depth, reflow)
for argtype, argname, opt in args:
emit("p->%s = %s;" % (argname, argname), 1)
assert not attrs
class PickleVisitor(EmitVisitor):
def visitModule(self, mod):
for dfn in mod.dfns:
self.visit(dfn)
def visitType(self, type):
self.visit(type.value, type.name)
def visitSum(self, sum, name):
pass
def visitProduct(self, sum, name):
pass
def visitConstructor(self, cons, name):
pass
def visitField(self, sum):
pass
class Obj2ModPrototypeVisitor(PickleVisitor):
def visitProduct(self, prod, name):
code = "static int obj2ast_%s(PyObject* obj, %s* out, PyArena* arena);"
self.emit(code % (name, get_c_type(name)), 0)
visitSum = visitProduct
class Obj2ModVisitor(PickleVisitor):
def funcHeader(self, name):
ctype = get_c_type(name)
self.emit("int", 0)
self.emit("obj2ast_%s(PyObject* obj, %s* out, PyArena* arena)" % (name, ctype), 0)
self.emit("{", 0)
self.emit("int isinstance;", 1)
self.emit("", 0)
def sumTrailer(self, name, add_label=False):
self.emit("", 0)
# there's really nothing more we can do if this fails ...
error = "expected some sort of %s, but got %%R" % name
format = "PyErr_Format(PyExc_TypeError, \"%s\", obj);"
self.emit(format % error, 1, reflow=False)
if add_label:
self.emit("failed:", 1)
self.emit("Py_XDECREF(tmp);", 1)
self.emit("return 1;", 1)
self.emit("}", 0)
self.emit("", 0)
def simpleSum(self, sum, name):
self.funcHeader(name)
for t in sum.types:
line = ("isinstance = PyObject_IsInstance(obj, "
"(PyObject *)%s_type);")
self.emit(line % (t.name,), 1)
self.emit("if (isinstance == -1) {", 1)
self.emit("return 1;", 2)
self.emit("}", 1)
self.emit("if (isinstance) {", 1)
self.emit("*out = %s;" % t.name, 2)
self.emit("return 0;", 2)
self.emit("}", 1)
self.sumTrailer(name)
def buildArgs(self, fields):
return ", ".join(fields + ["arena"])
def complexSum(self, sum, name):
self.funcHeader(name)
self.emit("PyObject *tmp = NULL;", 1)
for a in sum.attributes:
self.visitAttributeDeclaration(a, name, sum=sum)
self.emit("", 0)
# XXX: should we only do this for 'expr'?
self.emit("if (obj == Py_None) {", 1)
self.emit("*out = NULL;", 2)
self.emit("return 0;", 2)
self.emit("}", 1)
for a in sum.attributes:
self.visitField(a, name, sum=sum, depth=1)
for t in sum.types:
line = "isinstance = PyObject_IsInstance(obj, (PyObject*)%s_type);"
self.emit(line % (t.name,), 1)
self.emit("if (isinstance == -1) {", 1)
self.emit("return 1;", 2)
self.emit("}", 1)
self.emit("if (isinstance) {", 1)
for f in t.fields:
self.visitFieldDeclaration(f, t.name, sum=sum, depth=2)
self.emit("", 0)
for f in t.fields:
self.visitField(f, t.name, sum=sum, depth=2)
args = [f.name.value for f in t.fields] + [a.name.value for a in sum.attributes]
self.emit("*out = %s(%s);" % (t.name, self.buildArgs(args)), 2)
self.emit("if (*out == NULL) goto failed;", 2)
self.emit("return 0;", 2)
self.emit("}", 1)
self.sumTrailer(name, True)
def visitAttributeDeclaration(self, a, name, sum=sum):
ctype = get_c_type(a.type)
self.emit("%s %s;" % (ctype, a.name), 1)
def visitSum(self, sum, name):
if is_simple(sum):
self.simpleSum(sum, name)
else:
self.complexSum(sum, name)
def visitProduct(self, prod, name):
ctype = get_c_type(name)
self.emit("int", 0)
self.emit("obj2ast_%s(PyObject* obj, %s* out, PyArena* arena)" % (name, ctype), 0)
self.emit("{", 0)
self.emit("PyObject* tmp = NULL;", 1)
for f in prod.fields:
self.visitFieldDeclaration(f, name, prod=prod, depth=1)
self.emit("", 0)
for f in prod.fields:
self.visitField(f, name, prod=prod, depth=1)
args = [f.name.value for f in prod.fields]
self.emit("*out = %s(%s);" % (name, self.buildArgs(args)), 1)
self.emit("return 0;", 1)
self.emit("failed:", 0)
self.emit("Py_XDECREF(tmp);", 1)
self.emit("return 1;", 1)
self.emit("}", 0)
self.emit("", 0)
def visitFieldDeclaration(self, field, name, sum=None, prod=None, depth=0):
ctype = get_c_type(field.type)
if field.seq:
if self.isSimpleType(field):
self.emit("asdl_int_seq* %s;" % field.name, depth)
else:
self.emit("asdl_seq* %s;" % field.name, depth)
else:
ctype = get_c_type(field.type)
self.emit("%s %s;" % (ctype, field.name), depth)
def isSimpleSum(self, field):
# XXX can the members of this list be determined automatically?
return field.type.value in ('expr_context', 'boolop', 'operator',
'unaryop', 'cmpop')
def isNumeric(self, field):
return get_c_type(field.type) in ("int", "bool")
def isSimpleType(self, field):
return self.isSimpleSum(field) or self.isNumeric(field)
def visitField(self, field, name, sum=None, prod=None, depth=0):
ctype = get_c_type(field.type)
self.emit("if (PyObject_HasAttrString(obj, \"%s\")) {" % field.name, depth)
self.emit("int res;", depth+1)
if field.seq:
self.emit("Py_ssize_t len;", depth+1)
self.emit("Py_ssize_t i;", depth+1)
self.emit("tmp = PyObject_GetAttrString(obj, \"%s\");" % field.name, depth+1)
self.emit("if (tmp == NULL) goto failed;", depth+1)
if field.seq:
self.emit("if (!PyList_Check(tmp)) {", depth+1)
self.emit("PyErr_Format(PyExc_TypeError, \"%s field \\\"%s\\\" must "
"be a list, not a %%.200s\", tmp->ob_type->tp_name);" %
(name, field.name),
depth+2, reflow=False)
self.emit("goto failed;", depth+2)
self.emit("}", depth+1)
self.emit("len = PyList_GET_SIZE(tmp);", depth+1)
if self.isSimpleType(field):
self.emit("%s = asdl_int_seq_new(len, arena);" % field.name, depth+1)
else:
self.emit("%s = asdl_seq_new(len, arena);" % field.name, depth+1)
self.emit("if (%s == NULL) goto failed;" % field.name, depth+1)
self.emit("for (i = 0; i < len; i++) {", depth+1)
self.emit("%s value;" % ctype, depth+2)
self.emit("res = obj2ast_%s(PyList_GET_ITEM(tmp, i), &value, arena);" %
field.type, depth+2, reflow=False)
self.emit("if (res != 0) goto failed;", depth+2)
self.emit("asdl_seq_SET(%s, i, value);" % field.name, depth+2)
self.emit("}", depth+1)
else:
self.emit("res = obj2ast_%s(tmp, &%s, arena);" %
(field.type, field.name), depth+1)
self.emit("if (res != 0) goto failed;", depth+1)
self.emit("Py_XDECREF(tmp);", depth+1)
self.emit("tmp = NULL;", depth+1)
self.emit("} else {", depth)
if not field.opt:
message = "required field \\\"%s\\\" missing from %s" % (field.name, name)
format = "PyErr_SetString(PyExc_TypeError, \"%s\");"
self.emit(format % message, depth+1, reflow=False)
self.emit("return 1;", depth+1)
else:
if self.isNumeric(field):
self.emit("%s = 0;" % field.name, depth+1)
elif not self.isSimpleType(field):
self.emit("%s = NULL;" % field.name, depth+1)
else:
raise TypeError("could not determine the default value for %s" % field.name)
self.emit("}", depth)
class MarshalPrototypeVisitor(PickleVisitor):
def prototype(self, sum, name):
ctype = get_c_type(name)
self.emit("static int marshal_write_%s(PyObject **, int *, %s);"
% (name, ctype), 0)
visitProduct = visitSum = prototype
class PyTypesDeclareVisitor(PickleVisitor):
def visitProduct(self, prod, name):
self.emit("static PyTypeObject *%s_type;" % name, 0)
self.emit("static PyObject* ast2obj_%s(void*);" % name, 0)
if prod.fields:
self.emit("static char *%s_fields[]={" % name,0)
for f in prod.fields:
self.emit('"%s",' % f.name, 1)
self.emit("};", 0)
def visitSum(self, sum, name):
self.emit("static PyTypeObject *%s_type;" % name, 0)
if sum.attributes:
self.emit("static char *%s_attributes[] = {" % name, 0)
for a in sum.attributes:
self.emit('"%s",' % a.name, 1)
self.emit("};", 0)
ptype = "void*"
if is_simple(sum):
ptype = get_c_type(name)
tnames = []
for t in sum.types:
tnames.append(str(t.name)+"_singleton")
tnames = ", *".join(tnames)
self.emit("static PyObject *%s;" % tnames, 0)
self.emit("static PyObject* ast2obj_%s(%s);" % (name, ptype), 0)
for t in sum.types:
self.visitConstructor(t, name)
def visitConstructor(self, cons, name):
self.emit("static PyTypeObject *%s_type;" % cons.name, 0)
if cons.fields:
self.emit("static char *%s_fields[]={" % cons.name, 0)
for t in cons.fields:
self.emit('"%s",' % t.name, 1)
self.emit("};",0)
class PyTypesVisitor(PickleVisitor):
def visitModule(self, mod):
self.emit("""
static int
ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
{
Py_ssize_t i, numfields = 0;
int res = -1;
PyObject *key, *value, *fields;
fields = PyObject_GetAttrString((PyObject*)Py_TYPE(self), "_fields");
if (!fields)
PyErr_Clear();
if (fields) {
numfields = PySequence_Size(fields);
if (numfields == -1)
goto cleanup;
}
res = 0; /* if no error occurs, this stays 0 to the end */
if (PyTuple_GET_SIZE(args) > 0) {
if (numfields != PyTuple_GET_SIZE(args)) {
PyErr_Format(PyExc_TypeError, "%.400s constructor takes %s"
"%zd positional argument%s",
Py_TYPE(self)->tp_name,
numfields == 0 ? "" : "either 0 or ",
numfields, numfields == 1 ? "" : "s");
res = -1;
goto cleanup;
}
for (i = 0; i < PyTuple_GET_SIZE(args); i++) {
/* cannot be reached when fields is NULL */
PyObject *name = PySequence_GetItem(fields, i);
if (!name) {
res = -1;
goto cleanup;
}
res = PyObject_SetAttr(self, name, PyTuple_GET_ITEM(args, i));
Py_DECREF(name);
if (res < 0)
goto cleanup;
}
}
if (kw) {
i = 0; /* needed by PyDict_Next */
while (PyDict_Next(kw, &i, &key, &value)) {
res = PyObject_SetAttr(self, key, value);
if (res < 0)
goto cleanup;
}
}
cleanup:
Py_XDECREF(fields);
return res;
}
/* Pickling support */
static PyObject *
ast_type_reduce(PyObject *self, PyObject *unused)
{
PyObject *res;
PyObject *dict = PyObject_GetAttrString(self, "__dict__");
if (dict == NULL) {
if (PyErr_ExceptionMatches(PyExc_AttributeError))
PyErr_Clear();
else
return NULL;
}
if (dict) {
res = Py_BuildValue("O()O", Py_TYPE(self), dict);
Py_DECREF(dict);
return res;
}
return Py_BuildValue("O()", Py_TYPE(self));
}
static PyMethodDef ast_type_methods[] = {
{"__reduce__", ast_type_reduce, METH_NOARGS, NULL},
{NULL}
};
static PyTypeObject AST_type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"_ast.AST",
sizeof(PyObject),
0,
0, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
PyObject_GenericSetAttr, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
0, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
ast_type_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)ast_type_init, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
PyType_GenericNew, /* tp_new */
PyObject_Del, /* tp_free */
};
static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int num_fields)
{
PyObject *fnames, *result;
int i;
fnames = PyTuple_New(num_fields);
if (!fnames) return NULL;
for (i = 0; i < num_fields; i++) {
PyObject *field = PyUnicode_FromString(fields[i]);
if (!field) {
Py_DECREF(fnames);
return NULL;
}
PyTuple_SET_ITEM(fnames, i, field);
}
result = PyObject_CallFunction((PyObject*)&PyType_Type, "s(O){sOss}",
type, base, "_fields", fnames, "__module__", "_ast");
Py_DECREF(fnames);
return (PyTypeObject*)result;
}
static int add_attributes(PyTypeObject* type, char**attrs, int num_fields)
{
int i, result;
PyObject *s, *l = PyTuple_New(num_fields);
if (!l)
return 0;
for (i = 0; i < num_fields; i++) {
s = PyUnicode_FromString(attrs[i]);
if (!s) {
Py_DECREF(l);
return 0;
}
PyTuple_SET_ITEM(l, i, s);
}
result = PyObject_SetAttrString((PyObject*)type, "_attributes", l) >= 0;
Py_DECREF(l);
return result;
}
/* Conversion AST -> Python */
static PyObject* ast2obj_list(asdl_seq *seq, PyObject* (*func)(void*))
{
int i, n = asdl_seq_LEN(seq);
PyObject *result = PyList_New(n);
PyObject *value;
if (!result)
return NULL;
for (i = 0; i < n; i++) {
value = func(asdl_seq_GET(seq, i));
if (!value) {
Py_DECREF(result);
return NULL;
}
PyList_SET_ITEM(result, i, value);
}
return result;
}
static PyObject* ast2obj_object(void *o)
{
if (!o)
o = Py_None;
Py_INCREF((PyObject*)o);
return (PyObject*)o;
}
#define ast2obj_identifier ast2obj_object
#define ast2obj_string ast2obj_object
static PyObject* ast2obj_int(long b)
{
return PyLong_FromLong(b);
}
/* Conversion Python -> AST */
static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena)
{
if (obj == Py_None)
obj = NULL;
if (obj)
PyArena_AddPyObject(arena, obj);
Py_XINCREF(obj);
*out = obj;
return 0;
}
static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
{
if (!PyUnicode_CheckExact(obj) && obj != Py_None) {
PyErr_SetString(PyExc_TypeError, "AST identifier must be of type str");
return 1;
}
return obj2ast_object(obj, out, arena);
}
static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
{
if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {
PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
return 1;
}
return obj2ast_object(obj, out, arena);
}
static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
{
int i;
if (!PyLong_Check(obj)) {
PyObject *s = PyObject_Repr(obj);
if (s == NULL) return 1;
PyErr_Format(PyExc_ValueError, "invalid integer value: %.400s",
PyBytes_AS_STRING(s));
Py_DECREF(s);
return 1;
}
i = (int)PyLong_AsLong(obj);
if (i == -1 && PyErr_Occurred())
return 1;
*out = i;
return 0;
}
static int add_ast_fields(void)
{
PyObject *empty_tuple, *d;
if (PyType_Ready(&AST_type) < 0)
return -1;
d = AST_type.tp_dict;
empty_tuple = PyTuple_New(0);
if (!empty_tuple ||
PyDict_SetItemString(d, "_fields", empty_tuple) < 0 ||
PyDict_SetItemString(d, "_attributes", empty_tuple) < 0) {
Py_XDECREF(empty_tuple);
return -1;
}
Py_DECREF(empty_tuple);
return 0;
}
""", 0, reflow=False)
self.emit("static int init_types(void)",0)
self.emit("{", 0)
self.emit("static int initialized;", 1)
self.emit("if (initialized) return 1;", 1)
self.emit("if (add_ast_fields() < 0) return 0;", 1)
for dfn in mod.dfns:
self.visit(dfn)
self.emit("initialized = 1;", 1)
self.emit("return 1;", 1);
self.emit("}", 0)
def visitProduct(self, prod, name):
if prod.fields:
fields = name.value+"_fields"
else:
fields = "NULL"
self.emit('%s_type = make_type("%s", &AST_type, %s, %d);' %
(name, name, fields, len(prod.fields)), 1)
self.emit("if (!%s_type) return 0;" % name, 1)
def visitSum(self, sum, name):
self.emit('%s_type = make_type("%s", &AST_type, NULL, 0);' %
(name, name), 1)
self.emit("if (!%s_type) return 0;" % name, 1)
if sum.attributes:
self.emit("if (!add_attributes(%s_type, %s_attributes, %d)) return 0;" %
(name, name, len(sum.attributes)), 1)
else:
self.emit("if (!add_attributes(%s_type, NULL, 0)) return 0;" % name, 1)
simple = is_simple(sum)
for t in sum.types:
self.visitConstructor(t, name, simple)
def visitConstructor(self, cons, name, simple):
if cons.fields:
fields = cons.name.value+"_fields"
else:
fields = "NULL"
self.emit('%s_type = make_type("%s", %s_type, %s, %d);' %
(cons.name, cons.name, name, fields, len(cons.fields)), 1)
self.emit("if (!%s_type) return 0;" % cons.name, 1)
if simple:
self.emit("%s_singleton = PyType_GenericNew(%s_type, NULL, NULL);" %
(cons.name, cons.name), 1)
self.emit("if (!%s_singleton) return 0;" % cons.name, 1)
class ASTModuleVisitor(PickleVisitor):
def visitModule(self, mod):
self.emit("static struct PyModuleDef _astmodule = {", 0)
self.emit(' PyModuleDef_HEAD_INIT, "_ast"', 0)
self.emit("};", 0)
self.emit("PyMODINIT_FUNC", 0)
self.emit("PyInit__ast(void)", 0)
self.emit("{", 0)
self.emit("PyObject *m, *d;", 1)
self.emit("if (!init_types()) return NULL;", 1)
self.emit('m = PyModule_Create(&_astmodule);', 1)
self.emit("if (!m) return NULL;", 1)
self.emit("d = PyModule_GetDict(m);", 1)
self.emit('if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return NULL;', 1)
self.emit('if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)', 1)
self.emit("return NULL;", 2)
# Value of version: "$Revision$"
self.emit('if (PyModule_AddStringConstant(m, "__version__", "%s") < 0)'
% mod.version, 1)
self.emit("return NULL;", 2)
for dfn in mod.dfns:
self.visit(dfn)
self.emit("return m;", 1)
self.emit("}", 0)
def visitProduct(self, prod, name):
self.addObj(name)
def visitSum(self, sum, name):
self.addObj(name)
for t in sum.types:
self.visitConstructor(t, name)
def visitConstructor(self, cons, name):
self.addObj(cons.name)
def addObj(self, name):
self.emit('if (PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return NULL;' % (name, name), 1)
_SPECIALIZED_SEQUENCES = ('stmt', 'expr')
def find_sequence(fields, doing_specialization):
"""Return True if any field uses a sequence."""
for f in fields:
if f.seq:
if not doing_specialization:
return True
if str(f.type) not in _SPECIALIZED_SEQUENCES:
return True
return False
def has_sequence(types, doing_specialization):
for t in types:
if find_sequence(t.fields, doing_specialization):
return True
return False
class StaticVisitor(PickleVisitor):
CODE = '''Very simple, always emit this static code. Overide CODE'''
def visit(self, object):
self.emit(self.CODE, 0, reflow=False)
class ObjVisitor(PickleVisitor):
def func_begin(self, name):
ctype = get_c_type(name)
self.emit("PyObject*", 0)
self.emit("ast2obj_%s(void* _o)" % (name), 0)
self.emit("{", 0)
self.emit("%s o = (%s)_o;" % (ctype, ctype), 1)
self.emit("PyObject *result = NULL, *value = NULL;", 1)
self.emit('if (!o) {', 1)
self.emit("Py_INCREF(Py_None);", 2)
self.emit('return Py_None;', 2)
self.emit("}", 1)
self.emit('', 0)
def func_end(self):
self.emit("return result;", 1)
self.emit("failed:", 0)
self.emit("Py_XDECREF(value);", 1)
self.emit("Py_XDECREF(result);", 1)
self.emit("return NULL;", 1)
self.emit("}", 0)
self.emit("", 0)
def visitSum(self, sum, name):
if is_simple(sum):
self.simpleSum(sum, name)
return
self.func_begin(name)
self.emit("switch (o->kind) {", 1)
for i in range(len(sum.types)):
t = sum.types[i]
self.visitConstructor(t, i + 1, name)
self.emit("}", 1)
for a in sum.attributes:
self.emit("value = ast2obj_%s(o->%s);" % (a.type, a.name), 1)
self.emit("if (!value) goto failed;", 1)
self.emit('if (PyObject_SetAttrString(result, "%s", value) < 0)' % a.name, 1)
self.emit('goto failed;', 2)
self.emit('Py_DECREF(value);', 1)
self.func_end()
def simpleSum(self, sum, name):
self.emit("PyObject* ast2obj_%s(%s_ty o)" % (name, name), 0)
self.emit("{", 0)
self.emit("switch(o) {", 1)
for t in sum.types:
self.emit("case %s:" % t.name, 2)
self.emit("Py_INCREF(%s_singleton);" % t.name, 3)
self.emit("return %s_singleton;" % t.name, 3)
self.emit("default:" % name, 2)
self.emit('/* should never happen, but just in case ... */', 3)
code = "PyErr_Format(PyExc_SystemError, \"unknown %s found\");" % name
self.emit(code, 3, reflow=False)
self.emit("return NULL;", 3)
self.emit("}", 1)
self.emit("}", 0)
def visitProduct(self, prod, name):
self.func_begin(name)
self.emit("result = PyType_GenericNew(%s_type, NULL, NULL);" % name, 1);
self.emit("if (!result) return NULL;", 1)
for field in prod.fields:
self.visitField(field, name, 1, True)
self.func_end()
def visitConstructor(self, cons, enum, name):
self.emit("case %s_kind:" % cons.name, 1)
self.emit("result = PyType_GenericNew(%s_type, NULL, NULL);" % cons.name, 2);
self.emit("if (!result) goto failed;", 2)
for f in cons.fields:
self.visitField(f, cons.name, 2, False)
self.emit("break;", 2)
def visitField(self, field, name, depth, product):
def emit(s, d):
self.emit(s, depth + d)
if product:
value = "o->%s" % field.name
else:
value = "o->v.%s.%s" % (name, field.name)
self.set(field, value, depth)
emit("if (!value) goto failed;", 0)
emit('if (PyObject_SetAttrString(result, "%s", value) == -1)' % field.name, 0)
emit("goto failed;", 1)
emit("Py_DECREF(value);", 0)
def emitSeq(self, field, value, depth, emit):
emit("seq = %s;" % value, 0)
emit("n = asdl_seq_LEN(seq);", 0)
emit("value = PyList_New(n);", 0)
emit("if (!value) goto failed;", 0)
emit("for (i = 0; i < n; i++) {", 0)
self.set("value", field, "asdl_seq_GET(seq, i)", depth + 1)
emit("if (!value1) goto failed;", 1)
emit("PyList_SET_ITEM(value, i, value1);", 1)
emit("value1 = NULL;", 1)
emit("}", 0)
def set(self, field, value, depth):
if field.seq:
# XXX should really check for is_simple, but that requires a symbol table
if field.type.value == "cmpop":
# While the sequence elements are stored as void*,
# ast2obj_cmpop expects an enum
self.emit("{", depth)
self.emit("int i, n = asdl_seq_LEN(%s);" % value, depth+1)
self.emit("value = PyList_New(n);", depth+1)
self.emit("if (!value) goto failed;", depth+1)
self.emit("for(i = 0; i < n; i++)", depth+1)
# This cannot fail, so no need for error handling
self.emit("PyList_SET_ITEM(value, i, ast2obj_cmpop((cmpop_ty)asdl_seq_GET(%s, i)));" % value,
depth+2, reflow=False)
self.emit("}", depth)
else:
self.emit("value = ast2obj_list(%s, ast2obj_%s);" % (value, field.type), depth)
else:
ctype = get_c_type(field.type)
self.emit("value = ast2obj_%s(%s);" % (field.type, value), depth, reflow=False)
class PartingShots(StaticVisitor):
CODE = """
PyObject* PyAST_mod2obj(mod_ty t)
{
init_types();
return ast2obj_mod(t);
}
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
{
mod_ty res;
PyObject *req_type[] = {(PyObject*)Module_type, (PyObject*)Expression_type,
(PyObject*)Interactive_type};
char *req_name[] = {"Module", "Expression", "Interactive"};
int isinstance;
assert(0 <= mode && mode <= 2);
init_types();
isinstance = PyObject_IsInstance(ast, req_type[mode]);
if (isinstance == -1)
return NULL;
if (!isinstance) {
PyErr_Format(PyExc_TypeError, "expected %s node, got %.400s",
req_name[mode], Py_TYPE(ast)->tp_name);
return NULL;
}
if (obj2ast_mod(ast, &res, arena) != 0)
return NULL;
else
return res;
}
int PyAST_Check(PyObject* obj)
{
init_types();
return PyObject_IsInstance(obj, (PyObject*)&AST_type);
}
"""
class ChainOfVisitors:
def __init__(self, *visitors):
self.visitors = visitors
def visit(self, object):
for v in self.visitors:
v.visit(object)
v.emit("", 0)
common_msg = "/* File automatically generated by %s. */\n\n"
c_file_msg = """
/*
__version__ %s.
This module must be committed separately after each AST grammar change;
The __version__ number is set to the revision number of the commit
containing the grammar change.
*/
"""
def main(srcfile):
argv0 = sys.argv[0]
components = argv0.split(os.sep)
argv0 = os.sep.join(components[-2:])
auto_gen_msg = common_msg % argv0
mod = asdl.parse(srcfile)
mod.version = "82163"
if not asdl.check(mod):
sys.exit(1)
if INC_DIR:
p = "%s/%s-ast.h" % (INC_DIR, mod.name)
f = open(p, "w")
f.write(auto_gen_msg)
f.write('#include "asdl.h"\n\n')
c = ChainOfVisitors(TypeDefVisitor(f),
StructVisitor(f),
PrototypeVisitor(f),
)
c.visit(mod)
f.write("PyObject* PyAST_mod2obj(mod_ty t);\n")
f.write("mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);\n")
f.write("int PyAST_Check(PyObject* obj);\n")
f.close()
if SRC_DIR:
p = os.path.join(SRC_DIR, str(mod.name) + "-ast.c")
f = open(p, "w")
f.write(auto_gen_msg)
f.write(c_file_msg % mod.version)
f.write('#include "Python.h"\n')
f.write('#include "%s-ast.h"\n' % mod.name)
f.write('\n')
f.write("static PyTypeObject AST_type;\n")
v = ChainOfVisitors(
PyTypesDeclareVisitor(f),
PyTypesVisitor(f),
Obj2ModPrototypeVisitor(f),
FunctionVisitor(f),
ObjVisitor(f),
Obj2ModVisitor(f),
ASTModuleVisitor(f),
PartingShots(f),
)
v.visit(mod)
f.close()
if __name__ == "__main__":
import sys
import getopt
INC_DIR = ''
SRC_DIR = ''
opts, args = getopt.getopt(sys.argv[1:], "h:c:")
if len(opts) != 1:
sys.stdout.write("Must specify exactly one output file\n")
sys.exit(1)
for o, v in opts:
if o == '-h':
INC_DIR = v
if o == '-c':
SRC_DIR = v
if len(args) != 1:
sys.stdout.write("Must specify single input file\n")
sys.exit(1)
main(args[0])
| Immortalin/python-for-android | python3-alpha/python3-src/Parser/asdl_c.py | Python | apache-2.0 | 40,884 |
import _plotly_utils.basevalidators
class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(self, plotly_name="column", parent_name="table.domain", **kwargs):
super(ColumnValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.pop("edit_type", "calc"),
min=kwargs.pop("min", 0),
**kwargs
)
| plotly/plotly.py | packages/python/plotly/plotly/validators/table/domain/_column.py | Python | mit | 437 |
print('-----------------')
C = -20
dC = 5
while C <= 40:
F = (9/5)*C + 32
print(C, F)
C += dC
print('-----------------')
| dariosena/LearningPython | general/scientific/looplist/c2f_while.py | Python | gpl-3.0 | 143 |
"""Blocking and non-blocking HTTP client interfaces.
This module defines a common interface shared by two implementations,
``simple_httpclient`` and ``curl_httpclient``. Applications may either
instantiate their chosen implementation class directly or use the
`AsyncHTTPClient` class from this module, which selects an implementation
that can be overridden with the `AsyncHTTPClient.configure` method.
The default implementation is ``simple_httpclient``, and this is expected
to be suitable for most users' needs. However, some applications may wish
to switch to ``curl_httpclient`` for reasons such as the following:
* ``curl_httpclient`` has some features not found in ``simple_httpclient``,
including support for HTTP proxies and the ability to use a specified
network interface.
* ``curl_httpclient`` is more likely to be compatible with sites that are
not-quite-compliant with the HTTP spec, or sites that use little-exercised
features of HTTP.
* ``curl_httpclient`` is faster.
* ``curl_httpclient`` was the default prior to Tornado 2.0.
Note that if you are using ``curl_httpclient``, it is highly
recommended that you use a recent version of ``libcurl`` and
``pycurl``. Currently the minimum supported version of libcurl is
7.22.0, and the minimum version of pycurl is 7.18.2. It is highly
recommended that your ``libcurl`` installation is built with
asynchronous DNS resolver (threaded or c-ares), otherwise you may
encounter various problems with request timeouts (for more
information, see
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCONNECTTIMEOUTMS
and comments in curl_httpclient.py).
To select ``curl_httpclient``, call `AsyncHTTPClient.configure` at startup::
AsyncHTTPClient.configure("tornado.curl_httpclient.CurlAsyncHTTPClient")
"""
from __future__ import absolute_import, division, print_function, with_statement
import functools
import time
import weakref
from tornado.concurrent import TracebackFuture
from tornado.escape import utf8, native_str
from tornado import httputil, stack_context
from tornado.ioloop import IOLoop
from tornado.util import Configurable
class HTTPClient(object):
"""A blocking HTTP client.
This interface is provided for convenience and testing; most applications
that are running an IOLoop will want to use `AsyncHTTPClient` instead.
Typical usage looks like this::
http_client = httpclient.HTTPClient()
try:
response = http_client.fetch("http://www.google.com/")
print(response.body)
except httpclient.HTTPError as e:
# HTTPError is raised for non-200 responses; the response
# can be found in e.response.
print("Error: " + str(e))
except Exception as e:
# Other errors are possible, such as IOError.
print("Error: " + str(e))
http_client.close()
"""
def __init__(self, async_client_class=None, **kwargs):
self._io_loop = IOLoop(make_current=False)
if async_client_class is None:
async_client_class = AsyncHTTPClient
self._async_client = async_client_class(self._io_loop, **kwargs)
self._closed = False
def __del__(self):
self.close()
def close(self):
"""Closes the HTTPClient, freeing any resources used."""
if not self._closed:
self._async_client.close()
self._io_loop.close()
self._closed = True
def fetch(self, request, **kwargs):
"""Executes a request, returning an `HTTPResponse`.
The request may be either a string URL or an `HTTPRequest` object.
If it is a string, we construct an `HTTPRequest` using any additional
kwargs: ``HTTPRequest(request, **kwargs)``
If an error occurs during the fetch, we raise an `HTTPError` unless
the ``raise_error`` keyword argument is set to False.
"""
response = self._io_loop.run_sync(functools.partial(
self._async_client.fetch, request, **kwargs))
return response
class AsyncHTTPClient(Configurable):
"""An non-blocking HTTP client.
Example usage::
def handle_response(response):
if response.error:
print("Error: %s" % response.error)
else:
print(response.body)
http_client = AsyncHTTPClient()
http_client.fetch("http://www.google.com/", handle_response)
The constructor for this class is magic in several respects: It
actually creates an instance of an implementation-specific
subclass, and instances are reused as a kind of pseudo-singleton
(one per `.IOLoop`). The keyword argument ``force_instance=True``
can be used to suppress this singleton behavior. Unless
``force_instance=True`` is used, no arguments other than
``io_loop`` should be passed to the `AsyncHTTPClient` constructor.
The implementation subclass as well as arguments to its
constructor can be set with the static method `configure()`
All `AsyncHTTPClient` implementations support a ``defaults``
keyword argument, which can be used to set default values for
`HTTPRequest` attributes. For example::
AsyncHTTPClient.configure(
None, defaults=dict(user_agent="MyUserAgent"))
# or with force_instance:
client = AsyncHTTPClient(force_instance=True,
defaults=dict(user_agent="MyUserAgent"))
.. versionchanged:: 4.1
The ``io_loop`` argument is deprecated.
"""
@classmethod
def configurable_base(cls):
return AsyncHTTPClient
@classmethod
def configurable_default(cls):
from tornado.simple_httpclient import SimpleAsyncHTTPClient
return SimpleAsyncHTTPClient
@classmethod
def _async_clients(cls):
attr_name = '_async_client_dict_' + cls.__name__
if not hasattr(cls, attr_name):
setattr(cls, attr_name, weakref.WeakKeyDictionary())
return getattr(cls, attr_name)
def __new__(cls, io_loop=None, force_instance=False, **kwargs):
io_loop = io_loop or IOLoop.current()
if force_instance:
instance_cache = None
else:
instance_cache = cls._async_clients()
if instance_cache is not None and io_loop in instance_cache:
return instance_cache[io_loop]
instance = super(AsyncHTTPClient, cls).__new__(cls, io_loop=io_loop,
**kwargs)
# Make sure the instance knows which cache to remove itself from.
# It can't simply call _async_clients() because we may be in
# __new__(AsyncHTTPClient) but instance.__class__ may be
# SimpleAsyncHTTPClient.
instance._instance_cache = instance_cache
if instance_cache is not None:
instance_cache[instance.io_loop] = instance
return instance
def initialize(self, io_loop, defaults=None):
self.io_loop = io_loop
self.defaults = dict(HTTPRequest._DEFAULTS)
if defaults is not None:
self.defaults.update(defaults)
self._closed = False
def close(self):
"""Destroys this HTTP client, freeing any file descriptors used.
This method is **not needed in normal use** due to the way
that `AsyncHTTPClient` objects are transparently reused.
``close()`` is generally only necessary when either the
`.IOLoop` is also being closed, or the ``force_instance=True``
argument was used when creating the `AsyncHTTPClient`.
No other methods may be called on the `AsyncHTTPClient` after
``close()``.
"""
if self._closed:
return
self._closed = True
if self._instance_cache is not None:
if self._instance_cache.get(self.io_loop) is not self:
raise RuntimeError("inconsistent AsyncHTTPClient cache")
del self._instance_cache[self.io_loop]
def fetch(self, request, callback=None, raise_error=True, **kwargs):
"""Executes a request, asynchronously returning an `HTTPResponse`.
The request may be either a string URL or an `HTTPRequest` object.
If it is a string, we construct an `HTTPRequest` using any additional
kwargs: ``HTTPRequest(request, **kwargs)``
This method returns a `.Future` whose result is an
`HTTPResponse`. By default, the ``Future`` will raise an
`HTTPError` if the request returned a non-200 response code
(other errors may also be raised if the server could not be
contacted). Instead, if ``raise_error`` is set to False, the
response will always be returned regardless of the response
code.
If a ``callback`` is given, it will be invoked with the `HTTPResponse`.
In the callback interface, `HTTPError` is not automatically raised.
Instead, you must check the response's ``error`` attribute or
call its `~HTTPResponse.rethrow` method.
"""
if self._closed:
raise RuntimeError("fetch() called on closed AsyncHTTPClient")
if not isinstance(request, HTTPRequest):
request = HTTPRequest(url=request, **kwargs)
else:
if kwargs:
raise ValueError("kwargs can't be used if request is an HTTPRequest object")
# We may modify this (to add Host, Accept-Encoding, etc),
# so make sure we don't modify the caller's object. This is also
# where normal dicts get converted to HTTPHeaders objects.
request.headers = httputil.HTTPHeaders(request.headers)
request = _RequestProxy(request, self.defaults)
future = TracebackFuture()
if callback is not None:
callback = stack_context.wrap(callback)
def handle_future(future):
exc = future.exception()
if isinstance(exc, HTTPError) and exc.response is not None:
response = exc.response
elif exc is not None:
response = HTTPResponse(
request, 599, error=exc,
request_time=time.time() - request.start_time)
else:
response = future.result()
self.io_loop.add_callback(callback, response)
future.add_done_callback(handle_future)
def handle_response(response):
if raise_error and response.error:
future.set_exception(response.error)
else:
future.set_result(response)
self.fetch_impl(request, handle_response)
return future
def fetch_impl(self, request, callback):
raise NotImplementedError()
@classmethod
def configure(cls, impl, **kwargs):
"""Configures the `AsyncHTTPClient` subclass to use.
``AsyncHTTPClient()`` actually creates an instance of a subclass.
This method may be called with either a class object or the
fully-qualified name of such a class (or ``None`` to use the default,
``SimpleAsyncHTTPClient``)
If additional keyword arguments are given, they will be passed
to the constructor of each subclass instance created. The
keyword argument ``max_clients`` determines the maximum number
of simultaneous `~AsyncHTTPClient.fetch()` operations that can
execute in parallel on each `.IOLoop`. Additional arguments
may be supported depending on the implementation class in use.
Example::
AsyncHTTPClient.configure("tornado.curl_httpclient.CurlAsyncHTTPClient")
"""
super(AsyncHTTPClient, cls).configure(impl, **kwargs)
class HTTPRequest(object):
"""HTTP client request object."""
# Default values for HTTPRequest parameters.
# Merged with the values on the request object by AsyncHTTPClient
# implementations.
_DEFAULTS = dict(
connect_timeout=20.0,
request_timeout=20.0,
follow_redirects=True,
max_redirects=5,
decompress_response=True,
proxy_password='',
allow_nonstandard_methods=False,
validate_cert=True)
def __init__(self, url, method="GET", headers=None, body=None,
auth_username=None, auth_password=None, auth_mode=None,
connect_timeout=None, request_timeout=None,
if_modified_since=None, follow_redirects=None,
max_redirects=None, user_agent=None, use_gzip=None,
network_interface=None, streaming_callback=None,
header_callback=None, prepare_curl_callback=None,
proxy_host=None, proxy_port=None, proxy_username=None,
proxy_password=None, proxy_auth_mode=None,
allow_nonstandard_methods=None, validate_cert=True,
ca_certs=None, allow_ipv6=None, client_key=None,
client_cert=None, body_producer=None,
expect_100_continue=False, decompress_response=None,
ssl_options=None):
r"""All parameters except ``url`` are optional.
:arg string url: URL to fetch
:arg string method: HTTP method, e.g. "GET" or "POST"
:arg headers: Additional HTTP headers to pass on the request
:type headers: `~tornado.httputil.HTTPHeaders` or `dict`
:arg body: HTTP request body as a string (byte or unicode; if unicode
the utf-8 encoding will be used)
:arg body_producer: Callable used for lazy/asynchronous request bodies.
It is called with one argument, a ``write`` function, and should
return a `.Future`. It should call the write function with new
data as it becomes available. The write function returns a
`.Future` which can be used for flow control.
Only one of ``body`` and ``body_producer`` may
be specified. ``body_producer`` is not supported on
``curl_httpclient``. When using ``body_producer`` it is recommended
to pass a ``Content-Length`` in the headers as otherwise chunked
encoding will be used, and many servers do not support chunked
encoding on requests. New in Tornado 4.0
:arg string auth_username: Username for HTTP authentication
:arg string auth_password: Password for HTTP authentication
:arg string auth_mode: Authentication mode; default is "basic".
Allowed values are implementation-defined; ``curl_httpclient``
supports "basic" and "digest"; ``simple_httpclient`` only supports
"basic"
:arg float connect_timeout: Timeout for initial connection in seconds,
default 20 seconds
:arg float request_timeout: Timeout for entire request in seconds,
default 20 seconds
:arg if_modified_since: Timestamp for ``If-Modified-Since`` header
:type if_modified_since: `datetime` or `float`
:arg bool follow_redirects: Should redirects be followed automatically
or return the 3xx response? Default True.
:arg int max_redirects: Limit for ``follow_redirects``, default 5.
:arg string user_agent: String to send as ``User-Agent`` header
:arg bool decompress_response: Request a compressed response from
the server and decompress it after downloading. Default is True.
New in Tornado 4.0.
:arg bool use_gzip: Deprecated alias for ``decompress_response``
since Tornado 4.0.
:arg string network_interface: Network interface to use for request.
``curl_httpclient`` only; see note below.
:arg callable streaming_callback: If set, ``streaming_callback`` will
be run with each chunk of data as it is received, and
``HTTPResponse.body`` and ``HTTPResponse.buffer`` will be empty in
the final response.
:arg callable header_callback: If set, ``header_callback`` will
be run with each header line as it is received (including the
first line, e.g. ``HTTP/1.0 200 OK\r\n``, and a final line
containing only ``\r\n``. All lines include the trailing newline
characters). ``HTTPResponse.headers`` will be empty in the final
response. This is most useful in conjunction with
``streaming_callback``, because it's the only way to get access to
header data while the request is in progress.
:arg callable prepare_curl_callback: If set, will be called with
a ``pycurl.Curl`` object to allow the application to make additional
``setopt`` calls.
:arg string proxy_host: HTTP proxy hostname. To use proxies,
``proxy_host`` and ``proxy_port`` must be set; ``proxy_username``,
``proxy_pass`` and ``proxy_auth_mode`` are optional. Proxies are
currently only supported with ``curl_httpclient``.
:arg int proxy_port: HTTP proxy port
:arg string proxy_username: HTTP proxy username
:arg string proxy_password: HTTP proxy password
:arg string proxy_auth_mode: HTTP proxy Authentication mode;
default is "basic". supports "basic" and "digest"
:arg bool allow_nonstandard_methods: Allow unknown values for ``method``
argument? Default is False.
:arg bool validate_cert: For HTTPS requests, validate the server's
certificate? Default is True.
:arg string ca_certs: filename of CA certificates in PEM format,
or None to use defaults. See note below when used with
``curl_httpclient``.
:arg string client_key: Filename for client SSL key, if any. See
note below when used with ``curl_httpclient``.
:arg string client_cert: Filename for client SSL certificate, if any.
See note below when used with ``curl_httpclient``.
:arg ssl.SSLContext ssl_options: `ssl.SSLContext` object for use in
``simple_httpclient`` (unsupported by ``curl_httpclient``).
Overrides ``validate_cert``, ``ca_certs``, ``client_key``,
and ``client_cert``.
:arg bool allow_ipv6: Use IPv6 when available? Default is true.
:arg bool expect_100_continue: If true, send the
``Expect: 100-continue`` header and wait for a continue response
before sending the request body. Only supported with
simple_httpclient.
.. note::
When using ``curl_httpclient`` certain options may be
inherited by subsequent fetches because ``pycurl`` does
not allow them to be cleanly reset. This applies to the
``ca_certs``, ``client_key``, ``client_cert``, and
``network_interface`` arguments. If you use these
options, you should pass them on every request (you don't
have to always use the same values, but it's not possible
to mix requests that specify these options with ones that
use the defaults).
.. versionadded:: 3.1
The ``auth_mode`` argument.
.. versionadded:: 4.0
The ``body_producer`` and ``expect_100_continue`` arguments.
.. versionadded:: 4.2
The ``ssl_options`` argument.
"""
# Note that some of these attributes go through property setters
# defined below.
self.headers = headers
if if_modified_since:
self.headers["If-Modified-Since"] = httputil.format_timestamp(
if_modified_since)
self.proxy_host = proxy_host
self.proxy_port = proxy_port
self.proxy_username = proxy_username
self.proxy_password = proxy_password
self.proxy_auth_mode = proxy_auth_mode
self.url = url
self.method = method
self.body = body
self.body_producer = body_producer
self.auth_username = auth_username
self.auth_password = auth_password
self.auth_mode = auth_mode
self.connect_timeout = connect_timeout
self.request_timeout = request_timeout
self.follow_redirects = follow_redirects
self.max_redirects = max_redirects
self.user_agent = user_agent
if decompress_response is not None:
self.decompress_response = decompress_response
else:
self.decompress_response = use_gzip
self.network_interface = network_interface
self.streaming_callback = streaming_callback
self.header_callback = header_callback
self.prepare_curl_callback = prepare_curl_callback
self.allow_nonstandard_methods = allow_nonstandard_methods
self.validate_cert = validate_cert
self.ca_certs = ca_certs
self.allow_ipv6 = allow_ipv6
self.client_key = client_key
self.client_cert = client_cert
self.ssl_options = ssl_options
self.expect_100_continue = expect_100_continue
self.start_time = time.time()
@property
def headers(self):
return self._headers
@headers.setter
def headers(self, value):
if value is None:
self._headers = httputil.HTTPHeaders()
else:
self._headers = value
@property
def body(self):
return self._body
@body.setter
def body(self, value):
self._body = utf8(value)
@property
def body_producer(self):
return self._body_producer
@body_producer.setter
def body_producer(self, value):
self._body_producer = stack_context.wrap(value)
@property
def streaming_callback(self):
return self._streaming_callback
@streaming_callback.setter
def streaming_callback(self, value):
self._streaming_callback = stack_context.wrap(value)
@property
def header_callback(self):
return self._header_callback
@header_callback.setter
def header_callback(self, value):
self._header_callback = stack_context.wrap(value)
@property
def prepare_curl_callback(self):
return self._prepare_curl_callback
@prepare_curl_callback.setter
def prepare_curl_callback(self, value):
self._prepare_curl_callback = stack_context.wrap(value)
class HTTPResponse(object):
"""HTTP Response object.
Attributes:
* request: HTTPRequest object
* code: numeric HTTP status code, e.g. 200 or 404
* reason: human-readable reason phrase describing the status code
* headers: `tornado.httputil.HTTPHeaders` object
* effective_url: final location of the resource after following any
redirects
* buffer: ``cStringIO`` object for response body
* body: response body as bytes (created on demand from ``self.buffer``)
* error: Exception object, if any
* request_time: seconds from request start to finish
* time_info: dictionary of diagnostic timing information from the request.
Available data are subject to change, but currently uses timings
available from http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html,
plus ``queue``, which is the delay (if any) introduced by waiting for
a slot under `AsyncHTTPClient`'s ``max_clients`` setting.
"""
def __init__(self, request, code, headers=None, buffer=None,
effective_url=None, error=None, request_time=None,
time_info=None, reason=None):
if isinstance(request, _RequestProxy):
self.request = request.request
else:
self.request = request
self.code = code
self.reason = reason or httputil.responses.get(code, "Unknown")
if headers is not None:
self.headers = headers
else:
self.headers = httputil.HTTPHeaders()
self.buffer = buffer
self._body = None
if effective_url is None:
self.effective_url = request.url
else:
self.effective_url = effective_url
if error is None:
if self.code < 200 or self.code >= 300:
self.error = HTTPError(self.code, message=self.reason,
response=self)
else:
self.error = None
else:
self.error = error
self.request_time = request_time
self.time_info = time_info or {}
@property
def body(self):
if self.buffer is None:
return None
elif self._body is None:
self._body = self.buffer.getvalue()
return self._body
def rethrow(self):
"""If there was an error on the request, raise an `HTTPError`."""
if self.error:
raise self.error
def __repr__(self):
args = ",".join("%s=%r" % i for i in sorted(self.__dict__.items()))
return "%s(%s)" % (self.__class__.__name__, args)
class HTTPError(Exception):
"""Exception thrown for an unsuccessful HTTP request.
Attributes:
* ``code`` - HTTP error integer error code, e.g. 404. Error code 599 is
used when no HTTP response was received, e.g. for a timeout.
* ``response`` - `HTTPResponse` object, if any.
Note that if ``follow_redirects`` is False, redirects become HTTPErrors,
and you can look at ``error.response.headers['Location']`` to see the
destination of the redirect.
"""
def __init__(self, code, message=None, response=None):
self.code = code
self.message = message or httputil.responses.get(code, "Unknown")
self.response = response
super(HTTPError, self).__init__(code, message, response)
def __str__(self):
return "HTTP %d: %s" % (self.code, self.message)
# There is a cyclic reference between self and self.response,
# which breaks the default __repr__ implementation.
# (especially on pypy, which doesn't have the same recursion
# detection as cpython).
__repr__ = __str__
class _RequestProxy(object):
"""Combines an object with a dictionary of defaults.
Used internally by AsyncHTTPClient implementations.
"""
def __init__(self, request, defaults):
self.request = request
self.defaults = defaults
def __getattr__(self, name):
request_attr = getattr(self.request, name)
if request_attr is not None:
return request_attr
elif self.defaults is not None:
return self.defaults.get(name, None)
else:
return None
def main():
from tornado.options import define, options, parse_command_line
define("print_headers", type=bool, default=False)
define("print_body", type=bool, default=True)
define("follow_redirects", type=bool, default=True)
define("validate_cert", type=bool, default=True)
args = parse_command_line()
client = HTTPClient()
for arg in args:
try:
response = client.fetch(arg,
follow_redirects=options.follow_redirects,
validate_cert=options.validate_cert,
)
except HTTPError as e:
if e.response is not None:
response = e.response
else:
raise
if options.print_headers:
print(response.headers)
if options.print_body:
print(native_str(response.body))
client.close()
if __name__ == "__main__":
main()
| mr-ping/tornado | tornado/httpclient.py | Python | apache-2.0 | 27,522 |
# http://julienbayle.net
from __future__ import with_statement
import Live
import math
""" _Framework files """
from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller
from _Framework.ButtonMatrixElement import ButtonMatrixElement # Class representing a 2-dimensional set of buttons
from _Framework.ChannelStripComponent import ChannelStripComponent # Class attaching to the mixer of a given track
#from _Framework.ClipSlotComponent import ClipSlotComponent # Class representing a ClipSlot within Live
from _Framework.CompoundComponent import CompoundComponent # Base class for classes encompasing other components to form complex components
from _Framework.ControlElement import ControlElement # Base class for all classes representing control elements on a controller
from _Framework.ControlSurface import ControlSurface # Central base class for scripts based on the new Framework
from _Framework.ControlSurfaceComponent import ControlSurfaceComponent # Base class for all classes encapsulating functions in Live
from _Framework.DeviceComponent import DeviceComponent # Class representing a device in Live
from _Framework.EncoderElement import EncoderElement # Class representing a continuous control on the controller
from _Framework.InputControlElement import * # Base class for all classes representing control elements on a controller
from VCM600.MixerComponent import MixerComponent # Class encompassing several channel strips to form a mixer
from _Framework.ModeSelectorComponent import ModeSelectorComponent # Class for switching between modes, handle several functions with few controls
from _Framework.NotifyingControlElement import NotifyingControlElement # Class representing control elements that can send values
from _Framework.SceneComponent import SceneComponent # Class representing a scene in Live
from _Framework.SessionComponent import SessionComponent # Class encompassing several scene to cover a defined section of Live's session
from _Framework.SessionZoomingComponent import DeprecatedSessionZoomingComponent as SessionZoomingComponent # Class using a matrix of buttons to choose blocks of clips in the session
from _Framework.SliderElement import SliderElement # Class representing a slider on the controller
from VCM600.TrackEQComponent import TrackEQComponent # Class representing a track's EQ, it attaches to the last EQ device in the track
from VCM600.TrackFilterComponent import TrackFilterComponent # Class representing a track's filter, attaches to the last filter in the track
from _Framework.TransportComponent import TransportComponent # Class encapsulating all functions in Live's transport section
""" Here we define some global variables """
CHANNEL = 0
CODE_ENC = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]
CODE_ENCBTN = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]
CODE_BTN = [33,34,35,36,37,38,39,40,41,42,43,44,45]
CODE_ENCRING = [33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64]
class LividCodeM4L(ControlSurface):
__module__ = __name__
__doc__ = " LividCodeM4L controller script "
def __init__(self, c_instance):
super(LividCodeM4L, self).__init__(c_instance)
with self.component_guard():
self._host_name = 'LividCode'
self._color_type = 'Code'
self.log_message("--------------= LividCodeM4L log START =--------------")
self._setup_controls()
"""script initialization methods"""
def _setup_controls(self):
is_momentary = True
self._encoder = [None for index in range(32)]
self._encoder_button = [None for index in range(32)]
self._button = [None for index in range(13)]
for index in range(32):
self._encoder[index] = EncoderElement(MIDI_CC_TYPE, CHANNEL, CODE_ENC[index], Live.MidiMap.MapMode.absolute)
self._encoder[index].name = 'enc[' + str(index) + ']'
for index in range(32):
self._encoder_button[index] = ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, CODE_ENCBTN[index])
self._encoder_button[index].name = 'encbtn[' + str(index) + ']'
for index in range(13):
self._button[index] = ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, CODE_BTN[index])
self._button[index].name = 'btn[' + str(index) + ']'
for index in range(32):
self._encoder[index] = EncoderElement(MIDI_CC_TYPE, CHANNEL, CODE_ENCRING[index], Live.MidiMap.MapMode.absolute)
self._encoder[index].name = 'encring[' + str(index) + ']'
def receive_value(self, value):
self._value = value
self.log_message("rx: "+value)
"""LividCodeM4L script disconnection"""
def disconnect(self):
self.log_message("--------------= LividCodeM4L log END =--------------")
ControlSurface.disconnect(self)
return None | LividInstruments/LiveRemoteScripts | Livid_Code_M4L/LividCodeM4L.py | Python | mit | 4,792 |
"""
WSGI config for opsmanager 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.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opsmanager.settings")
application = get_wsgi_application()
| damondengxin/opsmanager | opsmanager/wsgi.py | Python | lgpl-3.0 | 398 |
import os
import plotly
import yaml
DATA_DIR = os.path.join(os.path.expanduser('~'), ".groupmestats")
if not os.path.exists(DATA_DIR):
os.mkdir(DATA_DIR)
GROUPME_TOKEN_FILE = os.path.join(os.path.expanduser('~'), ".groupme_key")
def get_groupme_token():
with open(GROUPME_TOKEN_FILE, "r") as f:
return f.readline().strip()
| kjteske/groupmestats | groupmestats/_config.py | Python | mit | 345 |
import numpy as np
from gym.spaces import Box
from metaworld.envs.asset_path_utils import full_v1_path_for
from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set
class SawyerDialTurnEnv(SawyerXYZEnv):
def __init__(self):
hand_low = (-0.5, 0.40, 0.05)
hand_high = (0.5, 1, 0.5)
obj_low = (-0.1, 0.7, 0.05)
obj_high = (0.1, 0.8, 0.05)
super().__init__(
self.model_name,
hand_low=hand_low,
hand_high=hand_high,
)
self.init_config = {
'obj_init_pos': np.array([0, 0.7, 0.05]),
'hand_init_pos': np.array([0, 0.6, 0.2], dtype=np.float32),
}
self.goal = np.array([0., 0.73, 0.08])
self.obj_init_pos = self.init_config['obj_init_pos']
self.hand_init_pos = self.init_config['hand_init_pos']
goal_low = self.hand_low
goal_high = self.hand_high
self._random_reset_space = Box(
np.array(obj_low),
np.array(obj_high),
)
self.goal_space = Box(np.array(goal_low), np.array(goal_high))
@property
def model_name(self):
return full_v1_path_for('sawyer_xyz/sawyer_dial.xml')
@_assert_task_is_set
def step(self, action):
ob = super().step(action)
reward, reachDist, pullDist = self.compute_reward(action, ob)
info = {
'reachDist': reachDist,
'goalDist': pullDist,
'epRew': reward,
'pickRew': None,
'success': float(pullDist <= 0.03)
}
return ob, reward, False, info
def _get_pos_objects(self):
return self._get_site_pos('dialStart')
def reset_model(self):
self._reset_hand()
self._target_pos = self.goal.copy()
self.obj_init_pos = self.init_config['obj_init_pos']
if self.random_init:
goal_pos = self._get_state_rand_vec()
self.obj_init_pos = goal_pos[:3]
final_pos = goal_pos.copy() + np.array([0, 0.03, 0.03])
self._target_pos = final_pos
self.sim.model.body_pos[self.model.body_name2id('dial')] = self.obj_init_pos
self.maxPullDist = np.abs(self._target_pos[1] - self.obj_init_pos[1])
return self._get_obs()
def _reset_hand(self):
super()._reset_hand(10)
rightFinger, leftFinger = self._get_site_pos('rightEndEffector'), self._get_site_pos('leftEndEffector')
self.init_fingerCOM = (rightFinger + leftFinger)/2
self.reachCompleted = False
def compute_reward(self, actions, obs):
del actions
objPos = obs[3:6]
rightFinger, leftFinger = self._get_site_pos('rightEndEffector'), self._get_site_pos('leftEndEffector')
fingerCOM = (rightFinger + leftFinger)/2
pullGoal = self._target_pos
pullDist = np.abs(objPos[1] - pullGoal[1])
reachDist = np.linalg.norm(objPos - fingerCOM)
reachRew = -reachDist
self.reachCompleted = reachDist < 0.05
def pullReward():
c1 = 1000
c2 = 0.001
c3 = 0.0001
if self.reachCompleted:
pullRew = 1000*(self.maxPullDist - pullDist) + c1*(np.exp(-(pullDist**2)/c2) + np.exp(-(pullDist**2)/c3))
pullRew = max(pullRew,0)
return pullRew
else:
return 0
pullRew = pullReward()
reward = reachRew + pullRew
return [reward, reachDist, pullDist]
| rlworkgroup/metaworld | metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_dial_turn.py | Python | mit | 3,539 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from selenium.common.exceptions import TimeoutException
from pages.home import HomePage
from pages.about import AboutPage
from pages.contribute.contribute import ContributePage
from pages.contribute.task.twitter import TwitterTaskPage
from pages.contribute.task.mobile import MobileTaskPage
from pages.contribute.task.encryption import EncryptionTaskPage
from pages.contribute.task.joy_of_coding import JoyOfCodingTaskPage
from pages.contribute.task.dev_tools_challenger import DevToolsChallengerTaskPage
from pages.contribute.task.stumbler import StumblerTaskPage
from pages.mission import MissionPage
from pages.firefox.all import FirefoxAllPage
from pages.firefox.desktop.desktop import DesktopPage
from pages.firefox.desktop.customize import CustomizePage
from pages.firefox.desktop.all import FirefoxDesktopBasePage
from pages.firefox.hello import HelloPage
from pages.firefox.sync import FirefoxSyncPage
from pages.plugincheck import PluginCheckPage
from pages.smarton.landing import SmartOnLandingPage
from pages.smarton.base import SmartOnBasePage
@pytest.mark.nondestructive
@pytest.mark.parametrize(('page_class', 'url_kwargs'), [
pytest.mark.skipif(pytest.mark.smoke((HomePage, None)),
reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1293779'),
(AboutPage, None),
pytest.mark.smoke((ContributePage, None)),
(TwitterTaskPage, None),
(MobileTaskPage, None),
(EncryptionTaskPage, None),
(JoyOfCodingTaskPage, None),
(DevToolsChallengerTaskPage, None),
(StumblerTaskPage, None),
(MissionPage, None),
(FirefoxAllPage, None),
pytest.mark.smoke((DesktopPage, None)),
(CustomizePage, None),
(FirefoxDesktopBasePage, {'slug': 'fast'}),
(FirefoxDesktopBasePage, {'slug': 'trust'}),
(FirefoxSyncPage, None),
(HelloPage, None),
(PluginCheckPage, None),
(SmartOnLandingPage, None),
pytest.mark.skip_if_not_firefox((SmartOnBasePage, {'slug': 'tracking'}),
reason='Newsletter is only shown to Firefox browsers.'),
pytest.mark.skip_if_not_firefox((SmartOnBasePage, {'slug': 'security'}),
reason='Newsletter is only shown to Firefox browsers.'),
pytest.mark.skip_if_not_firefox((SmartOnBasePage, {'slug': 'surveillance'}),
reason='Newsletter is only shown to Firefox browsers.')])
def test_newsletter_default_values(page_class, url_kwargs, base_url, selenium):
url_kwargs = url_kwargs or {}
page = page_class(selenium, base_url, **url_kwargs).open()
page.newsletter.expand_form()
assert '' == page.newsletter.email
assert 'United States' == page.newsletter.country
assert not page.newsletter.privacy_policy_accepted
assert page.newsletter.is_privacy_policy_link_displayed
@pytest.mark.nondestructive
@pytest.mark.parametrize('page_class', [
pytest.mark.skipif(HomePage,
reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1293779'),
ContributePage])
def test_newsletter_successful_sign_up(page_class, base_url, selenium):
page = page_class(selenium, base_url).open()
page.newsletter.expand_form()
page.newsletter.type_email('success@example.com')
page.newsletter.select_country('United Kingdom')
page.newsletter.select_text_format()
page.newsletter.accept_privacy_policy()
page.newsletter.click_sign_me_up()
assert page.newsletter.sign_up_successful
@pytest.mark.nondestructive
@pytest.mark.parametrize('page_class', [
pytest.mark.skipif(HomePage,
reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1293779'),
ContributePage])
def test_newsletter_sign_up_fails_when_missing_required_fields(page_class, base_url, selenium):
page = page_class(selenium, base_url).open()
page.newsletter.expand_form()
with pytest.raises(TimeoutException):
page.newsletter.click_sign_me_up()
| jgmize/bedrock | tests/functional/newsletter/test_newsletter_embed.py | Python | mpl-2.0 | 4,018 |
config = {
# Interval between speedtests
'INTERVAL': 5,
# Interval Units can be: seconds, minutes, hours, days, ...
'INTERVAL_UNIT': 'minutes',
# Output file
'SAVE_FILE': 'results.csv',
}
| franksh/scheduled-speedtest | config.py | Python | mit | 212 |
"""Setup script for modoboa-admin."""
import re
import os
from setuptools import setup, find_packages
from modoboa_postfix_autoreply import __version__
ROOT = os.path.dirname(__file__)
PIP_REQUIRES = os.path.join(ROOT, "requirements.txt")
def parse_requirements(*filenames):
"""
We generate our install_requires from the pip-requires and test-requires
files so that we don't have to maintain the dependency definitions in
two places.
"""
requirements = []
for f in filenames:
for line in open(f, 'r').read().split('\n'):
# Comment lines. Skip.
if re.match(r'(\s*#)|(\s*$)', line):
continue
# Editable matches. Put the egg name into our reqs list.
if re.match(r'\s*-e\s+', line):
pkg = re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', line)
requirements.append("%s" % pkg)
# File-based installs not supported/needed. Skip.
elif re.match(r'\s*-f\s+', line):
pass
else:
requirements.append(line)
return requirements
def parse_dependency_links(*filenames):
"""
We generate our dependency_links from the pip-requires and test-requires
files for the dependencies pulled from github (prepended with -e).
"""
dependency_links = []
for f in filenames:
for line in open(f, 'r').read().split('\n'):
if re.match(r'\s*-[ef]\s+', line):
line = re.sub(r'\s*-[ef]\s+', '', line)
line = re.sub(r'\s*git\+https', 'http', line)
line = re.sub(r'\.git#', '/tarball/master#', line)
dependency_links.append(line)
return dependency_links
def read(fname):
"""A simple function to read the content of a file."""
return open(os.path.join(ROOT, fname)).read()
setup(
name="modoboa-postfix-autoreply",
version=__version__,
url='http://modoboa.org/',
license='MIT',
description="Away message editor for Modoboa (postfix compatible)",
long_description=read('README.rst'),
author='Antoine Nguyen',
author_email='tonio@ngyn.org',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=parse_requirements(PIP_REQUIRES),
dependency_links=parse_dependency_links(PIP_REQUIRES),
classifiers=['Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP']
)
| bearstech/modoboa-postfix-autoreply | setup.py | Python | mit | 2,735 |
#!/usr/bin/env python
__author__ = "Zack Cerza <zcerza@redhat.com>"
from distutils.core import setup
from distutils.command.bdist_rpm import bdist_rpm
def examples():
import os
exList = os.listdir(os.curdir + '/examples/')
result = []
for ex in exList:
if ex.split('.')[-1] == 'py':
result = result + ['examples/' + ex]
return result
def examples_data():
import os
dataList = os.listdir(os.curdir + '/examples/data/')
result = []
for data in dataList:
result = result + ['examples/data/' + data]
return result
def tests():
import os
exList = os.listdir(os.curdir + '/tests/')
result = []
for ex in exList:
if ex.split('.')[-1] == 'py':
result = result + ['tests/' + ex]
return result
def sniff_icons():
import os
list = os.listdir(os.curdir + '/sniff/icons/')
result = []
for file in list:
if file.split('.')[-1] in ('xpm'):
result = result + ['sniff/icons/' + file]
return result
def icons(ext_tuple):
import os
list = os.listdir(os.curdir + '/icons/')
result = []
for file in list:
if file.split('.')[-1] in ext_tuple:
result = result + ['icons/' + file]
return result
def scripts():
import os
list = os.listdir(os.curdir + '/scripts/')
result = ['sniff/sniff']
for file in list:
result = result + ['scripts/' + file]
return result
def session_file():
result = ['scripts/gnome-dogtail-headless.session']
return result
setup (
name = 'dogtail',
version = '0.8.3',
description = """GUI test tool and automation framework that uses Accessibility (a11y) technologies to communicate with desktop applications.""",
author = """Zack Cerza <zcerza@redhat.com>,
Ed Rousseau <rousseau@redhat.com>,
David Malcolm <dmalcolm@redhat.com>
Vitezslav Humpa <vhumpa@redhat.com>""",
author_email = 'dogtail-list@gnome.org',
url = 'http://dogtail.fedorahosted.org/',
packages = ['dogtail'],
scripts = scripts(),
data_files = [
('share/doc/dogtail/examples',
examples() ),
('share/doc/dogtail/examples/data',
examples_data() ),
('share/doc/dogtail/tests',
tests() ),
('share/dogtail/glade', ['sniff/sniff.ui']),
('share/dogtail/icons', sniff_icons() ),
('share/applications', ['sniff/sniff.desktop']),
('share/icons/hicolor/48x48/apps', icons('png')),
('share/icons/hicolor/scalable/apps', icons('svg'))
],
cmdclass = {
'bdist_rpm': bdist_rpm
}
)
# vim: sw=4 ts=4 sts=4 noet ai
| vrutkovs/dogtail | setup.py | Python | gpl-2.0 | 3,001 |
"""
Demonstrates using the BMP180 temperature and humidity sensor connected
on the LabJack I2C bus.
This requires the associated example Lua script under
Examples > I2C > Temperature & Pressure BMP180 (temp-and-pressure-BMP180.lua),
which can be loaded from Kipling and can be configured to run at device start up.
***See Lua script for electical connections.***
Data is transfered using the USER_RAM registers, which are written from the Lua script
and read from the Python script.
The calculations are taken directly from the BMP180 datasheet, which can
be found at:
https://media.digikey.com/pdf/Data%20Sheets/Bosch/BMP180.pdf
"""
import math
import sys
import time
from labjack import ljm
# Open first found LabJack
handle = ljm.open(ljm.constants.dtANY, ljm.constants.ctUSB, "ANY")
#handle = ljm.openS("ANY", "USB", "ANY")
info = ljm.getHandleInfo(handle)
print("Opened a LabJack with Device type: %i, Connection type: %i,\n" \
"Serial number: %i, IP address: %s, Port: %i,\nMax bytes per mb: %i" % \
(info[0], info[1], info[2], ljm.numberToIP(info[3]), info[4], info[5]))
# Ensure that a lua script is running on the T7. If not, end the python script.
if(ljm.eReadName(handle, "LUA_RUN") != 1):
print("There is no Lua script running on the device.")
print("Please use Kipling to begin a Lua script on the device.")
sys.exit()
# Load the calibration consants for the BMP180 from USER_RAM Registers.
calAddrNames = ["USER_RAM11_F32", "USER_RAM12_F32", "USER_RAM13_F32",
"USER_RAM14_F32", "USER_RAM15_F32", "USER_RAM16_F32",
"USER_RAM17_F32", "USER_RAM18_F32", "USER_RAM19_F32",
"USER_RAM20_F32", "USER_RAM21_F32"
]
calConst = ljm.eReadNames(handle, 11, calAddrNames)
ac1 = calConst[0]
ac2 = calConst[1]
ac3 = calConst[2]
ac4 = calConst[3]
ac5 = calConst[4]
ac6 = calConst[5]
b1 = calConst[6]
b2 = calConst[7]
mb = calConst[8]
mc = calConst[9]
md = calConst[10]
while True:
try:
ut = ljm.eReadName(handle, "USER_RAM9_F32")
up = ljm.eReadName(handle, "USER_RAM10_F32")
# BMP180 datasheet calculations
x1 = (ut-ac6) * ac5 / 2**15
x2 = mc * (2**11) / (x1 + md)
b5 = x1 + x2
tempC = ((b5+8)/2**4) / 10
tempF = (tempC*(9.0/5)) + 32
b6 = b5 - 400
x1 = (b2*(b6*b6/(2*12))) / 2**11
x2 = ac2 * b6 / 2**11
x3 = x1 + x2
b3 = ((ac1*4+x3)+2) / 4
x1 = ac3*b6 / 2**13
x2 = (b1*(b6*b6/2**12)) / 2**16
x3 = ((x1+x2) + 2) / 4
b4 = ac4 * (x3+32768) / 2**15
b7 = (up-b3) * 50000
if b7 < 0x80000000:
pressureRaw = (b7*2) / b4
else:
pressureRaw = (b7/b4) * 2
x1 = (pressureRaw/2**8) * (pressureRaw/2**8)
x1 = (x1*3038) / 2**16
x2 = (-7357*pressureRaw) / 2**16
pressurePa = pressureRaw + (x1+x2+3791) / 2**4 # Pressure in Pascals
pressureAtm = (9.86923E-06) * pressurePa # Pressure in Atmospheres
print("Temp: %4.2fF (%4.2fC) Pressure: %4.3f Atm (%04.2f KPa)" \
%(tempF, tempC, pressureAtm, pressurePa/1000))
time.sleep(1.00) # Delay for 1 second between readings
except KeyboardInterrupt:
# Exit the loop upon Ctrl+C to allow closing the LabJack properly
break
print("Closing LabJack")
ljm.close(handle)
| chrisJohn404/ljswitchboard-module_manager | lib/switchboard_modules/lua_script_debugger/premade_scripts_addresses/i2c/associated-files/bmp180_temp_and_humidity_using_lua.py | Python | mit | 3,383 |
"""
Filename: plot_zonal_ensemble.py
Author: Damien Irving, irving.damien@gmail.com
Description: Plot zonal ensemble
"""
# Import general Python modules
import sys, os, pdb
import argparse
from itertools import groupby
from more_itertools import unique_everseen
import numpy
import iris
from iris.experimental.equalise_cubes import equalise_attributes
import iris.plot as iplt
import matplotlib.pyplot as plt
from matplotlib import gridspec
import seaborn
import matplotlib as mpl
# Import my modules
cwd = os.getcwd()
repo_dir = '/'
for directory in cwd.split('/')[1:]:
repo_dir = os.path.join(repo_dir, directory)
if directory == 'ocean-analysis':
break
modules_dir = os.path.join(repo_dir, 'modules')
sys.path.append(modules_dir)
try:
import general_io as gio
import timeseries
import grids
import convenient_universal as uconv
except ImportError:
raise ImportError('Must run this script from anywhere within the ocean-analysis git repo')
# Define functions
experiment_colors = {'historical': 'black', 'historicalGHG': 'red',
'historicalAA': 'blue', 'GHG + AA': 'green',
'piControl': '0.5'}
experiment_labels = {'historical': 'historical', 'historicalGHG': 'GHG-only',
'historicalAA': 'AA-only', 'piControl': 'control'}
seaborn.set(style='whitegrid')
mpl.rcParams['axes.labelsize'] = 'xx-large'
mpl.rcParams['axes.titlesize'] = 'xx-large'
mpl.rcParams['xtick.labelsize'] = 'x-large'
mpl.rcParams['ytick.labelsize'] = 'x-large'
mpl.rcParams['legend.fontsize'] = 'xx-large'
def make_zonal_grid():
"""Make a dummy cube with desired grid."""
lat_values = numpy.arange(-90, 91.5, 1.5)
latitude = iris.coords.DimCoord(lat_values,
standard_name='latitude',
units='degrees_north',
coord_system=iris.coord_systems.GeogCS(iris.fileformats.pp.EARTH_RADIUS))
dummy_data = numpy.zeros((len(lat_values)))
new_cube = iris.cube.Cube(dummy_data, dim_coords_and_dims=[(latitude, 0),])
new_cube.coord('latitude').guess_bounds()
return new_cube
def calc_trend_cube(cube):
"""Calculate trend and put into appropriate cube."""
trend_array = timeseries.calc_trend(cube, per_yr=True)
new_cube = cube[0,:].copy()
new_cube.remove_coord('time')
new_cube.data = trend_array
return new_cube
def get_colors(family_list):
"""Define a color for each model/physics combo"""
nfamilies = len(family_list)
cm = plt.get_cmap('nipy_spectral')
colors = [cm(1. * i / (nfamilies + 1)) for i in range(nfamilies + 1)]
color_dict = {}
count = 1 # skips the first color, which is black
for family in family_list:
color_dict[family] = colors[count]
count = count + 1
return color_dict
def get_ylabel(cube, time_agg, inargs):
"""get the y axis label"""
if str(cube.units) == 'kg m-2 s-1':
ylabel = '$kg \: m^{-2} \: s^{-1}'
else:
ylabel = '$%s' %(str(cube.units))
if inargs.perlat:
ylabel = ylabel + ' \: lat^{-1}'
if time_agg == 'trend':
ylabel = ylabel + ' \: yr^{-1}'
ylabel = time_agg + ' (' + ylabel + '$)'
return ylabel
def get_line_width(realization, model):
"""Get the line width"""
if model == 'FGOALS-g2':
lw = 2.0
else:
lw = 2.0 if realization == 'r1' else 0.5
return lw
def plot_individual(data_dict, color_dict):
"""Plot the individual model data"""
for key, cube in data_dict.items():
model, physics, realization = key
if (realization == 'r1') or (model == 'FGOALS-g2'):
label = model + ', ' + physics
else:
label = None
lw = 0.5 #get_line_width(realization, model)
iplt.plot(cube, label=label, color=color_dict[(model, physics)], linewidth=lw)
def plot_ensmean(data_dict, experiment, nexperiments,
single_run=False, linestyle='-', linewidth=2.0):
"""Plot the ensemble mean.
If single_run is true, the ensemble is calculated using
only the first run from each model/physics family.
"""
target_grid = make_zonal_grid()
regridded_cube_list = iris.cube.CubeList([])
count = 0
for key, cube in data_dict.items():
model, physics, realization = key
if not single_run or ((realization == 'r1') or (model == 'FGOALS-g2')):
regridded_cube = grids.regrid_1D(cube, target_grid, 'latitude')
new_aux_coord = iris.coords.AuxCoord(count, long_name='ensemble_member', units='no_unit')
regridded_cube.add_aux_coord(new_aux_coord)
regridded_cube.cell_methods = None
regridded_cube.data = regridded_cube.data.astype(numpy.float64)
regridded_cube_list.append(regridded_cube)
count = count + 1
if len(regridded_cube_list) > 1:
equalise_attributes(regridded_cube_list)
ensemble_cube = regridded_cube_list.merge_cube()
ensemble_mean = ensemble_cube.collapsed('ensemble_member', iris.analysis.MEAN)
else:
ensemble_mean = regridded_cube_list[0]
label, color = get_ensemble_label_color(experiment, nexperiments, count, single_run)
iplt.plot(ensemble_mean, label=label, color=color, linestyle=linestyle, linewidth=linewidth)
return ensemble_mean
def get_ensemble_label_color(experiment, nexperiments, ensemble_size, single_run):
"""Get the line label and color."""
label = experiment_labels[experiment]
color = experiment_colors[experiment]
return label, color
def group_runs(data_dict):
"""Find unique model/physics groups"""
all_info = data_dict.keys()
model_physics_list = []
for key, group in groupby(all_info, lambda x: x[0:2]):
model_physics_list.append(key)
family_list = list(unique_everseen(model_physics_list))
return family_list
def read_data(inargs, infiles, ref_cube=None):
"""Read data."""
clim_dict = {}
trend_dict = {}
for filenum, infile in enumerate(infiles):
cube = iris.load_cube(infile, gio.check_iris_var(inargs.var))
if ref_cube:
branch_time = None if inargs.branch_times[filenum] == 'default' else str(inargs.branch_times[filenum])
time_constraint = timeseries.get_control_time_constraint(cube, ref_cube, inargs.time, branch_time=branch_time)
cube = cube.extract(time_constraint)
iris.util.unify_time_units([ref_cube, cube])
cube.coord('time').units = ref_cube.coord('time').units
cube.replace_coord(ref_cube.coord('time'))
else:
time_constraint = gio.get_time_constraint(inargs.time)
cube = cube.extract(time_constraint)
#cube = uconv.convert_to_joules(cube)
if inargs.perlat:
grid_spacing = grids.get_grid_spacing(cube)
cube.data = cube.data / grid_spacing
trend_cube = calc_trend_cube(cube.copy())
clim_cube = cube.collapsed('time', iris.analysis.MEAN)
clim_cube.remove_coord('time')
model = cube.attributes['model_id']
realization = 'r' + str(cube.attributes['realization'])
physics = 'p' + str(cube.attributes['physics_version'])
key = (model, physics, realization)
trend_dict[key] = trend_cube
clim_dict[key] = clim_cube
experiment = cube.attributes['experiment_id']
experiment = 'historicalAA' if experiment == "historicalMisc" else experiment
trend_ylabel = get_ylabel(cube, 'trend', inargs)
clim_ylabel = get_ylabel(cube, 'climatology', inargs)
metadata_dict = {infile: cube.attributes['history']}
return cube, trend_dict, clim_dict, experiment, trend_ylabel, clim_ylabel, metadata_dict
def get_title(standard_name, time_list, experiment, nexperiments):
"""Get the plot title"""
title = '%s, %s-%s' %(gio.var_names[standard_name],
time_list[0][0:4],
time_list[1][0:4])
if nexperiments == 1:
title = title + ', ' + experiment
return title
def correct_y_lim(ax, data_cube):
"""Adjust the y limits after changing x limit
x: data for entire x-axes
y: data for entire y-axes
"""
x_data = data_cube.coord('latitude').points
y_data = data_cube.data
lims = ax.get_xlim()
i = numpy.where( (x_data > lims[0]) & (x_data < lims[1]) )[0]
plt.ylim( y_data[i].min(), y_data[i].max() )
def align_yaxis(ax1, ax2):
"""Align zeros of the two axes, zooming them out by same ratio
Taken from: https://stackoverflow.com/questions/10481990/matplotlib-axis-with-two-scales-shared-origin
"""
axes = (ax1, ax2)
extrema = [ax.get_ylim() for ax in axes]
tops = [extr[1] / (extr[1] - extr[0]) for extr in extrema]
# Ensure that plots (intervals) are ordered bottom to top:
if tops[0] > tops[1]:
axes, extrema, tops = [list(reversed(l)) for l in (axes, extrema, tops)]
# How much would the plot overflow if we kept current zoom levels?
tot_span = tops[1] + 1 - tops[0]
b_new_t = extrema[0][0] + tot_span * (extrema[0][1] - extrema[0][0])
t_new_b = extrema[1][1] - tot_span * (extrema[1][1] - extrema[1][0])
axes[0].set_ylim(extrema[0][0], b_new_t)
axes[1].set_ylim(t_new_b, extrema[1][1])
def plot_files(ax, ax2, infiles, inargs, nexperiments, ref_cube=None):
"""Plot a list of files corresponding to a particular experiment."""
cube, trend_dict, clim_dict, experiment, trend_ylabel, clim_ylabel, metadata_dict = read_data(inargs, infiles, ref_cube=ref_cube)
model_family_list = group_runs(trend_dict)
color_dict = get_colors(model_family_list)
if inargs.time_agg == 'trend':
target_dict = trend_dict
target_ylabel = trend_ylabel
else:
target_dict = clim_dict
target_ylabel = clim_ylabel
if nexperiments == 1:
plot_individual(target_dict, color_dict)
if inargs.ensmean:
ensemble_mean = plot_ensmean(target_dict, experiment, nexperiments,
single_run=inargs.single_run)
else:
ensemble_mean = None
if inargs.clim and ((nexperiments == 1) or (experiment == 'historical')):
ax2 = ax.twinx()
plot_ensmean(clim_dict, experiment, nexperiments,
single_run=inargs.single_run, linestyle='--', linewidth=1.0)
plt.sca(ax)
return cube, metadata_dict, ensemble_mean, target_ylabel, clim_ylabel, experiment, ax2
def main(inargs):
"""Run the program."""
seaborn.set_context(inargs.context)
fig, ax = plt.subplots(figsize=[8, 5])
ax2 = None
nexperiments = len(inargs.hist_files)
if inargs.control_files:
nexperiments = nexperiments + len(inargs.control_files)
# Plot historical data
for infiles in inargs.hist_files:
cube, metadata_dict, ensemble_mean, ylabel, clim_ylabel, experiment, ax2 = plot_files(ax, ax2, infiles, inargs, nexperiments)
# Titles and labels
if inargs.title:
title = inargs.title
plt.title(title)
#else:
#title = get_title(inargs.var, inargs.time, experiment, nexperiments)
if inargs.scientific:
plt.ticklabel_format(style='sci', axis='y', scilimits=(0,0), useMathText=True)
ax.yaxis.major.formatter._useMathText = True
if inargs.ylabel:
ylabel = inargs.ylabel
ax.set_ylabel(ylabel)
ax.set_xlabel('latitude')
# Plot control data
if inargs.control_files:
assert inargs.hist_files, 'Control plot requires branch time information from historical files'
ref_cube = cube
for infiles in inargs.control_files:
cube, metadata_dict, ensemble_mean, ylabel, clim_ylabel, epxeriment, ax2 = plot_files(ax, ax2, infiles, inargs, nexperiments, ref_cube=ref_cube)
# Ticks and axis limits
plt.xticks(numpy.arange(-75, 90, 15))
plt.xlim(inargs.xlim[0], inargs.xlim[1])
if not inargs.xlim == (-90, 90):
correct_y_lim(ax, ensemble_mean)
if inargs.clim:
align_yaxis(ax, ax2)
ax2.grid(None)
ax2.set_ylabel(clim_ylabel)
ax2.yaxis.major.formatter._useMathText = True
# Guidelines and legend
if inargs.zeroline:
plt.axhline(y=0, color='0.5', linestyle='--')
if inargs.legloc:
ax.legend(loc=inargs.legloc)
else:
box = ax.get_position()
ax.set_position([box.x0, box.y0, box.width * 0.8, box.height])
if inargs.clim:
ax2.set_position([box.x0, box.y0, box.width * 0.8, box.height])
legend_x_pos = 1.1
else:
legend_x_pos = 1.0
ax.legend(loc='center left', bbox_to_anchor=(legend_x_pos, 0.5))
# Save output
dpi = inargs.dpi if inargs.dpi else plt.savefig.__globals__['rcParams']['figure.dpi']
print('dpi =', dpi)
plt.savefig(inargs.outfile, bbox_inches='tight', dpi=dpi)
gio.write_metadata(inargs.outfile, file_info=metadata_dict)
if __name__ == '__main__':
extra_info ="""
author:
Damien Irving, irving.damien@gmail.com
"""
description = 'Plot zonal ensemble'
parser = argparse.ArgumentParser(description=description,
epilog=extra_info,
argument_default=argparse.SUPPRESS,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("var", type=str, help="Variable")
parser.add_argument("time_agg", type=str, choices=('trend', 'climatology'), help="Temporal aggregation")
parser.add_argument("outfile", type=str, help="Output file")
parser.add_argument("--hist_files", type=str, action='append', nargs='*',
help="Input files for a given historical experiment")
parser.add_argument("--control_files", type=str, action='append', nargs='*', default=[],
help="Input files for a control experiment")
parser.add_argument("--time", type=str, nargs=2, metavar=('START_DATE', 'END_DATE'),
default=('1861-01-01', '2005-12-31'),
help="Time bounds [default = 1861-2005]")
parser.add_argument("--branch_times", type=str, nargs='*', default=None,
help="Need value for each control file (write default to use metadata)")
parser.add_argument("--perlat", action="store_true", default=False,
help="Scale per latitude [default=False]")
parser.add_argument("--single_run", action="store_true", default=False,
help="Only use run 1 in the ensemble mean [default=False]")
parser.add_argument("--ensmean", action="store_true", default=False,
help="Plot an ensemble mean curve [default=False]")
parser.add_argument("--clim", action="store_true", default=False,
help="Plot a climatology curve behind the trend curve [default=False]")
parser.add_argument("--legloc", type=int, default=None,
help="Legend location [default = off plot]")
parser.add_argument("--scientific", action="store_true", default=False,
help="Use scientific notation for the y axis scale [default=False]")
parser.add_argument("--zeroline", action="store_true", default=False,
help="Plot a dashed guideline at y=0 [default=False]")
parser.add_argument("--title", type=str, default=None,
help="plot title [default: None]")
parser.add_argument("--ylabel", type=str, default=None,
help="Override the default y axis label")
parser.add_argument("--xlim", type=float, nargs=2, metavar=('SOUTHERN_LIMIT', 'NORTHERN LIMIT'), default=(-90, 90),
help="x-axis limits [default = entire]")
#parser.add_argument("--ylim", type=float, nargs=2, metavar=('LOWER_LIMIT', 'UPPER_LIMIT'), default=None,
# help="y-axis limits [default = auto]")
parser.add_argument("--context", type=str, default='talk', choices=('paper', 'talk'),
help="Context for plot [default=talk]")
parser.add_argument("--dpi", type=float, default=None,
help="Figure resolution in dots per square inch [default=auto]")
args = parser.parse_args()
main(args)
| DamienIrving/ocean-analysis | visualisation/plot_zonal_ensemble.py | Python | mit | 16,584 |
# Copyright 2014 Red Hat, 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.
import collections
import fractions
import itertools
from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import strutils
from oslo_utils import units
import six
import nova.conf
from nova import context
from nova import exception
from nova.i18n import _, _LI
from nova import objects
from nova.objects import fields
from nova.objects import instance as obj_instance
CONF = nova.conf.CONF
LOG = logging.getLogger(__name__)
MEMPAGES_SMALL = -1
MEMPAGES_LARGE = -2
MEMPAGES_ANY = -3
def get_vcpu_pin_set():
"""Parse vcpu_pin_set config.
:returns: a set of pcpu ids can be used by instances
"""
if not CONF.vcpu_pin_set:
return None
cpuset_ids = parse_cpu_spec(CONF.vcpu_pin_set)
if not cpuset_ids:
raise exception.Invalid(_("No CPUs available after parsing %r") %
CONF.vcpu_pin_set)
return cpuset_ids
def parse_cpu_spec(spec):
"""Parse a CPU set specification.
Each element in the list is either a single CPU number, a range of
CPU numbers, or a caret followed by a CPU number to be excluded
from a previous range.
:param spec: cpu set string eg "1-4,^3,6"
:returns: a set of CPU indexes
"""
cpuset_ids = set()
cpuset_reject_ids = set()
for rule in spec.split(','):
rule = rule.strip()
# Handle multi ','
if len(rule) < 1:
continue
# Note the count limit in the .split() call
range_parts = rule.split('-', 1)
if len(range_parts) > 1:
reject = False
if range_parts[0] and range_parts[0][0] == '^':
reject = True
range_parts[0] = str(range_parts[0][1:])
# So, this was a range; start by converting the parts to ints
try:
start, end = [int(p.strip()) for p in range_parts]
except ValueError:
raise exception.Invalid(_("Invalid range expression %r")
% rule)
# Make sure it's a valid range
if start > end:
raise exception.Invalid(_("Invalid range expression %r")
% rule)
# Add available CPU ids to set
if not reject:
cpuset_ids |= set(range(start, end + 1))
else:
cpuset_reject_ids |= set(range(start, end + 1))
elif rule[0] == '^':
# Not a range, the rule is an exclusion rule; convert to int
try:
cpuset_reject_ids.add(int(rule[1:].strip()))
except ValueError:
raise exception.Invalid(_("Invalid exclusion "
"expression %r") % rule)
else:
# OK, a single CPU to include; convert to int
try:
cpuset_ids.add(int(rule))
except ValueError:
raise exception.Invalid(_("Invalid inclusion "
"expression %r") % rule)
# Use sets to handle the exclusion rules for us
cpuset_ids -= cpuset_reject_ids
return cpuset_ids
def format_cpu_spec(cpuset, allow_ranges=True):
"""Format a libvirt CPU range specification.
Format a set/list of CPU indexes as a libvirt CPU range
specification. It allow_ranges is true, it will try to detect
continuous ranges of CPUs, otherwise it will just list each CPU
index explicitly.
:param cpuset: set (or list) of CPU indexes
:returns: a formatted CPU range string
"""
# We attempt to detect ranges, but don't bother with
# trying to do range negations to minimize the overall
# spec string length
if allow_ranges:
ranges = []
previndex = None
for cpuindex in sorted(cpuset):
if previndex is None or previndex != (cpuindex - 1):
ranges.append([])
ranges[-1].append(cpuindex)
previndex = cpuindex
parts = []
for entry in ranges:
if len(entry) == 1:
parts.append(str(entry[0]))
else:
parts.append("%d-%d" % (entry[0], entry[len(entry) - 1]))
return ",".join(parts)
else:
return ",".join(str(id) for id in sorted(cpuset))
def get_number_of_serial_ports(flavor, image_meta):
"""Get the number of serial consoles from the flavor or image.
If flavor extra specs is not set, then any image meta value is
permitted. If flavor extra specs *is* set, then this provides the
default serial port count. The image meta is permitted to override
the extra specs, but *only* with a lower value, i.e.:
- flavor hw:serial_port_count=4
VM gets 4 serial ports
- flavor hw:serial_port_count=4 and image hw_serial_port_count=2
VM gets 2 serial ports
- image hw_serial_port_count=6
VM gets 6 serial ports
- flavor hw:serial_port_count=4 and image hw_serial_port_count=6
Abort guest boot - forbidden to exceed flavor value
:param flavor: Flavor object to read extra specs from
:param image_meta: nova.objects.ImageMeta object instance
:returns: number of serial ports
"""
def get_number(obj, property):
num_ports = obj.get(property)
if num_ports is not None:
try:
num_ports = int(num_ports)
except ValueError:
raise exception.ImageSerialPortNumberInvalid(
num_ports=num_ports, property=property)
return num_ports
flavor_num_ports = get_number(flavor.extra_specs, "hw:serial_port_count")
image_num_ports = image_meta.properties.get("hw_serial_port_count", None)
if (flavor_num_ports and image_num_ports) is not None:
if image_num_ports > flavor_num_ports:
raise exception.ImageSerialPortNumberExceedFlavorValue()
return image_num_ports
return flavor_num_ports or image_num_ports or 1
class InstanceInfo(object):
def __init__(self, state=None, max_mem_kb=0, mem_kb=0, num_cpu=0,
cpu_time_ns=0, id=None):
"""Create a new Instance Info object
:param state: the running state, one of the power_state codes
:param max_mem_kb: (int) the maximum memory in KBytes allowed
:param mem_kb: (int) the memory in KBytes used by the instance
:param num_cpu: (int) the number of virtual CPUs for the
instance
:param cpu_time_ns: (int) the CPU time used in nanoseconds
:param id: a unique ID for the instance
"""
self.state = state
self.max_mem_kb = max_mem_kb
self.mem_kb = mem_kb
self.num_cpu = num_cpu
self.cpu_time_ns = cpu_time_ns
self.id = id
def __eq__(self, other):
return (self.__class__ == other.__class__ and
self.__dict__ == other.__dict__)
def _score_cpu_topology(topology, wanttopology):
"""Compare a topology against a desired configuration.
Calculate a score indicating how well a provided topology matches
against a preferred topology, where:
a score of 3 indicates an exact match for sockets, cores and
threads
a score of 2 indicates a match of sockets and cores, or sockets
and threads, or cores and threads
a score of 1 indicates a match of sockets or cores or threads
a score of 0 indicates no match
:param wanttopology: nova.objects.VirtCPUTopology instance for
preferred topology
:returns: score in range 0 (worst) to 3 (best)
"""
score = 0
if (wanttopology.sockets != -1 and
topology.sockets == wanttopology.sockets):
score = score + 1
if (wanttopology.cores != -1 and
topology.cores == wanttopology.cores):
score = score + 1
if (wanttopology.threads != -1 and
topology.threads == wanttopology.threads):
score = score + 1
return score
def _get_cpu_topology_constraints(flavor, image_meta):
"""Get the topology constraints declared in flavor or image
Extracts the topology constraints from the configuration defined in
the flavor extra specs or the image metadata. In the flavor this
will look for:
hw:cpu_sockets - preferred socket count
hw:cpu_cores - preferred core count
hw:cpu_threads - preferred thread count
hw:cpu_max_sockets - maximum socket count
hw:cpu_max_cores - maximum core count
hw:cpu_max_threads - maximum thread count
In the image metadata this will look at:
hw_cpu_sockets - preferred socket count
hw_cpu_cores - preferred core count
hw_cpu_threads - preferred thread count
hw_cpu_max_sockets - maximum socket count
hw_cpu_max_cores - maximum core count
hw_cpu_max_threads - maximum thread count
The image metadata must be strictly lower than any values set in
the flavor. All values are, however, optional.
:param flavor: Flavor object to read extra specs from
:param image_meta: nova.objects.ImageMeta object instance
:raises: exception.ImageVCPULimitsRangeExceeded if the maximum
counts set against the image exceed the maximum counts
set against the flavor
:raises: exception.ImageVCPUTopologyRangeExceeded if the preferred
counts set against the image exceed the maximum counts set
against the image or flavor
:returns: A two-tuple of objects.VirtCPUTopology instances. The
first element corresponds to the preferred topology,
while the latter corresponds to the maximum topology,
based on upper limits.
"""
# Obtain the absolute limits from the flavor
flvmaxsockets = int(flavor.extra_specs.get(
"hw:cpu_max_sockets", 65536))
flvmaxcores = int(flavor.extra_specs.get(
"hw:cpu_max_cores", 65536))
flvmaxthreads = int(flavor.extra_specs.get(
"hw:cpu_max_threads", 65536))
LOG.debug("Flavor limits %(sockets)d:%(cores)d:%(threads)d",
{"sockets": flvmaxsockets,
"cores": flvmaxcores,
"threads": flvmaxthreads})
# Get any customized limits from the image
props = image_meta.properties
maxsockets = props.get("hw_cpu_max_sockets", flvmaxsockets)
maxcores = props.get("hw_cpu_max_cores", flvmaxcores)
maxthreads = props.get("hw_cpu_max_threads", flvmaxthreads)
LOG.debug("Image limits %(sockets)d:%(cores)d:%(threads)d",
{"sockets": maxsockets,
"cores": maxcores,
"threads": maxthreads})
# Image limits are not permitted to exceed the flavor
# limits. ie they can only lower what the flavor defines
if ((maxsockets > flvmaxsockets) or
(maxcores > flvmaxcores) or
(maxthreads > flvmaxthreads)):
raise exception.ImageVCPULimitsRangeExceeded(
sockets=maxsockets,
cores=maxcores,
threads=maxthreads,
maxsockets=flvmaxsockets,
maxcores=flvmaxcores,
maxthreads=flvmaxthreads)
# Get any default preferred topology from the flavor
flvsockets = int(flavor.extra_specs.get("hw:cpu_sockets", -1))
flvcores = int(flavor.extra_specs.get("hw:cpu_cores", -1))
flvthreads = int(flavor.extra_specs.get("hw:cpu_threads", -1))
LOG.debug("Flavor pref %(sockets)d:%(cores)d:%(threads)d",
{"sockets": flvsockets,
"cores": flvcores,
"threads": flvthreads})
# If the image limits have reduced the flavor limits
# we might need to discard the preferred topology
# from the flavor
if ((flvsockets > maxsockets) or
(flvcores > maxcores) or
(flvthreads > maxthreads)):
flvsockets = flvcores = flvthreads = -1
# Finally see if the image has provided a preferred
# topology to use
sockets = props.get("hw_cpu_sockets", -1)
cores = props.get("hw_cpu_cores", -1)
threads = props.get("hw_cpu_threads", -1)
LOG.debug("Image pref %(sockets)d:%(cores)d:%(threads)d",
{"sockets": sockets,
"cores": cores,
"threads": threads})
# Image topology is not permitted to exceed image/flavor
# limits
if ((sockets > maxsockets) or
(cores > maxcores) or
(threads > maxthreads)):
raise exception.ImageVCPUTopologyRangeExceeded(
sockets=sockets,
cores=cores,
threads=threads,
maxsockets=maxsockets,
maxcores=maxcores,
maxthreads=maxthreads)
# If no preferred topology was set against the image
# then use the preferred topology from the flavor
# We use 'and' not 'or', since if any value is set
# against the image this invalidates the entire set
# of values from the flavor
if sockets == -1 and cores == -1 and threads == -1:
sockets = flvsockets
cores = flvcores
threads = flvthreads
LOG.debug("Chosen %(sockets)d:%(cores)d:%(threads)d limits "
"%(maxsockets)d:%(maxcores)d:%(maxthreads)d",
{"sockets": sockets, "cores": cores,
"threads": threads, "maxsockets": maxsockets,
"maxcores": maxcores, "maxthreads": maxthreads})
return (objects.VirtCPUTopology(sockets=sockets, cores=cores,
threads=threads),
objects.VirtCPUTopology(sockets=maxsockets, cores=maxcores,
threads=maxthreads))
def _get_possible_cpu_topologies(vcpus, maxtopology,
allow_threads):
"""Get a list of possible topologies for a vCPU count.
Given a total desired vCPU count and constraints on the maximum
number of sockets, cores and threads, return a list of
objects.VirtCPUTopology instances that represent every possible
topology that satisfies the constraints.
:param vcpus: total number of CPUs for guest instance
:param maxtopology: objects.VirtCPUTopology instance for upper
limits
:param allow_threads: True if the hypervisor supports CPU threads
:raises: exception.ImageVCPULimitsRangeImpossible if it is
impossible to achieve the total vcpu count given
the maximum limits on sockets, cores and threads
:returns: list of objects.VirtCPUTopology instances
"""
# Clamp limits to number of vcpus to prevent
# iterating over insanely large list
maxsockets = min(vcpus, maxtopology.sockets)
maxcores = min(vcpus, maxtopology.cores)
maxthreads = min(vcpus, maxtopology.threads)
if not allow_threads:
maxthreads = 1
LOG.debug("Build topologies for %(vcpus)d vcpu(s) "
"%(maxsockets)d:%(maxcores)d:%(maxthreads)d",
{"vcpus": vcpus, "maxsockets": maxsockets,
"maxcores": maxcores, "maxthreads": maxthreads})
# Figure out all possible topologies that match
# the required vcpus count and satisfy the declared
# limits. If the total vCPU count were very high
# it might be more efficient to factorize the vcpu
# count and then only iterate over its factors, but
# that's overkill right now
possible = []
for s in range(1, maxsockets + 1):
for c in range(1, maxcores + 1):
for t in range(1, maxthreads + 1):
if (t * c * s) != vcpus:
continue
possible.append(
objects.VirtCPUTopology(sockets=s,
cores=c,
threads=t))
# We want to
# - Minimize threads (ie larger sockets * cores is best)
# - Prefer sockets over cores
possible = sorted(possible, reverse=True,
key=lambda x: (x.sockets * x.cores,
x.sockets,
x.threads))
LOG.debug("Got %d possible topologies", len(possible))
if len(possible) == 0:
raise exception.ImageVCPULimitsRangeImpossible(vcpus=vcpus,
sockets=maxsockets,
cores=maxcores,
threads=maxthreads)
return possible
def _filter_for_numa_threads(possible, wantthreads):
"""Filter topologies which closest match to NUMA threads.
Determine which topologies provide the closest match to the number
of threads desired by the NUMA topology of the instance.
The possible topologies may not have any entries which match the
desired thread count. This method will find the topologies which
have the closest matching count. For example, if 'wantthreads' is 4
and the possible topologies has entries with 6, 3, 2 or 1 threads,
the topologies which have 3 threads will be identified as the
closest match not greater than 4 and will be returned.
:param possible: list of objects.VirtCPUTopology instances
:param wantthreads: desired number of threads
:returns: list of objects.VirtCPUTopology instances
"""
# First figure out the largest available thread
# count which is not greater than wantthreads
mostthreads = 0
for topology in possible:
if topology.threads > wantthreads:
continue
if topology.threads > mostthreads:
mostthreads = topology.threads
# Now restrict to just those topologies which
# match the largest thread count
bestthreads = []
for topology in possible:
if topology.threads != mostthreads:
continue
bestthreads.append(topology)
return bestthreads
def _sort_possible_cpu_topologies(possible, wanttopology):
"""Sort the topologies in order of preference.
Sort the provided list of possible topologies such that the
configurations which most closely match the preferred topology are
first.
:param possible: list of objects.VirtCPUTopology instances
:param wanttopology: objects.VirtCPUTopology instance for preferred
topology
:returns: sorted list of nova.objects.VirtCPUTopology instances
"""
# Look at possible topologies and score them according
# to how well they match the preferred topologies
# We don't use python's sort(), since we want to
# preserve the sorting done when populating the
# 'possible' list originally
scores = collections.defaultdict(list)
for topology in possible:
score = _score_cpu_topology(topology, wanttopology)
scores[score].append(topology)
# Build list of all possible topologies sorted
# by the match score, best match first
desired = []
desired.extend(scores[3])
desired.extend(scores[2])
desired.extend(scores[1])
desired.extend(scores[0])
return desired
def _get_desirable_cpu_topologies(flavor, image_meta, allow_threads=True,
numa_topology=None):
"""Identify desirable CPU topologies based for given constraints.
Look at the properties set in the flavor extra specs and the image
metadata and build up a list of all possible valid CPU topologies
that can be used in the guest. Then return this list sorted in
order of preference.
:param flavor: objects.Flavor instance to query extra specs from
:param image_meta: nova.objects.ImageMeta object instance
:param allow_threads: if the hypervisor supports CPU threads
:param numa_topology: objects.InstanceNUMATopology instance that
may contain additional topology constraints
(such as threading information) that should
be considered
:returns: sorted list of objects.VirtCPUTopology instances
"""
LOG.debug("Getting desirable topologies for flavor %(flavor)s "
"and image_meta %(image_meta)s, allow threads: %(threads)s",
{"flavor": flavor, "image_meta": image_meta,
"threads": allow_threads})
preferred, maximum = _get_cpu_topology_constraints(flavor, image_meta)
LOG.debug("Topology preferred %(preferred)s, maximum %(maximum)s",
{"preferred": preferred, "maximum": maximum})
possible = _get_possible_cpu_topologies(flavor.vcpus,
maximum,
allow_threads)
LOG.debug("Possible topologies %s", possible)
if numa_topology:
min_requested_threads = None
cell_topologies = [cell.cpu_topology for cell in numa_topology.cells
if cell.cpu_topology]
if cell_topologies:
min_requested_threads = min(
topo.threads for topo in cell_topologies)
if min_requested_threads:
if preferred.threads != -1:
min_requested_threads = min(preferred.threads,
min_requested_threads)
specified_threads = max(1, min_requested_threads)
LOG.debug("Filtering topologies best for %d threads",
specified_threads)
possible = _filter_for_numa_threads(possible,
specified_threads)
LOG.debug("Remaining possible topologies %s",
possible)
desired = _sort_possible_cpu_topologies(possible, preferred)
LOG.debug("Sorted desired topologies %s", desired)
return desired
def get_best_cpu_topology(flavor, image_meta, allow_threads=True,
numa_topology=None):
"""Identify best CPU topology for given constraints.
Look at the properties set in the flavor extra specs and the image
metadata and build up a list of all possible valid CPU topologies
that can be used in the guest. Then return the best topology to use
:param flavor: objects.Flavor instance to query extra specs from
:param image_meta: nova.objects.ImageMeta object instance
:param allow_threads: if the hypervisor supports CPU threads
:param numa_topology: objects.InstanceNUMATopology instance that
may contain additional topology constraints
(such as threading information) that should
be considered
:returns: an objects.VirtCPUTopology instance for best topology
"""
return _get_desirable_cpu_topologies(flavor, image_meta,
allow_threads, numa_topology)[0]
def _numa_cell_supports_pagesize_request(host_cell, inst_cell):
"""Determine whether the cell can accept the request.
:param host_cell: host cell to fit the instance cell onto
:param inst_cell: instance cell we want to fit
:raises: exception.MemoryPageSizeNotSupported if custom page
size not supported in host cell
:returns: the page size able to be handled by host_cell
"""
avail_pagesize = [page.size_kb for page in host_cell.mempages]
avail_pagesize.sort(reverse=True)
def verify_pagesizes(host_cell, inst_cell, avail_pagesize):
inst_cell_mem = inst_cell.memory * units.Ki
for pagesize in avail_pagesize:
if host_cell.can_fit_hugepages(pagesize, inst_cell_mem):
return pagesize
if inst_cell.pagesize == MEMPAGES_SMALL:
return verify_pagesizes(host_cell, inst_cell, avail_pagesize[-1:])
elif inst_cell.pagesize == MEMPAGES_LARGE:
return verify_pagesizes(host_cell, inst_cell, avail_pagesize[:-1])
elif inst_cell.pagesize == MEMPAGES_ANY:
return verify_pagesizes(host_cell, inst_cell, avail_pagesize)
else:
return verify_pagesizes(host_cell, inst_cell, [inst_cell.pagesize])
def _pack_instance_onto_cores(available_siblings,
instance_cell,
host_cell_id,
threads_per_core=1,
num_cpu_reserved=0):
"""Pack an instance onto a set of siblings.
Calculate the pinning for the given instance and its topology,
making sure that hyperthreads of the instance match up with those
of the host when the pinning takes effect. Also ensure that the
physical cores reserved for hypervisor on this host NUMA node do
not break any thread policies.
Currently the strategy for packing is to prefer siblings and try use
cores evenly by using emptier cores first. This is achieved by the
way we order cores in the sibling_sets structure, and the order in
which we iterate through it.
The main packing loop that iterates over the sibling_sets dictionary
will not currently try to look for a fit that maximizes number of
siblings, but will simply rely on the iteration ordering and picking
the first viable placement.
:param available_siblings: list of sets of CPU IDs corresponding to
available siblings per core
:param instance_cell: An instance of objects.InstanceNUMACell
describing the pinning requirements of the
instance
:param threads_per_core: number of threads per core in host's cell
:param num_cpu_reserved: number of pCPUs reserved for hypervisor
:returns: An instance of objects.InstanceNUMACell containing the
pinning information, the physical cores reserved and
potentially a new topology to be exposed to the
instance. None if there is no valid way to satisfy the
sibling requirements for the instance.
"""
LOG.debug('Packing an instance onto a set of siblings: '
' available_siblings: %(siblings)s'
' instance_cell: %(cells)s'
' host_cell_id: %(host_cell_id)s'
' threads_per_core: %(threads_per_core)s',
{'siblings': available_siblings,
'cells': instance_cell,
'host_cell_id': host_cell_id,
'threads_per_core': threads_per_core})
# We build up a data structure that answers the question: 'Given the
# number of threads I want to pack, give me a list of all the available
# sibling sets (or groups thereof) that can accommodate it'
sibling_sets = collections.defaultdict(list)
for sib in available_siblings:
for threads_no in range(1, len(sib) + 1):
sibling_sets[threads_no].append(sib)
LOG.debug('Built sibling_sets: %(siblings)s', {'siblings': sibling_sets})
pinning = None
threads_no = 1
def _orphans(instance_cell, threads_per_core):
"""Number of instance CPUs which will not fill up a host core.
Best explained by an example: consider set of free host cores as such:
[(0, 1), (3, 5), (6, 7, 8)]
This would be a case of 2 threads_per_core AKA an entry for 2 in the
sibling_sets structure.
If we attempt to pack a 5 core instance on it - due to the fact that we
iterate the list in order, we will end up with a single core of the
instance pinned to a thread "alone" (with id 6), and we would have one
'orphan' vcpu.
"""
return len(instance_cell) % threads_per_core
def _threads(instance_cell, threads_per_core):
"""Threads to expose to the instance via the VirtCPUTopology.
This is calculated by taking the GCD of the number of threads we are
considering at the moment, and the number of orphans. An example for
instance_cell = 6
threads_per_core = 4
So we can fit the instance as such:
[(0, 1, 2, 3), (4, 5, 6, 7), (8, 9, 10, 11)]
x x x x x x
We can't expose 4 threads, as that will not be a valid topology (all
cores exposed to the guest have to have an equal number of threads),
and 1 would be too restrictive, but we want all threads that guest sees
to be on the same physical core, so we take GCD of 4 (max number of
threads) and 2 (number of 'orphan' CPUs) and get 2 as the number of
threads.
"""
return fractions.gcd(threads_per_core, _orphans(instance_cell,
threads_per_core))
def _get_pinning(threads_no, sibling_set, instance_cores,
num_cpu_reserved=0):
"""Determines pCPUs/vCPUs mapping
Determines the pCPUs/vCPUs mapping regarding the number of
threads which can be used per cores and pCPUs reserved.
:param threads_no: Number of host threads per cores which can
be used to pin vCPUs according to the
policies :param sibling_set: List of
available threads per host cores on a
specific host NUMA node.
:param instance_cores: Set of vCPUs requested.
:param num_cpu_reserved: Number of additional host CPUs which
needs to be reserved.
NOTE: Depending on how host is configured (HT/non-HT) a thread can
be considered as an entire core.
"""
if threads_no * len(sibling_set) < (
len(instance_cores) + num_cpu_reserved):
return None, None
# Determines usable cores according the "threads number"
# constraint.
#
# For a sibling_set=[(0, 1, 2, 3), (4, 5, 6, 7)] and thread_no 1:
# usable_cores=[(0), (4),]
#
# For a sibling_set=[(0, 1, 2, 3), (4, 5, 6, 7)] and thread_no 2:
# usable_cores=[(0, 1), (4, 5)]
usable_cores = list(map(lambda s: list(s)[:threads_no], sibling_set))
# Determines the mapping vCPUs/pCPUs based on the sets of
# usable cores.
#
# For an instance_cores=[2, 3], usable_cores=[(0), (4)]
# vcpus_pinning=[(2, 0), (3, 4)]
vcpus_pinning = list(zip(sorted(instance_cores),
itertools.chain(*usable_cores)))
msg = _LI("Computed NUMA topology CPU pinning: usable pCPUs: "
"%(usable_cores)s, vCPUs mapping: %(vcpus_pinning)s")
msg_args = {
'usable_cores': usable_cores,
'vcpus_pinning': vcpus_pinning,
}
LOG.info(msg, msg_args)
cpuset_reserved = None
if num_cpu_reserved:
# Updates the pCPUs used based on vCPUs pinned to
#
# For vcpus_pinning=[(0, 2), (1, 3)], usable_cores=[(2, 3), (4, 5)]
# usable_cores=[(), (4, 5)]
for vcpu, pcpu in vcpus_pinning:
for sib in usable_cores:
if pcpu in sib:
sib.remove(pcpu)
# Determines the pCPUs reserved for hypervisor
#
# For usable_cores=[(), (4, 5)], num_cpu_reserved=1
# cpuset_reserved=[4]
cpuset_reserved = set(list(
itertools.chain(*usable_cores))[:num_cpu_reserved])
msg = _LI("Computed NUMA topology reserved pCPUs: usable pCPUs: "
"%(usable_cores)s, reserved pCPUs: %(cpuset_reserved)s")
msg_args = {
'usable_cores': usable_cores,
'cpuset_reserved': cpuset_reserved,
}
LOG.info(msg, msg_args)
return vcpus_pinning, cpuset_reserved
if (instance_cell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.REQUIRE):
LOG.debug("Requested 'require' thread policy for %d cores",
len(instance_cell))
elif (instance_cell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.PREFER):
LOG.debug("Requested 'prefer' thread policy for %d cores",
len(instance_cell))
elif (instance_cell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.ISOLATE):
LOG.debug("Requested 'isolate' thread policy for %d cores",
len(instance_cell))
else:
LOG.debug("User did not specify a thread policy. Using default "
"for %d cores", len(instance_cell))
if (instance_cell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.ISOLATE):
# make sure we have at least one fully free core
if threads_per_core not in sibling_sets:
LOG.debug('Host does not have any fully free thread sibling sets.'
'It is not possible to emulate a non-SMT behavior '
'for the isolate policy without this.')
return
pinning, cpuset_reserved = _get_pinning(
1, # we only want to "use" one thread per core
sibling_sets[threads_per_core],
instance_cell.cpuset,
num_cpu_reserved=num_cpu_reserved)
else: # REQUIRE, PREFER (explicit, implicit)
# NOTE(ndipanov): We iterate over the sibling sets in descending order
# of cores that can be packed. This is an attempt to evenly distribute
# instances among physical cores
for threads_no, sibling_set in sorted(
(t for t in sibling_sets.items()), reverse=True):
# NOTE(sfinucan): The key difference between the require and
# prefer policies is that require will not settle for non-siblings
# if this is all that is available. Enforce this by ensuring we're
# using sibling sets that contain at least one sibling
if (instance_cell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.REQUIRE):
if threads_no <= 1:
LOG.debug('Skipping threads_no: %s, as it does not satisfy'
' the require policy', threads_no)
continue
pinning, cpuset_reserved = _get_pinning(
threads_no, sibling_set,
instance_cell.cpuset,
num_cpu_reserved=num_cpu_reserved)
if pinning:
break
# NOTE(sfinucan): If siblings weren't available and we're using PREFER
# (implicitly or explicitly), fall back to linear assignment across
# cores
if (instance_cell.cpu_thread_policy !=
fields.CPUThreadAllocationPolicy.REQUIRE and
not pinning):
pinning = list(zip(sorted(instance_cell.cpuset),
itertools.chain(*sibling_set)))
threads_no = _threads(instance_cell, threads_no)
if not pinning:
return
LOG.debug('Selected cores for pinning: %s, in cell %s', pinning,
host_cell_id)
topology = objects.VirtCPUTopology(sockets=1,
cores=len(pinning) // threads_no,
threads=threads_no)
instance_cell.pin_vcpus(*pinning)
instance_cell.cpu_topology = topology
instance_cell.id = host_cell_id
instance_cell.cpuset_reserved = cpuset_reserved
return instance_cell
def _numa_fit_instance_cell_with_pinning(host_cell, instance_cell,
num_cpu_reserved=0):
"""Determine if cells can be pinned to a host cell.
:param host_cell: objects.NUMACell instance - the host cell that
the instance should be pinned to
:param instance_cell: objects.InstanceNUMACell instance without any
pinning information
:param num_cpu_reserved: int - number of pCPUs reserved for hypervisor
:returns: objects.InstanceNUMACell instance with pinning information,
or None if instance cannot be pinned to the given host
"""
required_cpus = len(instance_cell.cpuset) + num_cpu_reserved
if host_cell.avail_cpus < required_cpus:
LOG.debug('Not enough available CPUs to schedule instance. '
'Oversubscription is not possible with pinned instances. '
'Required: %(required)d (%(vcpus)d + %(num_cpu_reserved)d), '
'actual: %(actual)d',
{'required': required_cpus,
'vcpus': len(instance_cell.cpuset),
'actual': host_cell.avail_cpus,
'num_cpu_reserved': num_cpu_reserved})
return
if host_cell.avail_memory < instance_cell.memory:
LOG.debug('Not enough available memory to schedule instance. '
'Oversubscription is not possible with pinned instances. '
'Required: %(required)s, actual: %(actual)s',
{'required': instance_cell.memory,
'actual': host_cell.memory})
return
if host_cell.siblings:
LOG.debug('Using thread siblings for packing')
# Try to pack the instance cell onto cores
numa_cell = _pack_instance_onto_cores(
host_cell.free_siblings, instance_cell, host_cell.id,
max(map(len, host_cell.siblings)),
num_cpu_reserved=num_cpu_reserved)
else:
if (instance_cell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.REQUIRE):
LOG.info(_LI("Host does not support hyperthreading or "
"hyperthreading is disabled, but 'require' "
"threads policy was requested."))
return
# Straightforward to pin to available cpus when there is no
# hyperthreading on the host
free_cpus = [set([cpu]) for cpu in host_cell.free_cpus]
numa_cell = _pack_instance_onto_cores(
free_cpus, instance_cell, host_cell.id,
num_cpu_reserved=num_cpu_reserved)
if not numa_cell:
LOG.debug('Failed to map instance cell CPUs to host cell CPUs')
return numa_cell
def _numa_fit_instance_cell(host_cell, instance_cell, limit_cell=None,
cpuset_reserved=0):
"""Ensure an instance cell can fit onto a host cell
Ensure an instance cell can fit onto a host cell and, if so, return
a new objects.InstanceNUMACell with the id set to that of the host.
Returns None if the instance cell exceeds the limits of the host.
:param host_cell: host cell to fit the instance cell onto
:param instance_cell: instance cell we want to fit
:param limit_cell: an objects.NUMATopologyLimit or None
:param cpuset_reserved: An int to indicate the number of CPUs overhead
:returns: objects.InstanceNUMACell with the id set to that of the
host, or None
"""
LOG.debug('Attempting to fit instance cell %(cell)s on host_cell '
'%(host_cell)s', {'cell': instance_cell, 'host_cell': host_cell})
# NOTE (ndipanov): do not allow an instance to overcommit against
# itself on any NUMA cell
if instance_cell.memory > host_cell.memory:
LOG.debug('Not enough host cell memory to fit instance cell. '
'Required: %(required)d, actual: %(actual)d',
{'required': instance_cell.memory,
'actual': host_cell.memory})
return
if len(instance_cell.cpuset) + cpuset_reserved > len(host_cell.cpuset):
LOG.debug('Not enough host cell CPUs to fit instance cell. Required: '
'%(required)d + %(cpuset_reserved)d as overhead, '
'actual: %(actual)d',
{'required': len(instance_cell.cpuset),
'actual': len(host_cell.cpuset),
'cpuset_reserved': cpuset_reserved})
return
if instance_cell.cpu_pinning_requested:
LOG.debug('Pinning has been requested')
new_instance_cell = _numa_fit_instance_cell_with_pinning(
host_cell, instance_cell, cpuset_reserved)
if not new_instance_cell:
return
new_instance_cell.pagesize = instance_cell.pagesize
instance_cell = new_instance_cell
elif limit_cell:
LOG.debug('No pinning requested, considering limitations on usable cpu'
' and memory')
memory_usage = host_cell.memory_usage + instance_cell.memory
cpu_usage = host_cell.cpu_usage + len(instance_cell.cpuset)
cpu_limit = len(host_cell.cpuset) * limit_cell.cpu_allocation_ratio
ram_limit = host_cell.memory * limit_cell.ram_allocation_ratio
if memory_usage > ram_limit:
LOG.debug('Host cell has limitations on usable memory. There is '
'not enough free memory to schedule this instance. '
'Usage: %(usage)d, limit: %(limit)d',
{'usage': memory_usage, 'limit': ram_limit})
return
if cpu_usage > cpu_limit:
LOG.debug('Host cell has limitations on usable CPUs. There are '
'not enough free CPUs to schedule this instance. '
'Usage: %(usage)d, limit: %(limit)d',
{'usage': memory_usage, 'limit': cpu_limit})
return
pagesize = None
if instance_cell.pagesize:
pagesize = _numa_cell_supports_pagesize_request(
host_cell, instance_cell)
if not pagesize:
LOG.debug('Host does not support requested memory pagesize. '
'Requested: %d kB', instance_cell.pagesize)
return
instance_cell.id = host_cell.id
instance_cell.pagesize = pagesize
return instance_cell
def _get_flavor_image_meta(key, flavor, image_meta):
"""Extract both flavor- and image-based variants of metadata."""
flavor_key = ':'.join(['hw', key])
image_key = '_'.join(['hw', key])
flavor_policy = flavor.get('extra_specs', {}).get(flavor_key)
image_policy = image_meta.properties.get(image_key)
return flavor_policy, image_policy
def _numa_get_pagesize_constraints(flavor, image_meta):
"""Return the requested memory page size
:param flavor: a Flavor object to read extra specs from
:param image_meta: nova.objects.ImageMeta object instance
:raises: MemoryPageSizeInvalid if flavor extra spec or image
metadata provides an invalid hugepage value
:raises: MemoryPageSizeForbidden if flavor extra spec request
conflicts with image metadata request
:returns: a page size requested or MEMPAGES_*
"""
def check_and_return_pages_size(request):
if request == "any":
return MEMPAGES_ANY
elif request == "large":
return MEMPAGES_LARGE
elif request == "small":
return MEMPAGES_SMALL
else:
try:
request = int(request)
except ValueError:
try:
request = strutils.string_to_bytes(
request, return_int=True) / units.Ki
except ValueError:
request = 0
if request <= 0:
raise exception.MemoryPageSizeInvalid(pagesize=request)
return request
flavor_request, image_request = _get_flavor_image_meta(
'mem_page_size', flavor, image_meta)
if not flavor_request and image_request:
raise exception.MemoryPageSizeForbidden(
pagesize=image_request,
against="<empty>")
if not flavor_request:
# Nothing was specified for hugepages,
# let's the default process running.
return None
pagesize = check_and_return_pages_size(flavor_request)
if image_request and (pagesize in (MEMPAGES_ANY, MEMPAGES_LARGE)):
return check_and_return_pages_size(image_request)
elif image_request:
raise exception.MemoryPageSizeForbidden(
pagesize=image_request,
against=flavor_request)
return pagesize
def _numa_get_flavor_cpu_map_list(flavor):
hw_numa_cpus = []
extra_specs = flavor.get("extra_specs", {})
for cellid in range(objects.ImageMetaProps.NUMA_NODES_MAX):
cpuprop = "hw:numa_cpus.%d" % cellid
if cpuprop not in extra_specs:
break
hw_numa_cpus.append(
parse_cpu_spec(extra_specs[cpuprop]))
if hw_numa_cpus:
return hw_numa_cpus
def _numa_get_cpu_map_list(flavor, image_meta):
flavor_cpu_list = _numa_get_flavor_cpu_map_list(flavor)
image_cpu_list = image_meta.properties.get("hw_numa_cpus", None)
if flavor_cpu_list is None:
return image_cpu_list
else:
if image_cpu_list is not None:
raise exception.ImageNUMATopologyForbidden(
name='hw_numa_cpus')
return flavor_cpu_list
def _numa_get_flavor_mem_map_list(flavor):
hw_numa_mem = []
extra_specs = flavor.get("extra_specs", {})
for cellid in range(objects.ImageMetaProps.NUMA_NODES_MAX):
memprop = "hw:numa_mem.%d" % cellid
if memprop not in extra_specs:
break
hw_numa_mem.append(int(extra_specs[memprop]))
if hw_numa_mem:
return hw_numa_mem
def _numa_get_mem_map_list(flavor, image_meta):
flavor_mem_list = _numa_get_flavor_mem_map_list(flavor)
image_mem_list = image_meta.properties.get("hw_numa_mem", None)
if flavor_mem_list is None:
return image_mem_list
else:
if image_mem_list is not None:
raise exception.ImageNUMATopologyForbidden(
name='hw_numa_mem')
return flavor_mem_list
def _get_cpu_policy_constraints(flavor, image_meta):
"""Validate and return the requested CPU policy."""
flavor_policy, image_policy = _get_flavor_image_meta(
'cpu_policy', flavor, image_meta)
if flavor_policy == fields.CPUAllocationPolicy.DEDICATED:
cpu_policy = flavor_policy
elif flavor_policy == fields.CPUAllocationPolicy.SHARED:
if image_policy == fields.CPUAllocationPolicy.DEDICATED:
raise exception.ImageCPUPinningForbidden()
cpu_policy = flavor_policy
elif image_policy == fields.CPUAllocationPolicy.DEDICATED:
cpu_policy = image_policy
else:
cpu_policy = fields.CPUAllocationPolicy.SHARED
return cpu_policy
def _get_cpu_thread_policy_constraints(flavor, image_meta):
"""Validate and return the requested CPU thread policy."""
flavor_policy, image_policy = _get_flavor_image_meta(
'cpu_thread_policy', flavor, image_meta)
if flavor_policy in [None, fields.CPUThreadAllocationPolicy.PREFER]:
policy = flavor_policy or image_policy
elif image_policy and image_policy != flavor_policy:
raise exception.ImageCPUThreadPolicyForbidden()
else:
policy = flavor_policy
return policy
def _numa_get_constraints_manual(nodes, flavor, cpu_list, mem_list):
cells = []
totalmem = 0
availcpus = set(range(flavor.vcpus))
for node in range(nodes):
mem = mem_list[node]
cpuset = cpu_list[node]
for cpu in cpuset:
if cpu > (flavor.vcpus - 1):
raise exception.ImageNUMATopologyCPUOutOfRange(
cpunum=cpu, cpumax=(flavor.vcpus - 1))
if cpu not in availcpus:
raise exception.ImageNUMATopologyCPUDuplicates(
cpunum=cpu)
availcpus.remove(cpu)
cells.append(objects.InstanceNUMACell(
id=node, cpuset=cpuset, memory=mem))
totalmem = totalmem + mem
if availcpus:
raise exception.ImageNUMATopologyCPUsUnassigned(
cpuset=str(availcpus))
if totalmem != flavor.memory_mb:
raise exception.ImageNUMATopologyMemoryOutOfRange(
memsize=totalmem,
memtotal=flavor.memory_mb)
return objects.InstanceNUMATopology(cells=cells)
def is_realtime_enabled(flavor):
flavor_rt = flavor.get('extra_specs', {}).get("hw:cpu_realtime")
return strutils.bool_from_string(flavor_rt)
def _get_realtime_mask(flavor, image):
"""Returns realtime mask based on flavor/image meta"""
flavor_mask, image_mask = _get_flavor_image_meta(
'cpu_realtime_mask', flavor, image)
# Image masks are used ahead of flavor masks as they will have more
# specific requirements
return image_mask or flavor_mask
def vcpus_realtime_topology(flavor, image):
"""Determines instance vCPUs used as RT for a given spec"""
mask = _get_realtime_mask(flavor, image)
if not mask:
raise exception.RealtimeMaskNotFoundOrInvalid()
vcpus_rt = parse_cpu_spec("0-%d,%s" % (flavor.vcpus - 1, mask))
if len(vcpus_rt) < 1:
raise exception.RealtimeMaskNotFoundOrInvalid()
return vcpus_rt
def _numa_get_constraints_auto(nodes, flavor):
if ((flavor.vcpus % nodes) > 0 or
(flavor.memory_mb % nodes) > 0):
raise exception.ImageNUMATopologyAsymmetric()
cells = []
for node in range(nodes):
ncpus = int(flavor.vcpus / nodes)
mem = int(flavor.memory_mb / nodes)
start = node * ncpus
cpuset = set(range(start, start + ncpus))
cells.append(objects.InstanceNUMACell(
id=node, cpuset=cpuset, memory=mem))
return objects.InstanceNUMATopology(cells=cells)
def get_emulator_threads_constraint(flavor, image_meta):
"""Determines the emulator threads policy"""
emu_threads_policy = flavor.get('extra_specs', {}).get(
'hw:emulator_threads_policy')
LOG.debug("emulator threads policy constraint: %s", emu_threads_policy)
if not emu_threads_policy:
return
if emu_threads_policy not in fields.CPUEmulatorThreadsPolicy.ALL:
raise exception.InvalidEmulatorThreadsPolicy(
requested=emu_threads_policy,
available=str(fields.CPUEmulatorThreadsPolicy.ALL))
if emu_threads_policy == fields.CPUEmulatorThreadsPolicy.ISOLATE:
# In order to make available emulator threads policy, a dedicated
# CPU policy is necessary.
cpu_policy = _get_cpu_policy_constraints(flavor, image_meta)
if cpu_policy != fields.CPUAllocationPolicy.DEDICATED:
raise exception.BadRequirementEmulatorThreadsPolicy()
return emu_threads_policy
def _validate_numa_nodes(nodes):
"""Validate NUMA nodes number
:param nodes: number of NUMA nodes
:raises: exception.InvalidNUMANodesNumber if the number of NUMA
nodes is less than 1 or not an integer
"""
if nodes is not None and (not strutils.is_int_like(nodes) or
int(nodes) < 1):
raise exception.InvalidNUMANodesNumber(nodes=nodes)
# TODO(sahid): Move numa related to hardware/numa.py
def numa_get_constraints(flavor, image_meta):
"""Return topology related to input request.
:param flavor: a flavor object to read extra specs from
:param image_meta: nova.objects.ImageMeta object instance
:raises: exception.InvalidNUMANodesNumber if the number of NUMA
nodes is less than 1 or not an integer
:raises: exception.ImageNUMATopologyForbidden if an attempt is made
to override flavor settings with image properties
:raises: exception.MemoryPageSizeInvalid if flavor extra spec or
image metadata provides an invalid hugepage value
:raises: exception.MemoryPageSizeForbidden if flavor extra spec
request conflicts with image metadata request
:raises: exception.ImageNUMATopologyIncomplete if the image
properties are not correctly specified
:raises: exception.ImageNUMATopologyAsymmetric if the number of
NUMA nodes is not a factor of the requested total CPUs or
memory
:raises: exception.ImageNUMATopologyCPUOutOfRange if an instance
CPU given in a NUMA mapping is not valid
:raises: exception.ImageNUMATopologyCPUDuplicates if an instance
CPU is specified in CPU mappings for two NUMA nodes
:raises: exception.ImageNUMATopologyCPUsUnassigned if an instance
CPU given in a NUMA mapping is not assigned to any NUMA node
:raises: exception.ImageNUMATopologyMemoryOutOfRange if sum of memory from
each NUMA node is not equal with total requested memory
:raises: exception.ImageCPUPinningForbidden if a CPU policy
specified in a flavor conflicts with one defined in image
metadata
:raises: exception.RealtimeConfigurationInvalid if realtime is
requested but dedicated CPU policy is not also requested
:raises: exception.RealtimeMaskNotFoundOrInvalid if realtime is
requested but no mask provided
:raises: exception.CPUThreadPolicyConfigurationInvalid if a CPU thread
policy conflicts with CPU allocation policy
:raises: exception.ImageCPUThreadPolicyForbidden if a CPU thread policy
specified in a flavor conflicts with one defined in image metadata
:returns: objects.InstanceNUMATopology, or None
"""
flavor_nodes, image_nodes = _get_flavor_image_meta(
'numa_nodes', flavor, image_meta)
if flavor_nodes and image_nodes:
raise exception.ImageNUMATopologyForbidden(
name='hw_numa_nodes')
nodes = None
if flavor_nodes:
_validate_numa_nodes(flavor_nodes)
nodes = int(flavor_nodes)
else:
_validate_numa_nodes(image_nodes)
nodes = image_nodes
pagesize = _numa_get_pagesize_constraints(
flavor, image_meta)
numa_topology = None
if nodes or pagesize:
nodes = nodes or 1
cpu_list = _numa_get_cpu_map_list(flavor, image_meta)
mem_list = _numa_get_mem_map_list(flavor, image_meta)
# If one property list is specified both must be
if ((cpu_list is None and mem_list is not None) or
(cpu_list is not None and mem_list is None)):
raise exception.ImageNUMATopologyIncomplete()
# If any node has data set, all nodes must have data set
if ((cpu_list is not None and len(cpu_list) != nodes) or
(mem_list is not None and len(mem_list) != nodes)):
raise exception.ImageNUMATopologyIncomplete()
if cpu_list is None:
numa_topology = _numa_get_constraints_auto(
nodes, flavor)
else:
numa_topology = _numa_get_constraints_manual(
nodes, flavor, cpu_list, mem_list)
# We currently support same pagesize for all cells.
for c in numa_topology.cells:
setattr(c, 'pagesize', pagesize)
cpu_policy = _get_cpu_policy_constraints(flavor, image_meta)
cpu_thread_policy = _get_cpu_thread_policy_constraints(flavor, image_meta)
rt_mask = _get_realtime_mask(flavor, image_meta)
emu_thread_policy = get_emulator_threads_constraint(flavor, image_meta)
# sanity checks
rt = is_realtime_enabled(flavor)
if rt and cpu_policy != fields.CPUAllocationPolicy.DEDICATED:
raise exception.RealtimeConfigurationInvalid()
if rt and not rt_mask:
raise exception.RealtimeMaskNotFoundOrInvalid()
if cpu_policy == fields.CPUAllocationPolicy.SHARED:
if cpu_thread_policy:
raise exception.CPUThreadPolicyConfigurationInvalid()
return numa_topology
if numa_topology:
for cell in numa_topology.cells:
cell.cpu_policy = cpu_policy
cell.cpu_thread_policy = cpu_thread_policy
else:
single_cell = objects.InstanceNUMACell(
id=0,
cpuset=set(range(flavor.vcpus)),
memory=flavor.memory_mb,
cpu_policy=cpu_policy,
cpu_thread_policy=cpu_thread_policy)
numa_topology = objects.InstanceNUMATopology(cells=[single_cell])
if emu_thread_policy:
numa_topology.emulator_threads_policy = emu_thread_policy
return numa_topology
def numa_fit_instance_to_host(
host_topology, instance_topology, limits=None,
pci_requests=None, pci_stats=None):
"""Fit the instance topology onto the host topology.
Given a host, instance topology, and (optional) limits, attempt to
fit instance cells onto all permutations of host cells by calling
the _fit_instance_cell method, and return a new InstanceNUMATopology
with its cell ids set to host cell ids of the first successful
permutation, or None.
:param host_topology: objects.NUMATopology object to fit an
instance on
:param instance_topology: objects.InstanceNUMATopology to be fitted
:param limits: objects.NUMATopologyLimits that defines limits
:param pci_requests: instance pci_requests
:param pci_stats: pci_stats for the host
:returns: objects.InstanceNUMATopology with its cell IDs set to host
cell ids of the first successful permutation, or None
"""
if not (host_topology and instance_topology):
LOG.debug("Require both a host and instance NUMA topology to "
"fit instance on host.")
return
elif len(host_topology) < len(instance_topology):
LOG.debug("There are not enough NUMA nodes on the system to schedule "
"the instance correctly. Required: %(required)s, actual: "
"%(actual)s",
{'required': len(instance_topology),
'actual': len(host_topology)})
return
emulator_threads_policy = None
if 'emulator_threads_policy' in instance_topology:
emulator_threads_policy = instance_topology.emulator_threads_policy
# TODO(ndipanov): We may want to sort permutations differently
# depending on whether we want packing/spreading over NUMA nodes
for host_cell_perm in itertools.permutations(
host_topology.cells, len(instance_topology)):
cells = []
for host_cell, instance_cell in zip(
host_cell_perm, instance_topology.cells):
try:
cpuset_reserved = 0
if (instance_topology.emulator_threads_isolated
and len(cells) == 0):
# For the case of isolate emulator threads, to
# make predictable where that CPU overhead is
# located we always configure it to be on host
# NUMA node associated to the guest NUMA node
# 0.
cpuset_reserved = 1
got_cell = _numa_fit_instance_cell(
host_cell, instance_cell, limits, cpuset_reserved)
except exception.MemoryPageSizeNotSupported:
# This exception will been raised if instance cell's
# custom pagesize is not supported with host cell in
# _numa_cell_supports_pagesize_request function.
break
if got_cell is None:
break
cells.append(got_cell)
if len(cells) != len(host_cell_perm):
continue
if not pci_requests or ((pci_stats is not None) and
pci_stats.support_requests(pci_requests, cells)):
return objects.InstanceNUMATopology(
cells=cells,
emulator_threads_policy=emulator_threads_policy)
def numa_get_reserved_huge_pages():
"""Returns reserved memory pages from host option.
Based from the compute node option reserved_huge_pages, generate
a well formatted list of dict which can be used to build a valid
NUMATopology.
:raises: exception.InvalidReservedMemoryPagesOption when
reserved_huge_pages option is not correctly set.
:returns: a list of dict ordered by NUMA node ids; keys of dict
are pages size and values of the number reserved.
"""
bucket = {}
if CONF.reserved_huge_pages:
try:
bucket = collections.defaultdict(dict)
for cfg in CONF.reserved_huge_pages:
try:
pagesize = int(cfg['size'])
except ValueError:
pagesize = strutils.string_to_bytes(
cfg['size'], return_int=True) / units.Ki
bucket[int(cfg['node'])][pagesize] = int(cfg['count'])
except (ValueError, TypeError, KeyError):
raise exception.InvalidReservedMemoryPagesOption(
conf=CONF.reserved_huge_pages)
return bucket
def _numa_pagesize_usage_from_cell(hostcell, instancecell, sign):
topo = []
for pages in hostcell.mempages:
if pages.size_kb == instancecell.pagesize:
topo.append(objects.NUMAPagesTopology(
size_kb=pages.size_kb,
total=pages.total,
used=max(0, pages.used +
instancecell.memory * units.Ki /
pages.size_kb * sign),
reserved=pages.reserved if 'reserved' in pages else 0))
else:
topo.append(pages)
return topo
def numa_usage_from_instances(host, instances, free=False):
"""Get host topology usage.
Sum the usage from all provided instances to report the overall
host topology usage.
:param host: objects.NUMATopology with usage information
:param instances: list of objects.InstanceNUMATopology
:param free: decrease, rather than increase, host usage
:returns: objects.NUMATopology including usage information
"""
if host is None:
return
instances = instances or []
cells = []
sign = -1 if free else 1
for hostcell in host.cells:
memory_usage = hostcell.memory_usage
cpu_usage = hostcell.cpu_usage
newcell = objects.NUMACell(
id=hostcell.id, cpuset=hostcell.cpuset, memory=hostcell.memory,
cpu_usage=0, memory_usage=0, mempages=hostcell.mempages,
pinned_cpus=hostcell.pinned_cpus, siblings=hostcell.siblings)
for instance in instances:
for cellid, instancecell in enumerate(instance.cells):
if instancecell.id == hostcell.id:
memory_usage = (
memory_usage + sign * instancecell.memory)
cpu_usage_diff = len(instancecell.cpuset)
if (instancecell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.ISOLATE and
hostcell.siblings):
cpu_usage_diff *= max(map(len, hostcell.siblings))
cpu_usage += sign * cpu_usage_diff
if (cellid == 0
and instance.emulator_threads_isolated):
# The emulator threads policy when defined
# with 'isolate' makes the instance to consume
# an additional pCPU as overhead. That pCPU is
# mapped on the host NUMA node related to the
# guest NUMA node 0.
cpu_usage += sign * len(instancecell.cpuset_reserved)
if instancecell.pagesize and instancecell.pagesize > 0:
newcell.mempages = _numa_pagesize_usage_from_cell(
hostcell, instancecell, sign)
if instance.cpu_pinning_requested:
pinned_cpus = set(instancecell.cpu_pinning.values())
if instancecell.cpuset_reserved:
pinned_cpus |= instancecell.cpuset_reserved
if free:
if (instancecell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.ISOLATE):
newcell.unpin_cpus_with_siblings(pinned_cpus)
else:
newcell.unpin_cpus(pinned_cpus)
else:
if (instancecell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.ISOLATE):
newcell.pin_cpus_with_siblings(pinned_cpus)
else:
newcell.pin_cpus(pinned_cpus)
newcell.cpu_usage = max(0, cpu_usage)
newcell.memory_usage = max(0, memory_usage)
cells.append(newcell)
return objects.NUMATopology(cells=cells)
# TODO(ndipanov): Remove when all code paths are using objects
def instance_topology_from_instance(instance):
"""Extract numa topology from myriad instance representations.
Until the RPC version is bumped to 5.x, an instance may be
represented as a dict, a db object, or an actual Instance object.
Identify the type received and return either an instance of
objects.InstanceNUMATopology if the instance's NUMA topology is
available, else None.
:param host: nova.objects.ComputeNode instance, or a db object or
dict
:returns: An instance of objects.NUMATopology or None
"""
if isinstance(instance, obj_instance.Instance):
# NOTE (ndipanov): This may cause a lazy-load of the attribute
instance_numa_topology = instance.numa_topology
else:
if 'numa_topology' in instance:
instance_numa_topology = instance['numa_topology']
elif 'uuid' in instance:
try:
instance_numa_topology = (
objects.InstanceNUMATopology.get_by_instance_uuid(
context.get_admin_context(), instance['uuid'])
)
except exception.NumaTopologyNotFound:
instance_numa_topology = None
else:
instance_numa_topology = None
if instance_numa_topology:
if isinstance(instance_numa_topology, six.string_types):
instance_numa_topology = (
objects.InstanceNUMATopology.obj_from_primitive(
jsonutils.loads(instance_numa_topology)))
elif isinstance(instance_numa_topology, dict):
# NOTE (ndipanov): A horrible hack so that we can use
# this in the scheduler, since the
# InstanceNUMATopology object is serialized raw using
# the obj_base.obj_to_primitive, (which is buggy and
# will give us a dict with a list of InstanceNUMACell
# objects), and then passed to jsonutils.to_primitive,
# which will make a dict out of those objects. All of
# this is done by scheduler.utils.build_request_spec
# called in the conductor.
#
# Remove when request_spec is a proper object itself!
dict_cells = instance_numa_topology.get('cells')
if dict_cells:
cells = [objects.InstanceNUMACell(
id=cell['id'],
cpuset=set(cell['cpuset']),
memory=cell['memory'],
pagesize=cell.get('pagesize'),
cpu_pinning=cell.get('cpu_pinning_raw'),
cpu_policy=cell.get('cpu_policy'),
cpu_thread_policy=cell.get('cpu_thread_policy'),
cpuset_reserved=cell.get('cpuset_reserved'))
for cell in dict_cells]
emulator_threads_policy = instance_numa_topology.get(
'emulator_threads_policy')
instance_numa_topology = objects.InstanceNUMATopology(
cells=cells,
emulator_threads_policy=emulator_threads_policy)
return instance_numa_topology
# TODO(ndipanov): Remove when all code paths are using objects
def host_topology_and_format_from_host(host):
"""Extract numa topology from myriad host representations.
Until the RPC version is bumped to 5.x, a host may be represented
as a dict, a db object, an actual ComputeNode object, or an
instance of HostState class. Identify the type received and return
either an instance of objects.NUMATopology if host's NUMA topology
is available, else None.
:returns: A two-tuple. The first element is either an instance of
objects.NUMATopology or None. The second element is a
boolean set to True if topology was in JSON format.
"""
was_json = False
try:
host_numa_topology = host.get('numa_topology')
except AttributeError:
host_numa_topology = host.numa_topology
if host_numa_topology is not None and isinstance(
host_numa_topology, six.string_types):
was_json = True
host_numa_topology = (objects.NUMATopology.obj_from_db_obj(
host_numa_topology))
return host_numa_topology, was_json
# TODO(ndipanov): Remove when all code paths are using objects
def get_host_numa_usage_from_instance(host, instance, free=False,
never_serialize_result=False):
"""Calculate new host NUMA usage from an instance's NUMA usage.
Until the RPC version is bumped to 5.x, both host and instance
representations may be provided in a variety of formats. Extract
both host and instance numa topologies from provided
representations, and use the latter to update the NUMA usage
information of the former.
:param host: nova.objects.ComputeNode instance, or a db object or
dict
:param instance: nova.objects.Instance instance, or a db object or
dict
:param free: if True the returned topology will have its usage
decreased instead
:param never_serialize_result: if True result will always be an
instance of objects.NUMATopology
:returns: a objects.NUMATopology instance if never_serialize_result
was True, else numa_usage in the format it was on the
host
"""
instance_numa_topology = instance_topology_from_instance(instance)
if instance_numa_topology:
instance_numa_topology = [instance_numa_topology]
host_numa_topology, jsonify_result = host_topology_and_format_from_host(
host)
updated_numa_topology = (
numa_usage_from_instances(
host_numa_topology, instance_numa_topology, free=free))
if updated_numa_topology is not None:
if jsonify_result and not never_serialize_result:
updated_numa_topology = updated_numa_topology._to_json()
return updated_numa_topology
| vmturbo/nova | nova/virt/hardware.py | Python | apache-2.0 | 71,201 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
import RPi.GPIO as GPIO
import spi
import signal
import time
class MFRC522:
NRSTPD = 22
MAX_LEN = 16
PCD_IDLE = 0x00
PCD_AUTHENT = 0x0E
PCD_RECEIVE = 0x08
PCD_TRANSMIT = 0x04
PCD_TRANSCEIVE = 0x0C
PCD_RESETPHASE = 0x0F
PCD_CALCCRC = 0x03
PICC_REQIDL = 0x26
PICC_REQALL = 0x52
PICC_ANTICOLL = 0x93
PICC_SElECTTAG = 0x93
PICC_AUTHENT1A = 0x60
PICC_AUTHENT1B = 0x61
PICC_READ = 0x30
PICC_WRITE = 0xA0
PICC_DECREMENT = 0xC0
PICC_INCREMENT = 0xC1
PICC_RESTORE = 0xC2
PICC_TRANSFER = 0xB0
PICC_HALT = 0x50
MI_OK = 0
MI_NOTAGERR = 1
MI_ERR = 2
Reserved00 = 0x00
CommandReg = 0x01
CommIEnReg = 0x02
DivlEnReg = 0x03
CommIrqReg = 0x04
DivIrqReg = 0x05
ErrorReg = 0x06
Status1Reg = 0x07
Status2Reg = 0x08
FIFODataReg = 0x09
FIFOLevelReg = 0x0A
WaterLevelReg = 0x0B
ControlReg = 0x0C
BitFramingReg = 0x0D
CollReg = 0x0E
Reserved01 = 0x0F
Reserved10 = 0x10
ModeReg = 0x11
TxModeReg = 0x12
RxModeReg = 0x13
TxControlReg = 0x14
TxAutoReg = 0x15
TxSelReg = 0x16
RxSelReg = 0x17
RxThresholdReg = 0x18
DemodReg = 0x19
Reserved11 = 0x1A
Reserved12 = 0x1B
MifareReg = 0x1C
Reserved13 = 0x1D
Reserved14 = 0x1E
SerialSpeedReg = 0x1F
Reserved20 = 0x20
CRCResultRegM = 0x21
CRCResultRegL = 0x22
Reserved21 = 0x23
ModWidthReg = 0x24
Reserved22 = 0x25
RFCfgReg = 0x26
GsNReg = 0x27
CWGsPReg = 0x28
ModGsPReg = 0x29
TModeReg = 0x2A
TPrescalerReg = 0x2B
TReloadRegH = 0x2C
TReloadRegL = 0x2D
TCounterValueRegH = 0x2E
TCounterValueRegL = 0x2F
Reserved30 = 0x30
TestSel1Reg = 0x31
TestSel2Reg = 0x32
TestPinEnReg = 0x33
TestPinValueReg = 0x34
TestBusReg = 0x35
AutoTestReg = 0x36
VersionReg = 0x37
AnalogTestReg = 0x38
TestDAC1Reg = 0x39
TestDAC2Reg = 0x3A
TestADCReg = 0x3B
Reserved31 = 0x3C
Reserved32 = 0x3D
Reserved33 = 0x3E
Reserved34 = 0x3F
serNum = []
def __init__(self, dev='/dev/spidev0.0', spd=1000000):
spi.openSPI(device=dev,speed=spd)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(22, GPIO.OUT)
GPIO.output(self.NRSTPD, 1)
self.MFRC522_Init()
def MFRC522_Reset(self):
self.Write_MFRC522(self.CommandReg, self.PCD_RESETPHASE)
def Write_MFRC522(self, addr, val):
spi.transfer(((addr<<1)&0x7E,val))
def Read_MFRC522(self, addr):
val = spi.transfer((((addr<<1)&0x7E) | 0x80,0))
return val[1]
def SetBitMask(self, reg, mask):
tmp = self.Read_MFRC522(reg)
self.Write_MFRC522(reg, tmp | mask)
def ClearBitMask(self, reg, mask):
tmp = self.Read_MFRC522(reg);
self.Write_MFRC522(reg, tmp & (~mask))
def AntennaOn(self):
temp = self.Read_MFRC522(self.TxControlReg)
if(~(temp & 0x03)):
self.SetBitMask(self.TxControlReg, 0x03)
def AntennaOff(self):
self.ClearBitMask(self.TxControlReg, 0x03)
def MFRC522_ToCard(self,command,sendData):
backData = []
backLen = 0
status = self.MI_ERR
irqEn = 0x00
waitIRq = 0x00
lastBits = None
n = 0
i = 0
if command == self.PCD_AUTHENT:
irqEn = 0x12
waitIRq = 0x10
if command == self.PCD_TRANSCEIVE:
irqEn = 0x77
waitIRq = 0x30
self.Write_MFRC522(self.CommIEnReg, irqEn|0x80)
self.ClearBitMask(self.CommIrqReg, 0x80)
self.SetBitMask(self.FIFOLevelReg, 0x80)
self.Write_MFRC522(self.CommandReg, self.PCD_IDLE);
while(i<len(sendData)):
self.Write_MFRC522(self.FIFODataReg, sendData[i])
i = i+1
self.Write_MFRC522(self.CommandReg, command)
if command == self.PCD_TRANSCEIVE:
self.SetBitMask(self.BitFramingReg, 0x80)
i = 2000
while True:
n = self.Read_MFRC522(self.CommIrqReg)
i = i - 1
if ~((i!=0) and ~(n&0x01) and ~(n&waitIRq)):
break
self.ClearBitMask(self.BitFramingReg, 0x80)
if i != 0:
if (self.Read_MFRC522(self.ErrorReg) & 0x1B)==0x00:
status = self.MI_OK
if n & irqEn & 0x01:
status = self.MI_NOTAGERR
if command == self.PCD_TRANSCEIVE:
n = self.Read_MFRC522(self.FIFOLevelReg)
lastBits = self.Read_MFRC522(self.ControlReg) & 0x07
if lastBits != 0:
backLen = (n-1)*8 + lastBits
else:
backLen = n*8
if n == 0:
n = 1
if n > self.MAX_LEN:
n = self.MAX_LEN
i = 0
while i<n:
backData.append(self.Read_MFRC522(self.FIFODataReg))
i = i + 1;
else:
status = self.MI_ERR
return (status,backData,backLen)
def MFRC522_Request(self, reqMode):
status = None
backBits = None
TagType = []
self.Write_MFRC522(self.BitFramingReg, 0x07)
TagType.append(reqMode);
(status,backData,backBits) = self.MFRC522_ToCard(self.PCD_TRANSCEIVE, TagType)
if ((status != self.MI_OK) | (backBits != 0x10)):
status = self.MI_ERR
return (status,backBits)
def MFRC522_Anticoll(self):
backData = []
serNumCheck = 0
serNum = []
self.Write_MFRC522(self.BitFramingReg, 0x00)
serNum.append(self.PICC_ANTICOLL)
serNum.append(0x20)
(status,backData,backBits) = self.MFRC522_ToCard(self.PCD_TRANSCEIVE,serNum)
if(status == self.MI_OK):
i = 0
if len(backData)==5:
while i<4:
serNumCheck = serNumCheck ^ backData[i]
i = i + 1
if serNumCheck != backData[i]:
status = self.MI_ERR
else:
status = self.MI_ERR
return (status,backData)
def CalulateCRC(self, pIndata):
self.ClearBitMask(self.DivIrqReg, 0x04)
self.SetBitMask(self.FIFOLevelReg, 0x80);
i = 0
while i<len(pIndata):
self.Write_MFRC522(self.FIFODataReg, pIndata[i])
i = i + 1
self.Write_MFRC522(self.CommandReg, self.PCD_CALCCRC)
i = 0xFF
while True:
n = self.Read_MFRC522(self.DivIrqReg)
i = i - 1
if not ((i != 0) and not (n&0x04)):
break
pOutData = []
pOutData.append(self.Read_MFRC522(self.CRCResultRegL))
pOutData.append(self.Read_MFRC522(self.CRCResultRegM))
return pOutData
def MFRC522_SelectTag(self, serNum):
backData = []
buf = []
buf.append(self.PICC_SElECTTAG)
buf.append(0x70)
i = 0
while i<5:
buf.append(serNum[i])
i = i + 1
pOut = self.CalulateCRC(buf)
buf.append(pOut[0])
buf.append(pOut[1])
(status, backData, backLen) = self.MFRC522_ToCard(self.PCD_TRANSCEIVE, buf)
if (status == self.MI_OK) and (backLen == 0x18):
print "Size: " + str(backData[0])
return backData[0]
else:
return 0
def MFRC522_Auth(self, authMode, BlockAddr, Sectorkey, serNum):
buff = []
# First byte should be the authMode (A or B)
buff.append(authMode)
# Second byte is the trailerBlock (usually 7)
buff.append(BlockAddr)
# Now we need to append the authKey which usually is 6 bytes of 0xFF
i = 0
while(i < len(Sectorkey)):
buff.append(Sectorkey[i])
i = i + 1
i = 0
# Next we append the first 4 bytes of the UID
while(i < 4):
buff.append(serNum[i])
i = i +1
# Now we start the authentication itself
(status, backData, backLen) = self.MFRC522_ToCard(self.PCD_AUTHENT,buff)
# Check if an error occurred
if not(status == self.MI_OK):
print "AUTH ERROR!!"
if not (self.Read_MFRC522(self.Status2Reg) & 0x08) != 0:
print "AUTH ERROR(status2reg & 0x08) != 0"
# Return the status
return status
def MFRC522_StopCrypto1(self):
self.ClearBitMask(self.Status2Reg, 0x08)
def MFRC522_Read(self, blockAddr):
recvData = []
recvData.append(self.PICC_READ)
recvData.append(blockAddr)
pOut = self.CalulateCRC(recvData)
recvData.append(pOut[0])
recvData.append(pOut[1])
(status, backData, backLen) = self.MFRC522_ToCard(self.PCD_TRANSCEIVE, recvData)
if not(status == self.MI_OK):
print "Error while reading!"
i = 0
if len(backData) == 16:
print "Sector "+str(blockAddr)+" "+str(backData)
def MFRC522_Write(self, blockAddr, writeData):
buff = []
buff.append(self.PICC_WRITE)
buff.append(blockAddr)
crc = self.CalulateCRC(buff)
buff.append(crc[0])
buff.append(crc[1])
(status, backData, backLen) = self.MFRC522_ToCard(self.PCD_TRANSCEIVE, buff)
if not(status == self.MI_OK) or not(backLen == 4) or not((backData[0] & 0x0F) == 0x0A):
status = self.MI_ERR
print str(backLen)+" backdata &0x0F == 0x0A "+str(backData[0]&0x0F)
if status == self.MI_OK:
i = 0
buf = []
while i < 16:
buf.append(writeData[i])
i = i + 1
crc = self.CalulateCRC(buf)
buf.append(crc[0])
buf.append(crc[1])
(status, backData, backLen) = self.MFRC522_ToCard(self.PCD_TRANSCEIVE,buf)
if not(status == self.MI_OK) or not(backLen == 4) or not((backData[0] & 0x0F) == 0x0A):
print "Error while writing"
if status == self.MI_OK:
print "Data written"
def MFRC522_DumpClassic1K(self, key, uid):
i = 0
while i < 64:
status = self.MFRC522_Auth(self.PICC_AUTHENT1A, i, key, uid)
# Check if authenticated
if status == self.MI_OK:
self.MFRC522_Read(i)
else:
print "Authentication error"
i = i+1
def MFRC522_Init(self):
GPIO.output(self.NRSTPD, 1)
self.MFRC522_Reset();
self.Write_MFRC522(self.TModeReg, 0x8D)
self.Write_MFRC522(self.TPrescalerReg, 0x3E)
self.Write_MFRC522(self.TReloadRegL, 30)
self.Write_MFRC522(self.TReloadRegH, 0)
self.Write_MFRC522(self.TxAutoReg, 0x40)
self.Write_MFRC522(self.ModeReg, 0x3D)
self.AntennaOn()
| kmachnicki/work-time-guardian | embedded/MFRC522.py | Python | mit | 10,125 |
from ui import Summarizer
# legacy reasons, sum bots running using old interface
from core import (summarize_url,
ArticleExtractionFail)
| SalmaanP/samacharbot2 | smrzr/__init__.py | Python | gpl-3.0 | 156 |
"""Randomized eigenvalue calculation"""
from scipy.sparse.linalg import LinearOperator, aslinearoperator
from scipy.sparse import identity
from scipy.linalg import qr, eig, eigh
import numpy as np
from time import time
__all__ = ['randomhep', 'nystrom', 'randsvd', 'randomghep']
def randomhep(A, k, p = 20, twopass = False):
"""
Randomized algorithm for Hermitian eigenvalue problems
Returns k largest eigenvalues computed using the randomized algorithm
Parameters:
-----------
A : {SparseMatrix,DenseMatrix,LinearOperator} n x n
Hermitian matrix operator whose eigenvalues need to be estimated
k : int,
number of eigenvalues/vectors to be estimated
p : int, optional
oversampling parameter which can improve accuracy of resulting solution
Default: 20
twopass : bool,
determines if matrix-vector product is to be performed twice
Default: False
Returns:
--------
w : ndarray, (k,)
eigenvalues arranged in descending order
u : ndarray, (n,k)
eigenvectors arranged according to eigenvalues
References:
-----------
.. [1] Halko, Nathan, Per-Gunnar Martinsson, and Joel A. Tropp. "Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions." SIAM review 53.2 (2011): 217-288.
Examples:
---------
>>> import numpy as np
>>> A = np.diag(0.95**np.arange(100))
>>> w, v = RandomizedHEP(A, 10, twopass = True)
"""
#Get matrix sizes
m, n = A.shape
Aop = aslinearoperator(A)
#For square matrices only
assert m == n
#Oversample
k = k + p
#Generate gaussian random matrix
Omega = np.random.randn(n,k)
Y = np.zeros((m,k), dtype = 'd')
for i in np.arange(k):
Y[:,i] = Aop.matvec(Omega[:,i])
q,_ = qr(Y, mode = 'economic')
if twopass == True:
B = np.zeros((k,k),dtype = 'd')
for i in np.arange(k):
Aq = Aop.matvec(q[:,i])
for j in np.arange(k):
B[i,j] = np.dot(q[:,j].T,Aq)
else:
from scipy.linalg import inv, pinv,svd, pinv2
temp = np.dot(Omega.T, Y)
temp2 = np.dot(q.T,Omega)
temp3 = np.dot(q.T,Y)
B = np.dot(pinv2(temp2.T), np.dot(temp, pinv2(temp2)))
Binv = np.dot(pinv(temp3.T),np.dot(temp, pinv2(temp3)))
B = inv(Binv)
#Eigen subproblem
w, v = eigh(B)
#Reverse eigenvalues in descending order
w = w[::-1]
#Compute eigenvectors
u = np.dot(q, v[:,::-1])
k -= p
return w[:k], u[:,:k]
def nystrom(A, k, p = 20, twopass = False):
"""Randomized algorithm for Hermitian eigenvalue problems
Parameters:
A = LinearOperator n x n
hermitian matrix operator whose eigenvalues need to be estimated
k = int,
number of eigenvalues/vectors to be estimated
twopass = bool,
determines if matrix-vector product is to be performed twice
Returns:
w = double, k
eigenvalues
u = n x k
eigenvectors
"""
#Get matrix sizes
m, n = A.shape
#For square matrices only
assert m == n
#Oversample
k = k + p
#Generate gaussian random matrix
Omega = np.random.randn(n,k)
Y = np.zeros((m,k), dtype = 'd')
for i in np.arange(k):
Y[:,i] = A.matvec(Omega[:,i])
q,_ = qr(Y, mode = 'economic')
Aq = np.zeros((n,k), dtype = 'd')
for i in np.arange(k):
Aq[:,i] = A.matvec(q[:,i])
T = np.dot(q.T, Aq)
from scipy.linalg import cholesky, svd, inv
R = cholesky(inv(T), lower = True)
B = np.dot(Aq, R)
u, s, _ = svd(B)
k -= p
return s[:k]**2., u[:,:k]
def RandomizedSVD(A, k, p = 20):
"""Randomized algorithm for Hermitian eigenvalue problems
Parameters:
A = LinearOperator n x n
operator whose singular values need to be estimated
k = int,
number of eigenvalues/vectors to be estimated
Returns:
"""
#Get matrix sizes
m, n = A.shape
#For square matrices only
assert m == n
#Oversample
k = k + p
#Generate gaussian random matrix
Omega = np.random.randn(n,k)
Y = np.zeros((m,k), dtype = 'd')
for i in np.arange(k):
Y[:,i] = A.matvec(Omega[:,i])
q,_ = qr(Y, mode = 'economic')
Atq = np.zeros((n,k), dtype = 'd')
for i in np.arange(k):
Atq[:,i] = A.rmatvec(q[:,i])
from scipy.linalg import svd
u, s, vt = svd(Atq.T, full_matrices = False)
diff = Y - np.dot(q, np.dot(q.T,Y))
err = np.max(np.apply_along_axis(np.linalg.norm, 0, diff))
from math import pi
print "A posterior error is ", 10.*np.sqrt(2./pi)*err
k = k - p
return np.dot(q, u[:,:k]), s[:k], vt[:k,:].T
def randomghep(A, B, k, p = 20, BinvA = None, twopass = True, \
verbose = False, error = False):
"""
Randomized algorithm for Generalized Hermitian Eigenvalue problem
A approx (BU) * Lambda *(BU)^*
Computes k largest eigenvalues and eigenvectors
Modified from randomized algorithm for EV/SVD of A
"""
m, n = A.shape
assert m == n
#Oversample
k = k + p
#Initialize quantities
Omega = np.random.randn(n,k)
Yh = np.zeros_like(Omega, dtype = 'd')
Y = np.zeros_like(Omega, dtype = 'd')
start = time()
#Form matrix vector products with C = B^{-1}A
if BinvA is None:
for i in np.arange(k):
Yh[:,i] = A.matvec(Omega[:,i])
Y[:,i] = B.solve(Yh[:,i])
else:
for i in np.arange(k):
Y[:,i] = BinvA.matvec(Omega[:,i])
matvectime = time()-start
if verbose:
print "Matvec time in eigenvalue calculation is %g " %(matvectime)
#Compute Y = Q*R such that Q'*B*Q = I, R can be discarded
start = time()
q, Bq, _ = Aorthonormalize(B, Y, verbose = False)
Borthtime = time()-start
if verbose:
print "B-orthonormalization time in eigenvalue calculation is %g " \
%(Borthtime)
T = np.zeros((k,k), dtype = 'd')
start = time()
if twopass == True:
for i in np.arange(k):
Aq = A.matvec(q[:,i])
for j in np.arange(k):
T[i,j] = np.dot(Aq,q[:,j])
else:
for i in np.arange(k):
Yh[:,i] = B.matvec(Y[:,i])
from scipy.linalg import inv
OAO = np.dot(Omega.T, Yh)
QtBO = np.dot(Bq.T, Omega)
T = np.dot(inv(QtBO.T), np.dot(OAO, inv(QtBO)))
eigcalctime = time()-start
if verbose:
print "Calculating eigenvalues took %g" %(eigcalctime)
print "Total time taken for Eigenvalue calculations is %g" %\
(matvectime + Borthtime + eigcalctime)
#Eigen subproblem
w, v = eigh(T)
#Reverse eigenvalues in descending order
w = w[::-1]
#Compute eigenvectors
u = np.dot(q, v[:,::-1])
k = k - p
if error:
#Compute error estimate
r = 5
O = np.random.randn(n,r)
err = np.zeros((r,), dtype = 'd')
AO = np.zeros((n,r), dtype = 'd')
BinvAO = np.zeros((n,r), dtype = 'd')
for i in np.arange(r):
AO[:,i] = A.matvec(O[:,i])
BinvAO[:,i] = B.solve(AO[:,i])
diff = BinvAO[:,i] - np.dot(q,np.dot(q.T,AO[:,i]))
err[i] = np.sqrt(np.dot(diff.T, B.matvec(diff)) )
BinvNorm = np.max(np.apply_along_axis(np.linalg.norm, 0, q))
alpha = 10.
from math import pi
print "Using r = %i and alpha = %g" %(r,alpha)
print "Error in B-norm is %g" %\
(alpha*np.sqrt(2./pi)*BinvNorm*np.max(err)/np.max(w))
return w[:k], u[:,:k]
if __name__ == '__main__':
n = 100
x = np.linspace(0,1,n)
X, Y = np.meshgrid(x, x)
Q = np.exp(-np.abs(X-Y))
class LowRank:
def __init__(self, Q, n):
self.Q = Q
self.shape = (n,n)
def matvec(self, x):
return np.dot(Q,x)
mat = LowRank(Q,n)
matop = aslinearoperator(mat)
l,v = RandomizedHEP(matop, k = 10, twopass = False)
le, ve = eig(Q)
le = np.real(le)
#Test A-orthonormalize
z = np.random.randn(n,10)
q,_,r = Aorthonormalize(matop,z,verbose = False)
class Identity:
def __init__(self, n):
self.shape = (n,n)
def matvec(self, x):
return x
def solve(self, x):
return x
id_ = Identity(n)
l_, v_ = randomghep(matop, id_, 10)
| arvindks/kle | eigen/randomized.py | Python | gpl-3.0 | 7,613 |
# Generated by Django 2.0.13 on 2021-07-26 18:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("sponsors", "0032_sponsorcontact_accounting"),
]
operations = [
migrations.CreateModel(
name="TieredQuantity",
fields=[
(
"benefitfeature_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="sponsors.BenefitFeature",
),
),
("quantity", models.PositiveIntegerField()),
(
"package",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="sponsors.SponsorshipPackage",
),
),
],
options={
"verbose_name": "Tiered Quantity",
"verbose_name_plural": "Tiered Quantities",
"abstract": False,
"base_manager_name": "objects",
},
bases=("sponsors.benefitfeature", models.Model),
),
migrations.CreateModel(
name="TieredQuantityConfiguration",
fields=[
(
"benefitfeatureconfiguration_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="sponsors.BenefitFeatureConfiguration",
),
),
("quantity", models.PositiveIntegerField()),
(
"package",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="sponsors.SponsorshipPackage",
),
),
],
options={
"verbose_name": "Tiered Benefit Configuration",
"verbose_name_plural": "Tiered Benefit Configurations",
"abstract": False,
"base_manager_name": "objects",
},
bases=("sponsors.benefitfeatureconfiguration", models.Model),
),
]
| manhhomienbienthuy/pythondotorg | sponsors/migrations/0033_tieredquantity_tieredquantityconfiguration.py | Python | apache-2.0 | 2,670 |
#!/usr/bin/env python
import reader
import numpy
import sys
from filters import removeDc as removeDc
from utils import writeListAsRaw, toFloat
import pdb
import matplotlib.pyplot as plt
if len( sys.argv ) != 2:
print "Usage: %s dat-file" % sys.argv[0]
sys.exit( 0 )
# ---------------------------------
# main
# ---------------------------------
channels = [ 0, 1 ]
#samples = None
def plot( *args ):
plt.cla()
for data in args:
plt.plot( range( len( data ) ), data )
plt.show()
count = 0
if __name__ == "__main__":
#samples = dict( ( ( channel, [] ) for channel in channels ) )
deltaSampling = 0.00011 * 240.0
deltaTime = 0
reader.load( sys.argv[1] )
for header, frSamples in reader.perframe( channels,
lambdaOp=lambda d: toFloat(removeDc(d)),
numFrames=3 ):
deltaTime += deltaSampling
frSamples = dict(( ( channel, numpy.array(data) )
for channel, data in frSamples.items() ))
max0 = max( [ abs(r) for r in frSamples[channels[0]] ] )
max1 = max( [ abs(r) for r in frSamples[channels[1]] ] )
diff = frSamples[0] - frSamples[1] * max0/max1
maxDiff = max( [ abs(r) for r in diff ] )
print "%f\t%f" % ( deltaTime, maxDiff )
if maxDiff > 5.0:
pdb.set_trace()
count += 1
# pdb.set_trace()
reader.cleanup()
| ap1/PixeeBel | code/pysrc/sb_test.py | Python | mit | 1,401 |
# IfcOpenShell - IFC toolkit and geometry engine
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
#
# This file is part of IfcOpenShell.
#
# IfcOpenShell 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 3 of the License, or
# (at your option) any later version.
#
# IfcOpenShell 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 IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {"person": None, "organisation": None}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
return self.file.createIfcPersonAndOrganization(self.settings["person"], self.settings["organisation"])
| IfcOpenShell/IfcOpenShell | src/ifcopenshell-python/ifcopenshell/api/owner/add_person_and_organisation.py | Python | lgpl-3.0 | 1,165 |
# 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 logging
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import tables
from horizon import tabs
from openstack_dashboard.api import sahara as saharaclient
import openstack_dashboard.dashboards.project.data_processing. \
data_plugins.tables as p_tables
import openstack_dashboard.dashboards.project.data_processing. \
data_plugins.tabs as p_tabs
LOG = logging.getLogger(__name__)
class PluginsView(tables.DataTableView):
table_class = p_tables.PluginsTable
template_name = 'project/data_processing.data_plugins/plugins.html'
def get_data(self):
try:
plugins = saharaclient.plugin_list(self.request)
except Exception:
plugins = []
msg = _('Unable to retrieve data processing plugins.')
exceptions.handle(self.request, msg)
return plugins
class PluginDetailsView(tabs.TabView):
tab_group_class = p_tabs.PluginDetailsTabs
template_name = 'project/data_processing.data_plugins/details.html'
| zouyapeng/horizon-newtouch | openstack_dashboard/dashboards/project/data_processing/data_plugins/views.py | Python | apache-2.0 | 1,599 |
"""
Copyright (c) 2014 Idiap Research Institute, http://www.idiap.ch/
Written by Kenneth Funes <kenneth.funes@idiap.ch>
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, 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 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, see <http://www.gnu.org/licenses/>
"""
from interactiveViewer import InteractiveViewer
from PySide import QtCore, QtGui
class RGBDViewer(QtGui.QMainWindow):
"""
Class to visualize and render a stream of RGB-D data
"""
updateSignal = QtCore.Signal()
def __init__(self, qtApp, close_callback = None, render3D=True, showRGB=True):
super(RGBDViewer, self).__init__()
self.mainLayout = QtGui.QHBoxLayout()
self.qtApp = qtApp
self.rgbLabel = QtGui.QLabel()
# A widget where there is some control over what is being displayed.
self.control_widget = QtGui.QWidget()
self.control_layout = QtGui.QVBoxLayout()
# An example of such control is the "pauseButton"
self.pauseButton = QtGui.QPushButton('Pause/Unpause')
# Whi is now added to the control widget
self.control_layout.addWidget(self.pauseButton)
self.control_widget.setLayout(self.control_layout)
self.mainLayout.addWidget(self.control_widget)
# Create the widget which allows to do OpenGL rendering
self.glWidget = InteractiveViewer()
self.glWidget.setFixedSize(600, 600)
self.glWidget.ambient = (0.5,0.5,0.5,1.0)
self.glWidget.position = (1.0,1.0,2.0)
self.glWidget.diffuse = (1.0,1.0,1.0,1.0)
self.glWidget.qtApp = qtApp
# Make the connection of the update signal
self.updateSignal.connect(self.glWidget.updateGL)
widget = QtGui.QWidget()
widget.setLayout(self.mainLayout)
self.setCentralWidget(widget)
# Whenever this "main window" is closed, then this function will be called
self.close_callback = close_callback
self.meshId = None
self.showRGB = showRGB
self.render3D = render3D
self.rgbLabel.setMinimumSize(QtCore.QSize(640, 480))
self.rgb_size = 400, 400
self.mainLayout.addWidget(self.rgbLabel)
self.glWidget.show()
if not render3D:
self.glWidget.hide()
#self.mainLayout.addWidget(self.glWidget)
def setNewData(self, frameData, frameIndex):
frameMesh = frameData[4]
if self.meshId is not None:
self.glWidget.removeObject(self.meshId)
self.meshId = None
if self.render3D:
self.meshId = self.glWidget.addObject(frameMesh)
if self.showRGB:
rgb_numpy = frameData[0]
image = QtGui.QImage(rgb_numpy, rgb_numpy.shape[1], rgb_numpy.shape[0], QtGui.QImage.Format_RGB888)
self.rgbLabel.setPixmap(QtGui.QPixmap.fromImage(image))
if rgb_numpy.shape[1] != self.rgb_size[0] or rgb_numpy.shape[0] != self.rgb_size[1]:
self.rgb_size = rgb_numpy.shape[1], rgb_numpy.shape[0]
self.resize(QtCore.QSize(self.rgb_size[0]+200, self.rgb_size[1]))
self.rgbLabel.resize(QtCore.QSize(self.rgb_size[0], self.rgb_size[1]))
self.updateSignal.emit()
def closeEvent(self, ev):
""" Closes event"""
self.glWidget.close()
if self.close_callback is not None:
self.close_callback() | idiap/rgbd | Rendering/RGBDViewer.py | Python | lgpl-3.0 | 3,867 |
import sys
from lib.clarifai_basic import ClarifaiCustomModel
clarifai = ClarifaiCustomModel()
print clarifai.predict_all(sys.argv[1]) | ovaskevich/HackMIT-2015 | training/predict.py | Python | mit | 136 |
#Echo server -chapter 3- echoserver.py
import socket, traceback
host = '' #bind to all interface
port = 51423
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((host, port))
s.listen(1)
while True:
try:
clientsock, clientaddr = s.accept()
except KeyboradInterrupt:
raise
except:
traceback.print_exc()
continue
#Process the connection
try:
print('Got connection from', clientsock.getpeername())
while True:
data = clientsock.recv(4096) #只会读取4kb
if not len(data):
break
clientsock.sendall(data) #然后再写
except (KeyboardInterrupt, SystemExit):
raise
except:
traceback.print_exc()
#close the connection
try:
clientsock.close()
except KeyboardInterrupt:
raise
except:
traceback.print_exc()
| jiangfire/python-network-py3code | chapter3/echosever.py | Python | gpl-2.0 | 799 |
import unittest
from sos.utilities import ImporterHelper
class ImporterHelperTests(unittest.TestCase):
def test_runs(self):
h = ImporterHelper(unittest)
modules = h.get_modules()
self.assertTrue('main' in modules)
if __name__ == "__main__":
unittest.main()
| beagles/sosreport-neutron | tests/importer_tests.py | Python | gpl-2.0 | 293 |
import theano
import theano.tensor as T
class GlobalPoolLayer(object):
def __init__(self, input):
avg_out = input.mean(3)
max_out = input.max(3)
l2_out = T.sqrt((input ** 2).mean(3))
self.output = T.concatenate([avg_out, max_out, l2_out], axis=2)
| IraKorshunova/kaggle-seizure-detection | seizure/cnn/global_pool_layer.py | Python | mit | 286 |
# -*- coding: utf-8 -*-
'''
Exodus Add-on
Copyright (C) 2016 Exodus
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/>.
'''
import re,urllib,urlparse
from resources.lib.modules import cleantitle
from resources.lib.modules import client
from resources.lib.modules import debrid
class source:
def __init__(self):
self.language = ['en']
self.domains = ['dailyreleases.net']
self.base_link = 'http://dailyreleases.net'
self.search_link = '/search/%s/feed/rss2/'
def movie(self, imdb, title, year):
try:
url = {'imdb': imdb, 'title': title, 'year': year}
url = urllib.urlencode(url)
return url
except:
return
def tvshow(self, imdb, tvdb, tvshowtitle, year):
try:
url = {'imdb': imdb, 'tvdb': tvdb, 'tvshowtitle': tvshowtitle, 'year': year}
url = urllib.urlencode(url)
return url
except:
return
def episode(self, url, imdb, tvdb, title, premiered, season, episode):
try:
if url == None: return
url = urlparse.parse_qs(url)
url = dict([(i, url[i][0]) if url[i] else (i, '') for i in url])
url['title'], url['premiered'], url['season'], url['episode'] = title, premiered, season, episode
url = urllib.urlencode(url)
return url
except:
return
def sources(self, url, hostDict, hostprDict):
try:
sources = []
if url == None: return sources
if debrid.status() == False: raise Exception()
data = urlparse.parse_qs(url)
data = dict([(i, data[i][0]) if data[i] else (i, '') for i in data])
title = data['tvshowtitle'] if 'tvshowtitle' in data else data['title']
hdlr = 'S%02dE%02d' % (int(data['season']), int(data['episode'])) if 'tvshowtitle' in data else data['year']
query = '%s S%02dE%02d' % (data['tvshowtitle'], int(data['season']), int(data['episode'])) if 'tvshowtitle' in data else '%s %s' % (data['title'], data['year'])
query = re.sub('(\\\|/| -|:|;|\*|\?|"|\'|<|>|\|)', ' ', query)
url = self.search_link % urllib.quote_plus(query)
url = urlparse.urljoin(self.base_link, url)
r = client.request(url)
posts = client.parseDOM(r, 'item')
hostDict = hostprDict + hostDict
items = []
for post in posts:
try:
items += zip(client.parseDOM(post, 'a', attrs={'target': '_blank'}), client.parseDOM(post, 'a', ret='href', attrs={'target': '_blank'}))
except:
pass
for item in items:
try:
name = item[0]
name = client.replaceHTMLCodes(name)
t = re.sub('(\.|\(|\[|\s)(\d{4}|S\d*E\d*|S\d*|3D)(\.|\)|\]|\s|)(.+|)', '', name)
if not cleantitle.get(t) == cleantitle.get(title): raise Exception()
y = re.findall('[\.|\(|\[|\s](\d{4}|S\d*E\d*|S\d*)[\.|\)|\]|\s]', name)[-1].upper()
if not y == hdlr: raise Exception()
fmt = re.sub('(.+)(\.|\(|\[|\s)(\d{4}|S\d*E\d*|S\d*)(\.|\)|\]|\s)', '', name.upper())
fmt = re.split('\.|\(|\)|\[|\]|\s|\-', fmt)
fmt = [i.lower() for i in fmt]
if any(i.endswith(('subs', 'sub', 'dubbed', 'dub')) for i in fmt): raise Exception()
if any(i in ['extras'] for i in fmt): raise Exception()
if '1080p' in fmt: quality = '1080p'
elif '720p' in fmt: quality = 'HD'
else: quality = 'SD'
if any(i in ['dvdscr', 'r5', 'r6'] for i in fmt): quality = 'SCR'
elif any(i in ['camrip', 'tsrip', 'hdcam', 'hdts', 'dvdcam', 'dvdts', 'cam', 'telesync', 'ts'] for i in fmt): quality = 'CAM'
info = []
if '3d' in fmt: info.append('3D')
try:
size = re.findall('((?:\d+\.\d+|\d+\,\d+|\d+) [M|G]B)', name)[-1]
div = 1 if size.endswith(' GB') else 1024
size = float(re.sub('[^0-9|/.|/,]', '', size))/div
size = '%.2f GB' % size
info.append(size)
except:
pass
if any(i in ['hevc', 'h265', 'x265'] for i in fmt): info.append('HEVC')
info = ' | '.join(info)
url = item[1]
if any(x in url for x in ['.rar', '.zip', '.iso']): raise Exception()
url = client.replaceHTMLCodes(url)
url = url.encode('utf-8')
host = re.findall('([\w]+[.][\w]+)$', urlparse.urlparse(url.strip().lower()).netloc)[0]
if not host in hostDict: raise Exception()
host = client.replaceHTMLCodes(host)
host = host.encode('utf-8')
sources.append({'source': host, 'quality': quality, 'provider': 'Dailyrls', 'url': url, 'info': info, 'direct': False, 'debridonly': True})
except:
pass
check = [i for i in sources if not i['quality'] == 'CAM']
if check: sources = check
return sources
except:
return sources
def resolve(self, url):
return url
| KodiColdkeys/coldkeys-addons | repository/plugin.video.white.devil/resources/lib/sources/dailyrls_wp_jh.py | Python | gpl-2.0 | 6,200 |
"""
__init__.py
ist303-miye
Copyright (C) 2017
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., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
"""
from .cwebview import *
| morpheby/ist303-miye | client/__init__.py | Python | gpl-3.0 | 755 |
"""Hadroid setup."""
from codecs import open
from os import path
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
with open(path.join(here, 'hadroid', '__init__.py'), encoding='utf-8') as f:
for line in f.readlines():
if line.startswith('__version__'):
version = line.split('=')[1].strip()[1:-1]
setup(
name='hadroid',
version=version,
description='A simple Gitter chatbot.',
long_description=long_description,
url='https://github.com/hadroid/hadroid',
author='Krzysztof Nowak',
author_email='kn@linux.com',
license='GPLv3',
entry_points={
'console_scripts': [
'hadroid = hadroid.hadroid:main',
],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='gitter chatbot',
packages=find_packages(exclude=['docs', 'tests']),
install_requires=[
'crontab==0.21.3',
'cached-property==1.3.0',
'docopt==0.6.2',
'pytz==2016.10',
'requests==2.11.1',
'scikit-learn==0.18.1',
'numpy==1.13.0',
'scipy==0.19.0',
'uservoice==0.0.23',
'python-dateutil==2.6.0',
'beautifulsoup4==4.6.0'
],
extras_require={
'dev': [
'check-manifest'
],
'test': [
'pytest==3.1.0',
'pytest-mock==1.6.2'
],
},
)
| hadroid/hadroid | setup.py | Python | gpl-3.0 | 1,882 |
'''
Implementing some of:
https://www.ietf.org/rfc/rfc1350.txt
Not implementing:
writing (putting) files
modes other then netascii
returning appropriate errors to the client
'''
import os
import struct
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
BLOCK_SIZE = 512
opcodeMap = {
'RRQ': '\x00\x01',
'WRQ': '\x00\x02',
'DATA': '\x00\x03',
'ACK': '\x00\x04',
'ERROR': '\x00\x05',
}
def intToBytes(i):
'''
eg 3 -> '\x00\x03'
'''
# TODO what happens if our file is so big the blockno exceeds the size of
# an unsigned short? that would be quite big, 2 bytes is 16 bits is 2^16, so
# file size would be 2^16 * 512 bytes = 2^15 kb = 2^5 MB = 32 MB. Hmm, not
# so big actually . . .
return struct.pack('>H', i)
def bytesToInt(byt):
'''
eg '\x00\x03' -> 3
'''
return struct.unpack('>H', byt)[0]
class BadDataError(Exception):
''' To be raised whenever the data is not as we would prefer.'''
pass
class FileSystem(object):
'''
FileSystem must provide a getFileData method.
'''
def __init__(self, directoryPath='/tmp/test_tftp'):
self.directoryPath = directoryPath
def readBlock(self, path, blockno):
with open(path, 'r') as fin:
fin.seek((blockno - 1) * BLOCK_SIZE)
return fin.read(BLOCK_SIZE)
def getFileData(self, requestedFilename, blockno):
# os.listdir only returns the names of the files in the dir, so compare
# against that just to make sure there's no directory traversal
# possibilities
for filename in os.listdir(self.directoryPath):
if requestedFilename == filename:
return self.readBlock(os.path.join(self.directoryPath,
filename), blockno)
# TODO this is an error we should return to the client (and is it
# really 'bad data'?)
raise BadDataError('File not found.')
class Ack(object):
def __init__(self, data):
if data[:2] != opcodeMap['ACK']:
# TODO return error messages to the client?
raise BadDataError('Message is not an ack.')
self.blockno = bytesToInt(data[2:])
class Download(object):
def __init__(self, readRequest, remoteHost, remotePort, fileSystem=None):
self.filename = readRequest.filename
self.mode = readRequest.mode
self.remoteHost = remoteHost
self.remotePort = remotePort
self.blockno = 0
self.fileSystem = fileSystem
if self.fileSystem is None:
self.fileSystem = FileSystem()
self.done = False
def makeNextDataMessage(self):
blockno, data = self.nextData()
return '%s%s%s' % (
opcodeMap['DATA'],
intToBytes(blockno),
data)
def nextData(self):
self.blockno += 1
data = self.fileSystem.getFileData(self.filename, self.blockno)
if len(data) < BLOCK_SIZE:
self.done = True
return self.blockno, data
def ack(self, message, host, port):
if host != self.remoteHost or port != self.remotePort:
# TODO error handling
raise BadDataError('Message from wrong place!')
ack = Ack(message)
if ack.blockno != self.blockno:
#TODO error handling
raise BadDataError('This ack is out of sequence. ack for blockno %s, current blockno %s' % (ack.blockno, self.blockno))
return self.makeNextDataMessage()
class TftpDownloadHandler(DatagramProtocol):
'''
Subclass of twisted.internet.protocol.DatagramProtocol
(http://twistedmatrix.com/documents/current/api/twisted.internet.protocol.DatagramProtocol.html)
Created when the server gets a read request for a file.
Expects only acks from the remoteHost and remotePort it knows.
As soon as TftpDownloadHandler is created it sends it's first data packet.
A transfer is established by sending a request ([...]
RRQ to read from it), and receiving a
positive reply, [...] the first data packet for read.
Data packets look like:
2 bytes 2 bytes n bytes
----------------------------------
| Opcode | Block # | Data |
----------------------------------
Figure 5-2: DATA packet
Where opcode is \x00\x03 DATA
We send the next block when we get an ack for the last block.
Ack packets look like:
2 bytes 2 bytes
---------------------
| Opcode | Block # |
---------------------
Figure 5-3: ACK packet
Where opcode is \x00\x04 ACK
We stop when:
'the host sending the final
ACK will wait for a while before terminating in order to retransmit
the final ACK if it has been lost. The acknowledger will know that
the ACK has been lost if it receives the final DATA packet again.
The host sending the last DATA must retransmit it until the packet is
acknowledged or the sending host times out.'
in other words: once we've received an ack for our last message, we can hang
up
'''
# timeout period should actually be longer than this I think
timeoutPeriod = 5
def __init__(self, readRequest, remoteHost, remotePort, fileSystem=None):
self.readRequest = readRequest
self.remoteHost = remoteHost
self.remotePort = remotePort
self.fileSystem = fileSystem
self.timeout = reactor.callLater(self.timeoutPeriod, self.timedOut)
def timedOut(self):
if self.transport is not None:
self.transport.stopListening()
def startProtocol(self):
# make download
self.download = Download(self.readRequest, self.remoteHost, self.remotePort, self.fileSystem)
# send first block
self.transport.write(self.download.makeNextDataMessage(), (self.remoteHost, self.remotePort))
def datagramReceived(self, data, (host, port)):
self.timeout.reset(self.timeoutPeriod)
if self.download.done:
self.transport.stopListening()
self.transport.write(self.download.ack(data, host, port), (host, port))
class ReadRequest(object):
'''
Parses a message from a client into a read request, or raises an error.
'''
def __init__(self, data):
if len(data) < 2 or data[:2] != opcodeMap['RRQ']:
# TODO should this be an error message of code 0?
raise BadDataError('Got a message that is not a read request: %s' % data)
filename, mode, nothing = data[2:].split('\x00')
self.filename = filename
self.mode = mode
class TftpReadRequestHandler(DatagramProtocol):
'''
Subclass of twisted.internet.protocol.DatagramProtocol
(http://twistedmatrix.com/documents/current/api/twisted.internet.protocol.DatagramProtocol.html)
Listens on port 69 and expects only read requests.
Read request looks like:
2 bytes string 1 byte string 1 byte
------------------------------------------------
| Opcode | Filename | 0 | Mode | 0 |
------------------------------------------------
Figure 5-1: RRQ/WRQ packet
Where Opcode is \x00\x01
'''
def datagramReceived(self, data, (host, port)):
'''
When we get a read request, start a new port sending data and listening
for acks by calling listenUDP with TftpDownloadHandler.
'''
readRequest = ReadRequest(data)
# Spec says pick a random port.
reactor.listenUDP(0, TftpDownloadHandler(readRequest, host, port))
if __name__ == '__main__':
reactor.listenUDP(69, TftpReadRequestHandler())
print 'serving files'
reactor.run()
| franbull/tftp | tftp.py | Python | mit | 7,997 |
# Powered by Python 2.7
# remove nodes with no stable partnerships
# run from the stable
from tulip import tlp
# The updateVisualization(centerViews = True) function can be called
# during script execution to update the opened views
# The pauseScript() function can be called to pause the script execution.
# To resume the script execution, you will have to click on the "Run script " button.
# The runGraphScript(scriptFile, graph) function can be called to launch
# another edited script on a tlp.Graph object.
# The scriptFile parameter defines the script name to call (in the form [a-zA-Z0-9_]+.py)
# The main(graph) function must be defined
# to run the script on the current graph
def main(graph):
stableDegree = graph.getDoubleProperty("stableDegree")
viewLayout = graph.getLayoutProperty("viewLayout")
viewMetric = graph.getDoubleProperty("viewMetric")
KCore = graph.getDoubleProperty("K-Core")
TentativeSIC = graph.getStringProperty("TentativeSIC")
acronym = graph.getStringProperty("acronym")
activityType = graph.getStringProperty("activityType")
barPower = graph.getDoubleProperty("barPower")
betwCentrality = graph.getDoubleProperty("betwCentrality")
birthDate = graph.getIntegerProperty("birthDate")
call = graph.getStringProperty("call")
city = graph.getStringProperty("city")
commDate = graph.getDoubleProperty("commDate")
country = graph.getStringProperty("country")
ecContribution = graph.getDoubleProperty("ecContribution")
ecMaxContribution = graph.getDoubleProperty("ecMaxContribution")
endDate = graph.getStringProperty("endDate")
endOfParticipation = graph.getBooleanProperty("endOfParticipation")
fundingScheme = graph.getStringProperty("fundingScheme")
intimacy = graph.getDoubleProperty("intimacy")
manager = graph.getBooleanProperty("manager")
moneyTogether = graph.getDoubleProperty("moneyTogether")
myMoney = graph.getDoubleProperty("myMoney")
name = graph.getStringProperty("name")
numPartners = graph.getDoubleProperty("numPartners")
numProjects = graph.getDoubleProperty("numProjects")
objective = graph.getStringProperty("objective")
orgId = graph.getStringProperty("orgId")
organizationUrl = graph.getStringProperty("organizationUrl")
postCode = graph.getStringProperty("postCode")
programme = graph.getStringProperty("programme")
projectNode = graph.getBooleanProperty("projectNode")
projectUrl = graph.getStringProperty("projectUrl")
projectsTogether = graph.getIntegerProperty("projectsTogether")
rcn = graph.getStringProperty("rcn")
relationshipValue = graph.getDoubleProperty("relationshipValue")
role = graph.getStringProperty("role")
shortName = graph.getStringProperty("shortName")
startDate = graph.getStringProperty("startDate")
status = graph.getStringProperty("status")
street = graph.getStringProperty("street")
topics = graph.getStringProperty("topics")
totMoney = graph.getDoubleProperty("totMoney")
totalCost = graph.getDoubleProperty("totalCost")
viewBorderColor = graph.getColorProperty("viewBorderColor")
viewBorderWidth = graph.getDoubleProperty("viewBorderWidth")
viewColor = graph.getColorProperty("viewColor")
viewFont = graph.getStringProperty("viewFont")
viewFontSize = graph.getIntegerProperty("viewFontSize")
viewIcon = graph.getStringProperty("viewIcon")
viewLabel = graph.getStringProperty("viewLabel")
viewLabelBorderColor = graph.getColorProperty("viewLabelBorderColor")
viewLabelBorderWidth = graph.getDoubleProperty("viewLabelBorderWidth")
viewLabelColor = graph.getColorProperty("viewLabelColor")
viewLabelPosition = graph.getIntegerProperty("viewLabelPosition")
viewRotation = graph.getDoubleProperty("viewRotation")
viewSelection = graph.getBooleanProperty("viewSelection")
viewShape = graph.getIntegerProperty("viewShape")
viewSize = graph.getSizeProperty("viewSize")
viewSrcAnchorShape = graph.getIntegerProperty("viewSrcAnchorShape")
viewSrcAnchorSize = graph.getSizeProperty("viewSrcAnchorSize")
viewTexture = graph.getStringProperty("viewTexture")
viewTgtAnchorShape = graph.getIntegerProperty("viewTgtAnchorShape")
viewTgtAnchorSize = graph.getSizeProperty("viewTgtAnchorSize")
wBarPower = graph.getDoubleProperty("wBarPower")
weightedBarPower = graph.getDoubleProperty("weightedBarPower")
stablePartners = graph.getDoubleProperty('stablePartners')
for n in graph.getNodes():
stablePartners[n] = stableDegree[n] / 2 # there are two edges for each partners, one in and one out.
if stableDegree[n] == 0:
graph.delNode(n)
# neighbors = []
# for e in graph.getInOutEdges(n):
# source = graph.source(e)
# target = graph.target(e)
# if source != n and source not in neighbors:
# neighbors.append(source)
# if target != n and target not in neighbors:
# neighbors.append(target)
# if len(neighbors) < 2:
# toDelete.append(n)
#
# for node in toDelete:
# graph.delNode(node)
#
| spaghetti-open-data/ODFest2017-horizon2020-network | H2020_Code_2017/remove_no_stable.py | Python | mit | 4,992 |
from django.db import models
from django.utils.translation import gettext_lazy as _
from .managers import SiteMessageManager
class TargetSite(models.Model):
"""
Target site where to display site messages.
"""
TARGET_SITE_PUBLIC, TARGET_SITE_LIBRARY, TARGET_SITE_JOURNAL = 'P', 'L', 'J'
TARGET_SITE_CHOICES = (
(TARGET_SITE_PUBLIC, _('Public')),
(TARGET_SITE_LIBRARY, _('Tableau de bord des bibliothèques')),
(TARGET_SITE_JOURNAL, _('Tableau de bord des revues')),
)
site = models.CharField(
verbose_name=_('Site cible'),
choices=TARGET_SITE_CHOICES,
blank=False,
null=False,
default=TARGET_SITE_PUBLIC,
max_length=8,
help_text=_('Site cible'),
)
""" The target site. """
class Meta:
verbose_name = _('Site cible')
verbose_name_plural = _('Sites cibles')
def __str__(self):
for key, site in self.TARGET_SITE_CHOICES:
if key == self.site:
return str(site)
return self.site
class SiteMessage(models.Model):
"""
Site message to be displayed on the targeted site.
"""
label = models.CharField(
verbose_name=_('Libelé'),
blank=False,
null=False,
default='',
max_length=64,
help_text=_("Pour l'administration."),
)
""" The administration label. """
message = models.TextField(
verbose_name=_('Message'),
help_text=_('Message à afficher. Peut contenir du HTML.'),
)
""" The message to be displayed. """
level = models.CharField(
verbose_name=_('Niveau'),
choices=(
('DEBUG', _('Normal (gris)')),
('INFO', _('Information (vert)')),
('WARNING', _('Avertissement (jaune)')),
('ERROR', _('Alerte (orange)')),
('CRITICAL', _('Critique (rouge)')),
),
default='DEBUG',
max_length=8,
help_text=_("Niveau du message (couleur d'affichage)."),
)
""" The level of the message, which will detemine it's displayed color. """
target_sites = models.ManyToManyField(
TargetSite,
verbose_name=_('Sites cibles'),
related_name='+',
blank=False,
)
""" The targeted sites where the message should be displayed. """
active = models.BooleanField(
verbose_name=_('Actif'),
default=False,
help_text=_('Pour activer manuellement le message.'),
)
""" Switch to manualy activate the message. """
start_date = models.DateTimeField(
verbose_name=_("Date de début d'affichage"),
blank=True,
null=True,
help_text=_("Date à laquelle débuter l'affichage du message."),
)
""" Date and time when to start displaying the message. """
end_date = models.DateTimeField(
verbose_name=_("Date de fin d'affichage"),
blank=True,
null=True,
help_text=_("Date à laquelle arrêter l'affichage du message."),
)
""" Date and time when to stop displaying the message. """
setting = models.CharField(
verbose_name=_('Réglage'),
blank=True,
null=True,
max_length=64,
help_text=_('Si le site contient un réglage avec ce nom et que ce réglage est à \
<em>True</em>, le message sera affiché.'),
)
""" The name of a site setting to display the message if it's set to True. """
objects = SiteMessageManager()
class Meta:
verbose_name = _('Message global du site')
verbose_name_plural = _('Messages globaux du site')
def __str__(self):
return self.label
| erudit/zenon | eruditorg/apps/public/site_messages/models.py | Python | gpl-3.0 | 3,681 |
#!/usr/bin/python
# (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
Element Software Account Manager
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'certified'}
DOCUMENTATION = '''
module: na_elementsw_account
short_description: NetApp Element Software Manage Accounts
extends_documentation_fragment:
- netapp.solidfire
version_added: '2.7'
author: NetApp Ansible Team (ng-ansibleteam@netapp.com)
description:
- Create, destroy, or update accounts on Element SW
options:
state:
description:
- Whether the specified account should exist or not.
required: true
choices: ['present', 'absent']
element_username:
description:
- Unique username for this account. (May be 1 to 64 characters in length).
required: true
new_element_username:
description:
- New name for the user account.
initiator_secret:
description:
- CHAP secret to use for the initiator. Should be 12-16 characters long and impenetrable.
- The CHAP initiator secrets must be unique and cannot be the same as the target CHAP secret.
- If not specified, a random secret is created.
target_secret:
description:
- CHAP secret to use for the target (mutual CHAP authentication).
- Should be 12-16 characters long and impenetrable.
- The CHAP target secrets must be unique and cannot be the same as the initiator CHAP secret.
- If not specified, a random secret is created.
attributes:
description: List of Name/Value pairs in JSON object format.
account_id:
description:
- The ID of the account to manage or update.
status:
description:
- Status of the account.
'''
EXAMPLES = """
- name: Create Account
na_elementsw_account:
hostname: "{{ elementsw_hostname }}"
username: "{{ elementsw_username }}"
password: "{{ elementsw_password }}"
state: present
element_username: TenantA
- name: Modify Account
na_elementsw_account:
hostname: "{{ elementsw_hostname }}"
username: "{{ elementsw_username }}"
password: "{{ elementsw_password }}"
state: present
element_username: TenantA
new_element_username: TenantA-Renamed
- name: Delete Account
na_elementsw_account:
hostname: "{{ elementsw_hostname }}"
username: "{{ elementsw_username }}"
password: "{{ elementsw_password }}"
state: absent
element_username: TenantA-Renamed
"""
RETURN = """
"""
import traceback
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils._text import to_native
import ansible.module_utils.netapp as netapp_utils
from ansible.module_utils.netapp_elementsw_module import NaElementSWModule
HAS_SF_SDK = netapp_utils.has_sf_sdk()
class ElementSWAccount(object):
"""
Element SW Account
"""
def __init__(self):
self.argument_spec = netapp_utils.ontap_sf_host_argument_spec()
self.argument_spec.update(dict(
state=dict(required=True, choices=['present', 'absent']),
element_username=dict(required=True, type='str'),
account_id=dict(required=False, type='int', default=None),
new_element_username=dict(required=False, type='str', default=None),
initiator_secret=dict(required=False, type='str'),
target_secret=dict(required=False, type='str'),
attributes=dict(required=False, type='dict'),
status=dict(required=False, type='str'),
))
self.module = AnsibleModule(
argument_spec=self.argument_spec,
supports_check_mode=True
)
params = self.module.params
# set up state variables
self.state = params['state']
self.element_username = params['element_username']
self.account_id = params['account_id']
self.new_element_username = params['new_element_username']
self.initiator_secret = params['initiator_secret']
self.target_secret = params['target_secret']
self.attributes = params['attributes']
self.status = params['status']
if HAS_SF_SDK is False:
self.module.fail_json(msg="Unable to import the Element SW Python SDK")
else:
self.sfe = netapp_utils.create_sf_connection(module=self.module)
self.elementsw_helper = NaElementSWModule(self.sfe)
# add telemetry attributes
if self.attributes is not None:
self.attributes.update(self.elementsw_helper.set_element_attributes(source='na_elementsw_account'))
else:
self.attributes = self.elementsw_helper.set_element_attributes(source='na_elementsw_account')
def get_account(self):
"""
Get Account
:description: Get Account object from account id
:return: Details about the account. None if not found.
:rtype: object (Account object)
"""
account_list = self.sfe.list_accounts()
account_obj = None
for account in account_list.accounts:
if account.username == self.element_username:
# Update self.account_id:
if self.account_id is not None:
if account.account_id == self.account_id:
account_obj = account
else:
self.account_id = account.account_id
account_obj = account
return account_obj
def create_account(self):
"""
Create the Account
"""
try:
self.sfe.add_account(username=self.element_username,
initiator_secret=self.initiator_secret,
target_secret=self.target_secret,
attributes=self.attributes)
except Exception as e:
self.module.fail_json(msg='Error creating account %s: %s)' % (self.element_username, to_native(e)),
exception=traceback.format_exc())
def delete_account(self):
"""
Delete the Account
"""
try:
self.sfe.remove_account(account_id=self.account_id)
except Exception as e:
self.module.fail_json(msg='Error deleting account %s: %s' % (self.account_id, to_native(e)),
exception=traceback.format_exc())
def update_account(self):
"""
Update the Account
"""
try:
self.sfe.modify_account(account_id=self.account_id,
username=self.new_element_username,
status=self.status,
initiator_secret=self.initiator_secret,
target_secret=self.target_secret,
attributes=self.attributes)
except Exception as e:
self.module.fail_json(msg='Error updating account %s: %s' % (self.account_id, to_native(e)),
exception=traceback.format_exc())
def apply(self):
"""
Process the account operation on the Element OS Cluster
"""
changed = False
account_exists = False
update_account = False
account_detail = self.get_account()
if account_detail:
account_exists = True
if self.state == 'absent':
changed = True
elif self.state == 'present':
# Check if we need to update the account
if account_detail.username is not None and self.new_element_username is not None and \
account_detail.username != self.new_element_username:
update_account = True
changed = True
elif account_detail.status is not None and self.status is not None \
and account_detail.status != self.status:
update_account = True
changed = True
elif account_detail.initiator_secret is not None and self.initiator_secret is not None \
and account_detail.initiator_secret != self.initiator_secret:
update_account = True
changed = True
elif account_detail.target_secret is not None and self.target_secret is not None \
and account_detail.target_secret != self.target_secret:
update_account = True
changed = True
elif account_detail.attributes is not None and self.attributes is not None \
and account_detail.attributes != self.attributes:
update_account = True
changed = True
else:
if self.state == 'present' and self.status is None:
changed = True
if changed:
if self.module.check_mode:
pass
else:
if self.state == 'present':
if not account_exists:
self.create_account()
elif update_account:
self.update_account()
elif self.state == 'absent':
self.delete_account()
self.module.exit_json(changed=changed)
def main():
"""
Main function
"""
na_elementsw_account = ElementSWAccount()
na_elementsw_account.apply()
if __name__ == '__main__':
main()
| alexlo03/ansible | lib/ansible/modules/storage/netapp/na_elementsw_account.py | Python | gpl-3.0 | 9,838 |
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.http import Http404
from treemap.models import Tree
from treemap.images import get_image_from_request
from treemap.lib.map_feature import get_map_feature_or_404
def add_tree_photo_helper(request, instance, feature_id, tree_id=None):
plot = get_map_feature_or_404(feature_id, instance, 'Plot')
tree_ids = [t.pk for t in plot.tree_set.all()]
if tree_id and int(tree_id) in tree_ids:
tree = Tree.objects.get(pk=tree_id)
elif tree_id is None:
# See if a tree already exists on this plot
tree = plot.current_tree()
if tree is None:
# A tree doesn't exist, create a new tree create a
# new tree, and attach it to this plot
tree = Tree(plot=plot, instance=instance)
# TODO: it is possible that a user has the ability to
# 'create tree photos' but not trees. In this case we
# raise an authorization exception here.
# It is, however, possible to have both a pending
# tree and a pending tree photo
# This will be added later, when auth/admin work
# correctly with this system
tree.save_with_user(request.user)
else:
# Tree id is invalid or not in this plot
raise Http404('Tree id %s not found on plot %s'
% (tree_id, feature_id))
#TODO: Auth Error
data = get_image_from_request(request)
treephoto = tree.add_photo(data, request.user)
# We must update a rev so that missing photo searches are up to date
instance.update_universal_rev()
return treephoto, tree
| maurizi/otm-core | opentreemap/treemap/lib/tree.py | Python | agpl-3.0 | 1,754 |
#! /usr/bin/env python
#
# Copyright (C) 2008 Lorenzo Pallara, l.pallara@avalpa.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.
#
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import os
from dvbobjects.PSI.SDT import *
from dvbobjects.DVB.Descriptors import *
from dvbobjects.MPEG.Descriptors import *
#
# Service Description Table (ETSI EN 300 468 5.2.3)
#
sdt = service_description_section(
transport_stream_id = 1, # demo value, an official value should be demanded to dvb org
original_network_id = 1, # demo value, an official value should be demanded to dvb org
service_loop = [
service_loop_item(
service_ID = 1, # demo value
EIT_schedule_flag = 0, # 0 no current even information is broadcasted, 1 broadcasted
EIT_present_following_flag = 0, # 0 no next event information is broadcasted, 1 is broadcasted
running_status = 4, # 4 service is running, 1 not running, 2 starts in a few seconds, 3 pausing
free_CA_mode = 0, # 0 means service is not scrambled, 1 means at least a stream is scrambled
service_descriptor_loop = [
service_descriptor(
service_type = 1, # digital television service
service_provider_name = "Avalpa",
service_name = "Avalpa 1",
),
],
),
],
version_number = 1, # you need to change the table number every time you edit, so the decoder will compare its version with the new one and update the table
section_number = 0,
last_section_number = 0,
)
#
# PSI marshalling and encapsulation
#
out = open("./firstsdt.sec", "wb")
out.write(sdt.pack())
out.close
| philotas/opencaster | tutorials/psi-generation/firstsdt.py | Python | gpl-2.0 | 2,269 |
from fabric.api import settings, hide, puts, run
from fabphile.common import check
def _invoke_aptget(apt_command, args=[]):
"Invoke the aptget command"
ALLOWED_APT_COMMAND = ['install', 'remove', 'update']
command_arguments = ""
check(apt_command in ALLOWED_APT_COMMAND,
"%s command is not allowed" % apt_command)
if args.isinstnace(list):
command_arguments = " ".join(args)
else:
command_arguments = args
with settings(hide('everything')):
results = run("apt-get %s %s" % (apt_command, command_arguments))
return results
def _invoke_dpkg(args=[]):
"invoke the dpkg command"
command_arguments = ""
if args.isinstnace(list):
command_arguments = " ".join(args)
else:
command_arguments = args
return run("dpkg %s" % command_arguments)
def _install(package):
"Install without looking"
_invoke_aptget("install", ['-y', package])
def install(package):
"Install a package via apt"
check(package, "You must provide a package to installed")
if package_is_not_installed(package):
_install(package)
return package_is_installed(package)
def latest(package):
"Ensure the package is installed and upto date"
check(package, "You must provide a package to installed & upgraded")
install(package)
upgrade(package)
def _remove(package):
"Remove without looking"
_invoke_aptget("remove", ['-y', package])
def remove(package):
"Remove a package via apt"
check(package, "You must provide a package to be removed")
if package_is_not_installed(package):
puts("%s is already removed" % package)
return True
_remove(package)
def update():
"Just run apt-get update"
_invoke_aptget("update")
def _upgrade(package):
"upgrade the system or package"
_invoke_aptget("upgrade", package)
def upgrade(package=None):
"upgrade the system or package"
check(package, "You must provide a package to be upgraded")
if package and package_is_not_installed(package):
install(package)
_upgrade("upgrade", package)
def package_is_not_installed(package):
"True if a package is not installed"
return not package_is_installed(package)
def package_is_installed(package):
"True if a package is installed"
check(package, "You must provide a package to be checked")
install_list = _invoke_dpkg("--get-selections %s" % package)
installed_packages = []
for line in install_list:
if not line.endswith('install'):
continue
installed_packages.apend(line.split()[0])
if package in installed_packages:
return True
else:
return False
| daniellawrence/fabphile | src/fabphile/apt.py | Python | gpl-2.0 | 2,712 |
# Copyright (c) 2021 PaddlePaddle Authors. 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 unittest
import numpy as np
import sys
sys.path.append("..")
import op_test
import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddle.fluid.core as core
from paddle.fluid import Program, program_guard, Executor, default_main_program
import paddle.fluid as fluid
class TestPad3dNPUOp(op_test.OpTest):
def setUp(self):
paddle.enable_static()
self.__class__.use_npu = True
self.op_type = "pad3d"
self.place = paddle.NPUPlace(0)
self.x_type = "float32"
self.mode = "constant"
self.variable_paddings = False
self.initTestCase()
self.value = 0 #Asend npu only support constant_values = 0 right now.
self.inputs = {'X': np.random.random(self.shape).astype(self.x_type)}
self.attrs = {}
if self.variable_paddings:
self.attrs['paddings'] = []
self.inputs['Paddings'] = np.array(self.paddings).flatten().astype(
"int32")
else:
self.attrs['paddings'] = np.array(self.paddings).flatten().astype(
"int32")
self.attrs['value'] = self.value
self.attrs['mode'] = self.mode
self.attrs['data_format'] = self.data_format
if self.data_format == "NCDHW":
paddings = [
(0, 0),
(0, 0),
(self.paddings[4], self.paddings[5]),
(self.paddings[2], self.paddings[3]),
(self.paddings[0], self.paddings[1]),
]
else:
paddings = [
(0, 0),
(self.paddings[4], self.paddings[5]),
(self.paddings[2], self.paddings[3]),
(self.paddings[0], self.paddings[1]),
(0, 0),
]
out = np.pad(self.inputs['X'],
paddings,
mode=self.mode,
constant_values=self.value)
self.outputs = {'Out': out}
def test_check_output(self):
self.check_output_with_place(self.place)
def test_check_grad(self):
self.check_grad_with_place(self.place, ['X'], 'Out')
def initTestCase(self):
self.shape = (2, 3, 4, 5, 6)
self.paddings = [0, 0, 0, 0, 0, 0]
self.data_format = "NCDHW"
class TestCase1(TestPad3dNPUOp):
def initTestCase(self):
self.shape = (3, 4, 5, 6, 7)
self.paddings = [0, 1, 2, 3, 4, 5]
self.data_format = "NCDHW"
self.x_type = "float16"
def test_check_grad(self):
self.__class__.no_need_check_grad = True
pass
class TestCase2(TestPad3dNPUOp):
def initTestCase(self):
self.shape = (4, 5, 6, 7, 8)
self.paddings = [1, 1, 1, 1, 1, 1]
self.data_format = "NDHWC"
self.variable_paddings = True
class TestPadAPI(unittest.TestCase):
def _get_numpy_out(self,
input_data,
pad,
mode,
value=0,
data_format="NCDHW"):
if mode == "constant" and len(pad) == len(input_data.shape) * 2:
pad = np.reshape(pad, (-1, 2)).tolist()
elif data_format == "NCDHW":
pad = [
(0, 0),
(0, 0),
(pad[4], pad[5]),
(pad[2], pad[3]),
(pad[0], pad[1]),
]
elif data_format == "NDHWC":
pad = [
(0, 0),
(pad[4], pad[5]),
(pad[2], pad[3]),
(pad[0], pad[1]),
(0, 0),
]
elif data_format == "NCHW":
pad = [
(0, 0),
(0, 0),
(pad[2], pad[3]),
(pad[0], pad[1]),
]
elif data_format == "NHWC":
pad = [
(0, 0),
(pad[2], pad[3]),
(pad[0], pad[1]),
(0, 0),
]
elif data_format == "NCL":
pad = [
(0, 0),
(0, 0),
(pad[0], pad[1]),
]
elif data_format == "NLC":
pad = [
(0, 0),
(pad[0], pad[1]),
(0, 0),
]
out = np.pad(input_data, pad, mode=mode, constant_values=value)
return out
def test_static(self):
paddle.enable_static()
self.place = fluid.NPUPlace(0) if fluid.core.is_compiled_with_npu(
) else fluid.CPUPlace()
with program_guard(Program(), Program()):
input_shape = (1, 2, 3, 4, 5)
pad = [1, 2, 1, 1, 3, 4]
mode = "constant"
value = 0
input_data = np.random.rand(*input_shape).astype(np.float32)
x = paddle.fluid.data(name="x", shape=input_shape)
result1 = F.pad(x=x,
pad=pad,
value=value,
mode=mode,
data_format="NCDHW")
result2 = F.pad(x=x,
pad=pad,
value=value,
mode=mode,
data_format="NDHWC")
exe = Executor(self.place)
fetches = exe.run(default_main_program(),
feed={"x": input_data},
fetch_list=[result1, result2])
np_out1 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NCDHW")
np_out2 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NDHWC")
self.assertTrue(np.allclose(fetches[0], np_out1))
self.assertTrue(np.allclose(fetches[1], np_out2))
def test_dygraph_1(self):
paddle.disable_static()
paddle.device.set_device("npu")
input_shape = (1, 2, 3, 4, 5)
pad = [1, 2, 1, 1, 3, 4]
mode = "constant"
value = 0
input_data = np.random.rand(*input_shape).astype(np.float32)
tensor_data = paddle.to_tensor(input_data)
np_out1 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NCDHW")
np_out2 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NDHWC")
y1 = F.pad(tensor_data,
pad=pad,
mode=mode,
value=value,
data_format="NCDHW")
y2 = F.pad(tensor_data,
pad=pad,
mode=mode,
value=value,
data_format="NDHWC")
self.assertTrue(np.allclose(y1.numpy(), np_out1))
self.assertTrue(np.allclose(y2.numpy(), np_out2))
def test_dygraph_2(self):
paddle.disable_static()
paddle.device.set_device("npu")
input_shape = (2, 3, 4, 5)
pad = [1, 1, 3, 4]
mode = "constant"
value = 0
input_data = np.random.rand(*input_shape).astype(np.float32)
tensor_data = paddle.to_tensor(input_data)
np_out1 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NCHW")
np_out2 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NHWC")
y1 = F.pad(tensor_data,
pad=pad,
mode=mode,
value=value,
data_format="NCHW")
y2 = F.pad(tensor_data,
pad=pad,
mode=mode,
value=value,
data_format="NHWC")
self.assertTrue(np.allclose(y1.numpy(), np_out1))
self.assertTrue(np.allclose(y2.numpy(), np_out2))
def test_dygraph_3(self):
paddle.disable_static()
paddle.device.set_device("npu")
input_shape = (3, 4, 5)
pad = [3, 4]
mode = "constant"
value = 0
input_data = np.random.rand(*input_shape).astype(np.float32)
tensor_data = paddle.to_tensor(input_data)
np_out1 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NCL")
np_out2 = self._get_numpy_out(
input_data, pad, mode, value, data_format="NLC")
y1 = F.pad(tensor_data,
pad=pad,
mode=mode,
value=value,
data_format="NCL")
y2 = F.pad(tensor_data,
pad=pad,
mode=mode,
value=value,
data_format="NLC")
self.assertTrue(np.allclose(y1.numpy(), np_out1))
self.assertTrue(np.allclose(y2.numpy(), np_out2))
class TestPad1dAPI(unittest.TestCase):
def _get_numpy_out(self,
input_data,
pad,
mode,
value=0.0,
data_format="NCL"):
if data_format == "NCL":
pad = [
(0, 0),
(0, 0),
(pad[0], pad[1]),
]
else:
pad = [
(0, 0),
(pad[0], pad[1]),
(0, 0),
]
out = np.pad(input_data, pad, mode=mode, constant_values=value)
return out
def test_class(self):
paddle.disable_static()
paddle.device.set_device("npu")
input_shape = (3, 4, 5)
pad = [1, 2]
pad_int = 1
value = 0
input_data = np.random.rand(*input_shape).astype(np.float32)
pad_constant = nn.Pad1D(padding=pad, mode="constant", value=value)
pad_constant_int = nn.Pad1D(
padding=pad_int, mode="constant", value=value)
data = paddle.to_tensor(input_data)
output = pad_constant(data)
np_out = self._get_numpy_out(
input_data, pad, "constant", value=value, data_format="NCL")
self.assertTrue(np.allclose(output.numpy(), np_out))
output = pad_constant_int(data)
np_out = self._get_numpy_out(
input_data, [pad_int] * 2,
"constant",
value=value,
data_format="NCL")
self.assertTrue(np.allclose(output.numpy(), np_out))
class TestPad2dAPI(unittest.TestCase):
def _get_numpy_out(self,
input_data,
pad,
mode,
value=0.0,
data_format="NCHW"):
if data_format == "NCHW":
pad = [
(0, 0),
(0, 0),
(pad[2], pad[3]),
(pad[0], pad[1]),
]
else:
pad = [
(0, 0),
(pad[2], pad[3]),
(pad[0], pad[1]),
(0, 0),
]
out = np.pad(input_data, pad, mode=mode, constant_values=value)
return out
def test_class(self):
paddle.disable_static()
paddle.device.set_device("npu")
input_shape = (3, 4, 5, 6)
pad = [1, 2, 2, 1]
pad_int = 1
value = 0
input_data = np.random.rand(*input_shape).astype(np.float32)
pad_constant = nn.Pad2D(padding=pad, mode="constant", value=value)
pad_constant_int = nn.Pad2D(
padding=pad_int, mode="constant", value=value)
data = paddle.to_tensor(input_data)
output = pad_constant(data)
np_out = self._get_numpy_out(
input_data, pad, "constant", value=value, data_format="NCHW")
self.assertTrue(np.allclose(output.numpy(), np_out))
output = pad_constant_int(data)
np_out = self._get_numpy_out(
input_data, [pad_int] * 4,
"constant",
value=value,
data_format="NCHW")
self.assertTrue(np.allclose(output.numpy(), np_out))
class TestPad3dAPI(unittest.TestCase):
def _get_numpy_out(self,
input_data,
pad,
mode,
value=0.0,
data_format="NCDHW"):
if data_format == "NCDHW":
pad = [
(0, 0),
(0, 0),
(pad[4], pad[5]),
(pad[2], pad[3]),
(pad[0], pad[1]),
]
else:
pad = [
(0, 0),
(pad[4], pad[5]),
(pad[2], pad[3]),
(pad[0], pad[1]),
(0, 0),
]
out = np.pad(input_data, pad, mode=mode, constant_values=value)
return out
def test_class(self):
paddle.disable_static()
paddle.device.set_device("npu")
input_shape = (3, 4, 5, 6, 7)
pad = [1, 2, 2, 1, 1, 0]
pad_int = 1
value = 0
input_data = np.random.rand(*input_shape).astype(np.float32)
pad_constant = nn.Pad3D(padding=pad, mode="constant", value=value)
pad_constant_int = nn.Pad3D(
padding=pad_int, mode="constant", value=value)
data = paddle.to_tensor(input_data)
output = pad_constant(data)
np_out = self._get_numpy_out(
input_data, pad, "constant", value=value, data_format="NCDHW")
self.assertTrue(np.allclose(output.numpy(), np_out))
output = pad_constant_int(data)
np_out = self._get_numpy_out(
input_data, [pad_int] * 6,
"constant",
value=value,
data_format="NCDHW")
self.assertTrue(np.allclose(output.numpy(), np_out))
class TestPad3dOpNpuError(unittest.TestCase):
def test_errors(self):
def test_value():
input_shape = (1, 2, 3, 4, 5)
data = np.random.rand(*input_shape).astype(np.float32)
x = paddle.fluid.data(name="x", shape=input_shape)
y = F.pad(x, pad=[1, 1, 1, 1, 1, 1], value=1, mode='constant')
place = paddle.NPUPlace()
exe = Executor(place)
outputs = exe.run(feed={'x': data}, fetch_list=[y.name])
def test_mode_1():
input_shape = (1, 2, 3, 4, 5)
data = np.random.rand(*input_shape).astype(np.float32)
x = paddle.fluid.data(name="x", shape=input_shape)
y = F.pad(x, pad=[1, 1, 1, 1, 1, 1], mode='reflect')
place = paddle.NPUPlace()
exe = Executor(place)
outputs = exe.run(feed={'x': data}, fetch_list=[y.name])
def test_mode_2():
input_shape = (1, 2, 3, 4, 5)
data = np.random.rand(*input_shape).astype(np.float32)
x = paddle.fluid.data(name="x", shape=input_shape)
y = F.pad(x, pad=[1, 1, 1, 1, 1, 1], mode='replicate')
place = paddle.NPUPlace()
exe = Executor(place)
outputs = exe.run(feed={'x': data}, fetch_list=[y.name])
def test_mode_3():
input_shape = (1, 2, 3, 4, 5)
data = np.random.rand(*input_shape).astype(np.float32)
x = paddle.fluid.data(name="x", shape=input_shape)
y = F.pad(x, pad=[1, 1, 1, 1, 1, 1], mode='circular')
place = paddle.CPUPlace()
exe = Executor(place)
outputs = exe.run(feed={'x': data}, fetch_list=[y.name])
self.assertRaises(Exception, test_value)
self.assertRaises(Exception, test_mode_1)
self.assertRaises(Exception, test_mode_2)
self.assertRaises(Exception, test_mode_3)
class TestPadDataformatError(unittest.TestCase):
def test_errors(self):
def test_ncl():
input_shape = (1, 2, 3, 4)
pad = paddle.to_tensor(np.array([2, 1, 2, 1]).astype('int32'))
data = np.arange(
np.prod(input_shape), dtype=np.float64).reshape(input_shape) + 1
my_pad = nn.Pad1D(padding=pad, mode="replicate", data_format="NCL")
data = paddle.to_tensor(data)
result = my_pad(data)
def test_nchw():
input_shape = (1, 2, 4)
pad = paddle.to_tensor(np.array([2, 1, 2, 1]).astype('int32'))
data = np.arange(
np.prod(input_shape), dtype=np.float64).reshape(input_shape) + 1
my_pad = nn.Pad1D(padding=pad, mode="replicate", data_format="NCHW")
data = paddle.to_tensor(data)
result = my_pad(data)
def test_ncdhw():
input_shape = (1, 2, 3, 4)
pad = paddle.to_tensor(np.array([2, 1, 2, 1]).astype('int32'))
data = np.arange(
np.prod(input_shape), dtype=np.float64).reshape(input_shape) + 1
my_pad = nn.Pad1D(
padding=pad, mode="replicate", data_format="NCDHW")
data = paddle.to_tensor(data)
result = my_pad(data)
self.assertRaises(AssertionError, test_ncl)
self.assertRaises(AssertionError, test_nchw)
self.assertRaises(AssertionError, test_ncdhw)
if __name__ == '__main__':
unittest.main()
| PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/npu/test_pad3d_op_npu.py | Python | apache-2.0 | 17,706 |
from ..itemManager import getItem
class Vote:
def __init__(self, itemId, type):
assert(type == u'more' or type == u'less')
self.type = type
self.item = getItem(itemId)
| TobyRoseman/PS4M | engine/data/vote.py | Python | mit | 197 |
from django.db import models
import uuid
description_length = 80
signature_length = 400
key_length = 400 # 2048 bit key in base 64? I don't know what I'm doing :)
# TODO: Use correct key length and signature_length
# Create your models here.
class Group(models.Model):
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=80)
key = models.CharField(max_length=key_length)
# owner_email = models.EmailField(max_length=254)
# TODO: add proxy/name server address
class User(models.Model):
group = models.ForeignKey(Group, on_delete=models.CASCADE)
# the uuid is the signing key of the user!
key = models.CharField(primary_key=True, max_length=key_length)
# if the user, after simplification, is a borrower
balance = models.IntegerField(default=0)
def __str__(self):
return self.key
class UOMe(models.Model):
class Meta:
verbose_name_plural = "UOMe's" # for the Django Admin panel
group = models.ForeignKey(Group, on_delete=models.CASCADE)
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
borrower = models.ForeignKey(User, on_delete=models.PROTECT, related_name='uome_borrower')
lender = models.ForeignKey(User, on_delete=models.PROTECT, related_name='uome_lender')
# In cents!
value = models.PositiveIntegerField()
description = models.CharField(max_length=description_length)
issuing_date = models.DateField('date issued', auto_now_add=True)
# TODO: add blank=False all over the place?
issuer_signature = models.CharField(max_length=signature_length, default='', blank=True)
borrower_signature = models.CharField(max_length=signature_length, default='', blank=True)
def __str__(self):
return "%.3f€ from %s to %s: %s" % (int(self.value)/100, self.borrower, self.lender, self.description)
def to_array_unconfirmed(self) -> tuple:
"""
Returns an array/tuple of the relevant information of the UOMe without
the borrower signature
:return tuple:
"""
return (str(self.group.uuid), self.lender.key, self.borrower.key, self.value,
self.description, self.issuer_signature, str(self.uuid))
class UserDebt(models.Model):
# the debt between users after simplification
group = models.ForeignKey(Group, on_delete=models.CASCADE)
borrower = models.ForeignKey(User, on_delete=models.PROTECT, related_name='debt_borrower')
lender = models.ForeignKey(User, on_delete=models.PROTECT, related_name='debt_lender')
value = models.PositiveIntegerField() # In cents!
def __str__(self):
return "%.3f€ from %s to %s" % (int(self.value)/100, self.borrower, self.lender)
| ric2b/confidential-debt-simplification | main_server/main_server_app/models.py | Python | gpl-3.0 | 2,798 |
# Copyright 2017 Balazs Nemeth, Mark Szalay, Janos Doka
#
# 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 copy
from abc import ABCMeta, abstractmethod
import logging
from datetime import datetime, timedelta
from hybrid.OptimizationDataHandler import *
from simulation.OrchestratorAdaptor import *
try:
# runs when mapping files are called from ESCAPE
from escape.nffg_lib.nffg import NFFG, NFFGToolBox
except ImportError:
# runs when mapping repo is cloned individually, and NFFG lib is in a
# sibling directory. WARNING: cicular import is not avioded by design.
import site
site.addsitedir('..')
from nffg_lib.nffg import NFFG, NFFGToolBox
log = logging.getLogger(" WhatToOptStrat")
class AbstractWhatToOptimizeStrategy:
__metaclass__ = ABCMeta
def __init__(self, full_log_path, config_file_path, resource_type,
remaining_request_lifetimes):
formatter = logging.Formatter(
'%(asctime)s | WhatToOptStrat | %(levelname)s | \t%(message)s')
hdlr = logging.FileHandler(full_log_path)
hdlr.setFormatter(formatter)
log.addHandler(hdlr)
log.setLevel(logging.DEBUG)
self.opt_data_handler = OptimizationDataHandler(full_log_path, config_file_path,
resource_type)
self.remaining_request_lifetimes = remaining_request_lifetimes
@abstractmethod
def reqs_to_optimize(self, sum_req):
# needs to return a copy of the to be optimized request graph (so
# the HybridOrchestrator could handle sum_req independently of the offline optimization)!
raise NotImplementedError("Abstract function!")
class ReqsSinceLastOpt(AbstractWhatToOptimizeStrategy):
def __init__(self, full_log_path, config_file_path, resource_type,
remaining_request_lifetimes):
super(ReqsSinceLastOpt, self).__init__(full_log_path, config_file_path,
resource_type, remaining_request_lifetimes)
self.optimized_reqs = None
def reqs_to_optimize(self, sum_req):
"""
Return SUM_reqs - optimized requests
:param sum_req:
:return:
"""
try:
if self.optimized_reqs is None:
self.optimized_reqs = copy.deepcopy(sum_req)
return copy.deepcopy(sum_req)
else:
need_to_optimize = copy.deepcopy(sum_req)
for nf in self.optimized_reqs.nfs:
need_to_optimize.del_node(nf.id)
for req in self.optimized_reqs.reqs:
need_to_optimize.del_edge(req.src.node.id,
req.dst.node.id,
id=req.id)
for sap in self.optimized_reqs.saps:
if sap.id in need_to_optimize.network:
if need_to_optimize.network.out_degree(sap.id) + \
need_to_optimize.network.in_degree(sap.id) == 0:
need_to_optimize.del_node(sap.id)
self.optimized_reqs = copy.deepcopy(sum_req)
return need_to_optimize
except Exception as e:
log.error("reqs_to_optimize error" +
str(e.message) + str(e.__class__))
raise
class AllReqsOpt(AbstractWhatToOptimizeStrategy):
def __init__(self, full_log_path, config_file_path, resource_type,
remaining_request_lifetimes):
super(AllReqsOpt, self).__init__(full_log_path, config_file_path,
resource_type, remaining_request_lifetimes)
def reqs_to_optimize(self, sum_req):
return copy.deepcopy(sum_req)
class ReqsBasedOnLifetime (AbstractWhatToOptimizeStrategy):
def __init__(self, full_log_path, config_file_path, resource_type,
remaining_request_lifetimes):
super(ReqsBasedOnLifetime, self).__init__(full_log_path, config_file_path,
resource_type, remaining_request_lifetimes)
def reqs_to_optimize(self, sum_req):
opt_time = self.opt_data_handler.get_opt_time(len(self.remaining_request_lifetimes))
need_to_optimize = copy.deepcopy(sum_req)
for service in self.remaining_request_lifetimes:
if service['dead_time'] < (datetime.now() + timedelta(seconds=opt_time)):
for nf in service['SG'].nfs:
need_to_optimize.del_node(nf.id)
for req in service['SG'].reqs:
need_to_optimize.del_edge(req.src.node.id,
req.dst.node.id,
id=req.id)
for sap in service['SG'].saps:
if sap.id in need_to_optimize.network:
if need_to_optimize.network.out_degree(sap.id) + \
need_to_optimize.network.in_degree(sap.id) == 0:
need_to_optimize.del_node(sap.id)
return copy.deepcopy(need_to_optimize)
| hsnlab/mapping | hybrid/WhatToOptimizeStrategy.py | Python | apache-2.0 | 5,683 |
# Copyright 2008 (C) Nicira, Inc.
#
# This file is part of NOX.
#
# NOX 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.
#
# NOX 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 NOX. If not, see <http://www.gnu.org/licenses/>.
#
# Reactor for plugging twisted into the vigil main loop. Uses
# oxidereactorglue under the covers to register fildescriptors.
#
import signal
import nox.lib.core
import oxidereactor
import twisted
import logging, types
from twisted.internet import base, error, interfaces, posixbase, task
from twisted.internet.interfaces import IResolverSimple
from twisted.internet.process import reapAllProcesses
from twisted.python.runtime import seconds
from twisted.python import log, reflect
from zope.interface import implements
def doRead(reader, reactor):
why = None
why = reader.doRead()
if why:
twisted.internet.reactor._disconnectSelectable(reader, why, 1)
reactor.callPendingThreadCalls()
def doWrite(writer, reactor):
why = None
why = writer.doWrite()
if why:
twisted.internet.reactor._disconnectSelectable(writer, why, 0)
reactor.callPendingThreadCalls()
class DelayedCallWrapper(base.DelayedCall):
def __init__(self, delay, func, args, kw):
base.DelayedCall.__init__(self, delay, func, args, kw, None, None)
self.dc = oxidereactor.delayedcall()
def delay(self, secondsLater):
if self.cancelled:
raise error.AlreadyCancelled
elif self.called:
raise error.AlreadyCalled
if secondsLater < 0:
self.dc.delay(True, long(-secondsLater),
long(-secondsLater * 1000 % 1000))
else:
self.dc.delay(False, long(secondsLater),
long(secondsLater * 1000 % 1000))
def reset(self, secondsFromNow):
if self.cancelled:
raise error.AlreadyCancelled
elif self.called:
raise error.AlreadyCalled
self.dc.reset(long(secondsFromNow),
long(secondsFromNow * 1000 % 1000))
def cancel(self):
if self.cancelled:
raise error.AlreadyCancelled
elif self.called:
raise error.AlreadyCalled
self.cancelled = 1
self.dc.cancel()
def __call__(self):
try:
self.called = 1
self.func(*self.args, **self.kw);
except:
log.deferr()
if hasattr(self, "creator"):
e = "\n"
e += " C: previous exception occurred in " + \
"a DelayedCall created here:\n"
e += " C:"
e += "".join(self.creator).rstrip().replace("\n","\n C:")
e += "\n"
log.msg(e)
class Resolver:
implements (IResolverSimple)
def __init__(self, oreactor):
self.oreactor = oreactor
def getHostByName(self, name, timeout = (1, 3, 11, 45)):
from twisted.internet.defer import Deferred
d = Deferred()
self.oreactor.resolve(name, d.callback)
def query_complete(address, name):
if address is None or address == "":
from twisted.internet import error
msg = "address %r not found" % (name,)
err = error.DNSLookupError(msg)
from twisted.internet import defer
return defer.fail(err)
else:
return address
return d.addCallback(query_complete, name)
class pyoxidereactor (posixbase.PosixReactorBase):
def __init__(self, ctxt):
from twisted.internet.main import installReactor
self.oreactor = oxidereactor.oxidereactor(ctxt, "oxidereactor")
posixbase.PosixReactorBase.__init__(self)
installReactor(self)
self.installResolver(Resolver(self.oreactor))
signal.signal(signal.SIGCHLD, self._handleSigchld)
# Twisted uses os.waitpid(pid, WNOHANG) but doesn't try again
# if the call returns nothing (since not being able to block).
# Poll once a second on behalf of Twisted core to detect child
# processes dying properly.
task.LoopingCall(reapAllProcesses).start(1)
# The removeReader, removeWriter, addReader, and addWriter
# functions must be implemented, because they are used extensively
# by Python code.
def removeReader(self, reader):
self.oreactor.removeReader(reader.fileno())
def removeWriter(self, writer):
self.oreactor.removeWriter(writer.fileno())
def addReader(self, reader):
self.oreactor.addReader(reader.fileno(), reader,
lambda reader: doRead(reader, self))
def addWriter(self, writer):
self.oreactor.addWriter(writer.fileno(), writer,
lambda writer: doWrite(writer, self))
# doIteration is called from PosixReactorBase.mainLoop
# which is called from PosixReactorBase.run
# and we never call either one.
# doIteration is also called from ReactorBase.iterate,
# which we never call.
# So it seems questionable whether we have to implement this.
# For now, stub it out.
def doIteration(self, delay=0):
raise NotImplementedError()
# stop is called from ReactorBase.sigInt,
# which is called upon receipt of SIGINT
# only if PosixReactorBase.startRunning is allowed to install
# signal handlers. It seems uncertain, at best, that we'll
# want Python to handle our signals.
def stop(self):
raise NotImplementedError()
# removeAll is called from ReactorBase.disconnectAll
# which is called indirectly from stop
# which we concluded above doesn't get called in our system.
# So there's no need to implement it.
def removeAll(self):
raise NotImplementedError()
# IReactorTime interface for timer management
def callLater(self, delay, f, *args, **kw):
if not callable(f):
raise TypeError("'f' object is not callable")
tple = DelayedCallWrapper(delay, f, args, kw)
self.oreactor.callLater(long(tple.getTime()),
long(tple.getTime() * 1000000 % 1000000),
tple);
return tple
def getDelayedCalls(self):
raise NotImplementedError()
# Calls to be invoked in the reactor thread
def callPendingThreadCalls(self):
if self.threadCallQueue:
count = 0
total = len(self.threadCallQueue)
for (f, a, kw) in self.threadCallQueue:
try:
f(*a, **kw)
except:
log.err()
count += 1
if count == total:
break
del self.threadCallQueue[:count]
if self.threadCallQueue:
if self.waker:
self.waker.wakeUp()
class vlog(log.FileLogObserver):
"""
Passes Twisted log messages to the C++ vlog.
"""
def __init__(self, v):
log.FileLogObserver.__init__(self, log.NullFile())
self.modules = {}
self.v = v
def __call__(self, event):
msg = event['message']
if not msg:
if event['isError'] and event.has_key('failure'):
msg = ((event.get('why') or 'Unhandled Error')
+ '\n' + event['failure'].getTraceback())
elif event.has_key('format'):
if hasattr(self, '_safeFormat'):
msg = self._safeFormat(event['format'], event)
else:
msg = log._safeFormat(event['format'], event)
else:
return
else:
msg = ' '.join(map(reflect.safe_str, msg))
try:
module = event['system']
# Initialize the vlog modules on-demand, since systems are
# not initialized explicitly in the Twisted logging API.
if not self.modules.has_key(module):
if module == '-':
module = 'reactor'
self.modules['-'] = self.v.mod_init(module)
self.modules[module] = self.modules['-']
else:
self.modules[module] = self.v.mod_init(module)
# vlog module identifier
module = self.modules[module]
fmt = {'system': module, 'msg': msg.replace("\n", "\n\t")}
if hasattr(self, '_safeFormat'):
msg = self._safeFormat("%(msg)s", fmt)
else:
msg = log._safeFormat("%(msg)s", fmt)
if event["isError"]:
self.v.err(module, msg)
else:
self.v.msg(module, msg)
except Exception, e:
# Can't pass an exception, since then the observer would
# be disabled automatically.
pass
v = oxidereactor.vigillog()
log.startLoggingWithObserver(vlog(v), 0)
class VigilLogger(logging.Logger):
"""
Stores the C++ logger identifier.
"""
def __init__(self, name):
logging.Logger.__init__(self, name)
self.vigil_logger_id = v.mod_init(name)
def isEnabledFor(self, level):
if level < logging.DEBUG:
return v.is_dbg_enabled(self.vigil_logger_id)
elif level < logging.INFO:
return v.is_dbg_enabled(self.vigil_logger_id)
elif level < logging.WARN:
return v.is_info_enabled(self.vigil_logger_id)
elif level < logging.ERROR:
return v.is_warn_enabled(self.vigil_logger_id)
elif level < logging.FATAL:
return v.is_err_enabled(self.vigil_logger_id)
else:
return v.is_emer_enabled(self.vigil_logger_id)
def makeRecord(self, name, level, fn, lno, msg, args, exc_info,
func=None, extra=None):
"""
Inject the vigil logger id into a standard Python log record.
"""
rv = logging.Logger.makeRecord(self, name, level, fn, lno, msg, args,
exc_info, func, extra)
rv.__dict__['vigil_logger_id'] = self.vigil_logger_id
return rv
class VigilHandler(logging.Handler):
"""
A Python logging handler class which writes logging records, with
minimal formatting, to the C++ logging infrastructure.
"""
def __init__(self):
"""
Initialize the handler.
"""
logging.Handler.__init__(self)
def emit(self, record):
"""
Emit a record.
"""
try:
vigil_logger_id = record.__dict__['vigil_logger_id']
msg = self.format(record)
if record.levelno < logging.DEBUG:
o = v.dbg
elif record.levelno < logging.INFO:
o = v.dbg
elif record.levelno < logging.WARN:
o = v.info
elif record.levelno < logging.ERROR:
o = v.warn
elif record.levelno < logging.FATAL:
o = v.err
else:
o = v.fatal
fs = "%s"
if not hasattr(types, "UnicodeType"): #if no unicode support...
o(vigil_logger_id, fs % msg)
else:
if isinstance(msg, str):
#caller may have passed us an encoded byte string...
msg = unicode(msg, 'utf-8')
msg = msg.encode('utf-8')
o(vigil_logger_id, fs % msg)
self.flush()
except (KeyboardInterrupt, SystemExit):
raise
except:
self.handleError(record)
def config():
vigil_handler = VigilHandler()
fs = format='%(message)s'
dfs = None
fmt = logging.Formatter(fs, dfs)
vigil_handler.setFormatter(fmt)
logging.root.addHandler(vigil_handler)
logging.root.setLevel(logging.DEBUG)
config()
logging.setLoggerClass(VigilLogger)
def getFactory():
class Factory:
def instance(self, ctxt):
return pyoxidereactor(ctxt)
return Factory()
| zainabg/NOX | src/nox/coreapps/pyrt/pyoxidereactor.py | Python | gpl-3.0 | 12,596 |
"""
fs.expose.importhook
====================
Expose an FS object to the python import machinery, via a PEP-302 loader.
This module allows you to import python modules from an arbitrary FS object,
by placing FS urls on sys.path and/or inserting objects into sys.meta_path.
The main class in this module is FSImportHook, which is a PEP-302-compliant
module finder and loader. If you place an instance of FSImportHook on
sys.meta_path, you will be able to import modules from the exposed filesystem::
>>> from fs.memoryfs import MemoryFS
>>> m = MemoryFS()
>>> m.setcontents("helloworld.py","print 'hello world!'")
>>>
>>> import sys
>>> from fs.expose.importhook import FSImportHook
>>> sys.meta_path.append(FSImportHook(m))
>>> import helloworld
hello world!
It is also possible to install FSImportHook as an import path handler. This
allows you to place filesystem URLs on sys.path and have them automagically
opened for importing. This example would allow modules to be imported from
an SFTP server::
>>> from fs.expose.importhook import FSImportHook
>>> FSImportHook.install()
>>> sys.path.append("sftp://some.remote.machine/mypath/")
"""
import sys
import imp
import marshal
from fs.base import FS
from fs.opener import fsopendir, OpenerError
from fs.errors import *
from fs.path import *
class FSImportHook(object):
"""PEP-302-compliant module finder and loader for FS objects.
FSImportHook is a module finder and loader that takes its data from an
arbitrary FS object. The FS must have .py or .pyc files stored in the
standard module structure.
For easy use with sys.path, FSImportHook will also accept a filesystem
URL, which is automatically opened using fs.opener.
"""
_VALID_MODULE_TYPES = set((imp.PY_SOURCE,imp.PY_COMPILED))
def __init__(self,fs_or_url):
# If given a string, try to open it as an FS url.
# Don't open things on the local filesystem though.
if isinstance(fs_or_url,basestring):
if ":" not in fs_or_url:
raise ImportError
try:
self.fs = fsopendir(fs_or_url)
except OpenerError:
raise ImportError
self.path = fs_or_url
# Otherwise, it must be an FS object of some sort.
else:
if not isinstance(fs_or_url,FS):
raise ImportError
self.fs = fs_or_url
self.path = None
@classmethod
def install(cls):
"""Install this class into the import machinery.
This classmethod installs the custom FSImportHook class into the
import machinery of the running process, if it is not already
installed.
"""
for i,imp in enumerate(sys.path_hooks):
try:
if issubclass(cls,imp):
break
except TypeError:
pass
else:
sys.path_hooks.append(cls)
sys.path_importer_cache.clear()
@classmethod
def uninstall(cls):
"""Uninstall this class from the import machinery.
This classmethod uninstalls the custom FSImportHook class from the
import machinery of the running process.
"""
to_rem = []
for i,imp in enumerate(sys.path_hooks):
try:
if issubclass(cls,imp):
to_rem.append(imp)
break
except TypeError:
pass
for imp in to_rem:
sys.path_hooks.remove(imp)
sys.path_importer_cache.clear()
def find_module(self,fullname,path=None):
"""Find the FS loader for the given module.
This object is always its own loader, so this really just checks
whether it's a valid module on the exposed filesystem.
"""
try:
self._get_module_info(fullname)
except ImportError:
return None
else:
return self
def _get_module_info(self,fullname):
"""Get basic information about the given module.
If the specified module exists, this method returns a tuple giving
its filepath, file type and whether it's a package. Otherwise,
it raise ImportError.
"""
prefix = fullname.replace(".","/")
# Is it a regular module?
(path,type) = self._find_module_file(prefix)
if path is not None:
return (path,type,False)
# Is it a package?
prefix = pathjoin(prefix,"__init__")
(path,type) = self._find_module_file(prefix)
if path is not None:
return (path,type,True)
# No, it's nothing
raise ImportError(fullname)
def _find_module_file(self,prefix):
"""Find a module file from the given path prefix.
This method iterates over the possible module suffixes, checking each
in turn and returning the first match found. It returns a two-tuple
(path,type) or (None,None) if there's no module.
"""
for (suffix,mode,type) in imp.get_suffixes():
if type in self._VALID_MODULE_TYPES:
path = prefix + suffix
if self.fs.isfile(path):
return (path,type)
return (None,None)
def load_module(self,fullname):
"""Load the specified module.
This method locates the file for the specified module, loads and
executes it and returns the created module object.
"""
# Reuse an existing module if present.
try:
return sys.modules[fullname]
except KeyError:
pass
# Try to create from source or bytecode.
info = self._get_module_info(fullname)
code = self.get_code(fullname,info)
if code is None:
raise ImportError(fullname)
mod = imp.new_module(fullname)
mod.__file__ = "<loading>"
mod.__loader__ = self
sys.modules[fullname] = mod
try:
exec code in mod.__dict__
mod.__file__ = self.get_filename(fullname,info)
if self.is_package(fullname,info):
if self.path is None:
mod.__path__ = []
else:
mod.__path__ = [self.path]
return mod
except Exception:
sys.modules.pop(fullname,None)
raise
def is_package(self,fullname,info=None):
"""Check whether the specified module is a package."""
if info is None:
info = self._get_module_info(fullname)
(path,type,ispkg) = info
return ispkg
def get_code(self,path,info=None):
"""Get the bytecode for the specified module."""
if info is None:
info = self._get_module_info(fullname)
(path,type,ispkg) = info
code = self.fs.getcontents(path)
if type == imp.PY_SOURCE:
code = code.replace("\r\n","\n")
return compile(code,path,"exec")
elif type == imp.PY_COMPILED:
if code[:4] != imp.get_magic():
return None
return marshal.loads(code[8:])
else:
return None
return code
def get_source(self,fullname,info=None):
"""Get the sourcecode for the specified module, if present."""
if info is None:
info = self._get_module_info(fullname)
(path,type,ispkg) = info
if type != imp.PY_SOURCE:
return None
return self.fs.getcontents(path).replace("\r\n","\n")
def get_data(self,path):
"""Read the specified data file."""
try:
return self.fs.getcontents(path)
except FSError, e:
raise IOError(str(e))
def get_filename(self,fullname,info=None):
"""Get the __file__ attribute for the specified module."""
if info is None:
info = self._get_module_info(fullname)
(path,type,ispkg) = info
return path
| atty303/pyfilesystem | fs/expose/importhook.py | Python | bsd-3-clause | 8,060 |
# Copyright 2013 - Red Hat, 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.
"""Solum base exception handling.
Includes decorator for re-raising Solum-type exceptions.
"""
import collections
import functools
import sys
import uuid
from keystoneclient import exceptions as keystone_exceptions
from oslo_config import cfg
import pecan
import six
import wsme
from solum.common import safe_utils
from solum.openstack.common import excutils
from solum.openstack.common.gettextutils import _
from solum.openstack.common import log as logging
LOG = logging.getLogger(__name__)
exc_log_opts = [
cfg.BoolOpt('fatal_exception_format_errors',
default=False,
help='make exception message format errors fatal')
]
def list_opts():
yield None, exc_log_opts
CONF = cfg.CONF
CONF.register_opts(exc_log_opts)
def wrap_exception(notifier=None, publisher_id=None, event_type=None,
level=None):
"""This decorator wraps a method to catch any exceptions.
It logs the exception as well as optionally sending
it to the notification system.
"""
def inner(f):
def wrapped(self, context, *args, **kw):
# Don't store self or context in the payload, it now seems to
# contain confidential information.
try:
return f(self, context, *args, **kw)
except Exception as e:
with excutils.save_and_reraise_exception():
if notifier:
call_dict = safe_utils.getcallargs(f, *args, **kw)
payload = dict(exception=e,
private=dict(args=call_dict)
)
# Use a temp vars so we don't shadow
# our outer definitions.
temp_level = level
if not temp_level:
temp_level = notifier.ERROR
temp_type = event_type
if not temp_type:
# If f has multiple decorators, they must use
# functools.wraps to ensure the name is
# propagated.
temp_type = f.__name__
notifier.notify(context, publisher_id, temp_type,
temp_level, payload)
return functools.wraps(f)(wrapped)
return inner
OBFUSCATED_MSG = _('Your request could not be handled '
'because of a problem in the server. '
'Error Correlation id is: %s')
def wrap_controller_exception(func, func_server_error, func_client_error):
"""This decorator wraps controllers methods to handle exceptions:
- if an unhandled Exception or a SolumException with an error code >=500
is catched, raise a http 5xx ClientSideError and correlates it with a log
message
- if a SolumException is catched and its error code is <500, raise a http
4xx and logs the excp in debug mode
"""
@functools.wraps(func)
def wrapped(*args, **kw):
try:
return func(*args, **kw)
except Exception as excp:
LOG.error(excp)
http_error_code = 500
if hasattr(excp, 'code'):
http_error_code = excp.code
if http_error_code >= 500:
# log the error message with its associated
# correlation id
log_correlation_id = str(uuid.uuid4())
LOG.error("%s:%s", log_correlation_id, str(excp))
# raise a client error with an obfuscated message
func_server_error(log_correlation_id, http_error_code)
else:
# raise a client error the original message
func_client_error(excp, http_error_code)
return wrapped
def wrap_wsme_controller_exception(func):
"""This decorator wraps wsme controllers to handle exceptions."""
def _func_server_error(log_correlation_id, status_code):
raise wsme.exc.ClientSideError(
six.text_type(OBFUSCATED_MSG % log_correlation_id), status_code)
def _func_client_error(excp, status_code):
raise wsme.exc.ClientSideError(six.text_type(excp), status_code)
return wrap_controller_exception(func,
_func_server_error,
_func_client_error)
def wrap_pecan_controller_exception(func):
"""This decorator wraps pecan controllers to handle exceptions."""
def _func_server_error(log_correlation_id, status_code):
pecan.response.status = status_code
pecan.response.text = six.text_type(OBFUSCATED_MSG %
log_correlation_id)
# message body for errors is just a plain text message
# The following code is functionally equivalent to calling:
#
# pecan.override_template(None, "text/plain")
#
# We do it this way to work around a bug in our unit-test framework
# in which the mocked request object isn't properly mocked in the pecan
# core module (gilbert.plz@oracle.com)
pecan.request.pecan['override_template'] = None
pecan.request.pecan['override_content_type'] = 'text/plain'
def _func_client_error(excp, status_code):
pecan.response.status = status_code
pecan.response.text = six.text_type(excp)
# The following code is functionally equivalent to calling:
#
# pecan.override_template(None, "text/plain")
#
# We do it this way to work around a bug in our unit-test framework
# in which the mocked request object isn't properly mocked in the pecan
# core module (gilbert.plz@oracle.com)
pecan.request.pecan['override_template'] = None
pecan.request.pecan['override_content_type'] = 'text/plain'
return wrap_controller_exception(func,
_func_server_error,
_func_client_error)
def wrap_wsme_pecan_controller_exception(func):
"""Error handling for controllers decorated with wsmeext.pecan.wsexpose:
Controllers wrapped with wsme_pecan.wsexpose don't throw
exceptions but handle them internally. We need to intercept
the response and mask potentially sensitive information.
"""
@functools.wraps(func)
def wrapped(*args, **kw):
ret = func(*args, **kw)
ismapping = isinstance(ret, collections.Mapping)
if (pecan.response.status_code >= 500 and ismapping):
log_correlation_id = str(uuid.uuid4())
LOG.error("%s:%s", log_correlation_id, ret.get("faultstring",
"Unknown Error"))
ret['faultstring'] = six.text_type(OBFUSCATED_MSG %
log_correlation_id)
return ret
return wrapped
def wrap_keystone_exception(func):
"""Wrap keystone exceptions and throw Solum specific exceptions."""
@functools.wraps(func)
def wrapped(*args, **kw):
try:
return func(*args, **kw)
except keystone_exceptions.AuthorizationFailure:
raise AuthorizationFailure(
client=func.__name__, message="reason: %s" % sys.exc_info()[1])
except keystone_exceptions.ClientException:
raise AuthorizationFailure(
client=func.__name__,
message="unexpected keystone client error occurred: %s"
% sys.exc_info()[1])
return wrapped
@six.python_2_unicode_compatible
class SolumException(Exception):
"""Base Solum Exception
To correctly use this class, inherit from it and define
a 'msg_fmt' property. That msg_fmt will get printf'd
with the keyword arguments provided to the constructor.
"""
message = _("An unknown exception occurred.")
code = 500
def __init__(self, **kwargs):
self.kwargs = kwargs
if CONF.fatal_exception_format_errors:
assert isinstance(self.msg_fmt, six.text_type)
try:
self.message = self.msg_fmt % kwargs
except KeyError:
# kwargs doesn't match a variable in the message
# log the issue and the kwargs
LOG.exception(_('Exception in string format operation'),
extra=dict(
private=dict(
msg=self.msg_fmt,
args=kwargs
)
)
)
if CONF.fatal_exception_format_errors:
raise
def __str__(self):
return self.message
class ResourceLimitExceeded(SolumException):
msg_fmt = _("Resource limit exceeded. Reason: %(reason)s")
class BadRequest(SolumException):
msg_fmt = _("The request is malformed. Reason: %(reason)s")
code = 400
class ObjectNotFound(SolumException):
msg_fmt = _("The %(name)s %(id)s could not be found.")
class ObjectNotUnique(SolumException):
msg_fmt = _("The %(name)s already exists.")
class RequestForbidden(SolumException):
msg_fmt = _("The request is forbidden. Reason: %(reason)s")
code = 403
class ResourceNotFound(ObjectNotFound):
msg_fmt = _("The %(name)s resource %(id)s could not be found.")
code = 404
class ResourceExists(ObjectNotUnique):
msg_fmt = _("The %(name)s resource already exists.")
code = 409
class ResourceStillReferenced(SolumException):
msg_fmt = _("The %(name)s resource cannot be deleted because one or more"
" resources reference it.")
code = 409
class UnsupportedMediaType(SolumException):
msg_fmt = _("\'%(name)s\' is not a supported media type for the %(method)s"
" method of this resource")
code = 415
class Unprocessable(SolumException):
msg_fmt = _("Server is incapable of processing the specified request.")
code = 422
class PlanStillReferenced(ResourceStillReferenced):
msg_fmt = _("Plan %(name)s cannot be deleted because one or more"
" Assemblies reference it.")
class LPStillReferenced(ResourceStillReferenced):
msg_fmt = _("Languagepack %(name)s cannot be deleted because one or more"
" applications reference it.")
class NotImplemented(SolumException):
msg_fmt = _("The requested operation is not implemented.")
code = 501
class AuthorizationFailure(SolumException):
msg_fmt = _("%(client)s connection failed. %(message)s")
class InvalidObjectSizeError(Exception):
msg_fmt = _("Invalid object size.")
class MaxRetryReached(Exception):
msg_fmt = _("Maximum retries has been reached.")
| devdattakulkarni/test-solum | solum/common/exception.py | Python | apache-2.0 | 11,437 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
### This script should be run after :
### export LD_LIBRARY_PATH="/usr/local/Lima/Lima/lib"
import os,sys,time
from Lima import Core
from Lima import Andor3
print("* The general setup :")
print("\n** The environement of the pocess is now : ")
print(os.environ)
print("\n** Now, importing Lima (Core and Andor3 :")
print("\twith sys.path = " + ":".join(sys.path))
print("\n** Constructing the camera and the other related object :")
cam = Andor3.Camera("/usr/local/bf", 0)
cam_int = Andor3.Interface(cam)
cam_ctr = Core.CtControl(cam_int)
print("\n** Removing all files that could interfer with acquisition :")
os.system("rm -fv /mnt/DataHub3/iGEM/20170903/camera/testing*.tiff")
print("\n** Taking care of the saving format : 1st serie is wihtOUT saving")
cam_sav = cam_ctr.saving()
cam_sav.setDirectory("/mnt/DataHub3/iGEM/20170903/camera")
cam_sav.setPrefix("testing")
cam_sav.setSavingMode(Core.CtSaving.Manual)
# Manual: No automatic saving, you should call CtSaving::writeFrame
print(cam_sav.getParameters())
print("** Testing the ROI : 100, 100, 2360, 1960 (in HardOnly mode)")
cam_ctr.image().setMode(Core.CtImage.HardOnly)
cam_ctr.image().setRoi(Core.Roi(100, 100, 2360, 1960)) ### left, top, width, height
the_roi = cam_ctr.image().getRoi()
print("\tThe retrieved roi is (%d, %d, %d, %d)" % (the_roi.getTopLeft().x, the_roi.getTopLeft().y, the_roi.getSize().getWidth(), the_roi.getSize().getHeight()))
print("\n**Testing the acquisition exposure and latency :")
## ##### Faster frame-rates, lower latency :
## cam.setElectronicShutterMode(Andor3.Camera.Rolling)
## cam.setAdcRate(cam.MHz280)
## cam.getLatTimeRange() ## 0.0103
## ##### Slower frame-rate, higher latency :
## cam.setElectronicShutterMode(Andor3.Camera.Global)
## cam.setAdcRate(cam.MHz100)
## cam.getLatTimeRange() ## 0.0286
cam_acq = cam_ctr.acquisition()
print("Setting the trigger mode to internal :")
cam_acq.setTriggerMode(Core.IntTrig)
print("setting the exposition time to 0.001 ...")
cam_acq.setAcqExpoTime(.01)
print("*** Getting in slow acquisition mode :")
print("setting the true camera speed to Global shutter and 100MHz")
cam.setElectronicShutterMode(Andor3.Camera.Global)
cam.setAdcRate(cam.MHz100)
#print("the range of latency time for the hardware is now %.3f to %.3f s" % cam.getLatTimeRange())
print("setting the latency time to 0.015 (below the limit of the hardware")
cam_acq.setLatencyTime(.015)
print("retrieving the values : ")
print("\texpo time = %f" % cam_acq.getAcqExpoTime())
#print("\tlat time = %f" % cam_acq.getLatencyTime())
#if ( 0.015 != cam_acq.getLatencyTime() ) :
#print("\t The retrieved latency is different from the set one (expected)")
#if ( cam.getLatTimeRange()[0] != cam_acq.getLatencyTime() ) :
# print("\t The retrieved latency time is DIFFERENT from the min latency of the hardware, %.3f vs. %.3f respectively" % (cam_acq.getLatencyTime(), cam.getLatTimeRange()[0]))
print("\nTesting the ROI : 100, 100, 2360, 1960")
cam_ctr.image().setRoi(Core.Roi(100, 100, 2360, 1960)) ### left, top, width, height
the_roi = cam_ctr.image().getRoi()
print("\tThe retrieved roi is (%d, %d, %d, %d)" % (the_roi.getTopLeft().x, the_roi.getTopLeft().y, the_roi.getSize().getWidth(), the_roi.getSize().getHeight()))
print("*** Getting in fast acquisition mode :")
print("setting the true camera speed to Global shutter and 280MHz")
cam.setElectronicShutterMode(Andor3.Camera.Global)
cam.setAdcRate(cam.MHz280)
#print("the range of latency time for the hardware is now %.3f to %.3f s" % cam.getLatTimeRange())
print("setting the latency time to 0.015 (below the limit of the hardware")
cam_acq.setLatencyTime(.015)
print("retrieving the values : ")
print("\texpo time = %f" % cam_acq.getAcqExpoTime())
#print("\tlat time = %f" % cam_acq.getLatencyTime())
#if ( 0.015 != cam_acq.getLatencyTime() ) :
# print("\t The retrieved latency is DIFFERENT from the set one (unexpected in fast mode)")
#if ( cam.getLatTimeRange()[0] != cam_acq.getLatencyTime() ) :
# print("\t The retrieved latency time is DIFFERENT from the min latency of the hardware, %.3f vs. %.3f respectively" % (cam_acq.getLatencyTime(), cam.getLatTimeRange()[0]))
print("* Testing some frame-number based acquisitions")
# print(" Setting the debug to tracing on camera:")
# Core.DebParams.setTypeFlagsNamecam_ctrList(['Fatal', 'Error', 'Warning', 'Trace'])
# Core.DebParams.setModuleFlagsNameList(['Camera'])
print(" Acquiring 3 images, to flush the CtAcquisition and the frame-rate be updated accordingly")
cam_ctr.acquisition().setAcqNbFrames(3)
cam_ctr.prepareAcq()
cam_ctr.startAcq()
time.sleep(5)
print(" Acquiring 50 image using the current settings.")
cam_ctr.acquisition().setAcqNbFrames(50)
print(" Setting the output sink :")
cam_sav = cam_ctr.saving()
cam_sav.setDirectory("/mnt/DataHub3/iGEM/20170903/camera")
cam_sav.setPrefix("testing")
print(" The saving parameters are :")
print(cam_sav.getParameters())
#cam_ctr.video().startLive()
print(" Launching acquisition of %d frames whith exposure time of %.3fs and latency time %.3fs." % (cam_ctr.acquisition().getAcqNbFrames(), cam_acq.getAcqExpoTime(), cam_acq.getLatencyTime()))
print("** Setting the output to none")
cam_sav.setSavingMode(Core.CtSaving.Manual)
print(" The saving parameters are :")
print(cam_sav.getParameters())
cam_ctr.prepareAcq()
cam_ctr.startAcq()
the_wait=0
while ( Core.AcqReady != cam_ctr.getStatus().AcquisitionStatus ) :
time.sleep(1)
the_wait += 1
print("Acquisition done with sleep of %ds" % (the_wait))
time.sleep(1)
print("And again...")
cam_ctr.prepareAcq()
cam_ctr.startAcq()
the_wait=0
while ( Core.AcqReady != cam_ctr.getStatus().AcquisitionStatus ) :
time.sleep(1)
the_wait += 1
print("Acquisition done with sleep of %ds" % (the_wait))
time.sleep(1)
print("** Setting the output to tiff")
cam_sav.setSavingMode(Core.CtSaving.AutoFrame)
cam_sav.setFormat(Core.CtSaving.TIFFFormat)
cam_sav.setSuffix(".tiff")
print(" The saving parameters are :")
print(cam_sav.getParameters())
cam_ctr.prepareAcq()
cam_ctr.startAcq()
the_wait=0
while ( Core.AcqReady != cam_ctr.getStatus().AcquisitionStatus ) :
time.sleep(1)
the_wait += 1
print("Acquisition done with sleep of %ds"% (the_wait))
time.sleep(1)
print("And again...")
cam_ctr.prepareAcq()
cam_ctr.startAcq()
the_wait=0
while ( Core.AcqReady != cam_ctr.getStatus().AcquisitionStatus ) :
time.sleep(1)
the_wait += 1
print("Acquisition done with sleep of %ds"% (the_wait))
time.sleep(1)
# print("** Setting the output to nexus")
# cam_sav.setSavingMode(Core.CtSaving.AutoFrame)
# cam_sav.setFormat(Core.CtSaving.NXS)
# cam_sav.setSuffix(".nxs")
# print(" The saving parameters are :")
# print(cam_sav.getParameters())
# cam_ctr.prepareAcq()
# cam_ctr.startAcq()
# the_wait=0
# while ( Core.AcqReady != cam_ctr.getStatus().AcquisitionStatus ) :
# time.sleep(1)
# the_wait += 1
# print("Acquisition done with sleep of %ds"% (the_wait))
#
# print("And again...")
# cam_ctr.prepareAcq()
# cam_ctr.startAcq()
# the_wait=0
# while ( Core.AcqReady != cam_ctr.getStatus().AcquisitionStatus ) :
# time.sleep(1)
# the_wait += 1
# print("Acquisition done with sleep of %ds"% (the_wait))
#
print("* Testing some free-running acquisitions, during approx 2s each test :")
print(" Setting the output sink :")
cam_sav = cam_ctr.saving()
cam_sav.setDirectory("/mnt/DataHub3/")
cam_sav.setPrefix("testing_A_")
print(" The saving parameters are :")
print(cam_sav.getParameters())
print("** Using the null output sink :")
cam_sav.setSavingMode(Core.CtSaving.Manual)
print(" The saving parameters are :")
print(cam_sav.getParameters())
cam_ctr.video().startLive()
time.sleep(2)
cam_ctr.video().stopLive()
print("Acquisition done in free running while the main thread slept 2s")
time.sleep(1)
print("And again...")
cam_ctr.video().startLive()
time.sleep(2)
cam_ctr.video().stopLive()
print("Acquisition done in free running while the main thread slept 2s")
time.sleep(1)
print("** Setting the output to tiff")
cam_sav.setSavingMode(Core.CtSaving.AutoFrame)
cam_sav.setFormat(Core.CtSaving.TIFFFormat)
cam_sav.setSuffix(".tiff")
print(" The saving parameters are :")
print(cam_sav.getParameters())
cam_ctr.video().startLive()
time.sleep(2)
cam_ctr.video().stopLive()
print("Acquisition done in free running while the main thread slept 2s")
time.sleep(1)
print("And again...")
cam_ctr.video().startLive()
time.sleep(2)
cam_ctr.video().stopLive()
print("Acquisition done in free running while the main thread slept 2s")
time.sleep(1)
## print("** Setting the output to nexus")
## cam_sav.setSavingMode(Core.CtSaving.AutoFrame)
## cam_sav.setFormat(Core.CtSaving.NXS)
## cam_sav.setSuffix(".nxs")
## print(" The saving parameters are :")
## print(cam_sav.getParameters())
## cam_ctr.video().startLive()
## time.sleep(2)
## cam_ctr.video().stopLive()
## print("Acquisition done in free running while the main thread slept 2s")
##
print("And again...")
cam_ctr.video().startLive()
time.sleep(2)
cam_ctr.video().stopLive()
print("Acquisition done in free running while the main thread slept 2s")
| JiangXL/ColorMapping | unit-test.py | Python | gpl-3.0 | 9,130 |
#############################################################################
##
## Copyright : (C) 2015 Dimitri Sabadie
## License : BSD3
##
## Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com>
##
############################################################################
bl_info = {
"name" : "Export mesh to Quaazar JSON (.qmsh)"
, "author" : "Dimitri Sabadie"
, "category" : "Import-Export"
, "location" : "File > Import-Export"
}
import bpy
import mathutils
from bpy_extras.io_utils import ExportHelper
from bpy.props import BoolProperty
from math import pi
import json
def round_(x):
return round(x,6)
class QuaazarMeshExporter(bpy.types.Operator, ExportHelper):
"""Quaazar Mesh Exporter Script"""
bl_idname = "object.quaazar_mesh_exporter"
bl_label = "Quaazar Mesh Exporter"
bl_description = "Export all meshes from the scene into a directory"
bl_options = {'REGISTER'}
filename_ext = ".qmsh"
sparse = BoolProperty (
name = "Sparse output"
, description = "Should the output file be sparse?"
, default = False
, )
smoothNormals = BoolProperty (
name = "Smooth normals"
, description = "Smooth normals?"
, default = True
, )
yUp = BoolProperty (
name = "Y axis as up"
, description = "Rotate the object so that Y is up"
, default = True
, )
def execute(self, context):
print("-- ----------------------- --")
print("-- Quaazar Mesh JSON Export --")
o = bpy.context.active_object
if o == None:
print("E: no mesh selected")
else:
msh = o.data
if self.yUp:
biasMatrix = mathutils.Matrix.Rotation(pi/2, 3, 'X')
else:
biasMatrix = mathutils.Matrix.Identity(3)
if not hasOnlyTris(msh):
print("W: '" + msh.name + "' is not elegible to export, please convert quadrangles to triangles")
else:
print("I: exporting '" + msh.name + "'")
phmsh = toQuaazarMesh(msh, self.smoothNormals, biasMatrix)
fp = open(self.filepath, "w")
fp.write(phmsh.toJSON(self.sparse))
fp.close()
print("-- ----------------------- --")
return {'FINISHED'}
def register():
bpy.utils.register_class(QuaazarMeshExporter)
def unregister():
bpy.utils.unregister_class(QuaazarMeshExporter)
if __name__ == "__main__":
register()
class QuaazarMesh:
def __init__(self, vs, vgr):
self.vertices = vs
self.vgroup = vgr
def toJSON(self, sparse):
i = 2 if sparse else None
d = { "vertices" : {"interleaved" : True, "values" : self.vertices}, "vgroup" : { "grouping" : "triangles", "triangles" : self.vgroup } }
return json.dumps(d, sort_keys=True, indent=i)
# Check whether a mesh has only triangles.
def hasOnlyTris(msh):
for poly in msh.polygons:
if len(poly.vertices) > 3:
return False
return True
# Build a vertex.
def createVertex(msh, vertID, triID, loopID, smoothNormals, biasMatrix):
# position
co = msh.vertices[vertID].co.copy()
co.rotate(biasMatrix)
co = list(co)
# normal
if smoothNormals:
no = msh.vertices[vertID].normal.copy()
else:
no = msh.polygons[triID].normal.copy()
no.rotate(biasMatrix)
no = list(no)
# uv
uv_layers = msh.uv_layers
if len(uv_layers) == 1:
uv = list(uv_layers[0].data[loopID].uv.copy())
uv[1] = 1 - uv[1]
else:
uv = []
return [co,no,uv]
# Look for a vertex. If it exists, return its ID. Otherwise, return None.
def lookupVertex(vertices, vert):
try:
return vertices.index(vert)
except ValueError:
return None
# Record a new vertex for vertices / indices.
def recordVertex(vertices, indices, vert):
vid = lookupVertex(vertices, vert)
if vid == None:
vid = len(vertices)
vertices.append(vert)
return vid
def toQuaazarMesh(msh, smoothNormals, biasMatrix):
tris = msh.polygons
vertices = []
indices = []
for tri in tris:
triID = tri.index
loopIDs = list(tri.loop_indices)
[a,b,c] = tri.vertices
a_ = createVertex(msh, a, triID, loopIDs[0], smoothNormals, biasMatrix)
b_ = createVertex(msh, b, triID, loopIDs[1], smoothNormals, biasMatrix)
c_ = createVertex(msh, c, triID, loopIDs[2], smoothNormals, biasMatrix)
aID = recordVertex(vertices, indices, a_)
bID = recordVertex(vertices, indices, b_)
cID = recordVertex(vertices, indices, c_)
indices.append([aID,bID,cID])
return QuaazarMesh(vertices,indices)
| phaazon/quaazar | sdk/scripts/blender/export_qmsh.py | Python | bsd-3-clause | 4,487 |
from PIL import Image #pip install Pillow
import glob
# Create the frames
frames = []
imgs = glob.glob("C:/Users/thier/workspace/spectroDb/spectrum/display/plot/*.png")
for i in imgs:
new_frame = Image.open(i)
frames.append(new_frame)
# Save into a GIF file that loops forever
frames[0].save('png_to_gif.gif', format='GIF',
append_images=frames[1:],
save_all=True,
duration=300, loop=0)
| tlemoult/spectroDb | spectrum/display/makeGif.py | Python | mit | 447 |
# -*- coding: utf-8 -*-
#
# 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.
#
"""A workflow that uses a simple Monte Carlo method to estimate π.
The algorithm computes the fraction of points drawn uniformly within the unit
square that also fall in the quadrant of the unit circle that overlaps the
square. A simple area calculation shows that this fraction should be π/4, so
we multiply our counts ratio by four to estimate π.
"""
from __future__ import absolute_import
import argparse
import json
import logging
import random
import apache_beam as beam
from apache_beam.io import WriteToText
from apache_beam.typehints import Any
from apache_beam.typehints import Iterable
from apache_beam.typehints import Tuple
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.options.pipeline_options import SetupOptions
@beam.typehints.with_output_types(Tuple[int, int, int])
@beam.typehints.with_input_types(int)
def run_trials(runs):
"""Run trials and return a 3-tuple representing the results.
Args:
runs: Number of trial runs to be executed.
Returns:
A 3-tuple (total trials, inside trials, 0).
The final zero is needed solely to make sure that the combine_results function
has same type for inputs and outputs (a requirement for combiner functions).
"""
inside_runs = 0
for _ in xrange(runs):
x = random.uniform(0, 1)
y = random.uniform(0, 1)
inside_runs += 1 if x * x + y * y <= 1.0 else 0
return runs, inside_runs, 0
@beam.typehints.with_output_types(Tuple[int, int, float])
@beam.typehints.with_input_types(Iterable[Tuple[int, int, Any]])
def combine_results(results):
"""Combiner function to sum up trials and compute the estimate.
Args:
results: An iterable of 3-tuples (total trials, inside trials, ignored).
Returns:
A 3-tuple containing the sum of total trials, sum of inside trials, and
the probability computed from the two numbers.
"""
# TODO(silviuc): Do we guarantee that argument can be iterated repeatedly?
# Should document one way or the other.
total, inside = sum(r[0] for r in results), sum(r[1] for r in results)
return total, inside, 4 * float(inside) / total
class JsonCoder(object):
"""A JSON coder used to format the final result."""
def encode(self, x):
return json.dumps(x)
class EstimatePiTransform(beam.PTransform):
"""Runs 10M trials, and combine the results to estimate pi."""
def __init__(self, tries_per_work_item=100000):
self.tries_per_work_item = tries_per_work_item
def expand(self, pcoll):
# A hundred work items of a hundred thousand tries each.
return (pcoll
| 'Initialize' >> beam.Create(
[self.tries_per_work_item] * 100).with_output_types(int)
| 'Run trials' >> beam.Map(run_trials)
| 'Sum' >> beam.CombineGlobally(combine_results).without_defaults())
def run(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('--output',
required=True,
help='Output file to write results to.')
known_args, pipeline_args = parser.parse_known_args(argv)
# We use the save_main_session option because one or more DoFn's in this
# workflow rely on global context (e.g., a module imported at module level).
pipeline_options = PipelineOptions(pipeline_args)
pipeline_options.view_as(SetupOptions).save_main_session = True
p = beam.Pipeline(options=pipeline_options)
(p # pylint: disable=expression-not-assigned
| EstimatePiTransform()
| WriteToText(known_args.output, coder=JsonCoder()))
# Actually run the pipeline (all operations above are deferred).
p.run()
if __name__ == '__main__':
logging.getLogger().setLevel(logging.INFO)
run()
| dhalperi/incubator-beam | sdks/python/apache_beam/examples/complete/estimate_pi.py | Python | apache-2.0 | 4,482 |
# research/__init__.py
default_app_config = 'research.apps.ResearchConfig'
| neuromat/nira | research/__init__.py | Python | mpl-2.0 | 75 |
"""
Wrapper for [John Burkardt's 1D FEM steady state heat equation code](https://people.sc.fsu.edu/~jburkardt/f_src/fem1d_heat_steady/fem1d_heat_steady.html)
Serves as a demo of using python ctypes with fortran.
Note that conductivity k and forcing function f specified in python must treat arguments as pointers/arrays.
michael.james.asher@gmail.com
August 2015
"""
import numpy
import subprocess
import os
import ctypes as C
"""
compile
"""
base = os.path.abspath(os.path.join(os.path.dirname(__file__), 'fem1d_heat_steady'))
compile_cmd = 'gfortran -shared -fPIC -g -o '+base+'.so '+base+'.f90'
subprocess.check_call(compile_cmd.split())
"""
wrapping function
"""
fem1d_heat_steady_so = C.CDLL(base+'.so')
def fem1d_heat_steady( n, # number of mesh points
a, b, ua, ub, # u(a)=ua on left boundary, u(b)=ub on right boundary
k, # conductivity function
f, # forcing function
x # mesh points
):
C_FUNC = C.CFUNCTYPE(C.c_double, C.POINTER(C.c_double))
u = numpy.zeros((n), dtype=numpy.float64, order="F")
fem1d_heat_steady_types, fem1d_heat_steady_args = zip(*[
[C.POINTER(C.c_int), C.c_int(n)],
[C.POINTER(C.c_double), C.c_double(a)],
[C.POINTER(C.c_double), C.c_double(b)],
[C.POINTER(C.c_double), C.c_double(ua)],
[C.POINTER(C.c_double), C.c_double(ub)],
[C_FUNC, C_FUNC(k)],
[C_FUNC, C_FUNC(f)],
[numpy.ctypeslib.ndpointer(dtype=numpy.float64, shape=(n,), flags='F_CONTIGUOUS'), x.astype(dtype=numpy.float64, order="F")],
[numpy.ctypeslib.ndpointer(dtype=numpy.float64, shape=(n,), flags='F_CONTIGUOUS'), u],
])
fem1d_heat_steady_so.fem1d_heat_steady_.argtypes = fem1d_heat_steady_types
fem1d_heat_steady_so.fem1d_heat_steady_( * fem1d_heat_steady_args )
return u
"""
demo
"""
if __name__ == '__main__':
n = 2**7
n_lf = 2**3
a = 0.
b = 1.
ua = 0.
ub = 0.
a_par = 0.5
def k(x):
py_x = x[0]
return 1. + a_par*py_x
Z_par = 0.9
def f(x):
py_x = x[0]
return 50. * Z_par**2
x = numpy.linspace(a, b, n)
x_lf = numpy.linspace(a, b, n_lf)
u = fem1d_heat_steady(n, a, b, ua, ub, k, f, x)
u_lf = fem1d_heat_steady(n_lf, a, b, ua, ub, k, f, x_lf)
import matplotlib.pylab as plt
plt.plot(x, u, '-o')
plt.plot(x_lf, u_lf)
plt.show()
| mjasher/computation | fem1d_heat_steady/fem1d_heat_steady_wrapper.py | Python | mit | 2,299 |
# 거창하게 GUN이라고 했지만 사실 해상도를 거의 두배씩 올렸다.
# 2017. 07. 06
import tensorflow as tf
from PIL import Image
import numpy as np
#이미지, 상수들
learning_rate=1e-4
W1=192
H1=144
W15=480
H15=360
W2=960
H2=720
path="../06/"
pref1="144p/"
pref2="720p/"
suff1="_144.jpg"
suff2="_720.jpg"
train_num=500#1000
file_num=2#6#30
#batch_num=1000
#가중치 초기화 함수
def weight_variable(shape, name):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial, name=name)
#절편 초기화 함수
def bias_variable(shape, name):
initial = tf.constant(0.1, shape=shape)
return tf.Variable(initial, name=name)
#2D 컨벌루션 실행
def conv2d(x, W, B):
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')+B
def getimage(idx):
img_1=Image.open(path+pref1+str(idx)+suff1)
img_1_720 = img_1.resize((H2, W2))
array_1_720=np.array(img_1_720)[:, :]
array_1_720=array_1_720.astype(np.float32)
img_2=Image.open(path+pref2+str(idx)+suff2)
array_2=np.array(img_2)[:, :, 0:3]
array_2=array_2.astype(np.float32)
return array_1_720, array_2
def l_relu(x, alpha=0.):
return tf.nn.relu(x)-alpha*tf.nn.relu(-x)
def asImage(tensor):
result = tensor[0].astype(np.uint8)
return Image.fromarray(result, 'RGB')
def showres(index, steps):
test144, test720 = getimage(index)
A=sess.run(y_result, feed_dict={x_image:[test360], y_image:[test720]})
result = A.astype(np.uint8)
#Image.fromarray(array144, 'RGB').save('results/img144.jpg')
#Image.fromarray(array720, 'RGB').save('results/img720.jpg')
asImage(result).save('results/result_06_'+str(steps)+'.jpg')
x_image144 = tf.placeholder(np.float32, shape=[None, H1, W1, 3])
x_image = tf.placeholder(np.float32, shape=[None, H2, W2, 3])
y_image = tf.placeholder(np.float32, shape=[None, H2, W2, 3])
W1 = weight_variable([11, 11, 3, 15], name = 'W1')
B1 = bias_variable([15], name = 'B1')
W2 = weight_variable([1, 1, 15, 12], name = 'W2')
B2 = bias_variable([12], name='B2')
W3 = weight_variable([5, 5, 12, 3], name = 'W3')
B3 = bias_variable([3], name = 'B3')
W4 = weight_variable([11, 11, 3, 15], name = 'W4')
B4 = bias_variable([15], name = 'B4')
W5 = weight_variable([1, 1, 15, 12], name = 'W5')
B5 = bias_variable([12], name='B5')
W6 = weight_variable([5, 5, 12, 3], name = 'W6')
B6 = bias_variable([3], name = 'B6')
F0=tf.image.resize(x_image144, (H15,W15))
F1 = l_relu(conv2d(F0, W1, B1), alpha = 0.3)
F2 = l_relu(conv2d(F1, W2, B2), alpha = 0.3)
F3 = x_image+l_relu(conv2d(F2, W3, B3), alpha = 0.3)
F4=tf.image.resize(xF3, (H15,W15))
F5 = l_relu(conv2d(F4, W1, B1), alpha = 0.3)
F6 = l_relu(conv2d(F5, W2, B2), alpha = 0.3)
y_image = x_image+l_relu(conv2d(F2, W3, B3), alpha = 0.3)
cost = tf.reduce_mean(tf.square(y_image-y_result))
train_step = tf.train.AdamOptimizer(learning_rate).minimize(cost)
saver = tf.train.Saver()
sess = tf.Session()
sess.run(tf.global_variables_initializer())
#saver.restore(sess, "01/models.ckpt")
for steps in range(train_num):
for index in range(1, file_num):
##array144은 144p인 이미지를 확대해서 720p으로 만들어놓은것.
inputarray, array144, array720 = getimage(index)
#asImage([array720]).show()
sess.run(train_step, feed_dict={x_image144:[inputarray], x_image:[array144], y_image:[array720]})
print (str(steps).zfill(3), sess.run(cost, feed_dict={x_image:[array144], y_image:[array720]}))
if(steps%5==0):
showres(index, steps)
print ("끝났다")
| yhunroh/SSHS-Waifu | Temp/train9.py | Python | mit | 3,652 |
import os
from lizard_ui.settingshelper import setup_logging
from lizard_ui.settingshelper import STATICFILES_FINDERS
DEBUG = True
TEMPLATE_DEBUG = True
# SETTINGS_DIR allows media paths and so to be relative to this settings file
# instead of hardcoded to c:\only\on\my\computer.
SETTINGS_DIR = os.path.dirname(os.path.realpath(__file__))
# BUILDOUT_DIR is for access to the "surrounding" buildout, for instance for
# BUILDOUT_DIR/var/static files to give django-staticfiles a proper place
# to place all collected static files.
BUILDOUT_DIR = os.path.abspath(os.path.join(SETTINGS_DIR, '..'))
LOGGING = setup_logging(BUILDOUT_DIR)
# ENGINE: 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
# In case of geodatabase, prepend with:
# django.contrib.gis.db.backends.(postgis)
DATABASES = {
# If you want to use another database, consider putting the database
# settings in localsettings.py. Otherwise, if you change the settings in
# the current file and commit them to the repository, other developers will
# also use these settings whether they have that database or not.
# One of those other developers is Jenkins, our continuous integration
# solution. Jenkins can only run the tests of the current application when
# the specified database exists. When the tests cannot run, Jenkins sees
# that as an error.
'default': {
'NAME': os.path.join(BUILDOUT_DIR, 'var', 'sqlite', 'test.db'),
'ENGINE': 'django.db.backends.sqlite3',
'USER': '',
'PASSWORD': '',
'HOST': '', # empty string for localhost.
'PORT': '', # empty string for default.
}
}
SITE_ID = 1
INSTALLED_APPS = [
'lizard_workspace',
'lizard_ui',
'staticfiles',
'compressor',
'south',
'django_nose',
'django_extensions',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.gis',
'django.contrib.sites',
]
ROOT_URLCONF = 'lizard_workspace.urls'
TEMPLATE_CONTEXT_PROCESSORS = (
# Uncomment this one if you use lizard-map.
# 'lizard_map.context_processors.processor.processor',
# Default django 1.3 processors.
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.contrib.messages.context_processors.messages"
)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
# Used for django-staticfiles (and for media files
STATIC_URL = '/static_media/'
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(BUILDOUT_DIR, 'var', 'static')
MEDIA_ROOT = os.path.join(BUILDOUT_DIR, 'var', 'media')
STATICFILES_FINDERS = STATICFILES_FINDERS
try:
# Import local settings that aren't stored in svn/git.
from lizard_workspace.local_testsettings import *
except ImportError:
pass
| lizardsystem/lizard-workspace | lizard_workspace/testsettings.py | Python | gpl-3.0 | 3,021 |
import email
from email.message import Message
from odoo import models, api, _
import logging
_logger = logging.getLogger(__name__)
class MailThread(models.AbstractModel):
_inherit = 'mail.thread'
def get_prefix(self, model):
try:
prefix = self.env['ir.sequence'].search([('code', '=', model)])[0].prefix
return prefix[:prefix.index('%')]
except IndexError:
return ''
def extract_code(self, prefix, subject):
"""
Extract Code from Subject string.
Code should not contain spaces and should begin
with some standard string prefix such as "TKT/"
"""
subject = subject.split()
for word in subject:
if word.startswith(prefix):
return word
def get_task_id(self, subject):
"""Get Model ID by looking up code from subject line"""
code_prefix = self.get_prefix(model='project.task')
if not code_prefix:
return None
code = self.extract_code(code_prefix, subject)
if not code:
return None
try:
task = self.env['project.task'].search([('code', '=', code)])
return task and task.id
except ValueError:
return None
@api.model
def message_process(self, model, message, custom_values=None,
save_original=False, strip_attachments=False,
thread_id=None):
"""
Some email clients strip out the Message-ID header :-(
When thread_id is None, try to extract the Task Code from the subject line
to increase chance that incoming emails will be attached to existing Task.
"""
msg = message
if not thread_id and model == 'project.task':
if not isinstance(msg, Message):
if isinstance(msg, unicode):
# Warning: message_from_string doesn't always work correctly on unicode,
# we must use utf-8 strings here :-(
msg = message.encode('utf-8')
msg = email.message_from_string(msg)
thread_id = self.get_task_id(subject=msg['subject'])
if thread_id:
_logger.info('Found %s thread_id %s for %s' % (model, thread_id, msg['subject']))
return super(MailThread, self).message_process(
model=model, message=message, custom_values=custom_values,
save_original=save_original, strip_attachments=strip_attachments,
thread_id=thread_id,
)
| thinkwelltwd/care_center | care_center/models/mail_thread.py | Python | lgpl-3.0 | 2,582 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic import TemplateView
from django.contrib.auth import views
from accounts.views import SendConfirmationEmailView
from allauth.account.views import ConfirmEmailView
admin.autodiscover()
###############################################################################################################
## APP Url Imports
##############################################################################################################
#from search import urls as urls_search
from blog import urls as urls_blog
#from blog.views import PostEditView
from accounts import urls as urls_accounts
from search import urls as urls_search
from stats import urls as urls_stats
from services import urls as urls_services
#from content import urls as urls_content
#from users import urls as urls_users
#from .views_proj import *
urlpatterns = patterns('',
# url(r'^home/', include(urls_content, namespace="content")),
#url(r'^a', TemplateView.as_view(template_name="index.html")),
url(r'^admin/', include(admin.site.urls)),
url(r'^search/', include(urls_search, namespace="search")),
url(r'^services/', include(urls_services, namespace="services")),
url(r'^stats/', include(urls_stats, namespace="stats")),
url(r'^blog/', include(urls_blog, namespace="blog")),
url(r'^docs/', include('rest_framework_swagger.urls')),
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
#url(r'^preview', PostEditView.as_view(), name="preview"),
url(r'^polymer/home/polymer/language/polymer-result', TemplateView.as_view(template_name="index4.html")),
url(r'^polymer_test', TemplateView.as_view(template_name="index5.html")),
url(r'^polymer_list', TemplateView.as_view(template_name="index6.html")),
url(r'^personal', TemplateView.as_view(template_name="index7.html")),
#url(r'^@j/', include(urls_content, namespace="content")),
#(r'^grappelli/', include('grappelli.urls')),
# ==================================== #
# User Profile & Registration
# ==================================== #
#(r'^users/profile/', include(urls_users)),
url(r'^accounts/', include(urls_accounts, namespace="accounts")),
# need this !!! as is as allatth iwll call
url(r'^account-confirm-email/(?P<key>\w+)/$', ConfirmEmailView.as_view(), name='account_confirm_email'),
url(r'^account-email-verification-sent/$', TemplateView.as_view(), name='account_email_verification_sent'),
#url(r'^regression/', include(urls_regression, namespace="regression"))
# this url is used to generate email content
#url(r'^password/reset/confirm/(?P<uid>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
# views.password_reset_confirm,
# name='password_reset_confirm'),
url('^', include('django.contrib.auth.urls')),
# This url is used by django-allauth and empty TemplateView is
# defined just to allow reverse() call inside app, for example when email
# with verification link is being sent, then it's required to render email
# content.
# account_confirm_email - You should override this view to handle it in
# your API client somehow and then, send post to /verify-email/ endpoint
# with proper key.
# If you don't want to use API on that step, then just use ConfirmEmailView
# view from:
# djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
#url(r'^account-confirm-email/(?P<key>\w+)/$', ConfirmEmailView.as_view(),
# name='account_confirm_email'),
)
# ==================================== #
# Static Pages for Dev Only
# ==================================== #
# if DEBUG (This is implicit) i.e. DEBUG must be set to TRUE
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += staticfiles_urlpatterns()
# ==================================== #
# Other Pages
# ==================================== #
# 404 - defaults to 404.html
# 500 - defaults to 500.html
# 403 - defaults to 403.html in the root of the template directory
#handler404 = 'project.views.home'
| JTarball/tetherbox | docker/app/app/backend/project/urls.py | Python | isc | 4,207 |
"""Provides device automations for NEW_NAME."""
from typing import List
import voluptuous as vol
from homeassistant.const import (
CONF_DOMAIN,
CONF_TYPE,
CONF_PLATFORM,
CONF_DEVICE_ID,
CONF_ENTITY_ID,
STATE_ON,
STATE_OFF,
)
from homeassistant.core import HomeAssistant, CALLBACK_TYPE
from homeassistant.helpers import config_validation as cv, entity_registry
from homeassistant.helpers.typing import ConfigType
from homeassistant.components.automation import state, AutomationActionType
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
from . import DOMAIN
# TODO specify your supported trigger types.
TRIGGER_TYPES = {"turned_on", "turned_off"}
TRIGGER_SCHEMA = TRIGGER_BASE_SCHEMA.extend(
{
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(CONF_TYPE): vol.In(TRIGGER_TYPES),
}
)
async def async_get_triggers(hass: HomeAssistant, device_id: str) -> List[dict]:
"""List device triggers for NEW_NAME devices."""
registry = await entity_registry.async_get_registry(hass)
triggers = []
# TODO Read this comment and remove it.
# This example shows how to iterate over the entities of this device
# that match this integration. If your triggers instead rely on
# events fired by devices without entities, do something like:
# zha_device = await _async_get_zha_device(hass, device_id)
# return zha_device.device_triggers
# Get all the integrations entities for this device
for entry in entity_registry.async_entries_for_device(registry, device_id):
if entry.domain != DOMAIN:
continue
# Add triggers for each entity that belongs to this integration
# TODO add your own triggers.
triggers.append(
{
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "turned_on",
}
)
triggers.append(
{
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_TYPE: "turned_off",
}
)
return triggers
async def async_attach_trigger(
hass: HomeAssistant,
config: ConfigType,
action: AutomationActionType,
automation_info: dict,
) -> CALLBACK_TYPE:
"""Attach a trigger."""
config = TRIGGER_SCHEMA(config)
# TODO Implement your own logic to attach triggers.
# Generally we suggest to re-use the existing state or event
# triggers from the automation integration.
if config[CONF_TYPE] == "turned_on":
from_state = STATE_OFF
to_state = STATE_ON
else:
from_state = STATE_ON
to_state = STATE_OFF
state_config = {
state.CONF_PLATFORM: "state",
CONF_ENTITY_ID: config[CONF_ENTITY_ID],
state.CONF_FROM: from_state,
state.CONF_TO: to_state,
}
state_config = state.TRIGGER_SCHEMA(state_config)
return await state.async_attach_trigger(
hass, state_config, action, automation_info, platform_type="device"
)
| joopert/home-assistant | script/scaffold/templates/device_trigger/integration/device_trigger.py | Python | apache-2.0 | 3,249 |
espaco = open ("espaco.txt", "w")
for i in range (1):
espaco.write('''ACME Inc. Uso do espaço em disco pelos usuários
------------------------------------------------------------------------
Nr. Usuário Espaço utilizado % do uso
1 alexandre 434,99 MB 16,85%
2 anderson 1187,99 MB 46,02%
3 antonio 117,73 MB 4,56%
4 carlos 87,03 MB 3,37%
5 cesar 0,94 MB 0,04%
6 rosemary 752,88 MB 29,16%
Espaço total ocupado: 2581,57 MB
Espaço médio ocupado: 430,26 MB''')
espaco.close()
espaco = open ("espaco.txt", "r")
for linha in espaco:
print(linha)
espaco.close()
| rafa-impacta/Exercicio | exec-5.py | Python | apache-2.0 | 569 |
#
# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This application 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, or (at your option)
# any later version.
#
# This application 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.
#
# The presence of this file turns this directory into a Python package
# ----------------------------------------------------------------
# Temporary workaround for ticket:181 (swig+python problem)
import sys
_RTLD_GLOBAL = 0
try:
from dl import RTLD_GLOBAL as _RTLD_GLOBAL
except ImportError:
try:
from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL
except ImportError:
pass
if _RTLD_GLOBAL != 0:
_dlopenflags = sys.getdlopenflags()
sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL)
# ----------------------------------------------------------------
# import swig generated symbols into the howto namespace
from howto_swig import *
# import any pure python here
#
# ----------------------------------------------------------------
# Tail of workaround
if _RTLD_GLOBAL != 0:
sys.setdlopenflags(_dlopenflags) # Restore original flags
# ----------------------------------------------------------------
| GREO/gnuradio-git | gr-howto-write-a-block/python/__init__.py | Python | gpl-3.0 | 1,691 |
# Copyright 2018 The TensorFlow Probability Authors.
#
# 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 Bijector."""
# Dependency imports
import numpy as np
import tensorflow.compat.v1 as tf1
import tensorflow.compat.v2 as tf
from tensorflow_probability.python import bijectors as tfb
from tensorflow_probability.python.bijectors import bijector_test_util
from tensorflow_probability.python.internal import tensorshape_util
from tensorflow_probability.python.internal import test_util
@test_util.test_all_tf_execution_regimes
class AscendingBijectorTest(test_util.TestCase):
"""Tests correctness of the Ascending transformation."""
def testName(self):
ascending = tfb.Ascending()
self.assertStartsWith(ascending.name, "ascending")
def testBijectorVector(self):
ordered = tfb.Invert(tfb.Ascending())
x = np.asarray([[2., 3, 4], [4., 8, 13]])
y = [[2., 0, 0], [4., np.log(4.), np.log(5.)]]
self.assertAllClose(y, self.evaluate(ordered.forward(x)))
self.assertAllClose(x, self.evaluate(ordered.inverse(y)))
self.assertAllClose(
np.sum(np.asarray(y)[..., 1:], axis=-1),
self.evaluate(ordered.inverse_log_det_jacobian(y, event_ndims=1)),
atol=0.,
rtol=1e-7)
self.assertAllClose(
self.evaluate(-ordered.inverse_log_det_jacobian(y, event_ndims=1)),
self.evaluate(ordered.forward_log_det_jacobian(x, event_ndims=1)),
atol=0.,
rtol=1e-7)
def testBijectorUnknownShape(self):
ordered = tfb.Invert(tfb.Ascending())
x_ = np.asarray([[2., 3, 4], [4., 8, 13]], dtype=np.float32)
y_ = np.asarray(
[[2., 0, 0], [4., np.log(4.), np.log(5.)]], dtype=np.float32)
x = tf1.placeholder_with_default(x_, shape=[2, None])
y = tf1.placeholder_with_default(y_, shape=[2, None])
self.assertAllClose(y_, self.evaluate(ordered.forward(x)))
self.assertAllClose(x_, self.evaluate(ordered.inverse(y)))
self.assertAllClose(
np.sum(np.asarray(y_)[..., 1:], axis=-1),
self.evaluate(ordered.inverse_log_det_jacobian(y, event_ndims=1)),
atol=0.,
rtol=1e-7)
self.assertAllClose(
-self.evaluate(ordered.inverse_log_det_jacobian(y, event_ndims=1)),
self.evaluate(ordered.forward_log_det_jacobian(x, event_ndims=1)),
atol=0.,
rtol=1e-7)
def testShapeGetters(self):
x = tf.TensorShape([4])
y = tf.TensorShape([4])
bijector = tfb.Ascending(validate_args=True)
self.assertAllEqual(y, bijector.forward_event_shape(x))
self.assertAllEqual(
tensorshape_util.as_list(y),
self.evaluate(
bijector.forward_event_shape_tensor(tensorshape_util.as_list(x))))
self.assertAllEqual(x, bijector.inverse_event_shape(y))
self.assertAllEqual(
tensorshape_util.as_list(x),
self.evaluate(
bijector.inverse_event_shape_tensor(tensorshape_util.as_list(y))))
def testBijectiveAndFinite(self):
ascending = tfb.Ascending()
x = (np.random.randn(3, 10)).astype(np.float32)
y = np.sort(np.random.randn(3, 10), axis=-1).astype(np.float32)
bijector_test_util.assert_bijective_and_finite(
ascending, x, y, eval_func=self.evaluate, event_ndims=1)
if __name__ == "__main__":
test_util.main()
| tensorflow/probability | tensorflow_probability/python/bijectors/ascending_test.py | Python | apache-2.0 | 3,843 |
#!/usr/bin/env python
#
# Read in MTE extractions (.jsonl) and align with expert-vetting (.csv)
# to filter; write out only those marked 'Y' by expert to new .jsonl.
#
# Author: Kiri Wagstaff
# June 10, 2018
# Copyright notice at bottom of file.
import sys, os
from ioutils import read_jsonlines, dump_jsonlines
import codecs, csv
def read_extractions(extractions):
# Get the number of lines (docs) to process
# Do this before re-opening the file because read_jsonlines()
# returns a generator.
with open(extractions) as f:
l = f.readlines()
ndocs = len(l)
f.close()
# Read in the JSON file (contains, among other things, extractions)
docs = read_jsonlines(extractions)
return docs, ndocs
# Read in the expert annotations (.csv)
def read_expert(expert):
judgments = []
#nrows = 0
with codecs.open(expert, 'r', 'UTF-8') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
judgments.append(row)
#nrows += 1
#if row['Judgment'] == 'Y':
# approved.append(row)
#print len(approved), 'of', nrows, 'relations approved.'
print 'Read %d judgments.' % len(judgments)
return judgments
def query_relation(target, cont, sentence):
print('<%s> contains <%s>? [y/n]' % (target, cont))
print('Sentence: <%s>' % sentence)
return raw_input()
def main(extractions, expert, outfile):
# Check arguments
if not os.path.exists(extractions):
print('Could not find extractions file %s.' % extractions)
sys.exit(1)
if not os.path.exists(expert):
print('Could not find expert file %s.' % expert)
sys.exit(1)
# Read in the JSON file (contains, among other things, extractions)
docs, ndocs = read_extractions(extractions)
filtered_docs = []
# Read in the expert annotations (.csv)
judgments = read_expert(expert)
# Align them. Iterate over the documents.
n_rels_keep = 0
n_rels_total = 0
for (i,d) in enumerate(docs):
# If there are no relations, omit this document
if 'rel' not in d['metadata']:
continue
docid = d['metadata']['resourceName']
rels = d['metadata']['rel']
n_rels_total += len(rels)
doc_judgments = [j for j in judgments if j[' Docid'] == docid]
# Relations to keep
filtered_rels = []
if len(doc_judgments) == len(rels):
# Same number in each set, so we can zip them up
for (r, j) in zip(rels, doc_judgments):
# Can't do exact string match on target_name because
# some are partials.
# Can't do exact string match on cont_name because
# I helpfully expanded element names in the expert file.
# Can do match on sentence at least!
if (r['target_names'][0] == j[' Target'] and
#r['cont_names'][0] == j[' Component'] and
r['sentence'] == j[' Sentence']):
# Only keep items judged 'Y'
if j['Judgment'] == 'Y':
filtered_rels.append(r)
else:
# Mismatch, so drop into manual review mode
res = query_relation(r['target_names'][0],
r['cont_names'][0],
r['sentence'])
if res == 'y' or res == 'Y':
filtered_rels.append(r)
else:
# Different number of relations in expert vs. system output
# so time for manual review
print('%d/%d: ****** MANUAL REVIEW MODE (%s) ******' % \
(i, ndocs, docid))
for r in rels:
res = query_relation(r['target_names'][0],
r['cont_names'][0],
r['sentence'])
if res == 'y' or res == 'Y':
filtered_rels.append(r)
print('%s (%d/%d): Kept %d/%d relations.' % \
(docid, i, ndocs, len(filtered_rels), len(rels)))
# Only save this document if it has relations remaining
if len(filtered_rels) > 0:
n_rels_keep += len(filtered_rels)
d['metadata']['rel'] = filtered_rels
filtered_docs.append(d)
# Save filtered JSON content to outfile
dump_jsonlines(filtered_docs, outfile)
print
print('Kept %d/%d relations in %d/%d documents.' % \
(n_rels_keep, n_rels_total,
len(filtered_docs), ndocs))
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS)
parser.add_argument('extractions', help='.jsonl file containing all NER and RE extractions')
parser.add_argument('expert', help='.csv file containing expert judgment of all relations')
parser.add_argument('outfile', help='.jsonl file to store filtered extractions')
args = parser.parse_args()
main(**vars(args))
# Copyright 2018, by the California Institute of Technology. ALL
# RIGHTS RESERVED. United States Government Sponsorship
# acknowledged. Any commercial use must be negotiated with the Office
# of Technology Transfer at the California Institute of Technology.
#
# This software may be subject to U.S. export control laws and
# regulations. By accepting this document, the user agrees to comply
# with all applicable U.S. export laws and regulations. User has the
# responsibility to obtain export licenses, or other export authority
# as may be required before exporting such information to foreign
# countries or providing access to foreign persons.
| USCDataScience/parser-indexer-py | src/parserindexer/filter_extractions.py | Python | apache-2.0 | 5,825 |
# Copyright 2016 The TensorFlow Authors. 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 routing function op."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.contrib.tensor_forest.hybrid.ops import gen_training_ops
from tensorflow.contrib.tensor_forest.hybrid.python.ops import training_ops
from tensorflow.contrib.tensor_forest.python import tensor_forest
from tensorflow.python.framework import test_util
from tensorflow.python.platform import googletest
class KFeatureRoutingFunctionTest(test_util.TensorFlowTestCase):
def setUp(self):
self.input_data = [[-1., 0.], [-1., 2.],
[1., 0.], [1., -2.]]
self.input_labels = [0., 1., 2., 3.]
self.tree = [[1, 0], [-1, 0], [-1, 0]]
self.tree_weights = [[1.0, 0.0], [1.0, 0.0], [1.0, 0.0]]
self.tree_thresholds = [0., 0., 0.]
self.ops = training_ops.Load()
self.params = tensor_forest.ForestHParams(
num_features=2,
hybrid_tree_depth=2,
base_random_seed=10,
feature_bagging_fraction=1.0,
regularization_strength=0.01,
regularization="",
weight_init_mean=0.0,
weight_init_std=0.1)
self.params.num_nodes = 2**self.params.hybrid_tree_depth - 1
self.params.num_leaves = 2**(self.params.hybrid_tree_depth - 1)
self.params.num_features_per_node = (
self.params.feature_bagging_fraction * self.params.num_features)
self.params.regression = False
def testParams(self):
self.assertEquals(self.params.num_nodes, 3)
self.assertEquals(self.params.num_features, 2)
self.assertEquals(self.params.num_features_per_node, 2)
def testRoutingFunction(self):
with self.test_session():
route_tensor = gen_training_ops.k_feature_routing_function(
self.input_data,
self.tree_weights,
self.tree_thresholds,
max_nodes=self.params.num_nodes,
num_features_per_node=self.params.num_features_per_node,
layer_num=0,
random_seed=self.params.base_random_seed)
route_tensor_shape = route_tensor.get_shape()
self.assertEquals(len(route_tensor_shape), 2)
self.assertEquals(route_tensor_shape[0], 4)
self.assertEquals(route_tensor_shape[1], 3)
routes = route_tensor.eval()
print(routes)
# Point 1
# Node 1 is a decision node => probability = 1.0
self.assertAlmostEquals(1.0, routes[0, 0])
# Probability left output = 1.0 / (1.0 + exp(1.0)) = 0.26894142
self.assertAlmostEquals(0.26894142, routes[0, 1])
# Probability right = 1 - 0.2689414 = 0.73105858
self.assertAlmostEquals(0.73105858, routes[0, 2])
if __name__ == "__main__":
googletest.main()
| npuichigo/ttsflow | third_party/tensorflow/tensorflow/contrib/tensor_forest/hybrid/python/kernel_tests/k_feature_routing_function_op_test.py | Python | apache-2.0 | 3,383 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2018 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = """
---
module: edgeswitch_facts
version_added: "2.8"
author: "Frederic Bor (@f-bor)"
short_description: Collect facts from remote devices running Edgeswitch
description:
- Collects a base set of device facts from a remote device that
is running Ubiquiti Edgeswitch. This module prepends all of the
base network fact keys with C(ansible_net_<fact>). The facts
module will always collect a base set of facts from the device
and can enable or disable collection of additional facts.
notes:
- Tested against Edgeswitch 1.7.4
options:
gather_subset:
description:
- When supplied, this argument will restrict the facts collected
to a given subset. Possible values for this argument include
all, config, and interfaces. Can specify a list of
values to include a larger subset. Values can also be used
with an initial C(M(!)) to specify that a specific subset should
not be collected.
required: false
default: '!config'
"""
EXAMPLES = """
# Collect all facts from the device
- edgeswitch_facts:
gather_subset: all
# Collect only the config and default facts
- edgeswitch_facts:
gather_subset:
- config
"""
RETURN = """
ansible_net_gather_subset:
description: The list of fact subsets collected from the device
returned: always
type: list
# default
ansible_net_model:
description: The model name returned from the device
returned: always
type: string
ansible_net_serialnum:
description: The serial number of the remote device
returned: always
type: string
ansible_net_version:
description: The operating system version running on the remote device
returned: always
type: string
ansible_net_hostname:
description: The configured hostname of the device
returned: always
type: string
# config
ansible_net_config:
description: The current active config from the device
returned: when config is configured
type: string
# interfaces
ansible_net_interfaces:
description: A hash of all interfaces running on the system
returned: when interfaces is configured
type: dict
"""
import re
from ansible.module_utils.network.edgeswitch.edgeswitch import run_commands
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six import iteritems
class FactsBase(object):
COMMANDS = list()
def __init__(self, module):
self.module = module
self.facts = dict()
self.responses = None
def populate(self):
self.responses = run_commands(self.module, commands=self.COMMANDS, check_rc=False)
def run(self, cmd):
return run_commands(self.module, commands=cmd, check_rc=False)
class Default(FactsBase):
COMMANDS = ['show version', 'show sysinfo']
def populate(self):
super(Default, self).populate()
data = self.responses[0]
if data:
self.facts['version'] = self.parse_version(data)
self.facts['serialnum'] = self.parse_serialnum(data)
self.facts['model'] = self.parse_model(data)
self.facts['hostname'] = self.parse_hostname(self.responses[1])
def parse_version(self, data):
match = re.search(r'Software Version\.+ (.*)', data)
if match:
return match.group(1)
def parse_hostname(self, data):
match = re.search(r'System Name\.+ (.*)', data)
if match:
return match.group(1)
def parse_model(self, data):
match = re.search(r'Machine Model\.+ (.*)', data)
if match:
return match.group(1)
def parse_serialnum(self, data):
match = re.search(r'Serial Number\.+ (.*)', data)
if match:
return match.group(1)
class Config(FactsBase):
COMMANDS = ['show running-config']
def populate(self):
super(Config, self).populate()
data = self.responses[0]
if data:
self.facts['config'] = data
class Interfaces(FactsBase):
COMMANDS = [
'show interfaces description',
'show interfaces status all'
]
def populate(self):
super(Interfaces, self).populate()
interfaces = {}
data = self.responses[0]
self.parse_interfaces_description(data, interfaces)
data = self.responses[1]
self.parse_interfaces_status(data, interfaces)
self.facts['interfaces'] = interfaces
def parse_interfaces_description(self, data, interfaces):
for line in data.split('\n'):
match = re.match(r'(\d\/\d+)\s+(\w+)\s+(\w+)', line)
if match:
name = match.group(1)
interface = {}
interface['operstatus'] = match.group(2)
interface['lineprotocol'] = match.group(3)
interface['description'] = line[30:]
interfaces[name] = interface
def parse_interfaces_status(self, data, interfaces):
for line in data.split('\n'):
match = re.match(r'(\d\/\d+)', line)
if match:
name = match.group(1)
interface = interfaces[name]
interface['physicalstatus'] = line[61:71].strip()
interface['mediatype'] = line[73:91].strip()
FACT_SUBSETS = dict(
default=Default,
config=Config,
interfaces=Interfaces,
)
VALID_SUBSETS = frozenset(FACT_SUBSETS.keys())
def main():
"""main entry point for module execution
"""
argument_spec = dict(
gather_subset=dict(default=['!config'], type='list')
)
module = AnsibleModule(argument_spec=argument_spec,
supports_check_mode=True)
gather_subset = module.params['gather_subset']
runable_subsets = set()
exclude_subsets = set()
for subset in gather_subset:
if subset == 'all':
runable_subsets.update(VALID_SUBSETS)
continue
if subset.startswith('!'):
subset = subset[1:]
if subset == 'all':
exclude_subsets.update(VALID_SUBSETS)
continue
exclude = True
else:
exclude = False
if subset not in VALID_SUBSETS:
module.fail_json(msg='Bad subset')
if exclude:
exclude_subsets.add(subset)
else:
runable_subsets.add(subset)
if not runable_subsets:
runable_subsets.update(VALID_SUBSETS)
runable_subsets.difference_update(exclude_subsets)
runable_subsets.add('default')
facts = dict()
facts['gather_subset'] = list(runable_subsets)
instances = list()
for key in runable_subsets:
instances.append(FACT_SUBSETS[key](module))
for inst in instances:
inst.populate()
facts.update(inst.facts)
ansible_facts = dict()
for key, value in iteritems(facts):
key = 'ansible_net_%s' % key
ansible_facts[key] = value
module.exit_json(ansible_facts=ansible_facts)
if __name__ == '__main__':
main()
| alexlo03/ansible | lib/ansible/modules/network/edgeswitch/edgeswitch_facts.py | Python | gpl-3.0 | 7,417 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012:
# Guillaume Subiron, maethor@subiron.org
#
# 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/>.
| shinken-monitoring/mod-webui | module/plugins/stats/__init__.py | Python | agpl-3.0 | 791 |
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': "Manage model export profiles",
'category': 'Personalization',
'version': '8.0.2.1.0',
'depends': [
'web',
],
'data': [
'views/assets.xml',
'views/ir_exports_view.xml',
],
'qweb': [
"static/src/xml/base.xml",
],
'author': 'Antiun Ingeniería S.L., '
'Tecnativa, '
'Odoo Community Association (OCA)',
'website': 'http://www.antiun.com',
'license': 'AGPL-3',
'installable': True,
'post_init_hook': 'post_init_hook',
}
| ddico/server-tools | base_export_manager/__openerp__.py | Python | agpl-3.0 | 689 |
import re
import csv
from openstates.scrape import Person, Scraper
from utils import LXMLMixin
import requests
class NHPersonScraper(Scraper, LXMLMixin):
members_url = "http://www.gencourt.state.nh.us/downloads/Members.csv"
lookup_url = "http://www.gencourt.state.nh.us/house/members/memberlookup.aspx"
house_profile_url = (
"http://www.gencourt.state.nh.us/house/members/member.aspx?member={}"
)
senate_profile_url = (
"http://www.gencourt.state.nh.us/Senate/members/webpages/district{}.aspx"
)
chamber_map = {"H": "lower", "S": "upper"}
party_map = {
"D": "Democratic",
"R": "Republican",
"I": "Independent",
"L": "Libertarian",
}
def _get_photo(self, url, chamber):
"""Attempts to find a portrait in the given legislator profile."""
try:
doc = self.lxmlize(url)
except Exception as e:
self.warning("skipping {}: {}".format(url, e))
return ""
if chamber == "upper":
src = doc.xpath(
'//div[@id="page_content"]//img[contains(@src, '
'"images/senators") or contains(@src, "Senator")]/@src'
)
elif chamber == "lower":
src = doc.xpath('//img[contains(@src, "images/memberpics")]/@src')
if src and "nophoto" not in src[0]:
photo_url = src[0]
else:
photo_url = ""
return photo_url
def _parse_person(self, row, chamber, seat_map):
# Capture legislator vitals.
first_name = row["FirstName"]
middle_name = row["MiddleName"]
last_name = row["LastName"]
full_name = "{} {} {}".format(first_name, middle_name, last_name)
full_name = re.sub(r"[\s]{2,}", " ", full_name)
if chamber == "lower":
district = "{} {}".format(row["County"], int(row["District"])).strip()
else:
district = str(int(row["District"])).strip()
party = self.party_map[row["party"].upper()]
email = row["WorkEmail"]
if district == "0":
self.warning("Skipping {}, district is set to 0".format(full_name))
return
person = Person(
primary_org=chamber, district=district, name=full_name, party=party
)
extras = {
"first_name": first_name,
"middle_name": middle_name,
"last_name": last_name,
}
person.extras = extras
if email:
office = "Capitol" if email.endswith("@leg.state.nh.us") else "District"
person.add_contact_detail(
type="email", value=email, note=office + " Office"
)
# Capture legislator office contact information.
district_address = "{}\n{}\n{}, {} {}".format(
row["Address"], row["address2"], row["city"], row["State"], row["Zipcode"]
).strip()
phone = row["Phone"].strip()
if not phone:
phone = None
if district_address:
office = "Capitol" if chamber == "upper" else "District"
person.add_contact_detail(
type="address", value=district_address, note=office + " Office"
)
if phone:
office = "Capitol" if "271-" in phone else "District"
person.add_contact_detail(
type="voice", value=phone, note=office + " Office"
)
# Retrieve legislator portrait.
profile_url = None
if chamber == "upper":
profile_url = self.senate_profile_url.format(row["District"])
elif chamber == "lower":
try:
seat_number = seat_map[row["seatno"]]
profile_url = self.house_profile_url.format(seat_number)
except KeyError:
pass
if profile_url:
person.image = self._get_photo(profile_url, chamber)
person.add_source(profile_url)
return person
def _parse_members_txt(self):
response = requests.get(self.members_url)
lines = csv.reader(response.text.strip().split("\n"), delimiter=",")
header = next(lines)
for line in lines:
yield dict(zip(header, line))
def _parse_seat_map(self):
"""Get mapping between seat numbers and legislator identifiers."""
seat_map = {}
page = self.lxmlize(self.lookup_url)
options = page.xpath('//select[@id="member"]/option')
for option in options:
member_url = self.house_profile_url.format(option.attrib["value"])
member_page = self.lxmlize(member_url)
table = member_page.xpath('//table[@id="Table1"]')
if table:
res = re.search(r"seat #:(\d+)", table[0].text_content(), re.IGNORECASE)
if res:
seat_map[res.groups()[0]] = option.attrib["value"]
return seat_map
def scrape(self, chamber=None):
chambers = [chamber] if chamber is not None else ["upper", "lower"]
seat_map = self._parse_seat_map()
for chamber in chambers:
for row in self._parse_members_txt():
print(row["electedStatus"])
if self.chamber_map[row["LegislativeBody"]] == chamber:
person = self._parse_person(row, chamber, seat_map)
# allow for skipping
if not person:
continue
person.add_source(self.members_url)
person.add_link(self.members_url)
yield person
| sunlightlabs/openstates | scrapers/nh/people.py | Python | gpl-3.0 | 5,642 |
# Copyright 2018,2019,2020,2021 Sony Corporation.
#
# 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 nnabla.testing import assert_allclose
def scheduler_tester(scheduler, ref_scheduler, max_iter, scheduler_args=[], atol=1e-6):
# Create scheduler
s = scheduler(*scheduler_args)
ref_s = ref_scheduler(*scheduler_args)
# Check learning rate
lr = [s.get_learning_rate(iter) for iter in range(max_iter)]
ref_lr = [ref_s.get_learning_rate(iter) for iter in range(max_iter)]
assert_allclose(lr, ref_lr, atol=atol)
| sony/nnabla | python/test/utils/learning_rate_scheduler/learning_rate_scheduler_test_utils.py | Python | apache-2.0 | 1,039 |
from django.http import HttpResponse,HttpResponseRedirect
from django.shortcuts import render,render_to_response,get_object_or_404
from django.template import RequestContext,loader,Context
from django.views.generic import ListView
from django.core.context_processors import csrf
from django.contrib.auth import authenticate,login as auth_login,logout
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from OMRS.models import JobStatus,Jobs,Authentication,Server,Shredder,Document
from OMRS.forms import UserProfileForm,UserForm,serverParams,DocumentForm
import OMRS.omrsfunctions as OF
#when using modelforms
from OMRS.forms import serverForm
# Create your views here.
def post_server_details(request):
context = RequestContext(request)
if request.method == 'GET':
form = serverForm()
else:
# A POST request: Handle Form Upload
# Bind data from request.POST into a PostForm
form = serverForm(request.POST)
if form.is_valid():
form.save()
return HttpResponseRedirect('/upload')
c = {'serverDetails':form}
return render_to_response('setup.html',c,context)
def index(request):
context = RequestContext(request)
context_dict = {'boldmessage':"I am bold"}
return render_to_response('index.html',context_dict,context)
def restricted(request):
context = RequestContext(request)
context_dict = {'boldmessage':"I am bold"}
return render_to_response('index.html',context_dict,context)
def server(request):
latest_server_list = Server.objects.all()
t = loader.get_template('server.html')
c = Context({
'latest_server_list' : latest_server_list
})
return HttpResponse(t.render(c))
def userProfile(request):
context = RequestContext(request)
return render_to_response('userprofile.html',{
'jobStatus_list' : JobStatus.objects.all(),
},context)
class jobs(ListView):
model = Jobs
template_name = 'jobs.html'
def userJobSettings(request):
context = RequestContext(request)
return render_to_response('serverparams.html',{
'userjobsettings_list': Server.objects.all(),
},context)
def setup(request):
context = RequestContext(request)
if request.method == 'POST':
setup_form = serverParams(data=request.POST)
if setup_form.is_valid():
new_obj = setup_form.save(commit=False)
new_obj.save()
#setup_form.save()
return HttpResponseRedirect('/jobserversettings')
else:
print setup_form.errors
return render_to_response('/setup', {}, context_instance=RequestContext(request))
def serverDetails(request):
context = RequestContext(request)
if request.method == 'POST':
server_form = serverParams(data = request.POST) #whats is declared int he forms data
if server_form.is_valid():
location_list = OF.searchLocations(server_form.serverAddress,server_form.serverUsername,server_form.serverPassword)
print location_list
return render_to_response('serverdetails.html',{
'userjobsettings_list': Server.objects.all(),
})
def register(request):
context = RequestContext(request)
registered = False
# If it's a HTTP POST, we're interested in processing form data.
if request.method == 'POST':
# Attempt to grab information from the raw form information.
# Note that we make use of both UserForm and UserProfileForm.
user_form = UserForm(data=request.POST)
profile_form = UserProfileForm(data=request.POST)
# If the two forms are valid...
if user_form.is_valid() and profile_form.is_valid():
# Save the user's form data to the database.
user = user_form.save()
# Now we hash the password with the set_password method.
# Once hashed, we can update the user object.
user.set_password(user.password)
user.save()
# Now sort out the UserProfile instance.
# Since we need to set the user attribute ourselves, we set commit=False.
# This delays saving the model until we're ready to avoid integrity problems.
profile = profile_form.save(commit=False)
profile.user = user
# Did the user provide a profile picture?
# If so, we need to get it from the input form and put it in the UserProfile model.
#if 'picture' in request.FILES:
#profile.picture = request.FILES['picture']
# Now we save the UserProfile model instance.
profile.save()
# Update our variable to tell the template registration was successful.
registered = True
#on successful registration move to the login page
return HttpResponseRedirect('/login')
# Invalid form or forms - mistakes or something else?
# Print problems to the terminal.
# They'll also be shown to the user.
else:
print user_form.errors, profile_form.errors
# Not a HTTP POST, so we render our form using two ModelForm instances.
# These forms will be blank, ready for user input.
else:
user_form = UserForm()
profile_form = UserProfileForm()
# Render the template depending on the context.
return render_to_response(
'register.html',
{'user_form': user_form, 'profile_form': profile_form, 'registered': registered},
context)
def user_login(request):
# Like before, obtain the context for the user's request.
context = RequestContext(request)
c = {}
c.update(csrf(request))
# If the request is a HTTP POST, try to pull out the relevant information.
if request.method == 'POST':
# Gather the username and password provided by the user.
# This information is obtained from the login form.
username = request.POST['username']
password = request.POST['password']
# Use Django's machinery to attempt to see if the username/password
# combination is valid - a User object is returned if it is.
user = authenticate(username=username, password=password)
# If we have a User object, the details are correct.
# If None (Python's way of representing the absence of a value), no user
# with matching credentials was found.
if user is not None:
# Is the account active? It could have been disabled.
if user.is_active:
# If the account is valid and active, we can log the user in.
# We'll send the user back to the homepage.
auth_login(request, user)
return HttpResponseRedirect('/userprofile')
else:
# An inactive account was used - no logging in!
return HttpResponse("Your Kenya Data Works account is disabled.")
else:
# Bad login details were provided. So we can't log the user in.
print "Invalid login details: {0}, {1}".format(username, password)
return HttpResponseRedirect('/')
#return HttpResponse("Invalid login details supplied.")
# The request is not a HTTP POST, so display the login form.
# This scenario would most likely be a HTTP GET.
else:
# No context variables to pass to the template system, hence the
# blank dictionary object...
return render_to_response('login.html', {}, context)
# Use the login_required() decorator to ensure only those logged in can access the view.
@login_required
def user_logout(request):
# Since we know the user is logged in, we can now just log them out.
logout(request)
# Take the user back to the homepage.
return HttpResponseRedirect('/OMRS')
#view to support file upload
def upload(request):
# Handle file upload
if request.method == 'POST':
form = DocumentForm(request.POST, request.FILES)
if form.is_valid():
newdoc = Document(docfile = request.FILES['docfile'])
newdoc.save()
# Redirect to the document list after POST
#return HttpResponseRedirect(reverse('')) userprofile
return HttpResponseRedirect('/userprofile')
else:
form = DocumentForm() # A empty, unbound form
# Load documents for the list page
documents = Document.objects.all()
# Render list page with the documents and the form
return render_to_response(
'upload.html',
{'documents': documents, 'form': form},
context_instance=RequestContext(request)
)
'''
class servers(ListView):
model = Server
template_name = 'server.html'
def requires_login(view):
def new_view(request, *args, **kwargs):
if not request.user.is_authenticated():
return HttpResponseRedirect('/accounts/login/')
return view(request, *args, **kwargs)
return new_view
<!-- <li> Username: {{ username }}</li> -->
<li> OMRS Server: {{ serverAddress }}</li>
<li> OMRS Username: {{ serverUsername }}</li>
<li> Date Added: {{ dateAdded }}</li>
'''
'''
from django.conf.urls.defaults import *
from mysite.views import requires_login, my_view1, my_view2, my_view3
urlpatterns = patterns('',
(r'^view1/$', requires_login(my_view1)),
(r'^view2/$', requires_login(my_view2)),
(r'^view3/$', requires_login(my_view3)),
)
''' | omiltoro/softbrew | OMRS/views.py | Python | apache-2.0 | 9,545 |
#
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""Test SOAP support."""
try:
import SOAPpy
except ImportError:
SOAPpy = None
class SOAPPublisher: pass
else:
from twisted.web import soap
SOAPPublisher = soap.SOAPPublisher
from twisted.trial import unittest
from twisted.web import server
from twisted.internet import reactor, defer
from twisted.python import log
class Test(SOAPPublisher):
def soap_add(self, a, b):
return a + b
def soap_kwargs(self, a=1, b=2):
return a + b
soap_kwargs.useKeywords=True
def soap_pair(self, string, num):
return [string, num, None]
def soap_struct(self):
return SOAPpy.structType({"a": "c"})
def soap_defer(self, x):
return defer.succeed(x)
def soap_deferFail(self):
return defer.fail(ValueError())
def soap_fail(self):
raise RuntimeError
def soap_deferFault(self):
return defer.fail(ValueError())
def soap_complex(self):
return {"a": ["b", "c", 12, []], "D": "foo"}
def soap_dict(self, map, key):
return map[key]
class SOAPTestCase(unittest.TestCase):
def setUp(self):
self.p = reactor.listenTCP(0, server.Site(Test()),
interface="127.0.0.1")
self.port = self.p.getHost()[2]
def tearDown(self):
self.p.stopListening()
reactor.iterate()
reactor.iterate()
def proxy(self):
return soap.Proxy("http://localhost:%d/" % self.port)
def testResults(self):
x = self.proxy().callRemote("add", 2, 3)
self.assertEquals(unittest.deferredResult(x), 5)
x = self.proxy().callRemote("kwargs", b=2, a=3)
self.assertEquals(unittest.deferredResult(x), 5)
x = self.proxy().callRemote("kwargs", b=3)
self.assertEquals(unittest.deferredResult(x), 4)
x = self.proxy().callRemote("defer", "a")
self.assertEquals(unittest.deferredResult(x), "a")
x = self.proxy().callRemote("dict", {"a" : 1}, "a")
self.assertEquals(unittest.deferredResult(x), 1)
x = self.proxy().callRemote("pair", 'a', 1)
self.assertEquals(unittest.deferredResult(x), ['a', 1, None])
x = self.proxy().callRemote("struct")
self.assertEquals(unittest.deferredResult(x)._asdict,
{"a": "c"})
x = self.proxy().callRemote("complex")
self.assertEquals(unittest.deferredResult(x)._asdict,
{"a": ["b", "c", 12, []], "D": "foo"})
testResults.todo = "this test breaks using retrial, don't know why"
def testErrors(self):
pass
testErrors.skip = "Not yet implemented"
if not SOAPpy:
SOAPTestCase.skip = "SOAPpy not installed"
| mclois/iteexe | twisted/web/test/test_soap.py | Python | gpl-2.0 | 2,810 |
import os
import sys
import site
SAL_ENV_DIR = '/home/docker/sal'
# Use site to load the site-packages directory of our virtualenv
# site.addsitedir(os.path.join(SAL_ENV_DIR, 'lib/python2.7/site-packages'))
# Make sure we have the virtualenv and the Django app itself added to our path
sys.path.append(SAL_ENV_DIR)
sys.path.append(os.path.join(SAL_ENV_DIR, 'sal'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sal.settings")
# try:
# import newrelic.agent
# if os.path.isfile(os.getenv('NEW_RELIC_INI'))
# newrelic.agent.initialize(os.getenv('NEW_RELIC_INI'))
# except:
# pass
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
| salopensource/sal | docker/wsgi.py | Python | apache-2.0 | 691 |
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 = {
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'http-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'tftp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'netconf-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'xr-xml',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'ssh-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'snmp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'telnet-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'all-protocols',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [b'(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Name of the Interface
''',
'interface_name',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('all-protocols', REFERENCE_CLASS, 'AllProtocols' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols',
[], [],
''' Configure all protocols on this interface
''',
'all_protocols',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('http-protocol', REFERENCE_CLASS, 'HttpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol',
[], [],
''' Configure HTTP on this interface
''',
'http_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('netconf-protocol', REFERENCE_CLASS, 'NetconfProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol',
[], [],
''' Configure NETCONF protocol and peer addresses
''',
'netconf_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('snmp-protocol', REFERENCE_CLASS, 'SnmpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol',
[], [],
''' Configure SNMP for this interface
''',
'snmp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('ssh-protocol', REFERENCE_CLASS, 'SshProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol',
[], [],
''' Configure SSH protocol and peer addresses
''',
'ssh_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('telnet-protocol', REFERENCE_CLASS, 'TelnetProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol',
[], [],
''' Configure Telnet for this interface
''',
'telnet_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('tftp-protocol', REFERENCE_CLASS, 'TftpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol',
[], [],
''' Configure TFTP on this interface
''',
'tftp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('xr-xml', REFERENCE_CLASS, 'XrXml' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml',
[], [],
''' Configure XML and peer addresses
''',
'xr_xml',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'interface',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces',
False,
[
_MetaInfoClassMember('interface', REFERENCE_LIST, 'Interface' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface',
[], [],
''' Specific interface
''',
'interface',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'interfaces',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'http-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'tftp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'netconf-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'xr-xml',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'ssh-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'snmp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'telnet-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'all-protocols',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces',
False,
[
_MetaInfoClassMember('all-protocols', REFERENCE_CLASS, 'AllProtocols' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols',
[], [],
''' Configure all protocols on this interface
''',
'all_protocols',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('http-protocol', REFERENCE_CLASS, 'HttpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol',
[], [],
''' Configure HTTP on this interface
''',
'http_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('netconf-protocol', REFERENCE_CLASS, 'NetconfProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol',
[], [],
''' Configure NETCONF protocol and peer addresses
''',
'netconf_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('snmp-protocol', REFERENCE_CLASS, 'SnmpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol',
[], [],
''' Configure SNMP for this interface
''',
'snmp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('ssh-protocol', REFERENCE_CLASS, 'SshProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol',
[], [],
''' Configure SSH protocol and peer addresses
''',
'ssh_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('telnet-protocol', REFERENCE_CLASS, 'TelnetProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol',
[], [],
''' Configure Telnet for this interface
''',
'telnet_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('tftp-protocol', REFERENCE_CLASS, 'TftpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol',
[], [],
''' Configure TFTP on this interface
''',
'tftp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('xr-xml', REFERENCE_CLASS, 'XrXml' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml',
[], [],
''' Configure XML and peer addresses
''',
'xr_xml',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'all-interfaces',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection',
False,
[
_MetaInfoClassMember('all-interfaces', REFERENCE_CLASS, 'AllInterfaces' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces',
[], [],
''' Configure all Inband interfaces
''',
'all_interfaces',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('interfaces', REFERENCE_CLASS, 'Interfaces' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces',
[], [],
''' Configure a specific interface
''',
'interfaces',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'interface-selection',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Outband' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Outband',
False,
[
_MetaInfoClassMember('interface-selection', REFERENCE_CLASS, 'InterfaceSelection' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection',
[], [],
''' Configure interfaces
''',
'interface_selection',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('outband-vrf', ATTRIBUTE, 'str' , None, None,
[], [],
''' Configure outband VRF
''',
'outband_vrf',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'outband',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'http-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'tftp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'netconf-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'xr-xml',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'ssh-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'snmp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'telnet-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'all-protocols',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], [b'(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Name of the Interface
''',
'interface_name',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('all-protocols', REFERENCE_CLASS, 'AllProtocols' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols',
[], [],
''' Configure all protocols on this interface
''',
'all_protocols',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('http-protocol', REFERENCE_CLASS, 'HttpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol',
[], [],
''' Configure HTTP on this interface
''',
'http_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('netconf-protocol', REFERENCE_CLASS, 'NetconfProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol',
[], [],
''' Configure NETCONF protocol and peer addresses
''',
'netconf_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('snmp-protocol', REFERENCE_CLASS, 'SnmpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol',
[], [],
''' Configure SNMP for this interface
''',
'snmp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('ssh-protocol', REFERENCE_CLASS, 'SshProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol',
[], [],
''' Configure SSH protocol and peer addresses
''',
'ssh_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('telnet-protocol', REFERENCE_CLASS, 'TelnetProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol',
[], [],
''' Configure Telnet for this interface
''',
'telnet_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('tftp-protocol', REFERENCE_CLASS, 'TftpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol',
[], [],
''' Configure TFTP on this interface
''',
'tftp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('xr-xml', REFERENCE_CLASS, 'XrXml' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml',
[], [],
''' Configure XML and peer addresses
''',
'xr_xml',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'interface',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces',
False,
[
_MetaInfoClassMember('interface', REFERENCE_LIST, 'Interface' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface',
[], [],
''' Specific interface
''',
'interface',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'interfaces',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'http-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'tftp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'netconf-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'xr-xml',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'ssh-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'snmp-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'telnet-protocol',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v4',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer',
False,
[
_MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', 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}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address', 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])))(%[\\p{N}\\p{L}]+)?'],
''' prefix
''',
'address',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers',
False,
[
_MetaInfoClassMember('peer', REFERENCE_LIST, 'Peer' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer',
[], [],
''' Configure peer on the interface
''',
'peer',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peers',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
False,
[
_MetaInfoClassMember('address-prefix', REFERENCE_UNION, 'str' , None, None,
[], [],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True, [
_MetaInfoClassMember('address-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])/(([0-9])|([1-2][0-9])|(3[0-2]))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
_MetaInfoClassMember('address-prefix', 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])))'],
''' prefix/length
''',
'address_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', True),
]),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefix',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
False,
[
_MetaInfoClassMember('peer-prefix', REFERENCE_LIST, 'PeerPrefix' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix',
[], [],
''' Peer address (with prefix)
''',
'peer_prefix',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-prefixes',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6',
False,
[
_MetaInfoClassMember('peer-prefixes', REFERENCE_CLASS, 'PeerPrefixes' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes',
[], [],
''' Configure peer addresses with prefix
''',
'peer_prefixes',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peers', REFERENCE_CLASS, 'Peers' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers',
[], [],
''' Configure peer addresses
''',
'peers',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-v6',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass',
False,
[
_MetaInfoClassMember('peer-all', ATTRIBUTE, 'Empty' , None, None,
[], [],
''' Only takes 'True'
''',
'peer_all',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v4', REFERENCE_CLASS, 'PeerV4' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4',
[], [],
''' Configure v4 peer addresses
''',
'peer_v4',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('peer-v6', REFERENCE_CLASS, 'PeerV6' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6',
[], [],
''' Configure v6 peer addresses
''',
'peer_v6',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'peer-class',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols',
False,
[
_MetaInfoClassMember('peer-class', REFERENCE_CLASS, 'PeerClass' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass',
[], [],
''' Configure peer addresses
''',
'peer_class',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'all-protocols',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces',
False,
[
_MetaInfoClassMember('all-protocols', REFERENCE_CLASS, 'AllProtocols' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols',
[], [],
''' Configure all protocols on this interface
''',
'all_protocols',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('http-protocol', REFERENCE_CLASS, 'HttpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol',
[], [],
''' Configure HTTP on this interface
''',
'http_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('netconf-protocol', REFERENCE_CLASS, 'NetconfProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol',
[], [],
''' Configure NETCONF protocol and peer addresses
''',
'netconf_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('snmp-protocol', REFERENCE_CLASS, 'SnmpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol',
[], [],
''' Configure SNMP for this interface
''',
'snmp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('ssh-protocol', REFERENCE_CLASS, 'SshProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol',
[], [],
''' Configure SSH protocol and peer addresses
''',
'ssh_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('telnet-protocol', REFERENCE_CLASS, 'TelnetProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol',
[], [],
''' Configure Telnet for this interface
''',
'telnet_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('tftp-protocol', REFERENCE_CLASS, 'TftpProtocol' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol',
[], [],
''' Configure TFTP on this interface
''',
'tftp_protocol',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('xr-xml', REFERENCE_CLASS, 'XrXml' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml',
[], [],
''' Configure XML and peer addresses
''',
'xr_xml',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'all-interfaces',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection',
False,
[
_MetaInfoClassMember('all-interfaces', REFERENCE_CLASS, 'AllInterfaces' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces',
[], [],
''' Configure all Inband interfaces
''',
'all_interfaces',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('interfaces', REFERENCE_CLASS, 'Interfaces' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces',
[], [],
''' Configure a specific interface
''',
'interfaces',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'interface-selection',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection.Inband' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection.Inband',
False,
[
_MetaInfoClassMember('interface-selection', REFERENCE_CLASS, 'InterfaceSelection' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection',
[], [],
''' Configure interfaces
''',
'interface_selection',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'inband',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane.ManagementPlaneProtection' : {
'meta_info' : _MetaInfoClass('ControlPlane.ManagementPlaneProtection',
False,
[
_MetaInfoClassMember('inband', REFERENCE_CLASS, 'Inband' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Inband',
[], [],
''' Inband Configuration
''',
'inband',
'Cisco-IOS-XR-lib-mpp-cfg', False),
_MetaInfoClassMember('outband', REFERENCE_CLASS, 'Outband' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection.Outband',
[], [],
''' Outband Configuration
''',
'outband',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'management-plane-protection',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
'ControlPlane' : {
'meta_info' : _MetaInfoClass('ControlPlane',
False,
[
_MetaInfoClassMember('management-plane-protection', REFERENCE_CLASS, 'ManagementPlaneProtection' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg', 'ControlPlane.ManagementPlaneProtection',
[], [],
''' Configure management plane protection
''',
'management_plane_protection',
'Cisco-IOS-XR-lib-mpp-cfg', False),
],
'Cisco-IOS-XR-lib-mpp-cfg',
'control-plane',
_yang_ns._namespaces['Cisco-IOS-XR-lib-mpp-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg'
),
},
}
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.HttpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TftpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.NetconfProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.XrXml']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SshProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.SnmpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.TelnetProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface.AllProtocols']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces.Interface']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.HttpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TftpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.NetconfProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.XrXml']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SshProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.SnmpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.TelnetProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces.AllProtocols']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.Interfaces']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection.AllInterfaces']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband.InterfaceSelection']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Outband']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.HttpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TftpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.NetconfProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.XrXml']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SshProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.SnmpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.TelnetProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface.AllProtocols']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces.Interface']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers.Peer']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes.PeerPrefix']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.Peers']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6.PeerPrefixes']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV4']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass.PeerV6']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols.PeerClass']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.HttpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TftpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.NetconfProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.XrXml']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SshProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.SnmpProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.TelnetProtocol']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces.AllProtocols']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.Interfaces']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection.AllInterfaces']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband.InterfaceSelection']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection.Inband']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Outband']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection.Inband']['meta_info'].parent =_meta_table['ControlPlane.ManagementPlaneProtection']['meta_info']
_meta_table['ControlPlane.ManagementPlaneProtection']['meta_info'].parent =_meta_table['ControlPlane']['meta_info']
| 111pontes/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_lib_mpp_cfg.py | Python | apache-2.0 | 672,258 |
# coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""
FILE: sample_analyze_conversation_app.py
DESCRIPTION:
This sample demonstrates how to analyze user query for intents and entities using a conversation project.
For more info about how to setup a CLU conversation project, see the README.
USAGE:
python sample_analyze_conversation_app.py
Set the environment variables with your own values before running the sample:
1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource.
2) AZURE_CONVERSATIONS_KEY - your CLU API key.
3) AZURE_CONVERSATIONS_PROJECT - the name of your CLU conversations project.
"""
def sample_analyze_conversation_app():
# [START analyze_conversation_app]
# import libraries
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.language.conversations import ConversationAnalysisClient
from azure.ai.language.conversations.models import ConversationAnalysisOptions
# get secrets
conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"]
conv_key = os.environ["AZURE_CONVERSATIONS_KEY"]
conv_project = os.environ["AZURE_CONVERSATIONS_PROJECT"]
# prepare data
query = "One california maki please."
input = ConversationAnalysisOptions(
query=query
)
# analyze quey
client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key))
with client:
result = client.analyze_conversations(
input,
project_name=conv_project,
deployment_name='production'
)
# view result
print("query: {}".format(result.query))
print("project kind: {}\n".format(result.prediction.project_kind))
print("view top intent:")
print("\ttop intent: {}".format(result.prediction.top_intent))
print("\tcategory: {}".format(result.prediction.intents[0].category))
print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score))
print("view entities:")
for entity in result.prediction.entities:
print("\tcategory: {}".format(entity.category))
print("\ttext: {}".format(entity.text))
print("\tconfidence score: {}".format(entity.confidence_score))
# [END analyze_conversation_app]
if __name__ == '__main__':
sample_analyze_conversation_app()
| Azure/azure-sdk-for-python | sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app.py | Python | mit | 2,453 |
## Script (Python) "guard_sampled_transition"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=type_name=None
##title=
##
from dependencies.dependency import DateTime
workflow = context.portal_workflow
# False if object is cancelled
if workflow.getInfoFor(context, 'cancellation_state', "active") == "cancelled":
return False
return True
| sciCloud/OLiMS | lims/skins/bika/guard_sample_transition.py | Python | agpl-3.0 | 448 |
# Copyright (c) 2015 Presslabs SRL
#
# 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 __future__ import absolute_import
import jwt
from django.conf import settings
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
from rest_framework import serializers
from silver.api.serializers.billing_entities_serializers import ProviderUrl
from silver.api.serializers.common import CustomerUrl
from silver.api.serializers.payment_methods_serializers import PaymentMethodUrl
from silver.models import PaymentMethod, Transaction
from silver.utils.payments import get_payment_url
class TransactionUrl(serializers.HyperlinkedIdentityField):
def get_url(self, obj, view_name, request, format):
lookup_value = getattr(obj, self.lookup_field)
kwargs = {'transaction_uuid': str(lookup_value),
'customer_pk': obj.customer.pk}
return self.reverse(view_name, kwargs=kwargs, request=request, format=format)
def get_object(self, view_name, view_args, view_kwargs):
return self.queryset.get(uuid=view_kwargs['transaction_uuid'])
class TransactionPaymentUrl(serializers.HyperlinkedIdentityField):
def get_url(self, obj, view_name, request, format):
if not obj.can_be_consumed:
return None
return get_payment_url(obj, request)
def get_object(self, view_name, view_args, view_kwargs):
try:
transaction_uuid = jwt.decode(view_kwargs['token'],
settings.PAYMENT_METHOD_SECRET)['transaction']
return self.queryset.get(uuid=transaction_uuid)
except (jwt.ExpiredSignatureError, jwt.DecodeError, jwt.InvalidTokenError):
return None
class TransactionSerializer(serializers.HyperlinkedModelSerializer):
payment_method = PaymentMethodUrl(view_name='payment-method-detail',
lookup_field='payment_method',
queryset=PaymentMethod.objects.all())
url = TransactionUrl(view_name='transaction-detail', lookup_field='uuid', )
pay_url = TransactionPaymentUrl(lookup_url_kwarg='token',
view_name='payment')
customer = CustomerUrl(view_name='customer-detail', read_only=True)
provider = ProviderUrl(view_name='provider-detail', read_only=True)
id = serializers.CharField(source='uuid', read_only=True)
amount = serializers.DecimalField(required=False, decimal_places=2,
max_digits=12, min_value=0)
class Meta:
model = Transaction
fields = ('id', 'url', 'customer', 'provider', 'amount', 'currency',
'state', 'proforma', 'invoice', 'can_be_consumed',
'payment_processor', 'payment_method', 'pay_url',
'valid_until', 'updated_at', 'created_at', 'fail_code',
'refund_code', 'cancel_code')
read_only_fields = ('customer', 'provider', 'can_be_consumed', 'pay_url',
'id', 'url', 'state', 'updated_at', 'created_at',
'payment_processor', 'fail_code', 'refund_code',
'cancel_code')
updateable_fields = ('valid_until', 'success_url', 'failed_url')
extra_kwargs = {'amount': {'required': False},
'currency': {'required': False},
'invoice': {'view_name': 'invoice-detail'},
'proforma': {'view_name': 'proforma-detail'}}
def validate(self, attrs):
attrs = super(TransactionSerializer, self).validate(attrs)
if not attrs:
return attrs
if self.instance:
if self.instance.state != Transaction.States.Initial:
message = "The transaction cannot be modified once it is in {}"\
" state.".format(self.instance.state)
raise serializers.ValidationError(message)
# Run model clean and handle ValidationErrors
try:
# Use the existing instance to avoid unique field errors
if self.instance:
transaction = self.instance
transaction_dict = transaction.__dict__.copy()
errors = {}
for attribute, value in attrs.items():
if attribute in self.Meta.updateable_fields:
continue
if getattr(transaction, attribute) != value:
errors[attribute] = "This field may not be modified."
setattr(transaction, attribute, value)
if errors:
raise serializers.ValidationError(errors)
transaction.full_clean()
# Revert changes to existing instance
transaction.__dict__ = transaction_dict
else:
transaction = Transaction(**attrs)
transaction.full_clean()
except ValidationError as e:
errors = e.error_dict
non_field_errors = errors.pop(NON_FIELD_ERRORS, None)
if non_field_errors:
errors['non_field_errors'] = [
error for sublist in non_field_errors for error in sublist
]
raise serializers.ValidationError(errors)
return attrs
| PressLabs/silver | silver/api/serializers/transaction_serializers.py | Python | apache-2.0 | 5,877 |
# -*- coding: utf-8 -*-
'''
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/>.
'''
import requests
import requests_cache
session = requests.Session()
session.headers['User-Agent'] = 'kodi.tv'
class GetException(Exception):
pass
class WebGet(object):
API_URL = "https://www.filmarkivet.se"
def __init__(self, cache_file):
requests_cache.install_cache(cache_file, backend='sqlite', expire_after=604800)
def getURL(self, url='/'):
try:
if not (url.startswith('http://') or url.startswith('https://')):
url = self.API_URL + url
request = session.get(url)
request.raise_for_status()
return request.text
except Exception as ex:
raise GetException(ex)
| pugo/filmarkivet-xbmc | lib/webget.py | Python | gpl-3.0 | 1,372 |
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 = {
'HostNames' : {
'meta_info' : _MetaInfoClass('HostNames',
False,
[
_MetaInfoClassMember('host-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Configure system's hostname
''',
'host_name',
'Cisco-IOS-XR-shellutil-cfg', False),
],
'Cisco-IOS-XR-shellutil-cfg',
'host-names',
_yang_ns._namespaces['Cisco-IOS-XR-shellutil-cfg'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_shellutil_cfg'
),
},
}
| 111pontes/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_shellutil_cfg.py | Python | apache-2.0 | 1,133 |
import requests
import json
import datetime
import time
from flask import Flask, request
#set some global variables
#resource name from AAD
resourcename = 'https://XXXXXXXXXXX.crm.dynamics.com'
#client name from AAD
clientid = 'XXXXXXXXXXX'
#token endpoint from AAD
tokenendpoint = 'https://login.microsoftonline.com/XXXXXXXXXXX/oauth2/token'
#length of time in seconds before token expires to request a refresh
timebeforerefresh = 1800 #1800 is 30 minutes
#port number on which to listen
portnumber = 5000
###DO NOT EDIT BELOW THIS LINE###
class Expando(object):
pass
class Token(object):
def __init__(self, accesstoken=None, refreshtoken=None, expireson=None, username=None, password=None):
self.accesstoken = accesstoken
self.refreshtoken = refreshtoken
self.expireson = expireson
self.username = username
self.password = password
#create an empty list to hold retrieved tokens
tokens = []
#set the datetime display format
timeformat = "%Y-%m-%d %H:%M:%S"
app = Flask(__name__)
@app.route('/requesttoken',methods=['GET', 'POST'])
def requesttoken():
#get the user request
userreq = request.get_json(silent=True)
#print(len(tokens))
#check if there's an existing token
existingtokens = list(filter(lambda x:x.username == userreq['username'] and x.password == userreq['password'], tokens))
#if there is an existing token
if len(existingtokens)>0:
existingtoken = existingtokens[0]
#check difference between expiration time and current time
#if it's less than the timebeforerefresh value, then refresh it
if (float(existingtoken.expireson)-time.time()) < timebeforerefresh:
#create a refresh request
tokenpost = {
'client_id':clientid,
'resource':resourcename,
'refresh_token':existingtoken.refreshtoken,
'grant_type':'refresh_token'
}
#make the token refresh request
tokenres = requests.post(tokenendpoint, data=tokenpost)
accesstoken = ''
#extract the access token
try:
accesstoken = tokenres.json()['access_token']
t = datetime.datetime.utcfromtimestamp(float(tokenres.json()['expires_on']))
newtoken = Token()
newtoken.accesstoken = tokenres.json()['access_token']
newtoken.refreshtoken = tokenres.json()['refresh_token']
newtoken.username = userreq['username']
newtoken.password = userreq['password']
newtoken.expireson = tokenres.json()['expires_on']
#remove the old token
tokens.remove(existingtoken)
#cache the new token
tokens.append(newtoken)
#return the token details to the requestor
tokenobj = Expando()
tokenobj.token = tokenres.json()['access_token']
tokenobj.expires_on = t.strftime(timeformat)
tokenobj.action = "refreshed existing token"
response = json.dumps(tokenobj.__dict__)
return response
except:
try:
#if we received an error message from the endpoint, handle it
errorobj = Expando()
errorobj.error = tokenres.json()['error']
errorobj.description = tokenres.json()['error_description']
response = json.dumps(errorobj.__dict__)
return response
except:
#for all other errors, return "unknon error"
return '{"error":"unknown error"}'
else:
#the cached token is still ok, so return it to the user
t = datetime.datetime.utcfromtimestamp(float(existingtoken.expireson))
tokenobj = Expando()
tokenobj.token = existingtoken.accesstoken
tokenobj.expires_on = t.strftime(timeformat)
tokenobj.action = "returned existing token"
response = json.dumps(tokenobj.__dict__)
return response
else:
#no cached token, so need to request a new one
#build the authorization request
tokenpost = {
'client_id':clientid,
'resource':resourcename,
'username':userreq['username'],
'password':userreq['password'],
'grant_type':'password'
}
#make the token request
tokenres = requests.post(tokenendpoint, data=tokenpost)
accesstoken = ''
#extract the access token
try:
accesstoken = tokenres.json()['access_token']
t = datetime.datetime.utcfromtimestamp(float(tokenres.json()['expires_on']))
newtoken = Token()
newtoken.accesstoken = tokenres.json()['access_token']
newtoken.refreshtoken = tokenres.json()['refresh_token']
newtoken.username = userreq['username']
newtoken.password = userreq['password']
newtoken.expireson = tokenres.json()['expires_on']
#cache the token
tokens.append(newtoken)
#return the token details to the requester
tokenobj = Expando()
tokenobj.token = tokenres.json()['access_token']
tokenobj.expires_on = t.strftime(timeformat)
tokenobj.action = "retrieved new token"
response = json.dumps(tokenobj.__dict__)
return response
except:
try:
#if we received an error message from the endpoint, handle it
errorobj = Expando()
errorobj.error = tokenres.json()['error']
errorobj.description = tokenres.json()['error_description']
response = json.dumps(errorobj.__dict__)
return response
except:
#for all other errors, return "unknown error"
return '{"error":"unknown error"}'
if __name__ == '__main__':
app.run(debug=False,host='0.0.0.0',port=portnumber) | lucasalexander/Crm-Sample-Code | OauthTokenMicroservice/app.py | Python | apache-2.0 | 6,216 |
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from letsencrypt import (
errors,
)
from letsencrypt.cli import (
choose_configurator_plugins,
_auth_from_domains,
_find_domains,
_suggest_donate,
)
from letsencrypt.display import ops as display_ops
from .helpers import (
auth_from_domains_with_key,
init_le_client,
)
# TODO: Make run as close to auth + install as possible
# Possible difficulties: args.csr was hacked into auth
def run(args, config, plugins): # pylint: disable=too-many-branches,too-many-locals
"""Obtain a certificate and install."""
try:
installer, authenticator = choose_configurator_plugins(args, config, plugins, "run")
except errors.PluginSelectionError, e:
return e.message
domains = _find_domains(args, installer)
# TODO: Handle errors from _init_le_client?
le_client = init_le_client(args, config, authenticator, installer)
if args.private_key:
lineage = auth_from_domains_with_key(le_client, config, domains, args.private_key)
else:
lineage = _auth_from_domains(le_client, config, domains)
le_client.deploy_certificate(
domains, lineage.privkey, lineage.cert,
lineage.chain, lineage.fullchain)
le_client.enhance_config(domains, config)
if len(lineage.available_versions("cert")) == 1:
display_ops.success_installation(domains)
else:
display_ops.success_renewal(domains)
_suggest_donate()
| cbrand/letsencrypt_gencsr | src/letsencrypt_gencsr/cmd/run.py | Python | mit | 1,505 |
# Copyright 2015 Mirantis, 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.
import signal
import sys
import time
import itertools
from neutron import context
from neutron.agent import rpc as agent_rpc
from neutron.agent import securitygroups_rpc as sg_rpc
from neutron.agent.common import polling
from neutron.common import config as common_config
from neutron.common import constants as n_const
from neutron.common import utils
from neutron.common import topics
from neutron._i18n import _, _LE, _LI
from oslo_config import cfg
from oslo_log import log as logging
from oslo_service import loopingcall
import oslo_messaging
from vmware_dvs.utils import dvs_util
from vmware_dvs.common import constants as dvs_const, exceptions
from vmware_dvs.api import dvs_agent_rpc_api
from vmware_dvs.agent.firewalls import dvs_securitygroup_rpc as dvs_rpc
LOG = logging.getLogger(__name__)
cfg.CONF.import_group('AGENT', 'vmware_dvs.common.config')
class DVSPluginApi(agent_rpc.PluginApi):
pass
class DVSAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
dvs_agent_rpc_api.ExtendAPI):
target = oslo_messaging.Target(version='1.2')
def __init__(self, vsphere_hostname, vsphere_login, vsphere_password,
bridge_mappings, polling_interval, quitting_rpc_timeout=None):
super(DVSAgent, self).__init__()
self.agent_state = {
'binary': 'neutron-dvs-agent',
'host': cfg.CONF.host,
'topic': n_const.L2_AGENT_TOPIC,
'configurations': {'bridge_mappings': bridge_mappings,
'vsphere_hostname': vsphere_hostname,
'log_agent_heartbeats':
cfg.CONF.AGENT.log_agent_heartbeats},
'agent_type': 'DVS agent',
'start_flag': True}
report_interval = cfg.CONF.AGENT.report_interval
self.polling_interval = polling_interval
# Security group agent support
self.context = context.get_admin_context_without_session()
self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
self.sg_agent = dvs_rpc.DVSSecurityGroupRpc(self.context,
self.sg_plugin_rpc, defer_refresh_firewall=True)
self.setup_rpc()
if report_interval:
heartbeat = loopingcall.FixedIntervalLoopingCall(
self._report_state)
heartbeat.start(interval=report_interval)
self.run_daemon_loop = True
self.iter_num = 0
self.fullsync = True
self.quitting_rpc_timeout = quitting_rpc_timeout
self.network_map = dvs_util.create_network_map_from_config(
cfg.CONF.ML2_VMWARE, pg_cache=True)
self.updated_ports = set()
self.deleted_ports = set()
self.known_ports = set()
self.added_ports = set()
self.booked_ports = set()
# The initialization is complete; we can start receiving messages
self.connection.consume_in_threads()
@dvs_util.wrap_retry
def create_network_precommit(self, current, segment):
try:
dvs = self._lookup_dvs_for_context(segment)
except exceptions.NoDVSForPhysicalNetwork as e:
LOG.info(_LI('Network %(id)s not created. Reason: %(reason)s') % {
'id': current['id'],
'reason': e.message})
except exceptions.InvalidNetwork:
pass
else:
dvs.create_network(current, segment)
@dvs_util.wrap_retry
def delete_network_postcommit(self, current, segment):
try:
dvs = self._lookup_dvs_for_context(segment)
except exceptions.NoDVSForPhysicalNetwork as e:
LOG.info(_LI('Network %(id)s not deleted. Reason: %(reason)s') % {
'id': current['id'],
'reason': e.message})
except exceptions.InvalidNetwork:
pass
else:
dvs.delete_network(current)
@dvs_util.wrap_retry
def update_network_precommit(self, current, segment, original):
try:
dvs = self._lookup_dvs_for_context(segment)
except (exceptions.NoDVSForPhysicalNetwork) as e:
LOG.info(_LI('Network %(id)s not updated. Reason: %(reason)s') % {
'id': current['id'],
'reason': e.message})
except exceptions.InvalidNetwork:
pass
else:
dvs.update_network(current, original)
@dvs_util.wrap_retry
def book_port(self, current, network_segments, network_current):
physnet = network_current['provider:physical_network']
dvs = None
dvs_segment = None
for segment in network_segments:
if segment['physical_network'] == physnet:
dvs = self._lookup_dvs_for_context(segment)
dvs_segment = segment
if dvs:
port = dvs.book_port(network_current, current['id'],
dvs_segment, current.get('portgroup_name'))
self.booked_ports.add(current['id'])
return port
return None
@dvs_util.wrap_retry
def update_port_postcommit(self, current, original, segment):
try:
dvs = self._lookup_dvs_for_context(segment)
if current['id'] in self.booked_ports:
self.added_ports.add(current['id'])
self.booked_ports.discard(current['id'])
except exceptions.NoDVSForPhysicalNetwork:
raise exceptions.InvalidSystemState(details=_(
'Port %(port_id)s belong to VMWare VM, but there is '
'no mapping from network to DVS.') % {'port_id': current['id']}
)
else:
self._update_admin_state_up(dvs, original, current)
def delete_port_postcommit(self, current, original, segment):
try:
dvs = self._lookup_dvs_for_context(segment)
except exceptions.NoDVSForPhysicalNetwork:
raise exceptions.InvalidSystemState(details=_(
'Port %(port_id)s belong to VMWare VM, but there is '
'no mapping from network to DVS.') % {'port_id': current['id']}
)
else:
if sg_rpc.is_firewall_enabled():
key = current.get(
'binding:vif_details', {}).get('dvs_port_key')
if key:
dvs.remove_block(key)
else:
dvs.release_port(current)
def _lookup_dvs_for_context(self, segment):
physical_network = segment['physical_network']
try:
return self.network_map[physical_network]
except KeyError:
LOG.debug('No dvs mapped for physical '
'network: %s' % physical_network)
raise exceptions.NoDVSForPhysicalNetwork(
physical_network=physical_network)
def _update_admin_state_up(self, dvs, original, current):
try:
original_admin_state_up = original['admin_state_up']
except KeyError:
pass
else:
current_admin_state_up = current['admin_state_up']
perform = current_admin_state_up != original_admin_state_up
if perform:
dvs.switch_port_blocked_state(current)
def _report_state(self):
try:
agent_status = self.state_rpc.report_state(self.context,
self.agent_state,
True)
if agent_status == n_const.AGENT_REVIVED:
LOG.info(_LI('Agent has just revived. Do a full sync.'))
self.agent_state.pop('start_flag', None)
except Exception:
LOG.exception(_LE("Failed reporting state!"))
def setup_rpc(self):
self.agent_id = 'dvs-agent-%s' % cfg.CONF.host
self.topic = topics.AGENT
self.plugin_rpc = DVSPluginApi(topics.PLUGIN)
self.state_rpc = agent_rpc.PluginReportStateAPI(topics.REPORTS)
# Handle updates from service
self.endpoints = [self]
# Define the listening consumers for the agent
consumers = [[topics.PORT, topics.UPDATE],
[topics.PORT, topics.DELETE],
[topics.NETWORK, topics.DELETE],
[topics.SECURITY_GROUP, topics.UPDATE],
[dvs_const.DVS, topics.UPDATE]]
self.connection = agent_rpc.create_consumers(self.endpoints,
self.topic,
consumers,
start_listening=False)
def _handle_sigterm(self, signum, frame):
LOG.info(_LI("Agent caught SIGTERM, quitting daemon loop."))
self.sg_agent.firewall.stop_all()
self.run_daemon_loop = False
@dvs_util.wrap_retry
def _clean_up_vsphere_extra_resources(self, connected_ports):
LOG.debug("Cleanup vsphere extra ports and networks...")
vsphere_not_connected_ports_maps = {}
network_with_active_ports = {}
network_with_known_not_active_ports = {}
for phys_net, dvs in self.network_map.items():
phys_net_active_network = \
network_with_active_ports.setdefault(phys_net, set())
phys_net_not_active_network = \
network_with_known_not_active_ports.setdefault(phys_net, {})
for port in dvs.get_ports(False):
port_name = getattr(port.config, 'name', None)
if not port_name:
continue
if port_name not in connected_ports:
vsphere_not_connected_ports_maps[port_name] = {
'phys_net': phys_net,
'port_key': port.key
}
phys_net_not_active_network[port_name] = port.portgroupKey
else:
phys_net_active_network.add(port.portgroupKey)
if vsphere_not_connected_ports_maps:
devices_details_list = (
self.plugin_rpc.get_devices_details_list_and_failed_devices(
self.context,
vsphere_not_connected_ports_maps.keys(),
self.agent_id,
cfg.CONF.host))
neutron_ports = set([
p['port_id'] for p in itertools.chain(
devices_details_list['devices'],
devices_details_list['failed_devices']) if p.get('port_id')
])
for port_id, port_data in vsphere_not_connected_ports_maps.items():
phys_net = port_data['phys_net']
if port_id not in neutron_ports:
dvs = self.network_map[phys_net]
dvs.release_port({
'id': port_id,
'binding:vif_details': {
'dvs_port_key': port_data['port_key']
}
})
else:
network_with_active_ports[phys_net].add(
network_with_known_not_active_ports[phys_net][port_id])
for phys_net, dvs in self.network_map.items():
dvs.delete_networks_without_active_ports(
network_with_active_ports.get(phys_net, []))
def daemon_loop(self):
with polling.get_polling_manager() as pm:
self.rpc_loop(polling_manager=pm)
def rpc_loop(self, polling_manager=None):
if not polling_manager:
polling_manager = polling.get_polling_manager(
minimize_polling=False)
while self.run_daemon_loop:
start = time.time()
port_stats = {'regular': {'added': 0,
'updated': 0,
'removed': 0}}
if self.fullsync:
LOG.info(_LI("Agent out of sync with plugin!"))
connected_ports = self._get_dvs_ports()
self.added_ports = connected_ports - self.known_ports
if cfg.CONF.DVS.clean_on_restart:
self._clean_up_vsphere_extra_resources(connected_ports)
self.fullsync = False
polling_manager.force_polling()
if self._agent_has_updates(polling_manager):
LOG.debug("Agent rpc_loop - update")
self.process_ports()
port_stats['regular']['added'] = len(self.added_ports)
port_stats['regular']['updated'] = len(self.updated_ports)
port_stats['regular']['removed'] = len(self.deleted_ports)
polling_manager.polling_completed()
self.loop_count_and_wait(start)
def _agent_has_updates(self, polling_manager):
return (polling_manager.is_polling_required or
self.sg_agent.firewall_refresh_needed() or
self.updated_ports or self.deleted_ports)
def loop_count_and_wait(self, start_time):
# sleep till end of polling interval
elapsed = time.time() - start_time
LOG.debug("Agent rpc_loop - iteration:%(iter_num)d "
"completed. Elapsed:%(elapsed).3f",
{'iter_num': self.iter_num,
'elapsed': elapsed})
if elapsed < self.polling_interval:
time.sleep(self.polling_interval - elapsed)
else:
LOG.debug("Loop iteration exceeded interval "
"(%(polling_interval)s vs. %(elapsed)s)!",
{'polling_interval': self.polling_interval,
'elapsed': elapsed})
self.iter_num = self.iter_num + 1
def process_ports(self):
LOG.debug("Process ports")
if self.deleted_ports:
deleted_ports = self.deleted_ports.copy()
self.deleted_ports = self.deleted_ports - deleted_ports
self.sg_agent.remove_devices_filter(deleted_ports)
if self.added_ports:
possible_ports = self.added_ports
self.added_ports = set()
else:
possible_ports = set()
upd_ports = self.updated_ports.copy()
self.sg_agent.setup_port_filters(possible_ports,
upd_ports)
self.updated_ports = self.updated_ports - upd_ports
self.known_ports |= possible_ports
def port_update(self, context, **kwargs):
port = kwargs.get('port')
if port['id'] in self.known_ports:
self.updated_ports.add(port['id'])
LOG.debug("port_update message processed for port %s", port['id'])
def port_delete(self, context, **kwargs):
port_id = kwargs.get('port_id')
if port_id in self.known_ports:
self.deleted_ports.add(port_id)
self.known_ports.discard(port_id)
if port_id in self.added_ports:
self.added_ports.discard(port_id)
LOG.debug("port_delete message processed for port %s", port_id)
def _get_dvs_ports(self):
ports = set()
dvs_list = self.network_map.values()
for dvs in dvs_list:
LOG.debug("Take port ids for dvs %s", dvs)
ports.update(dvs._get_ports_ids())
return ports
def create_agent_config_map(config):
"""Create a map of agent config parameters.
:param config: an instance of cfg.CONF
:returns: a map of agent configuration parameters
"""
try:
bridge_mappings = utils.parse_mappings(config.ML2_VMWARE.network_maps)
except ValueError as e:
raise ValueError(_("Parsing network_maps failed: %s.") % e)
kwargs = dict(
vsphere_hostname=config.ML2_VMWARE.vsphere_hostname,
vsphere_login=config.ML2_VMWARE.vsphere_login,
vsphere_password=config.ML2_VMWARE.vsphere_password,
bridge_mappings=bridge_mappings,
polling_interval=config.AGENT.polling_interval,
quitting_rpc_timeout=config.AGENT.quitting_rpc_timeout,
)
return kwargs
def main():
# cfg.CONF.register_opts(ip_lib.OPTS)
common_config.init(sys.argv[1:])
common_config.setup_logging()
utils.log_opt_values(LOG)
try:
agent_config = create_agent_config_map(cfg.CONF)
except ValueError as e:
LOG.error(_LE('%s Agent terminated!'), e)
sys.exit(1)
try:
agent = DVSAgent(**agent_config)
except RuntimeError as e:
LOG.error(_LE("%s Agent terminated!"), e)
sys.exit(1)
signal.signal(signal.SIGTERM, agent._handle_sigterm)
# Start everything.
LOG.info(_LI("Agent initialized successfully, now running... "))
agent.daemon_loop()
if __name__ == "__main__":
main()
| VTabolin/vmware-dvs | vmware_dvs/agent/dvs_neutron_agent.py | Python | apache-2.0 | 17,391 |
# Copyright 2013 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import argparse
from euca2ools.commands.argtypes import delimited_list
from euca2ools.commands.monitoring import CloudWatchRequest
from euca2ools.commands.monitoring.argtypes import cloudwatch_dimension
from requestbuilder import Arg
from requestbuilder.mixins import TabifyingMixin
from requestbuilder.response import PaginatedResponse
class DescribeAlarmsForMetric(CloudWatchRequest, TabifyingMixin):
DESCRIPTION = ('Describe alarms for a single metric.\n\nNote that all '
"of an alarm's metrics must match exactly to obtain any "
'results.')
ARGS = [Arg('--metric-name', dest='MetricName', metavar='METRIC',
required=True, help='name of the metric (required)'),
Arg('--namespace', dest='Namespace', metavar='NAMESPACE',
required=True, help='namespace of the metric (required)'),
# --alarm-description is supported by the tool, but not the service
Arg('--alarm-description', route_to=None, help=argparse.SUPPRESS),
Arg('--dimensions', dest='Dimensions.member',
metavar='KEY1=VALUE1,KEY2=VALUE2,...',
type=delimited_list(',', item_type=cloudwatch_dimension),
help='dimensions of the metric'),
Arg('--period', dest='Period', metavar='SECONDS',
help='period over which statistics are applied'),
Arg('--show-long', action='store_true', route_to=None,
help="show all of the alarms' info"),
Arg('--statistic', dest='Statistic',
choices=('Average', 'Maximum', 'Minimum', 'SampleCount',
'Sum'),
help='statistic of the metric on which to trigger alarms'),
Arg('--unit', dest='Unit',
help='unit of measurement for statistics')]
LIST_TAGS = ['MetricAlarms', 'AlarmActions', 'Dimensions',
'InsufficientDataActions', 'OKActions']
def main(self):
return PaginatedResponse(self, (None,), ('MetricAlarms',))
def prepare_for_page(self, page):
self.params['NextToken'] = page
def get_next_page(self, response):
return response.get('NextToken') or None
def print_result(self, result):
for alarm in result.get('MetricAlarms', []):
self.print_alarm(alarm)
| vasiliykochergin/euca2ools | euca2ools/commands/monitoring/describealarmsformetric.py | Python | bsd-2-clause | 3,693 |
#!/usr/bin/env python
# encoding: utf-8
"""
read_config.py
The main point with this package is how to retreive the corect entry from
a vcf file.
In the best case one should be able to specify any kind of entry in the
config file and how it is extracted.
ConfigParser will read these files and check if they are on the proper
format. It would be perfect to use the validator package but unfortunately
it is not as flexible as we need it to be.
ConfigParser will create plugins for each entry in the config file with the
relevant information for the score model.
A config file has to include a Version section with name and version like:
[Version]
name = config_name # This is a string
version = config_version # This is a float
Each plugin section will look like:
[Plugin_name]
section = section_name # str in ['CHROM','POS','ID','REF','ALT', 'FILTER',
'QUAL', 'FILTER','INFO','FORMAT','sample_id']
data_type = data_type # str in ['integer','float','flag','string']
record_rule = record_rule # str in ['min', 'max']
Created by Måns Magnusson on 2015-04-16.
Copyright (c) 2015 __MoonsoInc__. All rights reserved.
"""
from __future__ import print_function
import logging
from six import string_types
import configobj
from validate import ValidateError
from extract_vcf import Plugin
class ConfigParser(configobj.ConfigObj):
"""
Class for holding information from config file.
"""
def __init__(self, config_file, indent_type=' ', encoding='utf-8'):
super(ConfigParser, self).__init__(
infile=config_file,
indent_type=indent_type,
encoding=encoding,
)
self.logger = logging.getLogger(__name__)
self.logger = logging.getLogger("extract_vcf.config_parser")
self.vcf_columns = ['CHROM','POS','ID','REF','ALT', 'FILTER','QUAL',
'FILTER','INFO','FORMAT','sample_id']
self.data_types = ['integer','float','flag','character','string']
# self.data_numbers = ['A','G','.','R']
self.logger.info("Checking version and name")
self.version_check()
self.version = float(self['Version']['version'])
self.logger.debug("Set version to {0}".format(self.version))
self.name = self['Version']['name']
self.logger.debug("Set name to {0}".format(self.name))
self.logger.info("Config name: {0}".format(self['Version']['name']))
self.logger.info("Config version: {0}".format(self['Version']['version']))
self.plugins = {plugin:None for plugin in self.keys() if plugin != 'Version'}
self.logger.info("Found plugins: {0}".format(
', '.join(list(self.plugins.keys()))))
self.categories = {}
self.logger.info("Checking plugins")
for plugin in self.keys():
if plugin != 'Version':
self.logger.debug("Checking plugin: {0}".format(plugin))
self.check_plugin(plugin)
self.logger.debug("Plugin {0} is ok".format(plugin))
plugin_info = self[plugin]
string_rules = {}
if plugin_info['data_type'] == 'string':
self.logger.info("Checking string rules for plugin {0}".format(
plugin
))
string_rules = self.get_string_dict(plugin_info)
self.logger.debug("Adding plugin {0} to ConfigParser".format(plugin))
category = plugin_info.get('category', None)
self.plugins[plugin] = Plugin(
name=plugin,
field=plugin_info['field'],
data_type=plugin_info['data_type'],
separators=plugin_info.get('separators',[]),
info_key=plugin_info.get('info_key',None),
category=category,
csq_key=plugin_info.get('csq_key', None),
record_rule=plugin_info.get('record_rule', 'max'),
string_rules=string_rules
)
if category:
if category in self.categories:
self.categories[category].append(plugin)
else:
self.categories[category] = [plugin]
self.logger.debug("Adding {0} to category {1}".format(
plugin, category))
#
# logger.info("Checking plugin scores")
# for plugin in self.plugins:
# logger.debug("Checking plugin score: {0}".format(plugin))
# self[plugin] = self.vcf_score_check(self[plugin], plugin)
#
def get_string_dict(self, plugin_info):
"""
Convert a section with information of priorities to a string dict.
To avoid typos we make all letters lower case when comparing
Arguments:
plugin_info (dict): A dictionary with plugin information
Return:
string_dict (dict): A dictionary with strings as keys and integer
that specifies their priorities as values
"""
string_info = []
string_dict = {}
for key in plugin_info:
try:
string_info.append(dict(plugin_info[key]))
except ValueError:
pass
string_rules = {}
for raw_info in string_info:
try:
string = raw_info['string']
except KeyError:
raise ValidateError("String information has to have a 'string'")
try:
priority = raw_info['priority']
except KeyError:
raise ValidateError("String information has to have a 'priority'")
try:
priority = int(priority)
except ValueError:
raise ValidateError("'priority' has to be an integer")
string_dict[string] = priority
if len(string_dict) == 0:
raise ValidateError("'string' entrys must have string rules defined")
return string_dict
def version_check(self):
"""
Check if the version entry is in the proper format
"""
try:
version_info = self['Version']
except KeyError:
raise ValidateError('Config file has to have a Version section')
try:
float(version_info['version'])
except KeyError:
raise ValidateError('Config file has to have a version section')
except ValueError:
raise ValidateError('Version has to be a float.')
try:
version_info['name']
except KeyError:
raise ValidateError("Config file has to have a name")
return
def check_plugin(self, plugin):
"""
Check if the section is in the proper format vcf format.
Args:
vcf_section (dict): The information from a vcf section
Returns:
True is it is in the proper format
"""
vcf_section = self[plugin]
try:
vcf_field = vcf_section['field']
if not vcf_field in self.vcf_columns:
raise ValidateError(
"field has to be in {0}\n"
"Wrong field name in plugin: {1}".format(
self.vcf_columns, plugin
))
if vcf_field == 'INFO':
try:
info_key = vcf_section['info_key']
if info_key == 'CSQ':
try:
csq_key = vcf_section['csq_key']
except KeyError:
raise ValidateError(
"CSQ entrys has to refer to an csq field.\n"
"Refer with keyword 'csq_key'\n"
"csq_key is missing in section: {0}".format(
plugin
)
)
except KeyError:
raise ValidateError(
"INFO entrys has to refer to an INFO field.\n"
"Refer with keyword 'info_key'\n"
"info_key is missing in section: {0}".format(
plugin
)
)
except KeyError:
raise ValidateError(
"Vcf entrys have to refer to a field in the VCF with keyword"
" 'field'.\nMissing keyword 'field' in plugin: {0}".format(
plugin
))
try:
data_type = vcf_section['data_type']
if not data_type in self.data_types:
raise ValidateError(
"data_type has to be in {0}\n"
"Wrong data_type in plugin: {1}".format(
self.data_types, plugin)
)
except KeyError:
raise ValidateError(
"Vcf entrys have to refer to a data type in the VCF with "
"keyword 'data_type'.\n"
"Missing data_type in plugin: {0}".format(plugin)
)
separators = vcf_section.get('separators', None)
if separators:
if len(separators) == 1:
self[plugin]['separators'] = list(separators)
else:
if data_type != 'flag':
raise ValidateError(
"If data_type != flag the separators have to be defined"
"Missing separators in plugin: {0}".format(plugin)
)
record_rule = vcf_section.get('record_rule', None)
if record_rule:
if not record_rule in ['min', 'max']:
raise ValidateError(
"Record rules have to be in {0}\n"
"Wrong record_rule in plugin: {1}".format(
['min', 'max'], plugin)
)
else:
self.logger.info("Setting record rule to default: 'max'")
return True
| moonso/extract_vcf | extract_vcf/config_parser.py | Python | mit | 10,637 |
"""Support for Konnected devices."""
import copy
import hmac
import json
import logging
from aiohttp.hdrs import AUTHORIZATION
from aiohttp.web import Request, Response
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA
from homeassistant.components.http import HomeAssistantView
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_ENTITY_ID,
CONF_ACCESS_TOKEN,
CONF_BINARY_SENSORS,
CONF_DEVICES,
CONF_DISCOVERY,
CONF_HOST,
CONF_ID,
CONF_NAME,
CONF_PIN,
CONF_PORT,
CONF_REPEAT,
CONF_SENSORS,
CONF_SWITCHES,
CONF_TYPE,
CONF_ZONE,
HTTP_BAD_REQUEST,
HTTP_NOT_FOUND,
HTTP_UNAUTHORIZED,
STATE_OFF,
STATE_ON,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.typing import ConfigType
from .config_flow import ( # Loading the config flow file will register the flow
CONF_DEFAULT_OPTIONS,
CONF_IO,
CONF_IO_BIN,
CONF_IO_DIG,
CONF_IO_SWI,
OPTIONS_SCHEMA,
)
from .const import (
CONF_ACTIVATION,
CONF_API_HOST,
CONF_BLINK,
CONF_INVERSE,
CONF_MOMENTARY,
CONF_PAUSE,
CONF_POLL_INTERVAL,
DOMAIN,
PIN_TO_ZONE,
STATE_HIGH,
STATE_LOW,
UNDO_UPDATE_LISTENER,
UPDATE_ENDPOINT,
ZONE_TO_PIN,
ZONES,
)
from .handlers import HANDLERS
from .panel import AlarmPanel
_LOGGER = logging.getLogger(__name__)
def ensure_pin(value):
"""Check if valid pin and coerce to string."""
if value is None:
raise vol.Invalid("pin value is None")
if PIN_TO_ZONE.get(str(value)) is None:
raise vol.Invalid("pin not valid")
return str(value)
def ensure_zone(value):
"""Check if valid zone and coerce to string."""
if value is None:
raise vol.Invalid("zone value is None")
if str(value) not in ZONES is None:
raise vol.Invalid("zone not valid")
return str(value)
def import_device_validator(config):
"""Validate zones and reformat for import."""
config = copy.deepcopy(config)
io_cfgs = {}
# Replace pins with zones
for conf_platform, conf_io in (
(CONF_BINARY_SENSORS, CONF_IO_BIN),
(CONF_SENSORS, CONF_IO_DIG),
(CONF_SWITCHES, CONF_IO_SWI),
):
for zone in config.get(conf_platform, []):
if zone.get(CONF_PIN):
zone[CONF_ZONE] = PIN_TO_ZONE[zone[CONF_PIN]]
del zone[CONF_PIN]
io_cfgs[zone[CONF_ZONE]] = conf_io
# Migrate config_entry data into default_options structure
config[CONF_IO] = io_cfgs
config[CONF_DEFAULT_OPTIONS] = OPTIONS_SCHEMA(config)
# clean up fields migrated to options
config.pop(CONF_BINARY_SENSORS, None)
config.pop(CONF_SENSORS, None)
config.pop(CONF_SWITCHES, None)
config.pop(CONF_BLINK, None)
config.pop(CONF_DISCOVERY, None)
config.pop(CONF_API_HOST, None)
config.pop(CONF_IO, None)
return config
def import_validator(config):
"""Reformat for import."""
config = copy.deepcopy(config)
# push api_host into device configs
for device in config.get(CONF_DEVICES, []):
device[CONF_API_HOST] = config.get(CONF_API_HOST, "")
return config
# configuration.yaml schemas (legacy)
BINARY_SENSOR_SCHEMA_YAML = vol.All(
vol.Schema(
{
vol.Exclusive(CONF_ZONE, "s_io"): ensure_zone,
vol.Exclusive(CONF_PIN, "s_io"): ensure_pin,
vol.Required(CONF_TYPE): DEVICE_CLASSES_SCHEMA,
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_INVERSE, default=False): cv.boolean,
}
),
cv.has_at_least_one_key(CONF_PIN, CONF_ZONE),
)
SENSOR_SCHEMA_YAML = vol.All(
vol.Schema(
{
vol.Exclusive(CONF_ZONE, "s_io"): ensure_zone,
vol.Exclusive(CONF_PIN, "s_io"): ensure_pin,
vol.Required(CONF_TYPE): vol.All(vol.Lower, vol.In(["dht", "ds18b20"])),
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_POLL_INTERVAL, default=3): vol.All(
vol.Coerce(int), vol.Range(min=1)
),
}
),
cv.has_at_least_one_key(CONF_PIN, CONF_ZONE),
)
SWITCH_SCHEMA_YAML = vol.All(
vol.Schema(
{
vol.Exclusive(CONF_ZONE, "s_io"): ensure_zone,
vol.Exclusive(CONF_PIN, "s_io"): ensure_pin,
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_ACTIVATION, default=STATE_HIGH): vol.All(
vol.Lower, vol.Any(STATE_HIGH, STATE_LOW)
),
vol.Optional(CONF_MOMENTARY): vol.All(vol.Coerce(int), vol.Range(min=10)),
vol.Optional(CONF_PAUSE): vol.All(vol.Coerce(int), vol.Range(min=10)),
vol.Optional(CONF_REPEAT): vol.All(vol.Coerce(int), vol.Range(min=-1)),
}
),
cv.has_at_least_one_key(CONF_PIN, CONF_ZONE),
)
DEVICE_SCHEMA_YAML = vol.All(
vol.Schema(
{
vol.Required(CONF_ID): cv.matches_regex("[0-9a-f]{12}"),
vol.Optional(CONF_BINARY_SENSORS): vol.All(
cv.ensure_list, [BINARY_SENSOR_SCHEMA_YAML]
),
vol.Optional(CONF_SENSORS): vol.All(cv.ensure_list, [SENSOR_SCHEMA_YAML]),
vol.Optional(CONF_SWITCHES): vol.All(cv.ensure_list, [SWITCH_SCHEMA_YAML]),
vol.Inclusive(CONF_HOST, "host_info"): cv.string,
vol.Inclusive(CONF_PORT, "host_info"): cv.port,
vol.Optional(CONF_BLINK, default=True): cv.boolean,
vol.Optional(CONF_API_HOST, default=""): vol.Any("", cv.url),
vol.Optional(CONF_DISCOVERY, default=True): cv.boolean,
}
),
import_device_validator,
)
# pylint: disable=no-value-for-parameter
CONFIG_SCHEMA = vol.Schema(
{
DOMAIN: vol.All(
import_validator,
vol.Schema(
{
vol.Required(CONF_ACCESS_TOKEN): cv.string,
vol.Optional(CONF_API_HOST): vol.Url(),
vol.Optional(CONF_DEVICES): vol.All(
cv.ensure_list, [DEVICE_SCHEMA_YAML]
),
}
),
)
},
extra=vol.ALLOW_EXTRA,
)
YAML_CONFIGS = "yaml_configs"
PLATFORMS = ["binary_sensor", "sensor", "switch"]
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Konnected platform."""
cfg = config.get(DOMAIN)
if cfg is None:
cfg = {}
if DOMAIN not in hass.data:
hass.data[DOMAIN] = {
CONF_ACCESS_TOKEN: cfg.get(CONF_ACCESS_TOKEN),
CONF_API_HOST: cfg.get(CONF_API_HOST),
CONF_DEVICES: {},
}
hass.http.register_view(KonnectedView)
# Check if they have yaml configured devices
if CONF_DEVICES not in cfg:
return True
for device in cfg.get(CONF_DEVICES, []):
# Attempt to importing the cfg. Use
# hass.async_add_job to avoid a deadlock.
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_IMPORT}, data=device
)
)
return True
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up panel from a config entry."""
client = AlarmPanel(hass, entry)
# creates a panel data store in hass.data[DOMAIN][CONF_DEVICES]
await client.async_save_data()
# if the cfg entry was created we know we could connect to the panel at some point
# async_connect will handle retries until it establishes a connection
await client.async_connect()
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
# config entry specific data to enable unload
hass.data[DOMAIN][entry.entry_id] = {
UNDO_UPDATE_LISTENER: entry.add_update_listener(async_entry_updated)
}
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Unload a config entry."""
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
hass.data[DOMAIN][entry.entry_id][UNDO_UPDATE_LISTENER]()
if unload_ok:
hass.data[DOMAIN][CONF_DEVICES].pop(entry.data[CONF_ID])
hass.data[DOMAIN].pop(entry.entry_id)
return unload_ok
async def async_entry_updated(hass: HomeAssistant, entry: ConfigEntry):
"""Reload the config entry when options change."""
await hass.config_entries.async_reload(entry.entry_id)
class KonnectedView(HomeAssistantView):
"""View creates an endpoint to receive push updates from the device."""
url = UPDATE_ENDPOINT
name = "api:konnected"
requires_auth = False # Uses access token from configuration
def __init__(self):
"""Initialize the view."""
@staticmethod
def binary_value(state, activation):
"""Return binary value for GPIO based on state and activation."""
if activation == STATE_HIGH:
return 1 if state == STATE_ON else 0
return 0 if state == STATE_ON else 1
async def update_sensor(self, request: Request, device_id) -> Response:
"""Process a put or post."""
hass = request.app["hass"]
data = hass.data[DOMAIN]
auth = request.headers.get(AUTHORIZATION)
tokens = []
if hass.data[DOMAIN].get(CONF_ACCESS_TOKEN):
tokens.extend([hass.data[DOMAIN][CONF_ACCESS_TOKEN]])
tokens.extend(
[
entry.data[CONF_ACCESS_TOKEN]
for entry in hass.config_entries.async_entries(DOMAIN)
if entry.data.get(CONF_ACCESS_TOKEN)
]
)
if auth is None or not next(
(True for token in tokens if hmac.compare_digest(f"Bearer {token}", auth)),
False,
):
return self.json_message("unauthorized", status_code=HTTP_UNAUTHORIZED)
try: # Konnected 2.2.0 and above supports JSON payloads
payload = await request.json()
except json.decoder.JSONDecodeError:
_LOGGER.error(
"Your Konnected device software may be out of "
"date. Visit https://help.konnected.io for "
"updating instructions"
)
device = data[CONF_DEVICES].get(device_id)
if device is None:
return self.json_message(
"unregistered device", status_code=HTTP_BAD_REQUEST
)
panel = device.get("panel")
if panel is not None:
# connect if we haven't already
hass.async_create_task(panel.async_connect())
try:
zone_num = str(payload.get(CONF_ZONE) or PIN_TO_ZONE[payload[CONF_PIN]])
payload[CONF_ZONE] = zone_num
zone_data = (
device[CONF_BINARY_SENSORS].get(zone_num)
or next(
(s for s in device[CONF_SWITCHES] if s[CONF_ZONE] == zone_num), None
)
or next(
(s for s in device[CONF_SENSORS] if s[CONF_ZONE] == zone_num), None
)
)
except KeyError:
zone_data = None
if zone_data is None:
return self.json_message(
"unregistered sensor/actuator", status_code=HTTP_BAD_REQUEST
)
zone_data["device_id"] = device_id
for attr in ("state", "temp", "humi", "addr"):
value = payload.get(attr)
handler = HANDLERS.get(attr)
if value is not None and handler:
hass.async_create_task(handler(hass, zone_data, payload))
return self.json_message("ok")
async def get(self, request: Request, device_id) -> Response:
"""Return the current binary state of a switch."""
hass = request.app["hass"]
data = hass.data[DOMAIN]
device = data[CONF_DEVICES].get(device_id)
if not device:
return self.json_message(
f"Device {device_id} not configured", status_code=HTTP_NOT_FOUND
)
panel = device.get("panel")
if panel is not None:
# connect if we haven't already
hass.async_create_task(panel.async_connect())
# Our data model is based on zone ids but we convert from/to pin ids
# based on whether they are specified in the request
try:
zone_num = str(
request.query.get(CONF_ZONE) or PIN_TO_ZONE[request.query[CONF_PIN]]
)
zone = next(
switch
for switch in device[CONF_SWITCHES]
if switch[CONF_ZONE] == zone_num
)
except StopIteration:
zone = None
except KeyError:
zone = None
zone_num = None
if not zone:
target = request.query.get(
CONF_ZONE, request.query.get(CONF_PIN, "unknown")
)
return self.json_message(
f"Switch on zone or pin {target} not configured",
status_code=HTTP_NOT_FOUND,
)
resp = {}
if request.query.get(CONF_ZONE):
resp[CONF_ZONE] = zone_num
else:
resp[CONF_PIN] = ZONE_TO_PIN[zone_num]
# Make sure entity is setup
zone_entity_id = zone.get(ATTR_ENTITY_ID)
if zone_entity_id:
resp["state"] = self.binary_value(
hass.states.get(zone_entity_id).state, zone[CONF_ACTIVATION]
)
return self.json(resp)
_LOGGER.warning("Konnected entity not yet setup, returning default")
resp["state"] = self.binary_value(STATE_OFF, zone[CONF_ACTIVATION])
return self.json(resp)
async def put(self, request: Request, device_id) -> Response:
"""Receive a sensor update via PUT request and async set state."""
return await self.update_sensor(request, device_id)
async def post(self, request: Request, device_id) -> Response:
"""Receive a sensor update via POST request and async set state."""
return await self.update_sensor(request, device_id)
| Danielhiversen/home-assistant | homeassistant/components/konnected/__init__.py | Python | apache-2.0 | 14,300 |
#!/usr/bin/python
#encoding=utf-8
# Variante 1 - manuell
quadrat_zahlen = [1, 4, 9, 16, 26, 36, 49, 64, 81, 100]
quadrat_zahlen[4] = 25
quadrat_zahlen.append(121)
print quadrat_zahlen
# Variante 2 - automatisch
quadrat_zahlen = [1, 4, 9, 16, 26, 36, 49, 64, 81, 100]
for i, qz in enumerate(quadrat_zahlen, 1):
if i*i != qz:
quadrat_zahlen[i-1] = i*i
quadrat_zahlen.append((len(quadrat_zahlen)+1)**2)
print quadrat_zahlen
# Achtung, folgendes geht nicht!
quadrat_zahlen = [1, 4, 9, 16, 26, 36, 49, 64, 81, 100]
for i, qz in enumerate(quadrat_zahlen, 1):
if i*i != qz:
qz = i*i # das ändert den Wert von quadrat_zahlen[4] nicht!
print quadrat_zahlen
| gkabbe/Python-Kurs2015 | Lösungen/Woche2/quadratzahlen_korrigieren.py | Python | gpl-2.0 | 679 |
"""
A Printer for generating readable representation of most sympy classes.
"""
from __future__ import print_function, division
from sympy.core import S, Rational, Pow, Basic, Mul
from sympy.core.mul import _keep_coeff
from sympy.core.compatibility import string_types
from .printer import Printer
from sympy.printing.precedence import precedence, PRECEDENCE
from mpmath.libmp import prec_to_dps, to_str as mlib_to_str
from sympy.utilities import default_sort_key
class StrPrinter(Printer):
printmethod = "_sympystr"
_default_settings = {
"order": None,
"full_prec": "auto",
"sympy_integers": False,
"abbrev": False,
}
_relationals = dict()
def parenthesize(self, item, level, strict=False):
if (precedence(item) < level) or ((not strict) and precedence(item) <= level):
return "(%s)" % self._print(item)
else:
return self._print(item)
def stringify(self, args, sep, level=0):
return sep.join([self.parenthesize(item, level) for item in args])
def emptyPrinter(self, expr):
if isinstance(expr, string_types):
return expr
elif isinstance(expr, Basic):
return repr(expr)
else:
return str(expr)
def _print_Add(self, expr, order=None):
if self.order == 'none':
terms = list(expr.args)
else:
terms = self._as_ordered_terms(expr, order=order)
PREC = precedence(expr)
l = []
for term in terms:
t = self._print(term)
if t.startswith('-'):
sign = "-"
t = t[1:]
else:
sign = "+"
if precedence(term) < PREC:
l.extend([sign, "(%s)" % t])
else:
l.extend([sign, t])
sign = l.pop(0)
if sign == '+':
sign = ""
return sign + ' '.join(l)
def _print_BooleanTrue(self, expr):
return "True"
def _print_BooleanFalse(self, expr):
return "False"
def _print_Not(self, expr):
return '~%s' %(self.parenthesize(expr.args[0],PRECEDENCE["Not"]))
def _print_And(self, expr):
return self.stringify(expr.args, " & ", PRECEDENCE["BitwiseAnd"])
def _print_Or(self, expr):
return self.stringify(expr.args, " | ", PRECEDENCE["BitwiseOr"])
def _print_Xor(self, expr):
return self.stringify(expr.args, " ^ ", PRECEDENCE["BitwiseXor"])
def _print_AppliedPredicate(self, expr):
return '%s(%s)' % (self._print(expr.func), self._print(expr.arg))
def _print_Basic(self, expr):
l = [self._print(o) for o in expr.args]
return expr.__class__.__name__ + "(%s)" % ", ".join(l)
def _print_BlockMatrix(self, B):
if B.blocks.shape == (1, 1):
self._print(B.blocks[0, 0])
return self._print(B.blocks)
def _print_Catalan(self, expr):
return 'Catalan'
def _print_ComplexInfinity(self, expr):
return 'zoo'
def _print_ConditionSet(self, s):
args = tuple([self._print(i) for i in (s.sym, s.condition)])
if s.base_set is S.UniversalSet:
return 'ConditionSet(%s, %s)' % args
args += (self._print(s.base_set),)
return 'ConditionSet(%s, %s, %s)' % args
def _print_Derivative(self, expr):
dexpr = expr.expr
dvars = [i[0] if i[1] == 1 else i for i in expr.variable_count]
return 'Derivative(%s)' % ", ".join(map(lambda arg: self._print(arg), [dexpr] + dvars))
def _print_dict(self, d):
keys = sorted(d.keys(), key=default_sort_key)
items = []
for key in keys:
item = "%s: %s" % (self._print(key), self._print(d[key]))
items.append(item)
return "{%s}" % ", ".join(items)
def _print_Dict(self, expr):
return self._print_dict(expr)
def _print_RandomDomain(self, d):
if hasattr(d, 'as_boolean'):
return 'Domain: ' + self._print(d.as_boolean())
elif hasattr(d, 'set'):
return ('Domain: ' + self._print(d.symbols) + ' in ' +
self._print(d.set))
else:
return 'Domain on ' + self._print(d.symbols)
def _print_Dummy(self, expr):
return '_' + expr.name
def _print_EulerGamma(self, expr):
return 'EulerGamma'
def _print_Exp1(self, expr):
return 'E'
def _print_ExprCondPair(self, expr):
return '(%s, %s)' % (self._print(expr.expr), self._print(expr.cond))
def _print_Function(self, expr):
return expr.func.__name__ + "(%s)" % self.stringify(expr.args, ", ")
def _print_GeometryEntity(self, expr):
# GeometryEntity is special -- it's base is tuple
return str(expr)
def _print_GoldenRatio(self, expr):
return 'GoldenRatio'
def _print_TribonacciConstant(self, expr):
return 'TribonacciConstant'
def _print_ImaginaryUnit(self, expr):
return 'I'
def _print_Infinity(self, expr):
return 'oo'
def _print_Integral(self, expr):
def _xab_tostr(xab):
if len(xab) == 1:
return self._print(xab[0])
else:
return self._print((xab[0],) + tuple(xab[1:]))
L = ', '.join([_xab_tostr(l) for l in expr.limits])
return 'Integral(%s, %s)' % (self._print(expr.function), L)
def _print_Interval(self, i):
fin = 'Interval{m}({a}, {b})'
a, b, l, r = i.args
if a.is_infinite and b.is_infinite:
m = ''
elif a.is_infinite and not r:
m = ''
elif b.is_infinite and not l:
m = ''
elif not l and not r:
m = ''
elif l and r:
m = '.open'
elif l:
m = '.Lopen'
else:
m = '.Ropen'
return fin.format(**{'a': a, 'b': b, 'm': m})
def _print_AccumulationBounds(self, i):
return "AccumBounds(%s, %s)" % (self._print(i.min),
self._print(i.max))
def _print_Inverse(self, I):
return "%s**(-1)" % self.parenthesize(I.arg, PRECEDENCE["Pow"])
def _print_Lambda(self, obj):
expr = obj.expr
sig = obj.signature
if len(sig) == 1 and sig[0].is_symbol:
sig = sig[0]
return "Lambda(%s, %s)" % (self._print(sig), self._print(expr))
def _print_LatticeOp(self, expr):
args = sorted(expr.args, key=default_sort_key)
return expr.func.__name__ + "(%s)" % ", ".join(self._print(arg) for arg in args)
def _print_Limit(self, expr):
e, z, z0, dir = expr.args
if str(dir) == "+":
return "Limit(%s, %s, %s)" % tuple(map(self._print, (e, z, z0)))
else:
return "Limit(%s, %s, %s, dir='%s')" % tuple(map(self._print,
(e, z, z0, dir)))
def _print_list(self, expr):
return "[%s]" % self.stringify(expr, ", ")
def _print_MatrixBase(self, expr):
return expr._format_str(self)
_print_MutableSparseMatrix = \
_print_ImmutableSparseMatrix = \
_print_Matrix = \
_print_DenseMatrix = \
_print_MutableDenseMatrix = \
_print_ImmutableMatrix = \
_print_ImmutableDenseMatrix = \
_print_MatrixBase
def _print_MatrixElement(self, expr):
return self.parenthesize(expr.parent, PRECEDENCE["Atom"], strict=True) \
+ '[%s, %s]' % (self._print(expr.i), self._print(expr.j))
def _print_MatrixSlice(self, expr):
def strslice(x):
x = list(x)
if x[2] == 1:
del x[2]
if x[1] == x[0] + 1:
del x[1]
if x[0] == 0:
x[0] = ''
return ':'.join(map(lambda arg: self._print(arg), x))
return (self._print(expr.parent) + '[' +
strslice(expr.rowslice) + ', ' +
strslice(expr.colslice) + ']')
def _print_DeferredVector(self, expr):
return expr.name
def _print_Mul(self, expr):
prec = precedence(expr)
c, e = expr.as_coeff_Mul()
if c < 0:
expr = _keep_coeff(-c, e)
sign = "-"
else:
sign = ""
a = [] # items in the numerator
b = [] # items that are in the denominator (if any)
pow_paren = [] # Will collect all pow with more than one base element and exp = -1
if self.order not in ('old', 'none'):
args = expr.as_ordered_factors()
else:
# use make_args in case expr was something like -x -> x
args = Mul.make_args(expr)
# Gather args for numerator/denominator
for item in args:
if item.is_commutative and item.is_Pow and item.exp.is_Rational and item.exp.is_negative:
if item.exp != -1:
b.append(Pow(item.base, -item.exp, evaluate=False))
else:
if len(item.args[0].args) != 1 and isinstance(item.base, Mul): # To avoid situations like #14160
pow_paren.append(item)
b.append(Pow(item.base, -item.exp))
elif item.is_Rational and item is not S.Infinity:
if item.p != 1:
a.append(Rational(item.p))
if item.q != 1:
b.append(Rational(item.q))
else:
a.append(item)
a = a or [S.One]
a_str = [self.parenthesize(x, prec, strict=False) for x in a]
b_str = [self.parenthesize(x, prec, strict=False) for x in b]
# To parenthesize Pow with exp = -1 and having more than one Symbol
for item in pow_paren:
if item.base in b:
b_str[b.index(item.base)] = "(%s)" % b_str[b.index(item.base)]
if not b:
return sign + '*'.join(a_str)
elif len(b) == 1:
return sign + '*'.join(a_str) + "/" + b_str[0]
else:
return sign + '*'.join(a_str) + "/(%s)" % '*'.join(b_str)
def _print_MatMul(self, expr):
c, m = expr.as_coeff_mmul()
if c.is_number and c < 0:
expr = _keep_coeff(-c, m)
sign = "-"
else:
sign = ""
return sign + '*'.join(
[self.parenthesize(arg, precedence(expr)) for arg in expr.args]
)
def _print_ElementwiseApplyFunction(self, expr):
return "{0}({1}...)".format(
expr.function,
self._print(expr.expr),
)
def _print_NaN(self, expr):
return 'nan'
def _print_NegativeInfinity(self, expr):
return '-oo'
def _print_Order(self, expr):
if not expr.variables or all(p is S.Zero for p in expr.point):
if len(expr.variables) <= 1:
return 'O(%s)' % self._print(expr.expr)
else:
return 'O(%s)' % self.stringify((expr.expr,) + expr.variables, ', ', 0)
else:
return 'O(%s)' % self.stringify(expr.args, ', ', 0)
def _print_Ordinal(self, expr):
return expr.__str__()
def _print_Cycle(self, expr):
return expr.__str__()
def _print_Permutation(self, expr):
from sympy.combinatorics.permutations import Permutation, Cycle
if Permutation.print_cyclic:
if not expr.size:
return '()'
# before taking Cycle notation, see if the last element is
# a singleton and move it to the head of the string
s = Cycle(expr)(expr.size - 1).__repr__()[len('Cycle'):]
last = s.rfind('(')
if not last == 0 and ',' not in s[last:]:
s = s[last:] + s[:last]
s = s.replace(',', '')
return s
else:
s = expr.support()
if not s:
if expr.size < 5:
return 'Permutation(%s)' % self._print(expr.array_form)
return 'Permutation([], size=%s)' % self._print(expr.size)
trim = self._print(expr.array_form[:s[-1] + 1]) + ', size=%s' % self._print(expr.size)
use = full = self._print(expr.array_form)
if len(trim) < len(full):
use = trim
return 'Permutation(%s)' % use
def _print_Subs(self, obj):
expr, old, new = obj.args
if len(obj.point) == 1:
old = old[0]
new = new[0]
return "Subs(%s, %s, %s)" % (
self._print(expr), self._print(old), self._print(new))
def _print_TensorIndex(self, expr):
return expr._print()
def _print_TensorHead(self, expr):
return expr._print()
def _print_Tensor(self, expr):
return expr._print()
def _print_TensMul(self, expr):
# prints expressions like "A(a)", "3*A(a)", "(1+x)*A(a)"
sign, args = expr._get_args_for_traditional_printer()
return sign + "*".join(
[self.parenthesize(arg, precedence(expr)) for arg in args]
)
def _print_TensAdd(self, expr):
return expr._print()
def _print_PermutationGroup(self, expr):
p = [' %s' % self._print(a) for a in expr.args]
return 'PermutationGroup([\n%s])' % ',\n'.join(p)
def _print_Pi(self, expr):
return 'pi'
def _print_PolyRing(self, ring):
return "Polynomial ring in %s over %s with %s order" % \
(", ".join(map(lambda rs: self._print(rs), ring.symbols)),
self._print(ring.domain), self._print(ring.order))
def _print_FracField(self, field):
return "Rational function field in %s over %s with %s order" % \
(", ".join(map(lambda fs: self._print(fs), field.symbols)),
self._print(field.domain), self._print(field.order))
def _print_FreeGroupElement(self, elm):
return elm.__str__()
def _print_PolyElement(self, poly):
return poly.str(self, PRECEDENCE, "%s**%s", "*")
def _print_FracElement(self, frac):
if frac.denom == 1:
return self._print(frac.numer)
else:
numer = self.parenthesize(frac.numer, PRECEDENCE["Mul"], strict=True)
denom = self.parenthesize(frac.denom, PRECEDENCE["Atom"], strict=True)
return numer + "/" + denom
def _print_Poly(self, expr):
ATOM_PREC = PRECEDENCE["Atom"] - 1
terms, gens = [], [ self.parenthesize(s, ATOM_PREC) for s in expr.gens ]
for monom, coeff in expr.terms():
s_monom = []
for i, exp in enumerate(monom):
if exp > 0:
if exp == 1:
s_monom.append(gens[i])
else:
s_monom.append(gens[i] + "**%d" % exp)
s_monom = "*".join(s_monom)
if coeff.is_Add:
if s_monom:
s_coeff = "(" + self._print(coeff) + ")"
else:
s_coeff = self._print(coeff)
else:
if s_monom:
if coeff is S.One:
terms.extend(['+', s_monom])
continue
if coeff is S.NegativeOne:
terms.extend(['-', s_monom])
continue
s_coeff = self._print(coeff)
if not s_monom:
s_term = s_coeff
else:
s_term = s_coeff + "*" + s_monom
if s_term.startswith('-'):
terms.extend(['-', s_term[1:]])
else:
terms.extend(['+', s_term])
if terms[0] in ['-', '+']:
modifier = terms.pop(0)
if modifier == '-':
terms[0] = '-' + terms[0]
format = expr.__class__.__name__ + "(%s, %s"
from sympy.polys.polyerrors import PolynomialError
try:
format += ", modulus=%s" % expr.get_modulus()
except PolynomialError:
format += ", domain='%s'" % expr.get_domain()
format += ")"
for index, item in enumerate(gens):
if len(item) > 2 and (item[:1] == "(" and item[len(item) - 1:] == ")"):
gens[index] = item[1:len(item) - 1]
return format % (' '.join(terms), ', '.join(gens))
def _print_UniversalSet(self, p):
return 'UniversalSet'
def _print_AlgebraicNumber(self, expr):
if expr.is_aliased:
return self._print(expr.as_poly().as_expr())
else:
return self._print(expr.as_expr())
def _print_Pow(self, expr, rational=False):
"""Printing helper function for ``Pow``
Parameters
==========
rational : bool, optional
If ``True``, it will not attempt printing ``sqrt(x)`` or
``x**S.Half`` as ``sqrt``, and will use ``x**(1/2)``
instead.
See examples for additional details
Examples
========
>>> from sympy.functions import sqrt
>>> from sympy.printing.str import StrPrinter
>>> from sympy.abc import x
How ``rational`` keyword works with ``sqrt``:
>>> printer = StrPrinter()
>>> printer._print_Pow(sqrt(x), rational=True)
'x**(1/2)'
>>> printer._print_Pow(sqrt(x), rational=False)
'sqrt(x)'
>>> printer._print_Pow(1/sqrt(x), rational=True)
'x**(-1/2)'
>>> printer._print_Pow(1/sqrt(x), rational=False)
'1/sqrt(x)'
Notes
=====
``sqrt(x)`` is canonicalized as ``Pow(x, S.Half)`` in SymPy,
so there is no need of defining a separate printer for ``sqrt``.
Instead, it should be handled here as well.
"""
PREC = precedence(expr)
if expr.exp is S.Half and not rational:
return "sqrt(%s)" % self._print(expr.base)
if expr.is_commutative:
if -expr.exp is S.Half and not rational:
# Note: Don't test "expr.exp == -S.Half" here, because that will
# match -0.5, which we don't want.
return "%s/sqrt(%s)" % tuple(map(lambda arg: self._print(arg), (S.One, expr.base)))
if expr.exp is -S.One:
# Similarly to the S.Half case, don't test with "==" here.
return '%s/%s' % (self._print(S.One),
self.parenthesize(expr.base, PREC, strict=False))
e = self.parenthesize(expr.exp, PREC, strict=False)
if self.printmethod == '_sympyrepr' and expr.exp.is_Rational and expr.exp.q != 1:
# the parenthesized exp should be '(Rational(a, b))' so strip parens,
# but just check to be sure.
if e.startswith('(Rational'):
return '%s**%s' % (self.parenthesize(expr.base, PREC, strict=False), e[1:-1])
return '%s**%s' % (self.parenthesize(expr.base, PREC, strict=False), e)
def _print_UnevaluatedExpr(self, expr):
return self._print(expr.args[0])
def _print_MatPow(self, expr):
PREC = precedence(expr)
return '%s**%s' % (self.parenthesize(expr.base, PREC, strict=False),
self.parenthesize(expr.exp, PREC, strict=False))
def _print_ImmutableDenseNDimArray(self, expr):
return str(expr)
def _print_ImmutableSparseNDimArray(self, expr):
return str(expr)
def _print_Integer(self, expr):
if self._settings.get("sympy_integers", False):
return "S(%s)" % (expr)
return str(expr.p)
def _print_Integers(self, expr):
return 'Integers'
def _print_Naturals(self, expr):
return 'Naturals'
def _print_Naturals0(self, expr):
return 'Naturals0'
def _print_Rationals(self, expr):
return 'Rationals'
def _print_Reals(self, expr):
return 'Reals'
def _print_Complexes(self, expr):
return 'Complexes'
def _print_EmptySet(self, expr):
return 'EmptySet'
def _print_EmptySequence(self, expr):
return 'EmptySequence'
def _print_int(self, expr):
return str(expr)
def _print_mpz(self, expr):
return str(expr)
def _print_Rational(self, expr):
if expr.q == 1:
return str(expr.p)
else:
if self._settings.get("sympy_integers", False):
return "S(%s)/%s" % (expr.p, expr.q)
return "%s/%s" % (expr.p, expr.q)
def _print_PythonRational(self, expr):
if expr.q == 1:
return str(expr.p)
else:
return "%d/%d" % (expr.p, expr.q)
def _print_Fraction(self, expr):
if expr.denominator == 1:
return str(expr.numerator)
else:
return "%s/%s" % (expr.numerator, expr.denominator)
def _print_mpq(self, expr):
if expr.denominator == 1:
return str(expr.numerator)
else:
return "%s/%s" % (expr.numerator, expr.denominator)
def _print_Float(self, expr):
prec = expr._prec
if prec < 5:
dps = 0
else:
dps = prec_to_dps(expr._prec)
if self._settings["full_prec"] is True:
strip = False
elif self._settings["full_prec"] is False:
strip = True
elif self._settings["full_prec"] == "auto":
strip = self._print_level > 1
rv = mlib_to_str(expr._mpf_, dps, strip_zeros=strip)
if rv.startswith('-.0'):
rv = '-0.' + rv[3:]
elif rv.startswith('.0'):
rv = '0.' + rv[2:]
if rv.startswith('+'):
# e.g., +inf -> inf
rv = rv[1:]
return rv
def _print_Relational(self, expr):
charmap = {
"==": "Eq",
"!=": "Ne",
":=": "Assignment",
'+=': "AddAugmentedAssignment",
"-=": "SubAugmentedAssignment",
"*=": "MulAugmentedAssignment",
"/=": "DivAugmentedAssignment",
"%=": "ModAugmentedAssignment",
}
if expr.rel_op in charmap:
return '%s(%s, %s)' % (charmap[expr.rel_op], self._print(expr.lhs),
self._print(expr.rhs))
return '%s %s %s' % (self.parenthesize(expr.lhs, precedence(expr)),
self._relationals.get(expr.rel_op) or expr.rel_op,
self.parenthesize(expr.rhs, precedence(expr)))
def _print_ComplexRootOf(self, expr):
return "CRootOf(%s, %d)" % (self._print_Add(expr.expr, order='lex'),
expr.index)
def _print_RootSum(self, expr):
args = [self._print_Add(expr.expr, order='lex')]
if expr.fun is not S.IdentityFunction:
args.append(self._print(expr.fun))
return "RootSum(%s)" % ", ".join(args)
def _print_GroebnerBasis(self, basis):
cls = basis.__class__.__name__
exprs = [self._print_Add(arg, order=basis.order) for arg in basis.exprs]
exprs = "[%s]" % ", ".join(exprs)
gens = [ self._print(gen) for gen in basis.gens ]
domain = "domain='%s'" % self._print(basis.domain)
order = "order='%s'" % self._print(basis.order)
args = [exprs] + gens + [domain, order]
return "%s(%s)" % (cls, ", ".join(args))
def _print_set(self, s):
items = sorted(s, key=default_sort_key)
args = ', '.join(self._print(item) for item in items)
if not args:
return "set()"
return '{%s}' % args
def _print_frozenset(self, s):
if not s:
return "frozenset()"
return "frozenset(%s)" % self._print_set(s)
def _print_SparseMatrix(self, expr):
from sympy.matrices import Matrix
return self._print(Matrix(expr))
def _print_Sum(self, expr):
def _xab_tostr(xab):
if len(xab) == 1:
return self._print(xab[0])
else:
return self._print((xab[0],) + tuple(xab[1:]))
L = ', '.join([_xab_tostr(l) for l in expr.limits])
return 'Sum(%s, %s)' % (self._print(expr.function), L)
def _print_Symbol(self, expr):
return expr.name
_print_MatrixSymbol = _print_Symbol
_print_RandomSymbol = _print_Symbol
def _print_Identity(self, expr):
return "I"
def _print_ZeroMatrix(self, expr):
return "0"
def _print_OneMatrix(self, expr):
return "1"
def _print_Predicate(self, expr):
return "Q.%s" % expr.name
def _print_str(self, expr):
return str(expr)
def _print_tuple(self, expr):
if len(expr) == 1:
return "(%s,)" % self._print(expr[0])
else:
return "(%s)" % self.stringify(expr, ", ")
def _print_Tuple(self, expr):
return self._print_tuple(expr)
def _print_Transpose(self, T):
return "%s.T" % self.parenthesize(T.arg, PRECEDENCE["Pow"])
def _print_Uniform(self, expr):
return "Uniform(%s, %s)" % (self._print(expr.a), self._print(expr.b))
def _print_Quantity(self, expr):
if self._settings.get("abbrev", False):
return "%s" % expr.abbrev
return "%s" % expr.name
def _print_Quaternion(self, expr):
s = [self.parenthesize(i, PRECEDENCE["Mul"], strict=True) for i in expr.args]
a = [s[0]] + [i+"*"+j for i, j in zip(s[1:], "ijk")]
return " + ".join(a)
def _print_Dimension(self, expr):
return str(expr)
def _print_Wild(self, expr):
return expr.name + '_'
def _print_WildFunction(self, expr):
return expr.name + '_'
def _print_Zero(self, expr):
if self._settings.get("sympy_integers", False):
return "S(0)"
return "0"
def _print_DMP(self, p):
from sympy.core.sympify import SympifyError
try:
if p.ring is not None:
# TODO incorporate order
return self._print(p.ring.to_sympy(p))
except SympifyError:
pass
cls = p.__class__.__name__
rep = self._print(p.rep)
dom = self._print(p.dom)
ring = self._print(p.ring)
return "%s(%s, %s, %s)" % (cls, rep, dom, ring)
def _print_DMF(self, expr):
return self._print_DMP(expr)
def _print_Object(self, obj):
return 'Object("%s")' % obj.name
def _print_IdentityMorphism(self, morphism):
return 'IdentityMorphism(%s)' % morphism.domain
def _print_NamedMorphism(self, morphism):
return 'NamedMorphism(%s, %s, "%s")' % \
(morphism.domain, morphism.codomain, morphism.name)
def _print_Category(self, category):
return 'Category("%s")' % category.name
def _print_BaseScalarField(self, field):
return field._coord_sys._names[field._index]
def _print_BaseVectorField(self, field):
return 'e_%s' % field._coord_sys._names[field._index]
def _print_Differential(self, diff):
field = diff._form_field
if hasattr(field, '_coord_sys'):
return 'd%s' % field._coord_sys._names[field._index]
else:
return 'd(%s)' % self._print(field)
def _print_Tr(self, expr):
#TODO : Handle indices
return "%s(%s)" % ("Tr", self._print(expr.args[0]))
def sstr(expr, **settings):
"""Returns the expression as a string.
For large expressions where speed is a concern, use the setting
order='none'. If abbrev=True setting is used then units are printed in
abbreviated form.
Examples
========
>>> from sympy import symbols, Eq, sstr
>>> a, b = symbols('a b')
>>> sstr(Eq(a + b, 0))
'Eq(a + b, 0)'
"""
p = StrPrinter(settings)
s = p.doprint(expr)
return s
class StrReprPrinter(StrPrinter):
"""(internal) -- see sstrrepr"""
def _print_str(self, s):
return repr(s)
def sstrrepr(expr, **settings):
"""return expr in mixed str/repr form
i.e. strings are returned in repr form with quotes, and everything else
is returned in str form.
This function could be useful for hooking into sys.displayhook
"""
p = StrReprPrinter(settings)
s = p.doprint(expr)
return s
| kaushik94/sympy | sympy/printing/str.py | Python | bsd-3-clause | 28,378 |
from django.conf.urls.defaults import patterns
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from django.views.generic import View
from devilry.apps.core import pluginloader
from devilry.defaults.urls import devilry_urls
class RedirectToFrontpage(View):
def get(self, request):
return redirect(reverse('student'))
urlpatterns = patterns('',
(r'^$', RedirectToFrontpage.as_view()),
# Add the default Devilry urls
*devilry_urls
) + staticfiles_urlpatterns()
# Must be after url-loading to allow plugins to use reverse()
pluginloader.autodiscover()
| vegarang/devilry-django | devilry/defaults/root_urlconf.py | Python | bsd-3-clause | 738 |
#!/usr/bin/env python3
import argparse
import glob
import os
import sys
def parse_args():
parser = argparse.ArgumentParser(description="Get battery level")
parser.add_argument('-d', '--device', type=str, help="Device string like \"0003:1532:0045.000C\"")
args = parser.parse_args()
return args
def run():
args = parse_args()
if args.device is None:
mouse_dirs = glob.glob(os.path.join('/sys/bus/hid/drivers/razermouse/', "*:*:*.*"))
if len(mouse_dirs) > 1:
print("Multiple mouse directories found. Rerun with -d", file=sys.stderr)
sys.exit(1)
if len(mouse_dirs) < 1:
print("No mouse directories found. Make sure the driver is binded", file=sys.stderr)
sys.exit(1)
mouse_dir = mouse_dirs[0]
else:
mouse_dir = os.path.join('/sys/bus/hid/drivers/razermouse/', args.device)
if not os.path.isdir(mouse_dir):
print("Multiple mouse directories found. Rerun with -d", file=sys.stderr)
sys.exit(1)
battery_filepath = os.path.join(mouse_dir, "get_battery")
with open(battery_filepath, 'r') as battery_file:
# Battery percentage, before being scaled to 0-100
try:
battery_percentage_ns = int(battery_file.read().strip())
scaled_percentage = (100/255) * battery_percentage_ns
print("{0:.1f}%".format(scaled_percentage))
except ValueError as ex:
print("Failed to get battery percentage.\n{0}".format(ex), file=sys.stderr)
sys.exit(1)
if __name__ == '__main__':
run() | z3ntu/razer-drivers | scripts/razer_mouse/driver/get_battery.py | Python | gpl-2.0 | 1,598 |
# Copyright 2012 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 copy
from oslo_log import log as logging
from tempest.common import negative_rest_client
from tempest import config
from tempest import exceptions
from tempest.lib.services.compute.agents_client import AgentsClient
from tempest.lib.services.compute.aggregates_client import AggregatesClient
from tempest.lib.services.compute.availability_zone_client import \
AvailabilityZoneClient
from tempest.lib.services.compute.baremetal_nodes_client import \
BaremetalNodesClient
from tempest.lib.services.compute.certificates_client import \
CertificatesClient
from tempest.lib.services.compute.extensions_client import \
ExtensionsClient
from tempest.lib.services.compute.fixed_ips_client import FixedIPsClient
from tempest.lib.services.compute.flavors_client import FlavorsClient
from tempest.lib.services.compute.floating_ip_pools_client import \
FloatingIPPoolsClient
from tempest.lib.services.compute.floating_ips_bulk_client import \
FloatingIPsBulkClient
from tempest.lib.services.compute.floating_ips_client import \
FloatingIPsClient as ComputeFloatingIPsClient
from tempest.lib.services.compute.hosts_client import HostsClient
from tempest.lib.services.compute.hypervisor_client import \
HypervisorClient
from tempest.lib.services.compute.images_client import ImagesClient \
as ComputeImagesClient
from tempest.lib.services.compute.instance_usage_audit_log_client import \
InstanceUsagesAuditLogClient
from tempest.lib.services.compute.interfaces_client import InterfacesClient
from tempest.lib.services.compute.keypairs_client import KeyPairsClient
from tempest.lib.services.compute.limits_client import LimitsClient
from tempest.lib.services.compute.migrations_client import MigrationsClient
from tempest.lib.services.compute.networks_client import NetworksClient \
as ComputeNetworksClient
from tempest.lib.services.compute.quota_classes_client import \
QuotaClassesClient
from tempest.lib.services.compute.quotas_client import QuotasClient
from tempest.lib.services.compute.security_group_default_rules_client import \
SecurityGroupDefaultRulesClient
from tempest.lib.services.compute.security_group_rules_client import \
SecurityGroupRulesClient as ComputeSecurityGroupRulesClient
from tempest.lib.services.compute.security_groups_client import \
SecurityGroupsClient as ComputeSecurityGroupsClient
from tempest.lib.services.compute.server_groups_client import \
ServerGroupsClient
from tempest.lib.services.compute.servers_client import ServersClient
from tempest.lib.services.compute.services_client import ServicesClient
from tempest.lib.services.compute.snapshots_client import \
SnapshotsClient as ComputeSnapshotsClient
from tempest.lib.services.compute.tenant_networks_client import \
TenantNetworksClient
from tempest.lib.services.compute.tenant_usages_client import \
TenantUsagesClient
from tempest.lib.services.compute.versions_client import VersionsClient
from tempest.lib.services.compute.volumes_client import \
VolumesClient as ComputeVolumesClient
from tempest.lib.services.identity.v2.token_client import TokenClient
from tempest.lib.services.identity.v3.token_client import V3TokenClient
from tempest.lib.services.network.agents_client import AgentsClient \
as NetworkAgentsClient
from tempest.lib.services.network.extensions_client import \
ExtensionsClient as NetworkExtensionsClient
from tempest.lib.services.network.floating_ips_client import FloatingIPsClient
from tempest.lib.services.network.metering_label_rules_client import \
MeteringLabelRulesClient
from tempest.lib.services.network.metering_labels_client import \
MeteringLabelsClient
from tempest.lib.services.network.networks_client import NetworksClient
from tempest.lib.services.network.ports_client import PortsClient
from tempest.lib.services.network.quotas_client import QuotasClient \
as NetworkQuotasClient
from tempest.lib.services.network.security_group_rules_client import \
SecurityGroupRulesClient
from tempest.lib.services.network.security_groups_client import \
SecurityGroupsClient
from tempest.lib.services.network.subnetpools_client import SubnetpoolsClient
from tempest.lib.services.network.subnets_client import SubnetsClient
from tempest import manager
from tempest.services.baremetal.v1.json.baremetal_client import \
BaremetalClient
from tempest.services.data_processing.v1_1.data_processing_client import \
DataProcessingClient
from tempest.services.database.json.flavors_client import \
DatabaseFlavorsClient
from tempest.services.database.json.limits_client import \
DatabaseLimitsClient
from tempest.services.database.json.versions_client import \
DatabaseVersionsClient
from tempest.services.identity.v2.json.endpoints_client import EndpointsClient
from tempest.services.identity.v2.json.identity_client import IdentityClient
from tempest.services.identity.v2.json.roles_client import RolesClient
from tempest.services.identity.v2.json.services_client import \
ServicesClient as IdentityServicesClient
from tempest.services.identity.v2.json.tenants_client import TenantsClient
from tempest.services.identity.v2.json.users_client import UsersClient
from tempest.services.identity.v3.json.credentials_client import \
CredentialsClient
from tempest.services.identity.v3.json.domains_client import DomainsClient
from tempest.services.identity.v3.json.endpoints_client import \
EndPointsClient as EndPointsV3Client
from tempest.services.identity.v3.json.groups_client import GroupsClient
from tempest.services.identity.v3.json.identity_client import \
IdentityClient as IdentityV3Client
from tempest.services.identity.v3.json.policies_client import PoliciesClient
from tempest.services.identity.v3.json.projects_client import ProjectsClient
from tempest.services.identity.v3.json.regions_client import RegionsClient
from tempest.services.identity.v3.json.roles_client import \
RolesClient as RolesV3Client
from tempest.services.identity.v3.json.services_client import \
ServicesClient as IdentityServicesV3Client
from tempest.services.identity.v3.json.trusts_client import TrustsClient
from tempest.services.identity.v3.json.users_clients import \
UsersClient as UsersV3Client
from tempest.services.image.v1.json.images_client import ImagesClient
from tempest.services.image.v2.json.images_client import ImagesClientV2
from tempest.services.network.json.routers_client import RoutersClient
from tempest.services.object_storage.account_client import AccountClient
from tempest.services.object_storage.container_client import ContainerClient
from tempest.services.object_storage.object_client import ObjectClient
from tempest.services.orchestration.json.orchestration_client import \
OrchestrationClient
from tempest.services.telemetry.json.alarming_client import AlarmingClient
from tempest.services.telemetry.json.telemetry_client import \
TelemetryClient
from tempest.services.volume.v1.json.admin.hosts_client import \
HostsClient as VolumeHostsClient
from tempest.services.volume.v1.json.admin.quotas_client import \
QuotasClient as VolumeQuotasClient
from tempest.services.volume.v1.json.admin.services_client import \
ServicesClient as VolumeServicesClient
from tempest.services.volume.v1.json.admin.types_client import \
TypesClient as VolumeTypesClient
from tempest.services.volume.v1.json.availability_zone_client import \
AvailabilityZoneClient as VolumeAvailabilityZoneClient
from tempest.services.volume.v1.json.backups_client import BackupsClient
from tempest.services.volume.v1.json.extensions_client import \
ExtensionsClient as VolumeExtensionsClient
from tempest.services.volume.v1.json.qos_client import QosSpecsClient
from tempest.services.volume.v1.json.snapshots_client import SnapshotsClient
from tempest.services.volume.v1.json.volumes_client import VolumesClient
from tempest.services.volume.v2.json.admin.hosts_client import \
HostsClient as VolumeHostsV2Client
from tempest.services.volume.v2.json.admin.quotas_client import \
QuotasClient as VolumeQuotasV2Client
from tempest.services.volume.v2.json.admin.services_client import \
ServicesClient as VolumeServicesV2Client
from tempest.services.volume.v2.json.admin.types_client import \
TypesClient as VolumeTypesV2Client
from tempest.services.volume.v2.json.availability_zone_client import \
AvailabilityZoneClient as VolumeAvailabilityZoneV2Client
from tempest.services.volume.v2.json.backups_client import \
BackupsClient as BackupsV2Client
from tempest.services.volume.v2.json.extensions_client import \
ExtensionsClient as VolumeExtensionsV2Client
from tempest.services.volume.v2.json.qos_client import \
QosSpecsClient as QosSpecsV2Client
from tempest.services.volume.v2.json.snapshots_client import \
SnapshotsClient as SnapshotsV2Client
from tempest.services.volume.v2.json.volumes_client import \
VolumesClient as VolumesV2Client
CONF = config.CONF
LOG = logging.getLogger(__name__)
class Manager(manager.Manager):
"""Top level manager for OpenStack tempest clients"""
default_params = {
'disable_ssl_certificate_validation':
CONF.identity.disable_ssl_certificate_validation,
'ca_certs': CONF.identity.ca_certificates_file,
'trace_requests': CONF.debug.trace_requests
}
# NOTE: Tempest uses timeout values of compute API if project specific
# timeout values don't exist.
default_params_with_timeout_values = {
'build_interval': CONF.compute.build_interval,
'build_timeout': CONF.compute.build_timeout
}
default_params_with_timeout_values.update(default_params)
def __init__(self, credentials, service=None):
"""Initialization of Manager class.
Setup all services clients and make them available for tests cases.
:param credentials: type Credentials or TestResources
:param service: Service name
"""
super(Manager, self).__init__(credentials=credentials)
self._set_compute_clients()
self._set_database_clients()
self._set_identity_clients()
self._set_volume_clients()
self._set_object_storage_clients()
self.baremetal_client = BaremetalClient(
self.auth_provider,
CONF.baremetal.catalog_type,
CONF.identity.region,
endpoint_type=CONF.baremetal.endpoint_type,
**self.default_params_with_timeout_values)
self.network_agents_client = NetworkAgentsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.network_extensions_client = NetworkExtensionsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.networks_client = NetworksClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.subnetpools_client = SubnetpoolsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.subnets_client = SubnetsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.ports_client = PortsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.network_quotas_client = NetworkQuotasClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.floating_ips_client = FloatingIPsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.metering_labels_client = MeteringLabelsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.metering_label_rules_client = MeteringLabelRulesClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.routers_client = RoutersClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.security_group_rules_client = SecurityGroupRulesClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
self.security_groups_client = SecurityGroupsClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
endpoint_type=CONF.network.endpoint_type,
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
if CONF.service_available.ceilometer:
self.telemetry_client = TelemetryClient(
self.auth_provider,
CONF.telemetry.catalog_type,
CONF.identity.region,
endpoint_type=CONF.telemetry.endpoint_type,
**self.default_params_with_timeout_values)
if CONF.service_available.aodh:
self.alarming_client = AlarmingClient(
self.auth_provider,
CONF.alarming.catalog_type,
CONF.identity.region,
endpoint_type=CONF.alarming.endpoint_type,
**self.default_params_with_timeout_values)
if CONF.service_available.glance:
self.image_client = ImagesClient(
self.auth_provider,
CONF.image.catalog_type,
CONF.image.region or CONF.identity.region,
endpoint_type=CONF.image.endpoint_type,
build_interval=CONF.image.build_interval,
build_timeout=CONF.image.build_timeout,
**self.default_params)
self.image_client_v2 = ImagesClientV2(
self.auth_provider,
CONF.image.catalog_type,
CONF.image.region or CONF.identity.region,
endpoint_type=CONF.image.endpoint_type,
build_interval=CONF.image.build_interval,
build_timeout=CONF.image.build_timeout,
**self.default_params)
self.orchestration_client = OrchestrationClient(
self.auth_provider,
CONF.orchestration.catalog_type,
CONF.orchestration.region or CONF.identity.region,
endpoint_type=CONF.orchestration.endpoint_type,
build_interval=CONF.orchestration.build_interval,
build_timeout=CONF.orchestration.build_timeout,
**self.default_params)
self.data_processing_client = DataProcessingClient(
self.auth_provider,
CONF.data_processing.catalog_type,
CONF.identity.region,
endpoint_type=CONF.data_processing.endpoint_type,
**self.default_params_with_timeout_values)
self.negative_client = negative_rest_client.NegativeRestClient(
self.auth_provider, service, **self.default_params)
def _set_compute_clients(self):
params = {
'service': CONF.compute.catalog_type,
'region': CONF.compute.region or CONF.identity.region,
'endpoint_type': CONF.compute.endpoint_type,
'build_interval': CONF.compute.build_interval,
'build_timeout': CONF.compute.build_timeout
}
params.update(self.default_params)
self.agents_client = AgentsClient(self.auth_provider, **params)
self.compute_networks_client = ComputeNetworksClient(
self.auth_provider, **params)
self.migrations_client = MigrationsClient(self.auth_provider,
**params)
self.security_group_default_rules_client = (
SecurityGroupDefaultRulesClient(self.auth_provider, **params))
self.certificates_client = CertificatesClient(self.auth_provider,
**params)
self.servers_client = ServersClient(
self.auth_provider,
enable_instance_password=CONF.compute_feature_enabled
.enable_instance_password,
**params)
self.server_groups_client = ServerGroupsClient(
self.auth_provider, **params)
self.limits_client = LimitsClient(self.auth_provider, **params)
self.compute_images_client = ComputeImagesClient(self.auth_provider,
**params)
self.keypairs_client = KeyPairsClient(self.auth_provider, **params)
self.quotas_client = QuotasClient(self.auth_provider, **params)
self.quota_classes_client = QuotaClassesClient(self.auth_provider,
**params)
self.flavors_client = FlavorsClient(self.auth_provider, **params)
self.extensions_client = ExtensionsClient(self.auth_provider,
**params)
self.floating_ip_pools_client = FloatingIPPoolsClient(
self.auth_provider, **params)
self.floating_ips_bulk_client = FloatingIPsBulkClient(
self.auth_provider, **params)
self.compute_floating_ips_client = ComputeFloatingIPsClient(
self.auth_provider, **params)
self.compute_security_group_rules_client = \
ComputeSecurityGroupRulesClient(self.auth_provider, **params)
self.compute_security_groups_client = ComputeSecurityGroupsClient(
self.auth_provider, **params)
self.interfaces_client = InterfacesClient(self.auth_provider,
**params)
self.fixed_ips_client = FixedIPsClient(self.auth_provider,
**params)
self.availability_zone_client = AvailabilityZoneClient(
self.auth_provider, **params)
self.aggregates_client = AggregatesClient(self.auth_provider,
**params)
self.services_client = ServicesClient(self.auth_provider, **params)
self.tenant_usages_client = TenantUsagesClient(self.auth_provider,
**params)
self.hosts_client = HostsClient(self.auth_provider, **params)
self.hypervisor_client = HypervisorClient(self.auth_provider,
**params)
self.instance_usages_audit_log_client = \
InstanceUsagesAuditLogClient(self.auth_provider, **params)
self.tenant_networks_client = \
TenantNetworksClient(self.auth_provider, **params)
self.baremetal_nodes_client = BaremetalNodesClient(
self.auth_provider, **params)
# NOTE: The following client needs special timeout values because
# the API is a proxy for the other component.
params_volume = copy.deepcopy(params)
params_volume.update({
'build_interval': CONF.volume.build_interval,
'build_timeout': CONF.volume.build_timeout
})
self.volumes_extensions_client = ComputeVolumesClient(
self.auth_provider, **params_volume)
self.compute_versions_client = VersionsClient(self.auth_provider,
**params_volume)
self.snapshots_extensions_client = ComputeSnapshotsClient(
self.auth_provider, **params_volume)
def _set_database_clients(self):
self.database_flavors_client = DatabaseFlavorsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
self.database_limits_client = DatabaseLimitsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
self.database_versions_client = DatabaseVersionsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
def _set_identity_clients(self):
params = {
'service': CONF.identity.catalog_type,
'region': CONF.identity.region
}
params.update(self.default_params_with_timeout_values)
# Clients below use the admin endpoint type of Keystone API v2
params_v2_admin = params.copy()
params_v2_admin['endpoint_type'] = CONF.identity.v2_admin_endpoint_type
self.endpoints_client = EndpointsClient(self.auth_provider,
**params_v2_admin)
self.identity_client = IdentityClient(self.auth_provider,
**params_v2_admin)
self.tenants_client = TenantsClient(self.auth_provider,
**params_v2_admin)
self.roles_client = RolesClient(self.auth_provider, **params_v2_admin)
self.users_client = UsersClient(self.auth_provider, **params_v2_admin)
self.identity_services_client = IdentityServicesClient(
self.auth_provider, **params_v2_admin)
# Clients below use the public endpoint type of Keystone API v2
params_v2_public = params.copy()
params_v2_public['endpoint_type'] = (
CONF.identity.v2_public_endpoint_type)
self.identity_public_client = IdentityClient(self.auth_provider,
**params_v2_public)
self.tenants_public_client = TenantsClient(self.auth_provider,
**params_v2_public)
self.users_public_client = UsersClient(self.auth_provider,
**params_v2_public)
# Clients below use the endpoint type of Keystone API v3
params_v3 = params.copy()
params_v3['endpoint_type'] = CONF.identity.v3_endpoint_type
self.domains_client = DomainsClient(self.auth_provider,
**params_v3)
self.identity_v3_client = IdentityV3Client(self.auth_provider,
**params_v3)
self.trusts_client = TrustsClient(self.auth_provider, **params_v3)
self.users_v3_client = UsersV3Client(self.auth_provider, **params_v3)
self.endpoints_v3_client = EndPointsV3Client(self.auth_provider,
**params_v3)
self.roles_v3_client = RolesV3Client(self.auth_provider, **params_v3)
self.identity_services_v3_client = IdentityServicesV3Client(
self.auth_provider, **params_v3)
self.policies_client = PoliciesClient(self.auth_provider, **params_v3)
self.projects_client = ProjectsClient(self.auth_provider, **params_v3)
self.regions_client = RegionsClient(self.auth_provider, **params_v3)
self.credentials_client = CredentialsClient(self.auth_provider,
**params_v3)
self.groups_client = GroupsClient(self.auth_provider, **params_v3)
# Token clients do not use the catalog. They only need default_params.
# They read auth_url, so they should only be set if the corresponding
# API version is marked as enabled
if CONF.identity_feature_enabled.api_v2:
if CONF.identity.uri:
self.token_client = TokenClient(
CONF.identity.uri, **self.default_params)
else:
msg = 'Identity v2 API enabled, but no identity.uri set'
raise exceptions.InvalidConfiguration(msg)
if CONF.identity_feature_enabled.api_v3:
if CONF.identity.uri_v3:
self.token_v3_client = V3TokenClient(
CONF.identity.uri_v3, **self.default_params)
else:
msg = 'Identity v3 API enabled, but no identity.uri_v3 set'
raise exceptions.InvalidConfiguration(msg)
def _set_volume_clients(self):
params = {
'service': CONF.volume.catalog_type,
'region': CONF.volume.region or CONF.identity.region,
'endpoint_type': CONF.volume.endpoint_type,
'build_interval': CONF.volume.build_interval,
'build_timeout': CONF.volume.build_timeout
}
params.update(self.default_params)
self.volume_qos_client = QosSpecsClient(self.auth_provider,
**params)
self.volume_qos_v2_client = QosSpecsV2Client(
self.auth_provider, **params)
self.volume_services_client = VolumeServicesClient(
self.auth_provider, **params)
self.volume_services_v2_client = VolumeServicesV2Client(
self.auth_provider, **params)
self.backups_client = BackupsClient(self.auth_provider, **params)
self.backups_v2_client = BackupsV2Client(self.auth_provider,
**params)
self.snapshots_client = SnapshotsClient(self.auth_provider,
**params)
self.snapshots_v2_client = SnapshotsV2Client(self.auth_provider,
**params)
self.volumes_client = VolumesClient(
self.auth_provider, default_volume_size=CONF.volume.volume_size,
**params)
self.volumes_v2_client = VolumesV2Client(
self.auth_provider, default_volume_size=CONF.volume.volume_size,
**params)
self.volume_types_client = VolumeTypesClient(self.auth_provider,
**params)
self.volume_types_v2_client = VolumeTypesV2Client(
self.auth_provider, **params)
self.volume_hosts_client = VolumeHostsClient(self.auth_provider,
**params)
self.volume_hosts_v2_client = VolumeHostsV2Client(
self.auth_provider, **params)
self.volume_quotas_client = VolumeQuotasClient(self.auth_provider,
**params)
self.volume_quotas_v2_client = VolumeQuotasV2Client(self.auth_provider,
**params)
self.volumes_extension_client = VolumeExtensionsClient(
self.auth_provider, **params)
self.volumes_v2_extension_client = VolumeExtensionsV2Client(
self.auth_provider, **params)
self.volume_availability_zone_client = \
VolumeAvailabilityZoneClient(self.auth_provider, **params)
self.volume_v2_availability_zone_client = \
VolumeAvailabilityZoneV2Client(self.auth_provider, **params)
def _set_object_storage_clients(self):
params = {
'service': CONF.object_storage.catalog_type,
'region': CONF.object_storage.region or CONF.identity.region,
'endpoint_type': CONF.object_storage.endpoint_type
}
params.update(self.default_params_with_timeout_values)
self.account_client = AccountClient(self.auth_provider, **params)
self.container_client = ContainerClient(self.auth_provider, **params)
self.object_client = ObjectClient(self.auth_provider, **params)
| HybridF5/tempest_debug | tempest/clients.py | Python | apache-2.0 | 30,957 |
# Copyright (c) 2016-present, Facebook, 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.
##############################################################################
## @package visualize
# Module caffe2.python.visualize
"""Functions that could be used to visualize Tensors.
This is adapted from the old-time iceberk package that Yangqing wrote... Oh gold
memories. Before decaf and caffe. Why iceberk? Because I was at Berkeley,
bears are vegetarian, and iceberg lettuce has layers of leaves.
(This joke is so lame.)
"""
import numpy as np
from matplotlib import cm, pyplot
def ChannelFirst(arr):
"""Convert a HWC array to CHW."""
ndim = arr.ndim
return arr.swapaxes(ndim - 1, ndim - 2).swapaxes(ndim - 2, ndim - 3)
def ChannelLast(arr):
"""Convert a CHW array to HWC."""
ndim = arr.ndim
return arr.swapaxes(ndim - 3, ndim - 2).swapaxes(ndim - 2, ndim - 1)
class PatchVisualizer(object):
"""PatchVisualizer visualizes patches.
"""
def __init__(self, gap=1):
self.gap = gap
def ShowSingle(self, patch, cmap=None):
"""Visualizes one single patch.
The input patch could be a vector (in which case we try to infer the shape
of the patch), a 2-D matrix, or a 3-D matrix whose 3rd dimension has 3
channels.
"""
if len(patch.shape) == 1:
patch = patch.reshape(self.get_patch_shape(patch))
elif len(patch.shape) > 2 and patch.shape[2] != 3:
raise ValueError("The input patch shape isn't correct.")
# determine color
if len(patch.shape) == 2 and cmap is None:
cmap = cm.gray
pyplot.imshow(patch, cmap=cmap)
return patch
def ShowMultiple(self, patches, ncols=None, cmap=None, bg_func=np.mean):
"""Visualize multiple patches.
In the passed in patches matrix, each row is a patch, in the shape of either
n*n, n*n*1 or n*n*3, either in a flattened format (so patches would be a
2-D array), or a multi-dimensional tensor. We will try our best to figure
out automatically the patch size.
"""
num_patches = patches.shape[0]
if ncols is None:
ncols = int(np.ceil(np.sqrt(num_patches)))
nrows = int(np.ceil(num_patches / float(ncols)))
if len(patches.shape) == 2:
patches = patches.reshape(
(patches.shape[0], ) + self.get_patch_shape(patches[0])
)
patch_size_expand = np.array(patches.shape[1:3]) + self.gap
image_size = patch_size_expand * np.array([nrows, ncols]) - self.gap
if len(patches.shape) == 4:
if patches.shape[3] == 1:
# gray patches
patches = patches.reshape(patches.shape[:-1])
image_shape = tuple(image_size)
if cmap is None:
cmap = cm.gray
elif patches.shape[3] == 3:
# color patches
image_shape = tuple(image_size) + (3, )
else:
raise ValueError("The input patch shape isn't expected.")
else:
image_shape = tuple(image_size)
if cmap is None:
cmap = cm.gray
image = np.ones(image_shape) * bg_func(patches)
for pid in range(num_patches):
row = pid // ncols * patch_size_expand[0]
col = pid % ncols * patch_size_expand[1]
image[row:row+patches.shape[1], col:col+patches.shape[2]] = \
patches[pid]
pyplot.imshow(image, cmap=cmap, interpolation='nearest')
pyplot.axis('off')
return image
def ShowImages(self, patches, *args, **kwargs):
"""Similar to ShowMultiple, but always normalize the values between 0 and 1
for better visualization of image-type data.
"""
patches = patches - np.min(patches)
patches /= np.max(patches) + np.finfo(np.float64).eps
return self.ShowMultiple(patches, *args, **kwargs)
def ShowChannels(self, patch, cmap=None, bg_func=np.mean):
""" This function shows the channels of a patch.
The incoming patch should have shape [w, h, num_channels], and each channel
will be visualized as a separate gray patch.
"""
if len(patch.shape) != 3:
raise ValueError("The input patch shape isn't correct.")
patch_reordered = np.swapaxes(patch.T, 1, 2)
return self.ShowMultiple(patch_reordered, cmap=cmap, bg_func=bg_func)
def get_patch_shape(self, patch):
"""Gets the shape of a single patch.
Basically it tries to interprete the patch as a square, and also check if it
is in color (3 channels)
"""
edgeLen = np.sqrt(patch.size)
if edgeLen != np.floor(edgeLen):
# we are given color patches
edgeLen = np.sqrt(patch.size / 3.)
if edgeLen != np.floor(edgeLen):
raise ValueError("I can't figure out the patch shape.")
return (edgeLen, edgeLen, 3)
else:
edgeLen = int(edgeLen)
return (edgeLen, edgeLen)
_default_visualizer = PatchVisualizer()
"""Utility functions that directly point to functions in the default visualizer.
These functions don't return anything, so you won't see annoying printouts of
the visualized images. If you want to save the images for example, you should
explicitly instantiate a patch visualizer, and call those functions.
"""
class NHWC(object):
@staticmethod
def ShowSingle(*args, **kwargs):
_default_visualizer.ShowSingle(*args, **kwargs)
@staticmethod
def ShowMultiple(*args, **kwargs):
_default_visualizer.ShowMultiple(*args, **kwargs)
@staticmethod
def ShowImages(*args, **kwargs):
_default_visualizer.ShowImages(*args, **kwargs)
@staticmethod
def ShowChannels(*args, **kwargs):
_default_visualizer.ShowChannels(*args, **kwargs)
class NCHW(object):
@staticmethod
def ShowSingle(patch, *args, **kwargs):
_default_visualizer.ShowSingle(ChannelLast(patch), *args, **kwargs)
@staticmethod
def ShowMultiple(patch, *args, **kwargs):
_default_visualizer.ShowMultiple(ChannelLast(patch), *args, **kwargs)
@staticmethod
def ShowImages(patch, *args, **kwargs):
_default_visualizer.ShowImages(ChannelLast(patch), *args, **kwargs)
@staticmethod
def ShowChannels(patch, *args, **kwargs):
_default_visualizer.ShowChannels(ChannelLast(patch), *args, **kwargs)
| Yangqing/caffe2 | caffe2/python/visualize.py | Python | apache-2.0 | 6,987 |
# Copyright 2020 Google 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.
import base64
import datetime
import json
import os
import uuid
from flask import Flask, request
from google.cloud import datastore
app = Flask(__name__)
ds_client = datastore.Client()
def error500():
resp = {
'message': 'Internal error occured.'
}
return resp, 500
@app.route('/')
def index():
return 'Customer service / Asynchronous implementation. '
@app.route('/api/v1/customer/get', methods=['POST'])
@app.route('/customer-service-async/api/v1/customer/get', methods=['POST'])
def customer_get():
json_data = request.get_json()
customer_id = None
invalid_fields = []
for key in json_data.keys():
if key == 'customer_id':
customer_id = json_data[key]
else:
invalid_fields.append(key)
if customer_id is None:
return error500()
query = ds_client.query(kind='Customer')
query.add_filter('customer_id', '=', customer_id)
resp = None
for result in query.fetch(): # This should return a single entity.
resp = {
'customer_id': result['customer_id'],
'credit': result['credit'],
'limit': result['limit']
}
break
if resp is None:
return error500()
return resp, 200
@app.route('/api/v1/customer/limit', methods=['POST'])
@app.route('/customer-service-async/api/v1/customer/limit', methods=['POST'])
def customer_limit():
json_data = request.get_json()
customer_id, limit = None, None
invalid_fields = []
for key in json_data.keys():
if key == 'customer_id':
customer_id = json_data[key]
elif key == 'limit':
limit = json_data[key]
else:
invalid_fields.append(key)
if customer_id is None or limit is None:
return error500()
query = ds_client.query(kind='Customer')
query.add_filter('customer_id', '=', customer_id)
resp = None
for result in query.fetch(): # This should return a single entity.
credit = result['credit']
if limit < credit:
return error500()
resp = {
'customer_id': customer_id,
'credit': credit,
'limit': limit
}
result.update(resp)
ds_client.put(result)
break
if resp is None: # Create a new customer entry.
resp = {
'customer_id': customer_id,
'credit': 0,
'limit': limit
}
incomplete_key = ds_client.key('Customer')
customer_entity = datastore.Entity(key=incomplete_key)
customer_entity.update(resp)
ds_client.put(customer_entity)
return resp, 200
# Event handler
@app.route('/api/v1/customer/pubsub', methods=['POST'])
def customer_pubsub():
envelope = request.get_json()
if not isinstance(envelope, dict) or 'message' not in envelope:
return error500()
message = envelope['message']
if 'data' not in message or 'attributes' not in message:
return error500()
attributes = message['attributes']
if 'event_id' not in attributes or 'event_type' not in attributes:
return error500()
order = json.loads(base64.b64decode(message['data']).decode('utf-8'))
event_id = attributes['event_id']
event_type = attributes['event_type']
query = ds_client.query(kind='ProcessedEvent')
query.keys_only()
query.add_filter('event_id', '=', event_id)
if list(query.fetch()): # duplicate
print('Duplicate event {}'.format(event_id))
return 'Finished.', 200
if event_type != 'order_create':
print('Unknown event type {}.format(event_type)')
return 'Finished.', 200
customer_id = order['customer_id']
number = order['number']
query = ds_client.query(kind='Customer')
query.add_filter('customer_id', '=', customer_id)
customer = None
for result in query.fetch(): # This should return a single entity.
customer = result
break
if not customer: # Non existing customer_id
return error500()
accept = None
credit = customer['credit']
limit = customer['limit']
credit += number * 100
with ds_client.transaction():
if credit > limit: # Reject order
accept = False
else: # Accept order
accept = True
customer['credit'] = credit
ds_client.put(customer)
check_result = {
'customer_id': customer_id,
'order_id': order['order_id'],
'accepted': accept
}
event = {
'event_id': str(uuid.uuid4()),
'topic': 'customer-service-event',
'type': 'order_checked',
'timestamp': datetime.datetime.utcnow(),
'published': False,
'body': json.dumps(check_result)
}
incomplete_key = ds_client.key('Event')
event_entity = datastore.Entity(key=incomplete_key)
event_entity.update(event)
ds_client.put(event_entity)
incomplete_key = ds_client.key('ProcessedEvent')
entity = datastore.Entity(key=incomplete_key)
entity.update({
'event_id': event_id,
'timestamp': datetime.datetime.utcnow()
})
ds_client.put(entity)
return 'Finished.', 200
if __name__ == "__main__":
app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
| GoogleCloudPlatform/transactional-microservice-examples | services/customer-async/main.py | Python | apache-2.0 | 5,982 |
#python
import k3d
import testing
document = k3d.new_document()
grid = k3d.plugin.create("PolyGrid", document)
scale = k3d.plugin.create("ScalePoints", document)
select = k3d.plugin.create("SelectDegenerateFaces", document)
selection = k3d.geometry.selection.create(0)
point_selection = k3d.geometry.point_selection.create(selection)
k3d.geometry.point_selection.append(point_selection, 0, 10000, 0.)
k3d.geometry.point_selection.append(point_selection, 0, 12, 1.)
scale.mesh_selection = selection
scale.x = 0.
k3d.property.connect(document, grid.get_property("output_mesh"), scale.get_property("input_mesh"))
k3d.property.connect(document, scale.get_property("output_mesh"), select.get_property("input_mesh"))
testing.require_valid_mesh(document, select.get_property("output_mesh"))
testing.require_similar_mesh(document, select.get_property("output_mesh"), "mesh.selection.SelectDegenerateFaces", 1)
| barche/k3d | tests/mesh/mesh.selection.SelectDegenerateFaces.py | Python | gpl-2.0 | 910 |
###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# 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, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following 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 MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS 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.
#
###############################################################################
from twisted.internet.defer import inlineCallbacks, returnValue
from klein import Klein
from autobahn.twisted.wamp import Application
app = Klein()
wampapp = Application()
@app.route('/square/submit', methods=['POST'])
@inlineCallbacks
def square_submit(request):
x = int(request.args.get('x', [0])[0])
res = yield wampapp.session.call(u'com.example.square', x)
returnValue("{} squared is {}".format(x, res))
if __name__ == "__main__":
import sys
from twisted.python import log
from twisted.web.server import Site
from twisted.internet import reactor
log.startLogging(sys.stdout)
reactor.listenTCP(8080, Site(app.resource()))
wampapp.run(u"ws://127.0.0.1:9000", u"realm1", standalone=False)
| nucular/AutobahnPython | examples/twisted/wamp/app/klein/example1/server_web.py | Python | mit | 2,014 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Glencoe Software, Inc. All Rights Reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
# 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.
from future.utils import native_str
import pytest
from omero.testlib import AbstractRepoTest
from omero.constants.namespaces import NSFSRENAME
from omero.plugins.fs import contents
from omero.plugins.fs import prep_directory
from omero.plugins.fs import rename_fileset
from omero.sys import ParametersI
from omero import SecurityViolation
# Module level marker
pytestmark = pytest.mark.fs_suite
class TestRename(AbstractRepoTest):
def setup_method(self, method):
self.pixels = self.client.sf.getPixelsService()
self.query = self.client.sf.getQueryService()
self.update = self.client.sf.getUpdateService()
self.mrepo = self.client.getManagedRepository()
def assert_rename(self, fileset, new_dir,
client=None, mrepo=None, ctx=None):
"""
Change the path entry for the files contained
in the orig_dir and then verify that they will
only be listed as belonging to the new_dir. The
files on disk ARE NOT MOVED.
"""
if client is None:
client = self.client
if mrepo is None:
mrepo = self.mrepo
orig_dir = fileset.templatePrefix.val
# Before the move the new location should be empty
assert 3 == len(list(contents(mrepo, orig_dir, ctx)))
assert 0 == len(list(contents(mrepo, new_dir, ctx)))
rv = rename_fileset(client, mrepo, fileset, new_dir, ctx=ctx)
# After the move, the old location should be empty
assert 0 == len(list(contents(mrepo, orig_dir, ctx)))
assert 3 == len(list(contents(mrepo, new_dir, ctx)))
return rv
def fake_move(self, tomove):
"""
This methods uses an admin-only backdoor in order to
perform the desired move. Sysadmins would move likely
just perform the move manually via OS commands:
mv old_dir/* new_dir/
"""
for source, target in tomove:
cb = self.raw("mv", [source, target], client=self.root)
self.assert_passes(cb)
@pytest.mark.parametrize("data", (
("user1", "user1", "rw----", True),
("user1", "user2", "rwra--", False),
("user1", "user2", "rwrw--", True),
("user1", "root", "rwra--", True),
("root", "root", "rwra--", True),
))
def test_rename_permissions(self, data):
owner, renamer, perms, allowed = data
group = self.new_group(perms=perms)
clients = {
"user1": self.new_client(group=group),
"user2": self.new_client(group=group),
"root": self.root,
}
orig_img = self.import_fake_file(name="rename",
sizeX=16, sizeY=16,
with_companion=True,
client=clients[owner])[0]
orig_fs = self.get_fileset([orig_img], clients[owner])
uid = orig_fs.details.owner.id.val
gid = orig_fs.details.group.id.val
client = clients[renamer]
mrepo = client.getManagedRepository()
ctx = client.getContext(group=gid)
if renamer == "root":
ctx["omero.user"] = native_str(uid)
new_dir = prep_directory(client, mrepo)
try:
tomove = self.assert_rename(
orig_fs, new_dir, client=client, mrepo=mrepo, ctx=ctx)
assert allowed
except SecurityViolation:
assert not allowed
if renamer == "root":
self.fake_move(tomove)
def test_rename_annotation(self):
ns = NSFSRENAME
mrepo = self.client.getManagedRepository()
orig_img = self.import_fake_file(with_companion=True)
orig_fs = self.get_fileset(orig_img)
new_dir = prep_directory(self.client, mrepo)
self.assert_rename(orig_fs, new_dir)
ann = self.query.projection((
"select a.id from FilesetAnnotationLink l "
"join l.child as a where l.parent.id = :id "
"and a.ns = :ns"),
ParametersI().addId(orig_fs.id).addString("ns", ns))
assert ann
def test_prep_and_delete(self):
mrepo = self.client.getManagedRepository()
new_dir = prep_directory(self.client, mrepo)
tree = list(contents(mrepo, new_dir))
assert 0 == len(tree)
| snoopycrimecop/openmicroscopy | components/tools/OmeroPy/test/integration/fstest/test_rename.py | Python | gpl-2.0 | 5,235 |
import os
import os.path as osp
import unittest
from hpcbench.cli import bennett
from hpcbench.net import CampaignHolder
from hpcbench.toolbox.contextlib_ext import mkdtemp, pushd
def custom_ssh(self, *args):
# get rid of node
return list(args[1:])
def custom_scp(self, *args):
src, dest = args
if ':' in src:
src = src.split(':', 1)[1]
elif ':' in dest:
dest = dest.split(':', 1)[1]
if src != dest:
return ['cp', src, dest]
else:
return ['true']
CampaignHolder.ssh = custom_ssh
CampaignHolder.scp = custom_scp
class TestNet(unittest.TestCase):
@staticmethod
def get_campaign_file():
return osp.splitext(__file__)[0] + '.yaml'
@unittest.skipIf(
'TRAVIS_TAG' in os.environ, 'version to deploy is not available on PyPi yet'
)
def test_local(self):
with mkdtemp() as temp_dir:
with pushd(temp_dir):
bennett.main(TestNet.get_campaign_file())
| tristan0x/hpcbench | tests/test_net.py | Python | mit | 980 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import datetime
class Migration(migrations.Migration):
dependencies = [
('paginaPrincipal', '0006_auto_20151029_1414'),
]
operations = [
migrations.AlterField(
model_name='reseña',
name='fecha',
field=models.DateTimeField(default=datetime.datetime(2015, 10, 29, 14, 14, 49, 363488)),
),
]
| AliGhahraei/RateMe | paginaPrincipal/migrations/0007_auto_20151029_1414.py | Python | gpl-3.0 | 476 |
import os
import subprocess
import socket
name = "gobuildslave"
current_hash = ""
for line in os.popen("md5sum " + name).readlines():
current_hash = line.split(' ')[0]
# Move the old version over
for line in os.popen('cp ' + name + ' old' + name).readlines():
print line.strip()
# Rebuild
for line in os.popen('go build').readlines():
print line.strip()
size_1 = os.path.getsize('./old' + name)
size_2 = os.path.getsize('./' + name)
lines = os.popen('ps -ef | grep ' + name).readlines()
running = False
for line in lines:
if "./" + name in line:
running = True
new_hash = ""
for line in os.popen("md5sum " + name).readlines():
new_hash = line.split(' ')[0]
if size_1 != size_2 or new_hash != current_hash or not running:
if not running:
for line in os.popen('go get github.com/brotherlogic/buildserver/buildserver_cli'):
pass
for line in os.popen('buildserver_cli crash gobuildslave version out.txt'):
pass
else:
try:
os.popen('go get github.com/brotherlogic/versionserver/versionserver_cli')
os.popen('versionserver_cli guard ' + name)
except IOError:
os.Exit(0)
for line in os.popen("cp out.txt oldout.txt").readline():
pass
for line in os.popen('echo "" > out.txt').readlines():
pass
for line in os.popen('killall ' + name).readlines():
pass
if socket.gethostname() == "stationone" or socket.gethostname() == "natframe" or socket.gethostname() == 'framethree' or socket.gethostname() == "printer":
subprocess.Popen(['./' + name, '--builds=false'])
else:
if socket.gethostname() == "argon":
subprocess.Popen(['./' + name, '--max_jobs=50'])
else:
subprocess.Popen(['./' + name])
| brotherlogic/gobuildslave | BuildAndRun.py | Python | apache-2.0 | 1,837 |
import urllib
import urllib2
year = range(2008,2014)
year2014 = [2013]
month = range(1,13)
url = "http://www.iea.org/stats/surveys/Electricity/MES"
y = range(2007,2014)
m = range(1,13)
link = []
time = []
for i in y:
for j in m:
if j<10:
link.append(url+str(i)+'0'+str(j)+'.xls')
time.append(str(i)+'0'+str(j)+'.xls')
#linkname=(url+str(i)+'0'+str(j)+'.xls')
#filename=(str(i)+'0'+str(j)+'.xls')
else:
link.append(url+str(i)+str(j)+'.xls')
time.append(str(i)+str(j)+'.xls')
#linkname=(url+str(i)+str(j)+'.xls')
#filename=(str(i)+str(j)+'.xls')
for i in range(len(link)):
file(time.pop(),'wb').write(urllib2.urlopen(link.pop()).read())
#demo one month
| bigbigdata/IEA-electricity-statistics | IEA_download.py | Python | mit | 781 |
from django import forms
from django.core.exceptions import MultipleObjectsReturned
from django.core.validators import MaxValueValidator, MinValueValidator
from taggit.forms import TagField
from dcim.models import Site, Rack, Device, Interface
from extras.forms import AddRemoveTagsForm, CustomFieldForm, CustomFieldBulkEditForm, CustomFieldFilterForm
from tenancy.forms import TenancyForm
from tenancy.forms import TenancyFilterForm
from tenancy.models import Tenant
from utilities.forms import (
add_blank_choice, APISelect, APISelectMultiple, BootstrapMixin, BulkEditNullBooleanSelect, ChainedModelChoiceField,
CSVChoiceField, ExpandableIPAddressField, FilterChoiceField, FlexibleModelChoiceField, ReturnURLForm, SlugField,
StaticSelect2, StaticSelect2Multiple, BOOLEAN_WITH_BLANK_CHOICES
)
from virtualization.models import VirtualMachine
from .constants import (
IP_PROTOCOL_CHOICES, IPADDRESS_ROLE_CHOICES, IPADDRESS_STATUS_CHOICES, PREFIX_STATUS_CHOICES, VLAN_STATUS_CHOICES,
)
from .models import Aggregate, IPAddress, Prefix, RIR, Role, Service, VLAN, VLANGroup, VRF
IP_FAMILY_CHOICES = [
('', 'All'),
(4, 'IPv4'),
(6, 'IPv6'),
]
PREFIX_MASK_LENGTH_CHOICES = add_blank_choice([(i, i) for i in range(1, 128)])
IPADDRESS_MASK_LENGTH_CHOICES = add_blank_choice([(i, i) for i in range(1, 129)])
#
# VRFs
#
class VRFForm(BootstrapMixin, TenancyForm, CustomFieldForm):
tags = TagField(
required=False
)
class Meta:
model = VRF
fields = [
'name', 'rd', 'enforce_unique', 'description', 'tenant_group', 'tenant', 'tags',
]
labels = {
'rd': "RD",
}
help_texts = {
'rd': "Route distinguisher in any format",
}
class VRFCSVForm(forms.ModelForm):
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
required=False,
to_field_name='name',
help_text='Name of assigned tenant',
error_messages={
'invalid_choice': 'Tenant not found.',
}
)
class Meta:
model = VRF
fields = VRF.csv_headers
help_texts = {
'name': 'VRF name',
}
class VRFBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=VRF.objects.all(),
widget=forms.MultipleHiddenInput()
)
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
required=False,
widget=APISelect(
api_url="/api/tenancy/tenants/"
)
)
enforce_unique = forms.NullBooleanField(
required=False,
widget=BulkEditNullBooleanSelect(),
label='Enforce unique space'
)
description = forms.CharField(
max_length=100,
required=False
)
class Meta:
nullable_fields = [
'tenant', 'description',
]
class VRFFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm):
model = VRF
field_order = ['q', 'tenant_group', 'tenant']
q = forms.CharField(
required=False,
label='Search'
)
#
# RIRs
#
class RIRForm(BootstrapMixin, forms.ModelForm):
slug = SlugField()
class Meta:
model = RIR
fields = [
'name', 'slug', 'is_private',
]
class RIRCSVForm(forms.ModelForm):
slug = SlugField()
class Meta:
model = RIR
fields = RIR.csv_headers
help_texts = {
'name': 'RIR name',
}
class RIRFilterForm(BootstrapMixin, forms.Form):
is_private = forms.NullBooleanField(
required=False,
label='Private',
widget=StaticSelect2(
choices=BOOLEAN_WITH_BLANK_CHOICES
)
)
#
# Aggregates
#
class AggregateForm(BootstrapMixin, CustomFieldForm):
tags = TagField(
required=False
)
class Meta:
model = Aggregate
fields = [
'prefix', 'rir', 'date_added', 'description', 'tags',
]
help_texts = {
'prefix': "IPv4 or IPv6 network",
'rir': "Regional Internet Registry responsible for this prefix",
'date_added': "Format: YYYY-MM-DD",
}
widgets = {
'rir': APISelect(
api_url="/api/ipam/rirs/"
)
}
class AggregateCSVForm(forms.ModelForm):
rir = forms.ModelChoiceField(
queryset=RIR.objects.all(),
to_field_name='name',
help_text='Name of parent RIR',
error_messages={
'invalid_choice': 'RIR not found.',
}
)
class Meta:
model = Aggregate
fields = Aggregate.csv_headers
class AggregateBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=Aggregate.objects.all(),
widget=forms.MultipleHiddenInput()
)
rir = forms.ModelChoiceField(
queryset=RIR.objects.all(),
required=False,
label='RIR',
widget=APISelect(
api_url="/api/ipam/rirs/"
)
)
date_added = forms.DateField(
required=False
)
description = forms.CharField(
max_length=100,
required=False
)
class Meta:
nullable_fields = [
'date_added', 'description',
]
class AggregateFilterForm(BootstrapMixin, CustomFieldFilterForm):
model = Aggregate
q = forms.CharField(
required=False,
label='Search'
)
family = forms.ChoiceField(
required=False,
choices=IP_FAMILY_CHOICES,
label='Address family',
widget=StaticSelect2()
)
rir = FilterChoiceField(
queryset=RIR.objects.all(),
to_field_name='slug',
label='RIR',
widget=APISelectMultiple(
api_url="/api/ipam/rirs/",
value_field="slug",
)
)
#
# Roles
#
class RoleForm(BootstrapMixin, forms.ModelForm):
slug = SlugField()
class Meta:
model = Role
fields = [
'name', 'slug',
]
class RoleCSVForm(forms.ModelForm):
slug = SlugField()
class Meta:
model = Role
fields = Role.csv_headers
help_texts = {
'name': 'Role name',
}
#
# Prefixes
#
class PrefixForm(BootstrapMixin, TenancyForm, CustomFieldForm):
site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
label='Site',
widget=APISelect(
api_url="/api/dcim/sites/",
filter_for={
'vlan_group': 'site_id',
'vlan': 'site_id',
},
attrs={
'nullable': 'true',
}
)
)
vlan_group = ChainedModelChoiceField(
queryset=VLANGroup.objects.all(),
chains=(
('site', 'site'),
),
required=False,
label='VLAN group',
widget=APISelect(
api_url='/api/ipam/vlan-groups/',
filter_for={
'vlan': 'group_id'
},
attrs={
'nullable': 'true',
}
)
)
vlan = ChainedModelChoiceField(
queryset=VLAN.objects.all(),
chains=(
('site', 'site'),
('group', 'vlan_group'),
),
required=False,
label='VLAN',
widget=APISelect(
api_url='/api/ipam/vlans/',
display_field='display_name'
)
)
tags = TagField(required=False)
class Meta:
model = Prefix
fields = [
'prefix', 'vrf', 'site', 'vlan', 'status', 'role', 'is_pool', 'description', 'tenant_group', 'tenant',
'tags',
]
widgets = {
'vrf': APISelect(
api_url="/api/ipam/vrfs/"
),
'status': StaticSelect2(),
'role': APISelect(
api_url="/api/ipam/roles/"
)
}
def __init__(self, *args, **kwargs):
# Initialize helper selectors
instance = kwargs.get('instance')
initial = kwargs.get('initial', {}).copy()
if instance and instance.vlan is not None:
initial['vlan_group'] = instance.vlan.group
kwargs['initial'] = initial
super().__init__(*args, **kwargs)
self.fields['vrf'].empty_label = 'Global'
class PrefixCSVForm(forms.ModelForm):
vrf = FlexibleModelChoiceField(
queryset=VRF.objects.all(),
to_field_name='rd',
required=False,
help_text='Route distinguisher of parent VRF (or {ID})',
error_messages={
'invalid_choice': 'VRF not found.',
}
)
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
required=False,
to_field_name='name',
help_text='Name of assigned tenant',
error_messages={
'invalid_choice': 'Tenant not found.',
}
)
site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
to_field_name='name',
help_text='Name of parent site',
error_messages={
'invalid_choice': 'Site not found.',
}
)
vlan_group = forms.CharField(
help_text='Group name of assigned VLAN',
required=False
)
vlan_vid = forms.IntegerField(
help_text='Numeric ID of assigned VLAN',
required=False
)
status = CSVChoiceField(
choices=PREFIX_STATUS_CHOICES,
help_text='Operational status'
)
role = forms.ModelChoiceField(
queryset=Role.objects.all(),
required=False,
to_field_name='name',
help_text='Functional role',
error_messages={
'invalid_choice': 'Invalid role.',
}
)
class Meta:
model = Prefix
fields = Prefix.csv_headers
def clean(self):
super().clean()
site = self.cleaned_data.get('site')
vlan_group = self.cleaned_data.get('vlan_group')
vlan_vid = self.cleaned_data.get('vlan_vid')
# Validate VLAN
if vlan_group and vlan_vid:
try:
self.instance.vlan = VLAN.objects.get(site=site, group__name=vlan_group, vid=vlan_vid)
except VLAN.DoesNotExist:
if site:
raise forms.ValidationError("VLAN {} not found in site {} group {}".format(
vlan_vid, site, vlan_group
))
else:
raise forms.ValidationError("Global VLAN {} not found in group {}".format(vlan_vid, vlan_group))
except MultipleObjectsReturned:
raise forms.ValidationError(
"Multiple VLANs with VID {} found in group {}".format(vlan_vid, vlan_group)
)
elif vlan_vid:
try:
self.instance.vlan = VLAN.objects.get(site=site, group__isnull=True, vid=vlan_vid)
except VLAN.DoesNotExist:
if site:
raise forms.ValidationError("VLAN {} not found in site {}".format(vlan_vid, site))
else:
raise forms.ValidationError("Global VLAN {} not found".format(vlan_vid))
except MultipleObjectsReturned:
raise forms.ValidationError("Multiple VLANs with VID {} found".format(vlan_vid))
class PrefixBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=Prefix.objects.all(),
widget=forms.MultipleHiddenInput()
)
site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
widget=APISelect(
api_url="/api/dcim/sites/"
)
)
vrf = forms.ModelChoiceField(
queryset=VRF.objects.all(),
required=False,
label='VRF',
widget=APISelect(
api_url="/api/ipam/vrfs/"
)
)
prefix_length = forms.IntegerField(
min_value=1,
max_value=127,
required=False
)
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
required=False,
widget=APISelect(
api_url="/api/tenancy/tenants/"
)
)
status = forms.ChoiceField(
choices=add_blank_choice(PREFIX_STATUS_CHOICES),
required=False,
widget=StaticSelect2()
)
role = forms.ModelChoiceField(
queryset=Role.objects.all(),
required=False,
widget=APISelect(
api_url="/api/ipam/roles/"
)
)
is_pool = forms.NullBooleanField(
required=False,
widget=BulkEditNullBooleanSelect(),
label='Is a pool'
)
description = forms.CharField(
max_length=100,
required=False
)
class Meta:
nullable_fields = [
'site', 'vrf', 'tenant', 'role', 'description',
]
class PrefixFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm):
model = Prefix
field_order = [
'q', 'within_include', 'family', 'mask_length', 'vrf_id', 'status', 'site', 'role', 'tenant_group', 'tenant',
'is_pool', 'expand',
]
q = forms.CharField(
required=False,
label='Search'
)
within_include = forms.CharField(
required=False,
widget=forms.TextInput(
attrs={
'placeholder': 'Prefix',
}
),
label='Search within'
)
family = forms.ChoiceField(
required=False,
choices=IP_FAMILY_CHOICES,
label='Address family',
widget=StaticSelect2()
)
mask_length = forms.ChoiceField(
required=False,
choices=PREFIX_MASK_LENGTH_CHOICES,
label='Mask length',
widget=StaticSelect2()
)
vrf_id = FilterChoiceField(
queryset=VRF.objects.all(),
label='VRF',
null_label='-- Global --',
widget=APISelectMultiple(
api_url="/api/ipam/vrfs/",
null_option=True,
)
)
status = forms.MultipleChoiceField(
choices=PREFIX_STATUS_CHOICES,
required=False,
widget=StaticSelect2Multiple()
)
site = FilterChoiceField(
queryset=Site.objects.all(),
to_field_name='slug',
null_label='-- None --',
widget=APISelectMultiple(
api_url="/api/dcim/sites/",
value_field="slug",
null_option=True,
)
)
role = FilterChoiceField(
queryset=Role.objects.all(),
to_field_name='slug',
null_label='-- None --',
widget=APISelectMultiple(
api_url="/api/ipam/roles/",
value_field="slug",
null_option=True,
)
)
is_pool = forms.NullBooleanField(
required=False,
label='Is a pool',
widget=StaticSelect2(
choices=BOOLEAN_WITH_BLANK_CHOICES
)
)
expand = forms.BooleanField(
required=False,
label='Expand prefix hierarchy'
)
#
# IP addresses
#
class IPAddressForm(BootstrapMixin, TenancyForm, ReturnURLForm, CustomFieldForm):
interface = forms.ModelChoiceField(
queryset=Interface.objects.all(),
required=False
)
nat_site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
label='Site',
widget=APISelect(
api_url="/api/dcim/sites/",
filter_for={
'nat_rack': 'site_id',
'nat_device': 'site_id'
}
)
)
nat_rack = ChainedModelChoiceField(
queryset=Rack.objects.all(),
chains=(
('site', 'nat_site'),
),
required=False,
label='Rack',
widget=APISelect(
api_url='/api/dcim/racks/',
display_field='display_name',
filter_for={
'nat_device': 'rack_id'
},
attrs={
'nullable': 'true'
}
)
)
nat_device = ChainedModelChoiceField(
queryset=Device.objects.all(),
chains=(
('site', 'nat_site'),
('rack', 'nat_rack'),
),
required=False,
label='Device',
widget=APISelect(
api_url='/api/dcim/devices/',
display_field='display_name',
filter_for={
'nat_inside': 'device_id'
}
)
)
nat_inside = ChainedModelChoiceField(
queryset=IPAddress.objects.all(),
chains=(
('interface__device', 'nat_device'),
),
required=False,
label='IP Address',
widget=APISelect(
api_url='/api/ipam/ip-addresses/',
display_field='address'
)
)
primary_for_parent = forms.BooleanField(
required=False,
label='Make this the primary IP for the device/VM'
)
tags = TagField(
required=False
)
class Meta:
model = IPAddress
fields = [
'address', 'vrf', 'status', 'role', 'dns_name', 'description', 'interface', 'primary_for_parent',
'nat_site', 'nat_rack', 'nat_inside', 'tenant_group', 'tenant', 'tags',
]
widgets = {
'status': StaticSelect2(),
'role': StaticSelect2(),
'vrf': APISelect(
api_url="/api/ipam/vrfs/"
)
}
def __init__(self, *args, **kwargs):
# Initialize helper selectors
instance = kwargs.get('instance')
initial = kwargs.get('initial', {}).copy()
if instance and instance.nat_inside and instance.nat_inside.device is not None:
initial['nat_site'] = instance.nat_inside.device.site
initial['nat_rack'] = instance.nat_inside.device.rack
initial['nat_device'] = instance.nat_inside.device
kwargs['initial'] = initial
super().__init__(*args, **kwargs)
self.fields['vrf'].empty_label = 'Global'
# Limit interface selections to those belonging to the parent device/VM
if self.instance and self.instance.interface:
self.fields['interface'].queryset = Interface.objects.filter(
device=self.instance.interface.device, virtual_machine=self.instance.interface.virtual_machine
)
else:
self.fields['interface'].choices = []
# Initialize primary_for_parent if IP address is already assigned
if self.instance.pk and self.instance.interface is not None:
parent = self.instance.interface.parent
if (
self.instance.address.version == 4 and parent.primary_ip4_id == self.instance.pk or
self.instance.address.version == 6 and parent.primary_ip6_id == self.instance.pk
):
self.initial['primary_for_parent'] = True
def clean(self):
super().clean()
# Primary IP assignment is only available if an interface has been assigned.
if self.cleaned_data.get('primary_for_parent') and not self.cleaned_data.get('interface'):
self.add_error(
'primary_for_parent', "Only IP addresses assigned to an interface can be designated as primary IPs."
)
def save(self, *args, **kwargs):
ipaddress = super().save(*args, **kwargs)
# Assign/clear this IPAddress as the primary for the associated Device/VirtualMachine.
if self.cleaned_data['primary_for_parent']:
parent = self.cleaned_data['interface'].parent
if ipaddress.address.version == 4:
parent.primary_ip4 = ipaddress
else:
parent.primary_ip6 = ipaddress
parent.save()
elif self.cleaned_data['interface']:
parent = self.cleaned_data['interface'].parent
if ipaddress.address.version == 4 and parent.primary_ip4 == ipaddress:
parent.primary_ip4 = None
parent.save()
elif ipaddress.address.version == 6 and parent.primary_ip6 == ipaddress:
parent.primary_ip6 = None
parent.save()
return ipaddress
class IPAddressBulkCreateForm(BootstrapMixin, forms.Form):
pattern = ExpandableIPAddressField(
label='Address pattern'
)
class IPAddressBulkAddForm(BootstrapMixin, TenancyForm, CustomFieldForm):
class Meta:
model = IPAddress
fields = [
'address', 'vrf', 'status', 'role', 'dns_name', 'description', 'tenant_group', 'tenant',
]
widgets = {
'status': StaticSelect2(),
'role': StaticSelect2(),
'vrf': APISelect(
api_url="/api/ipam/vrfs/"
)
}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['vrf'].empty_label = 'Global'
class IPAddressCSVForm(forms.ModelForm):
vrf = FlexibleModelChoiceField(
queryset=VRF.objects.all(),
to_field_name='rd',
required=False,
help_text='Route distinguisher of parent VRF (or {ID})',
error_messages={
'invalid_choice': 'VRF not found.',
}
)
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
to_field_name='name',
required=False,
help_text='Name of the assigned tenant',
error_messages={
'invalid_choice': 'Tenant not found.',
}
)
status = CSVChoiceField(
choices=IPADDRESS_STATUS_CHOICES,
help_text='Operational status'
)
role = CSVChoiceField(
choices=IPADDRESS_ROLE_CHOICES,
required=False,
help_text='Functional role'
)
device = FlexibleModelChoiceField(
queryset=Device.objects.all(),
required=False,
to_field_name='name',
help_text='Name or ID of assigned device',
error_messages={
'invalid_choice': 'Device not found.',
}
)
virtual_machine = forms.ModelChoiceField(
queryset=VirtualMachine.objects.all(),
required=False,
to_field_name='name',
help_text='Name of assigned virtual machine',
error_messages={
'invalid_choice': 'Virtual machine not found.',
}
)
interface_name = forms.CharField(
help_text='Name of assigned interface',
required=False
)
is_primary = forms.BooleanField(
help_text='Make this the primary IP for the assigned device',
required=False
)
class Meta:
model = IPAddress
fields = IPAddress.csv_headers
def clean(self):
super().clean()
device = self.cleaned_data.get('device')
virtual_machine = self.cleaned_data.get('virtual_machine')
interface_name = self.cleaned_data.get('interface_name')
is_primary = self.cleaned_data.get('is_primary')
# Validate interface
if interface_name and device:
try:
self.instance.interface = Interface.objects.get(device=device, name=interface_name)
except Interface.DoesNotExist:
raise forms.ValidationError("Invalid interface {} for device {}".format(
interface_name, device
))
elif interface_name and virtual_machine:
try:
self.instance.interface = Interface.objects.get(virtual_machine=virtual_machine, name=interface_name)
except Interface.DoesNotExist:
raise forms.ValidationError("Invalid interface {} for virtual machine {}".format(
interface_name, virtual_machine
))
elif interface_name:
raise forms.ValidationError("Interface given ({}) but parent device/virtual machine not specified".format(
interface_name
))
elif device:
raise forms.ValidationError("Device specified ({}) but interface missing".format(device))
elif virtual_machine:
raise forms.ValidationError("Virtual machine specified ({}) but interface missing".format(virtual_machine))
# Validate is_primary
if is_primary and not device and not virtual_machine:
raise forms.ValidationError("No device or virtual machine specified; cannot set as primary IP")
def save(self, *args, **kwargs):
# Set interface
if self.cleaned_data['device'] and self.cleaned_data['interface_name']:
self.instance.interface = Interface.objects.get(
device=self.cleaned_data['device'],
name=self.cleaned_data['interface_name']
)
elif self.cleaned_data['virtual_machine'] and self.cleaned_data['interface_name']:
self.instance.interface = Interface.objects.get(
virtual_machine=self.cleaned_data['virtual_machine'],
name=self.cleaned_data['interface_name']
)
ipaddress = super().save(*args, **kwargs)
# Set as primary for device/VM
if self.cleaned_data['is_primary']:
parent = self.cleaned_data['device'] or self.cleaned_data['virtual_machine']
if self.instance.address.version == 4:
parent.primary_ip4 = ipaddress
elif self.instance.address.version == 6:
parent.primary_ip6 = ipaddress
parent.save()
return ipaddress
class IPAddressBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=IPAddress.objects.all(),
widget=forms.MultipleHiddenInput()
)
vrf = forms.ModelChoiceField(
queryset=VRF.objects.all(),
required=False,
label='VRF',
widget=APISelect(
api_url="/api/ipam/vrfs/"
)
)
mask_length = forms.IntegerField(
min_value=1,
max_value=128,
required=False
)
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
required=False,
widget=APISelect(
api_url="/api/tenancy/tenants/"
)
)
status = forms.ChoiceField(
choices=add_blank_choice(IPADDRESS_STATUS_CHOICES),
required=False,
widget=StaticSelect2()
)
role = forms.ChoiceField(
choices=add_blank_choice(IPADDRESS_ROLE_CHOICES),
required=False,
widget=StaticSelect2()
)
dns_name = forms.CharField(
max_length=255,
required=False
)
description = forms.CharField(
max_length=100,
required=False
)
class Meta:
nullable_fields = [
'vrf', 'role', 'tenant', 'dns_name', 'description',
]
class IPAddressAssignForm(BootstrapMixin, forms.Form):
vrf = forms.ModelChoiceField(
queryset=VRF.objects.all(),
required=False,
label='VRF',
empty_label='Global',
widget=APISelect(
api_url="/api/ipam/vrfs/"
)
)
address = forms.CharField(
label='IP Address'
)
class IPAddressFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm):
model = IPAddress
field_order = [
'q', 'parent', 'family', 'mask_length', 'vrf_id', 'status', 'role', 'tenant_group', 'tenant',
]
q = forms.CharField(
required=False,
label='Search'
)
parent = forms.CharField(
required=False,
widget=forms.TextInput(
attrs={
'placeholder': 'Prefix',
}
),
label='Parent Prefix'
)
family = forms.ChoiceField(
required=False,
choices=IP_FAMILY_CHOICES,
label='Address family',
widget=StaticSelect2()
)
mask_length = forms.ChoiceField(
required=False,
choices=IPADDRESS_MASK_LENGTH_CHOICES,
label='Mask length',
widget=StaticSelect2()
)
vrf_id = FilterChoiceField(
queryset=VRF.objects.all(),
label='VRF',
null_label='-- Global --',
widget=APISelectMultiple(
api_url="/api/ipam/vrfs/",
null_option=True,
)
)
status = forms.MultipleChoiceField(
choices=IPADDRESS_STATUS_CHOICES,
required=False,
widget=StaticSelect2Multiple()
)
role = forms.MultipleChoiceField(
choices=IPADDRESS_ROLE_CHOICES,
required=False,
widget=StaticSelect2Multiple()
)
#
# VLAN groups
#
class VLANGroupForm(BootstrapMixin, forms.ModelForm):
slug = SlugField()
class Meta:
model = VLANGroup
fields = [
'site', 'name', 'slug',
]
widgets = {
'site': APISelect(
api_url="/api/dcim/sites/"
)
}
class VLANGroupCSVForm(forms.ModelForm):
site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
to_field_name='name',
help_text='Name of parent site',
error_messages={
'invalid_choice': 'Site not found.',
}
)
slug = SlugField()
class Meta:
model = VLANGroup
fields = VLANGroup.csv_headers
help_texts = {
'name': 'Name of VLAN group',
}
class VLANGroupFilterForm(BootstrapMixin, forms.Form):
site = FilterChoiceField(
queryset=Site.objects.all(),
to_field_name='slug',
null_label='-- Global --',
widget=APISelectMultiple(
api_url="/api/dcim/sites/",
value_field="slug",
null_option=True,
)
)
#
# VLANs
#
class VLANForm(BootstrapMixin, TenancyForm, CustomFieldForm):
site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
widget=APISelect(
api_url="/api/dcim/sites/",
filter_for={
'group': 'site_id'
},
attrs={
'nullable': 'true',
}
)
)
group = ChainedModelChoiceField(
queryset=VLANGroup.objects.all(),
chains=(
('site', 'site'),
),
required=False,
label='Group',
widget=APISelect(
api_url='/api/ipam/vlan-groups/',
)
)
tags = TagField(required=False)
class Meta:
model = VLAN
fields = [
'site', 'group', 'vid', 'name', 'status', 'role', 'description', 'tenant_group', 'tenant', 'tags',
]
help_texts = {
'site': "Leave blank if this VLAN spans multiple sites",
'group': "VLAN group (optional)",
'vid': "Configured VLAN ID",
'name': "Configured VLAN name",
'status': "Operational status of this VLAN",
'role': "The primary function of this VLAN",
}
widgets = {
'status': StaticSelect2(),
'role': APISelect(
api_url="/api/ipam/roles/"
)
}
class VLANCSVForm(forms.ModelForm):
site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
to_field_name='name',
help_text='Name of parent site',
error_messages={
'invalid_choice': 'Site not found.',
}
)
group_name = forms.CharField(
help_text='Name of VLAN group',
required=False
)
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
to_field_name='name',
required=False,
help_text='Name of assigned tenant',
error_messages={
'invalid_choice': 'Tenant not found.',
}
)
status = CSVChoiceField(
choices=VLAN_STATUS_CHOICES,
help_text='Operational status'
)
role = forms.ModelChoiceField(
queryset=Role.objects.all(),
required=False,
to_field_name='name',
help_text='Functional role',
error_messages={
'invalid_choice': 'Invalid role.',
}
)
class Meta:
model = VLAN
fields = VLAN.csv_headers
help_texts = {
'vid': 'Numeric VLAN ID (1-4095)',
'name': 'VLAN name',
}
def clean(self):
super().clean()
site = self.cleaned_data.get('site')
group_name = self.cleaned_data.get('group_name')
# Validate VLAN group
if group_name:
try:
self.instance.group = VLANGroup.objects.get(site=site, name=group_name)
except VLANGroup.DoesNotExist:
if site:
raise forms.ValidationError(
"VLAN group {} not found for site {}".format(group_name, site)
)
else:
raise forms.ValidationError(
"Global VLAN group {} not found".format(group_name)
)
class VLANBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=VLAN.objects.all(),
widget=forms.MultipleHiddenInput()
)
site = forms.ModelChoiceField(
queryset=Site.objects.all(),
required=False,
widget=APISelect(
api_url="/api/dcim/sites/"
)
)
group = forms.ModelChoiceField(
queryset=VLANGroup.objects.all(),
required=False,
widget=APISelect(
api_url="/api/ipam/vlan-groups/"
)
)
tenant = forms.ModelChoiceField(
queryset=Tenant.objects.all(),
required=False,
widget=APISelect(
api_url="/api/tenancy/tenants/"
)
)
status = forms.ChoiceField(
choices=add_blank_choice(VLAN_STATUS_CHOICES),
required=False,
widget=StaticSelect2()
)
role = forms.ModelChoiceField(
queryset=Role.objects.all(),
required=False,
widget=APISelect(
api_url="/api/ipam/roles/"
)
)
description = forms.CharField(
max_length=100,
required=False
)
class Meta:
nullable_fields = [
'site', 'group', 'tenant', 'role', 'description',
]
class VLANFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm):
model = VLAN
field_order = ['q', 'site', 'group_id', 'status', 'role', 'tenant_group', 'tenant']
q = forms.CharField(
required=False,
label='Search'
)
site = FilterChoiceField(
queryset=Site.objects.all(),
to_field_name='slug',
null_label='-- Global --',
widget=APISelectMultiple(
api_url="/api/dcim/sites/",
value_field="slug",
null_option=True,
)
)
group_id = FilterChoiceField(
queryset=VLANGroup.objects.all(),
label='VLAN group',
null_label='-- None --',
widget=APISelectMultiple(
api_url="/api/ipam/vlan-groups/",
null_option=True,
)
)
status = forms.MultipleChoiceField(
choices=VLAN_STATUS_CHOICES,
required=False,
widget=StaticSelect2Multiple()
)
role = FilterChoiceField(
queryset=Role.objects.all(),
to_field_name='slug',
null_label='-- None --',
widget=APISelectMultiple(
api_url="/api/ipam/roles/",
value_field="slug",
null_option=True,
)
)
#
# Services
#
class ServiceForm(BootstrapMixin, CustomFieldForm):
tags = TagField(
required=False
)
class Meta:
model = Service
fields = [
'name', 'protocol', 'port', 'ipaddresses', 'description', 'tags',
]
help_texts = {
'ipaddresses': "IP address assignment is optional. If no IPs are selected, the service is assumed to be "
"reachable via all IPs assigned to the device.",
}
widgets = {
'protocol': StaticSelect2(),
'ipaddresses': StaticSelect2Multiple(),
}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Limit IP address choices to those assigned to interfaces of the parent device/VM
if self.instance.device:
vc_interface_ids = [i['id'] for i in self.instance.device.vc_interfaces.values('id')]
self.fields['ipaddresses'].queryset = IPAddress.objects.filter(
interface_id__in=vc_interface_ids
)
elif self.instance.virtual_machine:
self.fields['ipaddresses'].queryset = IPAddress.objects.filter(
interface__virtual_machine=self.instance.virtual_machine
)
else:
self.fields['ipaddresses'].choices = []
class ServiceFilterForm(BootstrapMixin, CustomFieldFilterForm):
model = Service
q = forms.CharField(
required=False,
label='Search'
)
protocol = forms.ChoiceField(
choices=add_blank_choice(IP_PROTOCOL_CHOICES),
required=False,
widget=StaticSelect2Multiple()
)
port = forms.IntegerField(
required=False,
)
class ServiceBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=Service.objects.all(),
widget=forms.MultipleHiddenInput()
)
protocol = forms.ChoiceField(
choices=add_blank_choice(IP_PROTOCOL_CHOICES),
required=False,
widget=StaticSelect2()
)
port = forms.IntegerField(
validators=[
MinValueValidator(1),
MaxValueValidator(65535),
],
required=False
)
description = forms.CharField(
max_length=100,
required=False
)
class Meta:
nullable_fields = [
'site', 'tenant', 'role', 'description',
]
| lampwins/netbox | netbox/ipam/forms.py | Python | apache-2.0 | 38,117 |
################################################################################
# Created By: Justin Paul
# Source: https://blogs.oracle.com/OracleWebCenterSuite
#
# NOTE: Please note that these code snippets should be used for development and
# testing purposes only, as such it is unsupported and should not be used
# on production environments.
################################################################################
from oracle.stellent.ridc import IdcClientManager
from oracle.stellent.ridc import IdcContext
manager = IdcClientManager ()
client = manager.createClient ("idc://127.0.0.1:4444")
userContext = IdcContext ("weblogic")
# client = manager.createClient ("http://127.0.0.1:16200/cs/idcplg")
# userContext = IdcContext ("<user>", "<password>")
binder = client.createBinder ()
binder.putLocal("IdcService", "FLD_MOVE")
# 1 to overwrite, 0 to leave
binder.putLocal("overwrite", "1")
# Use any one of the identified for destination folder
binder.putLocal("destination", "fFolderGUID:D638FE6CBE83C59B488AF5DDC70AD77F")
# binder.putLocal("destination", "path:/Enterprise Libraries/My Library/Folder1/Destination")
# You can move multiple items as item1, item2, item3, ..., item[n]
# Item1 - Folder
binder.putLocal("item1", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B52")
# binder.putLocal("item1", "path:/Enterprise Libraries/My Library/Folder2")
# Item2 - Folder
# binder.putLocal("item2", "fFolderGUID:9386AC92919EF4A8C022D3EA47E63B76")
binder.putLocal("item2", "path:/Enterprise Libraries/My Library/Folder3")
# Item3 - File
binder.putLocal("item3", "fFileGUID:F868B260B75DED9CD7A37F0A1CD703BD")
# binder.putLocal("item3", "path:/Enterprise Libraries/My Library/Folder4/file1.txt")
# Item4 - File
# binder.putLocal("item4", "fFileGUID:8F9E18BB9D8609A0E07F391C8A3737F4")
binder.putLocal("item4", "path:/Enterprise Libraries/My Library/Folder4/file2.txt")
# get the response
response = client.sendRequest (userContext, binder)
responseBinder = response.getResponseAsBinder ()
| justinpaulthekkan/oracle-blog-examples | RIDCJythonScripts/movefolderitems.py | Python | apache-2.0 | 2,022 |
from django.conf import settings
from django.conf.urls import patterns, url
from .views import RecoverPasswordView, LinkedInProfile
from student_account import views
urlpatterns = []
if settings.FEATURES.get('ENABLE_COMBINED_LOGIN_REGISTRATION'):
urlpatterns += patterns(
'student_account.views',
url(r'^password$', 'password_change_request_handler', name='password_change_request'),
url(r'^recover-password$', RecoverPasswordView.as_view({'post': 'post'}), name="restrecover-password"),
)
urlpatterns += patterns(
'student_account.views',
url(r'^finish_auth$', 'finish_auth', name='finish_auth'),
url(r'^settings$', 'account_settings', name='account_settings'),
url(r'^linkedin-profile$', LinkedInProfile.as_view({'get': 'get'}), name='linkedin_profile'),
)
| proversity-org/edx-platform | lms/djangoapps/student_account/urls.py | Python | agpl-3.0 | 813 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.