Skip to content

Commit

Permalink
version 2.0.3 - new card types including groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoram Shamir committed Apr 24, 2018
1 parent 968a85c commit 6a66f75
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 41 deletions.
Binary file modified Ixia Chassis Shell 2G Doc.docx
Binary file not shown.
Binary file modified IxiaChassisShell2GDriver.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions shell-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ description: 'Ixia chassis shell
'
imports:
- cloudshell_standard: cloudshell_traffic_generator_chassis_standard_1_0_2.yaml
- cloudshell_standard: cloudshell_traffic_generator_chassis_standard_1_0_3.yaml
metadata:
template_author: Quali
template_icon: shell-icon.png
template_name: Ixia Chassis Shell 2G
template_version: 2.0.2
template_version: 2.0.3
node_types:
vendor.Ixia Chassis Shell 2G:
artifacts:
Expand Down
29 changes: 0 additions & 29 deletions shell-definition.yml

This file was deleted.

7 changes: 4 additions & 3 deletions src/ixia_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from cloudshell.shell.core.driver_context import AutoLoadDetails, AutoLoadResource, AutoLoadAttribute

from trafficgenerator.tgn_utils import ApiType
from ixexplorer.ixe_app import init_ixe


Expand All @@ -26,7 +25,7 @@ def initialize(self, context, logger):
port = '4555'
rsa_id = path.join(path.dirname(__file__), 'id_rsa')

self.ixia = init_ixe(ApiType.socket, self.logger, host=controller_address, port=int(port), rsa_id=rsa_id)
self.ixia = init_ixe(self.logger, host=controller_address, port=int(port), rsa_id=rsa_id)
self.ixia.connect()
self.ixia.add(address)

Expand Down Expand Up @@ -95,7 +94,9 @@ def _get_port_ixos(self, card_relative_address, port_id, port):
name='Port' + str(port_id),
relative_address=relative_address)
self.resources.append(resource)
supported_speeds = port.supported_speeds() if port.supported_speeds() else ['0']
supported_speeds = port.supported_speeds()
if not supported_speeds:
supported_speeds = ['0']
self.attributes.append(AutoLoadAttribute(relative_address=relative_address,
attribute_name='CS_TrafficGeneratorPort.Max Speed',
attribute_value=int(max(supported_speeds, key=int))))
Expand Down
3 changes: 1 addition & 2 deletions src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ cloudshell-automation-api>=7.0,<7.1
cloudshell-traffic>=2.0.1

paramiko==1.15.2
pytrafficgen>=1.2.2
pyixexplorer==0.9.4
pyixexplorer==1.0.1
7 changes: 4 additions & 3 deletions tests/test_ixia_chassis_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

from src.driver import IxiaChassis2GDriver

controller = ''
port = '8022'
controller = 'localhost'
port = ''
address = '192.168.42.61'
address = '192.168.42.175'
address = '192.168.42.217'
address = 'localhost'


class TestIxiaChassis2GDriver(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ixia_chassis_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'port': '',
'modules': 4,
},
'lin-ixos': {'address': '192.168.42.175',
'lin-ixos': {'address': '192.168.42.217',
'controller': '',
'port': '8022',
'modules': 1,
Expand All @@ -26,7 +26,7 @@
'port': '4555',
'modules': 4,
},
'lin-ixos-from-ixtcl-server': {'address': '192.168.42.175',
'lin-ixos-from-ixtcl-server': {'address': '192.168.42.217',
'controller': 'localhost',
'port': '',
'modules': 1,
Expand Down

0 comments on commit 6a66f75

Please sign in to comment.