Skip to content

Instantly share code, notes, and snippets.

@nuthanc
nuthanc / bundle.yaml
Created June 9, 2021 05:14
Aswani k8s juju yaml
series: bionic
variables:
docker-registry: &docker-registry "bng-artifactory.juniper.net/contrail-nightly"
image-tag: &image-tag "R2011.L1.177"
data-network: &data-network "192.168.27.0/24"
control-network: &control-network "192.168.7.0/24"
vhost-gateway: &vhost-gateway "192.168.27.1"
services:
contrail-agent:
charm: /root/tf-charms/contrail-agent
@nuthanc
nuthanc / test.txt
Created June 9, 2021 02:20
Previous test2
from naas.test.Utils.TrafficGenerator.end_point_handler import EndPoint, EndPointHandler
from spirent import Spirent
spt_endpoint = EndPoint.spirent_endpoint(ip="10.204.216.89", ports=[
'1/4', '1/5'], username='admin', password='spt_admin')
# TGN handle
tgn_handle = Spirent(spt_endpoint, {})
# Port handle
@nuthanc
nuthanc / joint.txt
Created June 7, 2021 10:53
Joint setup k8s client error
2021-06-07 10:39:19,757 - INFO - STARTING TEST : test_ingress_ip_assignment
2021-06-07 10:39:19,757 - INFO - TEST DESCRIPTION :
Verify that Ingress gets a CLuster IP which is reachable to Pods in same
namespace. Also verify that a Floating IP is assigned to the Ingress
from the Public FIP poo.
Steps:
1. Create a service with 2 pods running nginx
2. Create an ingress out of this service
3. From another Pod do a wget on the ingress Cluster ip
@nuthanc
nuthanc / out.txt
Created June 5, 2021 11:26
Spirent output2
Spirent Invoke Parameters: {'port_handle': ['port1', 'port2'], 'action': 'reset'}
Invocation of Spirent method sth::traffic_control resulting in: {'status': '1'}
Spirent Invoke Parameters: {'l2_encap': 'ethernet_ii', 'mac_src': '00:11:AD:11:AA:01', 'l3_protocol': 'ipv4', 'ip_src_addr': '101.1.1.100', 'ip_dst_addr': '101.1.1.200', 'mac_discovery_gw': '101.1.1.200', 'frame_size': '512', 'length_mode': 'fixed', 'rate_pps': '10000', 'transmit_mode': 'continuous', 'mode': 'create', 'port_handle': 'port1', 'name': 'ipv4_raw_stream_port_1'}
Invocation of Spirent method sth::traffic_config resulting in: {'stream_id': 'streamblock1', 'status': '1', 'stream_id_pylist': ['streamblock1']}
INFO: Stream " ipv4_raw_stream_port_1 " created
Spirent Invoke Parameters: {'l2_encap': 'ethernet_ii', 'mac_src': '00:11:AD:11:AA:02', 'l3_protocol': 'ipv4', 'ip_src_addr': '101.1.1.200', 'ip_dst_addr': '101.1.1.100', 'mac_discovery_gw': '101.1.1.100', 'frame_size': '512', 'length_mode': 'fixed', 'rate_pps': '10000', 'transmit_mode'
@nuthanc
nuthanc / config.txt
Created June 2, 2021 12:15
Previous physical contrail command configure code
if [ $DEPLOYER = 'contrail_command_deployer' ]
then
export SKIP_CONTRAIL_COMMAND_INSTALL=0
export DEPLOYER=contrail_command
export DEPLOYER_SERVER_HOST_STRING=root@10.204.216.120
export DEPLOYER_SERVER_HOST_PWD=c0ntrail123
fi
@nuthanc
nuthanc / exp.txt
Last active June 15, 2021 16:36
RCCA Sudhee explanation
Dev: UT
Feature test
Solution test
Code review
Corner case
Test case would have been missed out
Design
No Requirement
@nuthanc
nuthanc / error.txt
Last active June 2, 2021 05:29
Problem in running run_tests with tag
Error while running the below:
bash -x run_tests.sh -m -U -s -T auth
--- import errors ---
Failed to import test module: serial_scripts.backup_restore.test_backup_restore
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/local/lib/python3.6/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
@nuthanc
nuthanc / README.md
Created May 27, 2021 12:08
k8s session presentation
@nuthanc
nuthanc / out.txt
Created May 26, 2021 12:33
First spirent output
root@noden1:~/nuthanc/naas/test# python3 Utils/TrafficGenerator/test_spirent.py
Initializing spirent......
LOG DIR : /root/nuthanc/logs/Utils/TrafficGenerator/test_spirent_20210526052915
Current OS: Linux,4.15.0-45-generic,#48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019; python version: 3.6.9
Connecting Tcl server via port 36129
Loading SpirentHltApi...
@nuthanc
nuthanc / info.txt
Created May 26, 2021 08:15
VM sanity problem
[root@testbed-1-vm1 vm_external_ip_issue]# kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE
cirros-deployment-57fdf9678d-b9zms 1/1 Running 0 53s 10.47.255.250 testbed-1-vm2 <none>
cirros-deployment-57fdf9678d-ctvfd 1/1 Running 0 53s 10.47.255.249 testbed-1-vm3 <none>
cirros-deployment-57fdf9678d-j85bx 1/1 Running 0 53s 10.47.255.247 testbed-1-vm2 <none>
cirros-deployment-57fdf9678d-lz2bx 1/1 Running 0 53s 10.47.255.248 testbed-1-vm3 <none>
[root@testbed-1-vm1 vm_external_ip_issue]# kubectl get pods
NAME READY STATUS RESTARTS AGE
cirros-deployment-57fdf9678d-b9zms 1/1 Running 0 3m19s