Skip to content

Commit

Permalink
fix linting and other issues in new example
Browse files Browse the repository at this point in the history
jeffkala committed Mar 28, 2024
1 parent 1f15aa9 commit 4e89dcf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/basic_with_task.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
"""Example with a actual dispatcher task."""

import logging
import os
from nornir import InitNornir
from nornir_nautobot.plugins.tasks.dispatcher import dispatcher
from nornir_utils.plugins.functions import print_result
from nornir_nautobot.plugins.tasks.dispatcher import dispatcher

import logging

LOGGER = logging.getLogger(__name__)

@@ -17,8 +20,8 @@
},
},
)
my_nornir.inventory.defaults.username = "jeff"
my_nornir.inventory.defaults.password = "cisco"
my_nornir.inventory.defaults.username = os.getenv("NORNIR_USERNAME")
my_nornir.inventory.defaults.password = os.getenv("NORNIR_PASSWORD")

for nr_host, nr_obj in my_nornir.inventory.hosts.items():
network_driver = my_nornir.inventory.hosts[nr_host].platform

0 comments on commit 4e89dcf

Please sign in to comment.