Skip to content

Commit

Permalink
fix pwd variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed May 14, 2024
1 parent 762bb3d commit 368aa7b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions fabric_am/handlers/switch_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,12 @@ def create(self, unit: ConfigToken) -> Tuple[dict, ConfigToken]:
inventory = InventoryManager(loader=data_loader,
sources=[inventory_path])
host = inventory.get_host(hostname=f"{sliver.get_site().lower()}-p4.fabric-testbed.net")
ansible_host = host.get_vars().get('ansible_host')
ansible_ssh_user = host.get_vars().get('ansible_ssh_user')
ansible_ssh_pwd = host.get_vars().get('ansible_ssh_pwd')
host_vars = host.get_vars()
ansible_host = host_vars.get('ansible_host')
ansible_ssh_user = host_vars.get('ansible_ssh_user')
ansible_ssh_pass = host_vars.get('ansible_ssh_pass')

print(f"KOMAL ---- {host.get_vars()}")
print(f"KOMAL --- {ansible_ssh_pwd}")

Utils.verify_ssh(mgmt_ip=ansible_host, user=ansible_ssh_user, pwd=ansible_ssh_pwd,
Utils.verify_ssh(mgmt_ip=ansible_host, user=ansible_ssh_user, pwd=ansible_ssh_pass,
logger=self.get_logger(), retry=10)
extra_vars = {
AmConstants.OPERATION: AmConstants.OP_CONFIG,
Expand Down

0 comments on commit 368aa7b

Please sign in to comment.