def is_ceilometer_supported(): # Ceilometer should be enabled enable_ceilometer = get_enable_ceilometer() if not enable_ceilometer: return False # Currently supported only on ubuntu icehouse os_type = detect_ostype() openstack_sku = get_openstack_sku() if os_type in ['redhat'] and \ openstack_sku in ['icehouse']: return True elif os_type in ['ubuntu'] and \ openstack_sku in ['icehouse', 'juno']: return True else: return False
def is_ceilometer_supported(use_install_repo=False): # Ceilometer should be enabled enable_ceilometer = get_enable_ceilometer() if not enable_ceilometer: return False # Orchestrator should be openstack orchestrator = get_orchestrator() if orchestrator != 'openstack': return False # Currently supported only on ubuntu icehouse os_type = detect_ostype() openstack_sku = get_openstack_sku(use_install_repo) if os_type in ['redhat'] and \ openstack_sku in ['juno']: return True elif os_type in ['ubuntu'] and \ openstack_sku in ['juno']: return True else: return False
def restart_openstack_on_demand(): ''' Restart openstack services for https://bugs.launchpad.net/juniperopenstack/+bug/1610024 ''' if detect_ostype() in ['centoslinux'] and get_openstack_sku() in ['kilo']: execute('restart_openstack_node', env.host_string)