This project is allowing config of Juniper device, Spirent TestCenter, and Ixia IxLoad to be saved, and templatized. It also enables the config to be re-pushed in a new sandbox for the same blueprint(topology).
This project works together with HelperVM. HelperVM comes up with ansible inventory files(under /etc/ansible) for the project to consume.
1 - Pull config from Juniper device and Ixia/Spirent, and then templatize(get-config-from-device.yml)
ansible-playbook get-config-from-device.yml
2 - Push the current directory to customized JCL Git Server(push-directory-to-git.yml)
ansible-playbook push-directory-to-git.yml --extra-vars "DirName=<YourGitRepositoryName>"
3 - Push config to Juniper and ixia/spirent devices(install-config-to-device.yml)
ansible-playbook install-config-to-device.yml
- build-junos-config
- push-junos-config
- get-junos-config
- templatize
- create-spirent-session
- upload-spirent-xml
- load-spirent-xml
- reserve-spirent-port
- get-spirent-session
- save-spirent-config
- clear-spirent-session
- set-spirent-license
- spirent-controller-quit
- load-ixia-config
- save-ixia-config
Default values are defined in /etc/ansible
No dependency
This role is dependent of Juniper.junos > juniper_junos_config
This role is dependent of Juniper.junos > juniper_junos_config
No dependency
This role is using Spirent ReST API: POST http://host.domain/stcapi/sessions
This role is using Spirent ReST API: PUT http://host.domain/stcapi/files/{{ filename }}
This role is using Spirent ReST API: POST http://host.domain/stcapi/perform
This role is using Spirent ReST API:
Connect to Spirent chassis: POST http://host.domain/stcapi/connections
Get portlist handle from lab server: GET http://host.domain/stcapi/objects/project1?children-port
Assign ports in lab server: PUT http://host.domain/stcapi/objects/{{ port }}
Reserve ports: POST http://host.domain/stcapi/perform
This role is using Spirent ReST API: GET http://host.domain/stcapi/sessions
This role is using Spirent ReST API: POST http://host.domain/stcapi/perform
This role is using Spirent ReST API: DELETE http://host.domain/stcapi/sessions/{{ session_id }}
This role is using Spirent ReST API:
Get license_parent object: GET http://host.domain/stcapi/objects/system1?children-licenseservermanager
Get license object: GET http://host.domain/stcapi/objects/{{ license_parent }}?children
Set Spirent license server IP: PUT http://host.domain/stcapi/objects/{{ license_object }}
This role is using Spirent ReST API: DELETE http://host.domain/stcapi/sessions/{{ session_id }}?false
This role is using Ixia ReST API
Upload config file to REST server: POST http://host.domain/api/v1/sessions/1/ixnetwork/files?filename=ixia.ixncfg
Load config file: POST http://host.domain/api/v1/sessions/1/ixnetwork/operations/loadconfig
Assign Ports: POST http://host.domain/api/v1/sessions/1/ixnetwork/operations/assignports
This role is using Ixia ReST API Save config as ixncfg file on REST server: POST http://host.domain/api/v1/sessions/1/ixnetwork/operations/saveconfig
This role pushes vxlan configuration to the Linux NV host according to vxlan definition under /etc/ansible/group_vars/all/vxlannv.yaml.
To override the definition, a new definition can be added under group_vars/all/ in .yml format as below under the current working directory. It is important to have the definition key as vxlans. Sample definition:
vxlans:
vQFX_NV-A1:
Port0:
peer: vQFX_NV-A2
pport: Port2
vni: 4008
ip: 10.44.0.1/30
peerip: 10.44.0.2
vQFX_NV-A2:
Port2:
peer: vQFX_NV-A1
pport: Port0
vni: 4008
ip: 10.44.0.2/30
peerip: 10.44.0.1