parses an ioc to populate self.iocs and self.ioc_name

        :param ioc_obj:
        :return:
498481
def parse(self, ioc_obj):
        
        if ioc_obj is None:
            return
        iocid = ioc_obj.iocid
        try:
            sd = ioc_obj.metadata.xpath('.//short_description/text()')[0]
        except IndexError:
            sd = 'NoName'
        if iocid in self.iocs:
            msg = 'duplicate IOC UUID [{}] [orig_shortName: {}][new_shortName: {}]'.format(iocid,
                                                                                           self.ioc_name[iocid],
                                                                                           sd)
            log.warning(msg)
        self.iocs[iocid] = ioc_obj
        self.ioc_name[iocid] = sd
        if self.parser_callback:
            self.parser_callback(ioc_obj)
        return True
391948
def GetParserObjectByName(cls, parser_name):
    
    parser_class = cls._parser_classes.get(parser_name, None)
    if parser_class:
      return parser_class()
    return None
227043
def getRegistered(self, context = ""):
		
		myobjs = {}
		try:
			# Python 2.x
			objs_iterator = self._objs[context].iteritems()
		except AttributeError:
			# Python 3.x
			objs_iterator = self._objs[context].items()
		for oidstr, snmpobj in objs_iterator:
			myobjs[oidstr] = {
				"type": type(snmpobj).__name__,
				"value": snmpobj.value()
			}
		return dict(myobjs)
590981
def get_object(self, name, obj):
        
        return self[name](obj, **self.opts(name))
420010
def get_interface_by_instance_name(self, name):
        ''''''
        with self._mutex:
            for intf in self.interfaces:
                if intf.instance_name == name:
                    return intf
            return None
813850
def init(obj, resource_root, attrs=None):
    
    # This works around http://bugs.python.org/issue2646
    # We use unicode strings as keys in kwargs.
    str_attrs = { }
    if attrs:
      for k, v in attrs.iteritems():
        if k not in ('self', 'resource_root'):
          str_attrs[k] = v
    BaseApiObject.__init__(obj, resource_root, **str_attrs)
644518
def _parse_interfaces(self):
        
        interfaces = dict()
        names = re.findall(r'^interface (Po.+)$', self.config, re.M)
        for name in names:
            config = self.get_block('interface %s' % name)
            match = re.search(r'mlag (\d+)', config)
            if match:
                interfaces[name] = dict(mlag_id=match.group(1))
        return dict(interfaces=interfaces)
1149812
def obj_to_dict(cls, obj):
        
        data = {}
        for field_name in cls.get_fields():
            try:
                value = getattr(obj, field_name)
            except AttributeError:
                # If the field doesn't exist on the object, fail gracefully
                # and don't include the field in the data dict at all. Fail
                # loudly if the field exists but produces a different error
                # (edge case: accessing an *existing* field could technically
                # produce an unrelated AttributeError).
                continue

            if callable(value):
                value = value()
            data[field_name] = value

        return data
949947
def normalizeInternalObjectType(value, cls, name):
    
    if not isinstance(value, cls):
        raise TypeError("%s must be a %s instance, not %s."
                        % (name, name, type(value).__name__))
    return value
201208
def interface_endpoints(self):
        
        api_version = self._get_api_version('interface_endpoints')
        if api_version == '2018-08-01':
            from .v2018_08_01.operations import InterfaceEndpointsOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
24004
def parse_obj(o):
    
    r = {}
    for k, v in o.items():
        if is_unable_to_connect(v):
            r[k] = None

        try:
            r[k] = parse_value(k, v)
        except (ObdPidParserUnknownError, AttributeError, TypeError):
            r[k] = None
    return r
1234911
def obj(self):
        
        if self._wrapped is not self.Null:
            return self._wrapped
        else:
            return self.object
469390
def _iris_obj_to_attrs(obj):
    
    attrs = {'standard_name': obj.standard_name,
             'long_name': obj.long_name}
    if obj.units.calendar:
        attrs['calendar'] = obj.units.calendar
    if obj.units.origin != '1' and not obj.units.is_unknown():
        attrs['units'] = obj.units.origin
    attrs.update(obj.attributes)
    return dict((k, v) for k, v in attrs.items() if v is not None)
164422
def _make_object_dict(self, obj):
        
        data = {}
        for attr in dir(obj):
            if attr[0] is not '_' and attr is not 'status':
                datum = getattr(obj, attr)
                if not isinstance(datum, types.MethodType):
                    data.update(self._handle_object(attr,datum))
        return data
870107
def cast_object(self, interface_object, interface_class):
        
        name = interface_class.__name__
        i = self.manager.queryInterface(interface_object._i, name)
        return interface_class(interface=i)
411295
def IOC_TYPECHECK(t):
    
    result = ctypes.sizeof(t)
    assert result <= _IOC_SIZEMASK, result
    return result
931381
def parse(cls, op):
        
        for event in cls:
            if event.value == int(op):
                return event
        return None