def volume_type_get(volume_type, region_name=None): if not uuidutils.is_uuid_like(volume_type): return volume_type c_client = get_cinderclient(region_name) try: vt = c_client.volume_types.get(volume_type) except NotFound: return None return vt.name
def _lookup(self, order_id, *remainder): if remainder and not remainder[-1]: remainder = remainder[:-1] if uuidutils.is_uuid_like(order_id): return OrderController(order_id), remainder
def _lookup(self, product_id, *remainder): # drop last path if empty if remainder and not remainder[-1]: remainder = remainder[:-1] if uuidutils.is_uuid_like(product_id): return ProductController(product_id), remainder