diff --git a/docs/source/tutorials/function_write_results.ipynb b/docs/source/tutorials/function_write_results.ipynb index 5be42d4..8feb519 100644 --- a/docs/source/tutorials/function_write_results.ipynb +++ b/docs/source/tutorials/function_write_results.ipynb @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": null, "id": "03a00337", "metadata": {}, "outputs": [], @@ -46,30 +46,10 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": null, "id": "cb99b478", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[('dev1.group_1',\n", - " '--- out_files/write_results/dev1.group_1\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev1.group_1: dummy_task ** changed : False ------------------------------- INFO\\n+\\n+hi!!!'),\n", - " ('dev2.group_1',\n", - " '--- out_files/write_results/dev2.group_1\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev2.group_1: dummy_task ** changed : False ------------------------------- INFO\\n+\\n+hi!!!'),\n", - " ('dev3.group_2',\n", - " '--- out_files/write_results/dev3.group_2\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev3.group_2: dummy_task ** changed : False ------------------------------- INFO\\n+\\n+hi!!!'),\n", - " ('dev4.group_2',\n", - " '--- out_files/write_results/dev4.group_2\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev4.group_2: dummy_task ** changed : False ------------------------------- INFO\\n+\\n+hi!!!'),\n", - " ('dev5.no_group',\n", - " '--- out_files/write_results/dev5.no_group\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev5.no_group: dummy_task ** changed : False ------------------------------ INFO\\n+\\n+hi!!!')]" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from nornir_utils.plugins.functions import write_results\n", "\n", @@ -98,38 +78,10 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": null, "id": "5227fd1e", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: dummy_task ** changed : False ------------------------------- INFO\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: dummy_task ** changed : False ------------------------------- INFO\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: dummy_task ** changed : False ------------------------------- INFO\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: dummy_task ** changed : False ------------------------------- INFO\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: dummy_task ** changed : False ------------------------------ INFO\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -162,19 +114,10 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "id": "14c221c4", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[('dev1.group_1', '--- out_files/write_results/dev1.group_1\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev1.group_1: smart_task ** changed : False ------------------------------- INFO\\n+\\n+hihi!!!'), ('dev2.group_1', '--- out_files/write_results/dev2.group_1\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev2.group_1: smart_task ** changed : False ------------------------------- INFO\\n+\\n+hihi!!!'), ('dev3.group_2', '--- out_files/write_results/dev3.group_2\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev3.group_2: smart_task ** changed : False ------------------------------- INFO\\n+\\n+hihi!!!'), ('dev4.group_2', '--- out_files/write_results/dev4.group_2\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev4.group_2: smart_task ** changed : False ------------------------------- INFO\\n+\\n+hihi!!!'), ('dev5.no_group', '--- out_files/write_results/dev5.no_group\\n\\n+++ new\\n\\n@@ -0,0 +1,3 @@\\n\\n+---- dev5.no_group: smart_task ** changed : False ------------------------------ INFO\\n+\\n+hihi!!!')]\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "def smart_task(task):\n", " return \"hihi!!!\"\n", @@ -186,38 +129,10 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "id": "d234c3c3", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: smart_task ** changed : False ------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: smart_task ** changed : False ------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: smart_task ** changed : False ------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: smart_task ** changed : False ------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: smart_task ** changed : False ------------------------------ INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -242,7 +157,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "774eaef7", "metadata": {}, "outputs": [], @@ -261,48 +176,10 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "a1ac0f7f", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Jar Jar Binks\n", - "\n", - "hawaiian pizza\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Jar Jar Binks\n", - "\n", - "hawaiian pizza\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Jar Jar Binks\n", - "\n", - "hawaiian pizza\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Jar Jar Binks\n", - "\n", - "hawaiian pizza\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: task_with_data ** changed : False -------------------------- INFO\n", - "\n", - "Jar Jar Binks\n", - "\n", - "hawaiian pizza\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -327,21 +204,10 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "6dd24ac3", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "AggregatedResult (complex_task): {'dev1.group_1': MultiResult: [Result: \"complex_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\"], 'dev2.group_1': MultiResult: [Result: \"complex_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\"], 'dev3.group_2': MultiResult: [Result: \"complex_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\"], 'dev4.group_2': MultiResult: [Result: \"complex_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\"], 'dev5.no_group': MultiResult: [Result: \"complex_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\", Result: \"dummy_task\"]}" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "import logging\n", "\n", @@ -367,7 +233,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "9d33d258", "metadata": {}, "outputs": [], @@ -377,38 +243,10 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "36f7b1c9", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: complex_task ** changed : False ---------------------------- INFO\n", - "\n", - "I did a lot of things!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -431,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "f9c380ae", "metadata": {}, "outputs": [], @@ -441,138 +279,10 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "3801974b", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\n", - "\n", - "---- dev4.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev4.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev4.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev4.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev4.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\n", - "\n", - "---- dev3.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev3.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev3.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev3.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev3.group_2: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\n", - "\n", - "---- dev2.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev2.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev2.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev2.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev2.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: complex_task ** changed : False ----------------------------- INFO\n", - "\n", - "I did a lot of things!!!\n", - "\n", - "---- dev1.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev1.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev1.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev1.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev1.group_1: dummy_task ** changed : False ------------------------------- DEBUG\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: complex_task ** changed : False ---------------------------- INFO\n", - "\n", - "I did a lot of things!!!\n", - "\n", - "---- dev5.no_group: dummy_task ** changed : False ------------------------------ DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev5.no_group: dummy_task ** changed : False ------------------------------ DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev5.no_group: dummy_task ** changed : False ------------------------------ DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev5.no_group: dummy_task ** changed : False ------------------------------ DEBUG\n", - "\n", - "hi!!!\n", - "\n", - "---- dev5.no_group: dummy_task ** changed : False ------------------------------ DEBUG\n", - "\n", - "hi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -597,7 +307,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "fb93e599", "metadata": {}, "outputs": [], @@ -607,38 +317,10 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "1675db9a", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -663,7 +345,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "62cbce4a", "metadata": {}, "outputs": [], @@ -673,58 +355,10 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "77bfdfba", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\n", - "\n", - "---- dev4.group_2: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Spaghetti monster\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\n", - "\n", - "---- dev3.group_2: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Spaghetti monster\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\n", - "\n", - "---- dev2.group_1: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Spaghetti monster\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\n", - "\n", - "---- dev1.group_1: task_with_data ** changed : False --------------------------- INFO\n", - "\n", - "Spaghetti monster\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- smart_task ** changed : False --------------------------------------------- INFO\n", - "\n", - "hihi!!!\n", - "\n", - "---- dev5.no_group: task_with_data ** changed : False -------------------------- INFO\n", - "\n", - "Spaghetti monster\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -749,7 +383,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "c9d3a814", "metadata": {}, "outputs": [], @@ -774,78 +408,10 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "85ecda49", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev4.group_2: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev4.group_2: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev3.group_2: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev3.group_2: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev2.group_1: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev2.group_1: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev1.group_1: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev1.group_1: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: task ** changed : False ------------------------------------ INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev5.no_group: task_with_exception ** changed : False --------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev5.no_group: task_without_exception ** changed : False ------------------ INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -860,7 +426,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "4cdc3d01", "metadata": {}, "outputs": [], @@ -870,58 +436,10 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "id": "391948d1", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev4.group_2: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev3.group_2: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev2.group_1: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev1.group_1: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: task ** changed : False ------------------------------------ INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev5.no_group: task_without_exception ** changed : False ------------------ INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -947,21 +465,10 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "22ad76bf", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "CompletedProcess(args='rm -r out_files/write_results/*', returncode=0)" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# clear out_files/write_results directory, at first\n", "\n", @@ -972,7 +479,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "fe6abf02", "metadata": {}, "outputs": [], @@ -982,42 +489,10 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "1a30deff", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev2.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev2.group_1: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev2.group_1: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev2.group_1: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev1.group_1\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev1.group_1: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev1.group_1: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev1.group_1: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -1040,21 +515,10 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "e7782e55", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "CompletedProcess(args='rm -r out_files/write_results/*', returncode=0)" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# clear out_files/write_results directory, at first\n", "\n", @@ -1065,7 +529,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "03247361", "metadata": {}, "outputs": [], @@ -1075,54 +539,10 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "9ed1c9ee", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1mout_files/write_results/dev4.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev4.group_2: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev4.group_2: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev4.group_2: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev3.group_2\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev3.group_2: task ** changed : False ------------------------------------- INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev3.group_2: task_with_exception ** changed : False ---------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev3.group_2: task_without_exception ** changed : False ------------------- INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[1mout_files/write_results/dev5.no_group\u001b[0;0m\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m---- dev5.no_group: task ** changed : False ------------------------------------ INFO\n", - "\n", - "What's happening?\n", - "\n", - "---- dev5.no_group: task_with_exception ** changed : False --------------------- INFO\n", - "\n", - "Something went wrong\n", - "\n", - "---- dev5.no_group: task_without_exception ** changed : False ------------------ INFO\n", - "\n", - "All is fine\u001b[0m\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", diff --git a/docs/source/tutorials/tcp_ping.ipynb b/docs/source/tutorials/tcp_ping.ipynb index 2217cca..c1913c0 100644 --- a/docs/source/tutorials/tcp_ping.ipynb +++ b/docs/source/tutorials/tcp_ping.ipynb @@ -11,23 +11,10 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "ab598e0c", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1m\u001b[36mtcp_ping************************************************************************\u001b[0m\n", - "\u001b[0m\u001b[1m\u001b[34m* dev1.group_1 ** changed : False **********************************************\u001b[0m\n", - "\u001b[0m\u001b[1m\u001b[32mvvvv tcp_ping ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO\u001b[0m\n", - "\u001b[0m{23: False, 65020: True}\u001b[0m\n", - "\u001b[0m\u001b[1m\u001b[32m^^^^ END tcp_ping ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n", - "\u001b[0m" - ] - } - ], + "outputs": [], "source": [ "from nornir import InitNornir\n", "from nornir_utils.plugins.tasks.networking import tcp_ping\n",