Skip to content

Commit

Permalink
scripts updated
Browse files Browse the repository at this point in the history
  • Loading branch information
biplamal committed Jan 30, 2024
1 parent 4f75e71 commit 53767f9
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
62 changes: 62 additions & 0 deletions tests/py/default/test_default_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import pytest
import utils
import time

@pytest.mark.sanity
def test_b2b_default_config():
"""
Deploy b2b kne topology with default version,
- namespace - 1: ixia-c
Delete b2b kne topology,
- namespace - 1: ixia-c
Validate,
- total pods count
- overall pods status
- total service count
- individual pod status
- individual service status
- operator pod health
"""
namespace1 = 'ixia-c'
namespace1_config = 'ixia_c_pd_rest_topology.yaml'
expected_svcs = [
'service-gnmi-otg-controller',
'service-grpc-otg-controller',
'service-otg-port-eth1',
'service-arista1',
]

expected_pods = [
'otg-controller',
'otg-port-eth1',
'arista1'
]
try:
op_rscount = utils.get_operator_restart_count()
print("[Namespace:{}]Deploying KNE topology".format(
namespace1
))
utils.create_kne_config(namespace1_config, namespace1)
utils.ixia_c_pods_ok(namespace1, expected_pods)
utils.ixia_c_services_ok(namespace1, expected_svcs)
op_rscount = utils.ixia_c_operator_ok(op_rscount)

print("[Namespace:{}]Deleting KNE topology".format(
namespace1
))
utils.delete_kne_config(namespace1_config, namespace1)
utils.ixia_c_pods_ok(namespace1, [])
utils.ixia_c_services_ok(namespace1, [])
op_rscount = utils.ixia_c_operator_ok(op_rscount)

finally:
utils.delete_kne_config(namespace1_config, namespace1)
utils.ixia_c_pods_ok(namespace1, [])
utils.ixia_c_services_ok(namespace1, [])

utils.wait_for(
lambda: utils.topology_deleted(namespace1),
'topology deleted',
timeout_seconds=30
)
time.sleep(5)
42 changes: 42 additions & 0 deletions tests/topology/ixia_c_pd_topology.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ixia-c
nodes:
- name: otg
vendor: KEYSIGHT
version: local
services:
40051:
name: grpc
inside: 40051
50051:
name: gnmi
inside: 50051
- name: arista1
vendor: ARISTA
model: ceos
os: eos
config:
file: arista-ceos.config
config_path: /mnt/flash
config_file: startup-config
image: ghcr.io/open-traffic-generator/ceos:4.29.1F-29233963
cert:
self_signed:
cert_name: gnmiCert.pem
key_name: gnmiCertKey.pem
key_size: 4096
services:
22:
name: ssh
inside: 22
6030:
name: gnmi
inside: 6030
9340:
name: gribi
inside: 9340
links:
- a_node: otg
a_int: eth1
z_node: arista1
z_int: eth1

0 comments on commit 53767f9

Please sign in to comment.