import routes
from nile.common import wsgi
from nile.versions import VersionsController
from nile.taskmanager.service import ClusterController

class API(wsgi.Router):
    """Defines the API routes."""
    def __init__(self):
        mapper = routes.Mapper()
        super(API, self).__init__(mapper)
        self._versions_router(mapper)
        self._clusters_resource_router(mapper)

    def _versions_router(self, mapper):
        versions_resource = VersionsController().create_resource()
        mapper.connect("/",
                       controller=versions_resource,
                       action="show",
                       conditions={'method': ['GET']})

    def _clusters_resource_router(self, mapper):
        clusters_resource = ClusterController().create_resource()
        mapper.connect("/",
                       controller=clusters_resource,
                       action="show",
                       conditions={'method': ['GET']})

@@ -794,32 +794,57 @@
 apper.connect(%22/
+%7Btenant_id%7D/clusters/%7Bid%7D
 %22,%0A             

fix the bug taskmanager in nile