'Return True if the given resource name is present and enabled.'

def __contains__(self, resource_name):

    if (self._resource_defns is not None):
        return (resource_name in self._resource_defns)
    else:
        return (resource_name in self._template[self._template.RESOURCES])
