Skip to content

Commit

Permalink
Replaced ixia_nto with ksvisionlib
Browse files Browse the repository at this point in the history
  • Loading branch information
bortok committed Feb 21, 2019
1 parent fc73226 commit 6fde355
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Create virtual environment called `ixvision` in a directory of your choice:
virtualenv -p python2.7 $PYENV; cd $PYENV; export PYENV_DIR=`pwd`
source "$PYENV_DIR/bin/activate"

Download VisionNPB library from GitHub (currently, IxVision-ZTA relies on 2018 version of VisionNPB library, which is available via a fork referenced below):
Download VisionNPB library from GitHub:

cd "$PYENV_DIR"; git clone https://github.com/bortok/VisionNPB.git
cd "$PYENV_DIR"; git clone https://github.com/OpenIxia/VisionNPB.git

Clone IxVision-ZTA repository

Expand Down
1 change: 0 additions & 1 deletion ixia_nto.py

This file was deleted.

6 changes: 3 additions & 3 deletions ixvision_ztp_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#
###############################################################################

from ixia_nto import *
from ksvisionlib import *

from ixvision_ztp_ntolib import *

Expand Down Expand Up @@ -73,7 +73,7 @@ def form_dynamic_filter(host_ip, port, username, password, df_name, df_input, df
print("Non-empty criteria are required for filter mode %s" % (df_mode))
return

nto = NtoApiClient(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_filter_debug.log")
nto = VisionWebApi(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_filter_debug.log")

# Search for existing DF, create a new one if not found
df_list = nto.searchFilters({'name': df_name})
Expand Down Expand Up @@ -151,7 +151,7 @@ def update_dynamic_filter(host_ip, port, username, password, df_name, df_criteri
print("Error: unsupported filter criteria %s" % df_criteria_field)
return

nto = NtoApiClient(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_filter_debug.log")
nto = VisionWebApi(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_filter_debug.log")

# Search for the DF
df_list = nto.searchFilters({'name': df_name})
Expand Down
4 changes: 2 additions & 2 deletions ixvision_ztp_lldp_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
###############################################################################


from ixia_nto import *
from ksvisionlib import *

# DEFINE FUNCTIONS HERE

Expand All @@ -42,7 +42,7 @@

def tag_ports(host_ip, port, username, password, tags):

nto = NtoApiClient(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_lldp_tag_debug.log")
nto = VisionWebApi(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_lldp_tag_debug.log")

neighbor_list = {}

Expand Down
2 changes: 1 addition & 1 deletion ixvision_ztp_ntolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
###############################################################################

from ixia_nto import *
from ksvisionlib import *

# DEFINE VARs HERE
port_modes_supported = {'net': 'NETWORK', 'tool': 'TOOL'}
Expand Down
4 changes: 2 additions & 2 deletions ixvision_ztp_port_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#
###############################################################################

from ixia_nto import *
from ksvisionlib import *

def discover_ports(host_ip, port, username, password, keyword=''):

nto = NtoApiClient(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_debug.log")
nto = VisionWebApi(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_debug.log")

discoveredPortList = {}

Expand Down
4 changes: 2 additions & 2 deletions ixvision_ztp_port_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
###############################################################################

from ixia_nto import *
from ksvisionlib import *

# DEFINE VARs HERE
pg_modes_supported = {'net': 'INTERCONNECT', 'lb': 'LOAD_BALANCE'}
Expand All @@ -41,7 +41,7 @@
# |_Keywords[Names]

def form_port_groups(host_ip, port, username, password, tags, pg_name, pg_mode_key):
nto = NtoApiClient(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_port_group_debug.log")
nto = VisionWebApi(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_port_group_debug.log")

# Check s/w version to use proper API syntax (ixia_nto.py doesn't support API versioning)
nto_system_properties = nto.getSystem()
Expand Down
4 changes: 2 additions & 2 deletions ixvision_ztp_port_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
###############################################################################

from ixia_nto import *
from ksvisionlib import *

from ixvision_ztp_ntolib import *

Expand All @@ -29,7 +29,7 @@

def set_port_mode(host_ip, port, username, password, tags, mode):

nto = NtoApiClient(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_port_mode_debug.log")
nto = VisionWebApi(host=host_ip, username=username, password=password, port=port, debug=True, logFile="ixvision_ztp_port_mode_debug.log")

# Search for ports to be updated - can't be a part of a port group, can't have any existing connections
port_list = nto.searchPorts({'enabled': True, 'port_group_id': None, 'dest_filter_list': [], 'source_filter_list': []})
Expand Down
4 changes: 2 additions & 2 deletions ixvision_ztp_sysinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
###############################################################################


from ixia_nto import *
from ksvisionlib import *

# DEFINE FUNCTIONS HERE

Expand Down Expand Up @@ -43,7 +43,7 @@ def nto_get_sysinfo(host_ip, port, username, password):
'serial_num': 'Serial number:'
}

nto = NtoApiClient(host=host_ip, username=username, password=password, port=port, debug=False, logFile="ixvision_status_debug.log")
nto = VisionWebApi(host=host_ip, username=username, password=password, port=port, debug=False, logFile="ixvision_status_debug.log")

nto_system_properties = nto.getSystem()
nto_system_info = nto_system_properties['system_info']
Expand Down
1 change: 1 addition & 0 deletions ksvisionlib.py

0 comments on commit 6fde355

Please sign in to comment.