def _datastore_router(self, mapper): datastore_resource = DatastoreController().create_resource() mapper.resource("datastore", "/{tenant_id}/datastores", controller=datastore_resource) mapper.connect("/{tenant_id}/datastores/{datastore}/versions", controller=datastore_resource, action="version_index") mapper.connect("/{tenant_id}/datastores/{datastore}/versions/{id}", controller=datastore_resource, action="version_show") mapper.connect( "/{tenant_id}/datastores/{datastore}/versions/" "{version_id}/flavors", controller=datastore_resource, action="list_associated_flavors", conditions={'method': ['GET']}) mapper.connect( "/{tenant_id}/datastores/{datastore}/versions/" "{version_id}/volume-types", controller=datastore_resource, action="list_associated_volume_types", conditions={'method': ['GET']}) mapper.connect("/{tenant_id}/datastores/versions/{uuid}", controller=datastore_resource, action="version_show_by_uuid")
def _datastore_router(self, mapper): datastore_resource = DatastoreController().create_resource() mapper.resource("datastore", "/{tenant_id}/datastores", controller=datastore_resource) mapper.connect("/{tenant_id}/datastores/{datastore}/versions", controller=datastore_resource, action="version_index") mapper.connect("/{tenant_id}/datastores/{datastore}/versions/{id}", controller=datastore_resource, action="version_show")