def _test_is_api_ready(self, tgt): fake_config = MagicMock() with patch.object(utils, 'incomplete_relation_data') as ird: ird.return_value = (not tgt) self.assertEqual(utils.is_api_ready(fake_config), tgt) ird.assert_called_with( fake_config, utils.REQUIRED_INTERFACES)
def nova_api_relation_joined(rid=None): rel_data = { 'nova-api-ready': 'yes' if is_api_ready(CONFIGS) else 'no' } relation_set(rid, **rel_data)
def nova_api_relation_joined(rid=None): rel_data = {'nova-api-ready': 'yes' if is_api_ready(CONFIGS) else 'no'} relation_set(rid, **rel_data)