def remote_embedded_ansible_dialog(request, remote_appliance): service_dialog = _dialog(request, remote_appliance) yield service_dialog with remote_appliance: service_dialog.delete_if_exists()
def services(request, rest_api, a_provider): if version.current_version() >= '5.7': # create simple service using REST API bodies = [service_body() for _ in range(3)] collection = rest_api.collections.services new_services = collection.action.create(*bodies) assert rest_api.response.status_code == 200 @request.addfinalizer def _finished(): collection.reload() ids = [service.id for service in new_services] delete_entities = [service for service in collection if service.id in ids] if len(delete_entities) != 0: collection.action.delete(*delete_entities) return new_services else: # create full-blown service using UI s_dialog = _dialog() s_catalogs = _service_catalogs(request, rest_api) return _services(request, rest_api, a_provider, s_dialog, s_catalogs)
def dialog(request, appliance): return _dialog(request, appliance)
def dialog(self): return _dialog()
def dialog_modscope(request, appliance): return _dialog(request, appliance)
def dialog(): return _dialog()
def dialog(request, replicated_appliances): remote_appliance, _ = replicated_appliances return _dialog(request, remote_appliance)