CSIT-870 Kubernetes/Ligato integration
[csit.git] / resources / libraries / robot / performance / performance_setup.robot
index 9713c22..0453fad 100644 (file)
 | | ... | *Arguments:*
 | | ... | - topology_type - Topology type. Type: string
 | | ... | - nic_model - Interface model. Type: string
+| | ... | - crypto_type - Crypto device type - HW_cryptodev or SW_cryptodev
+| | ... | (Optional). Type: string, default value: HW_cryptodev
 | | ...
 | | ... | *Example:*
 | | ...
 | | ... | \| Set up IPSec performance test suite \| L2 \
 | | ... | \| Intel-X520-DA2 \|
 | | ...
-| | [Arguments] | ${topology_type} | ${nic_model}
+| | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_cryptodev
 | | ...
 | | Set up 3-node performance topology with DUT's NIC model
 | | ... | ${topology_type} | ${nic_model}
-| | Configure crypto device on all DUTs | force_init=${True}
-| | Configure kernel module on all DUTs | igb_uio | force_load=${True}
+| | ${numvfs}= | Set Variable If
+| | ... | '${crypto_type}' == 'HW_cryptodev' | ${32}
+| | ... | '${crypto_type}' == 'SW_cryptodev' | ${0}
+| | Configure crypto device on all DUTs | force_init=${True} | numvfs=${numvfs}
+| | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
+| | ... | Configure kernel module on all DUTs | igb_uio | force_load=${True}
 
 | Set up performance topology with containers
 | | [Documentation]
 | | Reset VAT History On All DUTs | ${nodes}
 | | Create base startup configuration of VPP on all DUTs
 
+| Set up performance test with Ligato Kubernetes
+| | [Documentation] | Common test setup for performance tests with Ligato \
+| | ... | Kubernetes.
+| | ...
+| | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
+| | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
+| | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | configmaps/vswitch-agent-cfg.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | configmaps/vnf-agent-cfg.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | pods/contiv-sfc-controller.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | pods/contiv-vswitch.yaml
+
 # Tests teardowns
 
 | Tear down performance discovery test
 | | ...
 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
 | | ...
+| | Remove All Added Ports On All DUTs From Topology | ${nodes}
 | | Show VAT History On All DUTs | ${nodes}
 | | Show statistics on all DUTs | ${nodes}
 | | Run Keyword If Test Failed
 | Tear down performance ndrchk test
 | | [Documentation] | Common test teardown for ndrchk performance tests.
 | | ...
+| | Remove All Added Ports On All DUTs From Topology | ${nodes}
 | | Show VAT History On All DUTs | ${nodes}
 | | Show statistics on all DUTs | ${nodes}
 
 | Tear down performance pdrchk test
 | | [Documentation] | Common test teardown for pdrchk performance tests.
 | | ...
+| | Remove All Added Ports On All DUTs From Topology | ${nodes}
 | | Show VAT History On All DUTs | ${nodes}
 | | Show statistics on all DUTs | ${nodes}
 
 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
 | | ...
+| | Remove All Added Ports On All DUTs From Topology | ${nodes}
 | | Show VAT History On All DUTs | ${nodes}
 | | Show VPP vhost on all DUTs | ${nodes}
 | | Show statistics on all DUTs | ${nodes}
 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
 | | ...
+| | Remove All Added Ports On All DUTs From Topology | ${nodes}
 | | Show VAT History On All DUTs | ${nodes}
 | | Show VPP vhost on all DUTs | ${nodes}
 | | Show statistics on all DUTs | ${nodes}
 | | ...
 | | Tear down performance discovery test | ${rate} | ${framesize}
 | | ... | ${traffic_profile}
-| | Run Keyword And Ignore Error | Vpp Log Macip Acl Settings | ${dut1}
+| | Run Keyword If Test Failed | Run Keyword And Ignore Error
+| | ... | Vpp Log Macip Acl Settings | ${dut1}
 | | Run Keyword And Ignore Error
 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
+
+| Tear down performance test with Ligato Kubernetes
+| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
+| | ... | tests with Ligato Kubernetes.
+| | ...
+| | Run Keyword If Test Failed
+| | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
+| | Run Keyword If Test Failed
+| | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
+| | Delete Kubernetes resource on all DUTs | ${nodes} | csit
\ No newline at end of file