Exemplo n.º 1
0
 def get_flavor_list_with_details(self, request, tenant_id):
     """
     Returns a list of flavor details with the response code 200.
     """
     flavor_collection = GlobalFlavorCollection(tenant_id=tenant_id,
                                                clock=self._session_store.clock)
     return(flavor_collection.collection_for_region(region_name=self._name)
            .list_flavors(include_details=True, absolutize_url=self.url))
Exemplo n.º 2
0
 def get_flavor_details(self, request, tenant_id, flavor_id):
     """
     Returns a get flavor response, for any given flavorid
     """
     flavor_collection = GlobalFlavorCollection(tenant_id=tenant_id,
                                                clock=self._session_store.clock)
     return(flavor_collection.collection_for_region(region_name=self._name)
            .get_flavor(request, flavor_id, absolutize_url=self.url))
Exemplo n.º 3
0
 def get_flavor_list(self, request, tenant_id):
     """
     Returns a list of flavor with the response code 200.
     docs: http://bit.ly/1eXTSDC
     """
     flavor_collection = GlobalFlavorCollection(tenant_id=tenant_id,
                                                clock=self._session_store.clock)
     return(flavor_collection.collection_for_region(region_name=self._name)
            .list_flavors(include_details=False, absolutize_url=self.url))