(self)
return self._name
Property that returns the template name.
Property that returns the template name.
Property that returns the template name .
def name(self):
        """Property that returns the template name."""
        if self._name:
            return self._name

        if not self._resource_id:
            logger.error('No resource ID, have you loaded the template yet?')
            raise ValueError('Unable to get a name, not loaded yet.')

        data = self.lazyload_data()
        objects = data.get('objects')
        if not objects:
            return 'No name'

        self._name = objects[0].get('name', 'N/A')
        return self._name
def name ( self ) : if self . _name : return self . _name if not self . _resource_id : logger . error ( 'No resource ID, have you loaded the template yet?' ) raise ValueError ( 'Unable to get a name, not loaded yet.' ) data = self . lazyload_data ( ) objects = data . get ( 'objects' ) if not objects : return 'No name' self . _name = objects [ 0 ] . get ( 'name' , 'N/A' ) return self . _name