jnpr/space/collection.py
def _create_resource(self, xml_data):
        """
        Helper method to create a resource under this collection. This is used
        to populate entries in the list returned by the get() method of this
        collection.
        """
        if self._meta_object.resource_type:
            from jnpr.space import resource
            return resource.Resource(type_name=self._meta_object.resource_type,
                                     rest_end_point=self._rest_end_point,
                                     xml_data=xml_data,
                                     parent=self)
        else:
            xml_str = etree.tostring(xml_data, encoding='unicode')
            return xmlutil.xml2obj(xml_str)

        Helper method to create a resource under this collection. This is used
        to populate entries in the list returned by the get() method of this
        collection.
        
Helper method to create a resource under this collection. This is used
to populate entries in the list returned by the get() method of this
collection.
Helper method to create a resource under this collection . This is used to populate entries in the list returned by the get () method of this collection .
def _create_resource(self, xml_data):
        if self._meta_object.resource_type:
            from jnpr.space import resource
            return resource.Resource(type_name=self._meta_object.resource_type,
                                     rest_end_point=self._rest_end_point,
                                     xml_data=xml_data,
                                     parent=self)
        else:
            xml_str = etree.tostring(xml_data, encoding='unicode')
            return xmlutil.xml2obj(xml_str)
def _create_resource ( self , xml_data ) : if self . _meta_object . resource_type : from jnpr . space import resource return resource . Resource ( type_name = self . _meta_object . resource_type , rest_end_point = self . _rest_end_point , xml_data = xml_data , parent = self ) else : xml_str = etree . tostring ( xml_data , encoding = 'unicode' ) return xmlutil . xml2obj ( xml_str )
Helper method to create a resource under this collection.
Helper method to create a resource under this collection .
"""
        Helper method to create a resource under this collection. This is used
        to populate entries in the list returned by the get() method of this
        collection.
        """
self
xml_data