Пример #1
0
 def __init__(self, request, **kwargs):
     super(ImagesTable, self).__init__(request, **kwargs)
     if api.cinder.is_volume_service_enabled(request):
         volume_types = api.cinder.volume_type_list(request)
         if all('ceph' not in vtype.name for vtype in volume_types) or \
                 not base.is_stx_region(request):
             if 'cache' in self.columns:
                 del self.columns['cache']
Пример #2
0
 def allowed(self, request):
     return base.is_stx_region(request)
Пример #3
0
def flavor_extra_delete(request, flavor_id, keys):
    """Unset the flavor extra spec keys."""
    flavor = novaclient(request).flavors.get(flavor_id)
    return flavor.unset_keys(keys, base.is_stx_region(request))