Did I find the right examples for you? yes no

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)
Raised when the mgmt address is invalid or object does not exists

src/c/o/confine-controller-0.10.5/controller/apps/mgmtnetworks/tinc/utils.py   confine-controller(Download)
from django.contrib.contenttypes.models import ContentType
from IPy import IP
 
from controller import settings
from controller.core.exceptions import InvalidMgmtAddress
            ip = IP(ip)
        except ValueError:
            raise InvalidMgmtAddress('%s is not a valid IP address' % ip)
    if ip.version() == 6:
        ip_words = ip.strFullsize().split(':')
        prefix = settings.MGMT_IPV6_PREFIX.split(':')[:3]
        prefix = [ word.zfill(4) for word in prefix ]
        client_type = False
        if ip_words[:3] != prefix:
            raise InvalidMgmtAddress('%s is not a valid mgmt address' % ip)
                client = client_type.objects.get(object_id=object_id, content_type=ct)
            except client_type.DoesNotExist:
                raise InvalidMgmtAddress('No object related with %s mgmt IP' % ip)
            return client.content_object
    raise InvalidMgmtAddress('%s is not a valid mgmt address' % ip)

src/c/o/confine-controller-0.10.5/controller/apps/state/middlewares.py   confine-controller(Download)
    def process_view(self, request, view_func, view_args, view_kwargs):
        if view_func.func_name in ('NodeDetail', 'SliverDetail'):
            from controller.core.exceptions import InvalidMgmtAddress
            from nodes.utils import get_mgmt_backend_class
            mgmt_backend = get_mgmt_backend_class()

src/c/o/confine-controller-0.10.5/controller/apps/nodes/admin.py   confine-controller(Download)
from controller.admin import ChangeViewActions, ChangeListDefaultFilter
from controller.admin.utils import colored, admin_link, docstring_as_help_tip
from controller.core.exceptions import InvalidMgmtAddress
from controller.models.utils import get_help_text
from controller.utils.html import monospace_format