jnpr/space/resource.py
def _init_meta_data(self, rest_end_point, type_name):
        """
        Helper method to initialize meta data for this resource.
        """
        parts = type_name.split('.')
        if len(parts) == 3:
            app_name = parts[0]
            service_name = parts[1]
            resource_type = parts[2]
            try:
                app = rest_end_point.__getattr__(app_name)
            except AttributeError:
                raise Exception("Unknown service name in '%s'" % type_name)

            try:
                service = app.__getattr__(service_name)
            except AttributeError:
                raise Exception("Unknown service name in '%s'" % type_name)
        elif len(parts) == 2:
            app = None
            service_name = parts[0]
            resource_type = parts[1]
            try:
                service = rest_end_point.__getattr__(service_name)
            except AttributeError:
                raise Exception("Unknown service name in '%s'" % type_name)
        else:
            raise Exception("Invalid resource type given: '%s'" % type_name)

        try:
            values = service.get_meta_resource(resource_type)
            self._meta_object = get_meta_object(type_name, values)
        except KeyError:
            raise Exception("Unknown resource type in '%s'" % type_name)

        Helper method to initialize meta data for this resource.
        
Helper method to initialize meta data for this resource.
Helper method to initialize meta data for this resource .
def _init_meta_data(self, rest_end_point, type_name):
        parts = type_name.split('.')
        if len(parts) == 3:
            app_name = parts[0]
            service_name = parts[1]
            resource_type = parts[2]
            try:
                app = rest_end_point.__getattr__(app_name)
            except AttributeError:
                raise Exception("Unknown service name in '%s'" % type_name)
            try:
                service = app.__getattr__(service_name)
            except AttributeError:
                raise Exception("Unknown service name in '%s'" % type_name)
        elif len(parts) == 2:
            app = None
            service_name = parts[0]
            resource_type = parts[1]
            try:
                service = rest_end_point.__getattr__(service_name)
            except AttributeError:
                raise Exception("Unknown service name in '%s'" % type_name)
        else:
            raise Exception("Invalid resource type given: '%s'" % type_name)
        try:
            values = service.get_meta_resource(resource_type)
            self._meta_object = get_meta_object(type_name, values)
        except KeyError:
            raise Exception("Unknown resource type in '%s'" % type_name)
def _init_meta_data ( self , rest_end_point , type_name ) : parts = type_name . split ( '.' ) if len ( parts ) == 3 : app_name = parts [ 0 ] service_name = parts [ 1 ] resource_type = parts [ 2 ] try : app = rest_end_point . __getattr__ ( app_name ) except AttributeError : raise Exception ( "Unknown service name in '%s'" % type_name ) try : service = app . __getattr__ ( service_name ) except AttributeError : raise Exception ( "Unknown service name in '%s'" % type_name ) elif len ( parts ) == 2 : app = None service_name = parts [ 0 ] resource_type = parts [ 1 ] try : service = rest_end_point . __getattr__ ( service_name ) except AttributeError : raise Exception ( "Unknown service name in '%s'" % type_name ) else : raise Exception ( "Invalid resource type given: '%s'" % type_name ) try : values = service . get_meta_resource ( resource_type ) self . _meta_object = get_meta_object ( type_name , values ) except KeyError : raise Exception ( "Unknown resource type in '%s'" % type_name )
Helper method to initialize meta data for this resource.
Helper method to initialize meta data for this resource .
"""
        Helper method to initialize meta data for this resource.
        """
self
rest_end_point
type_name