CORD : Sample End-to-End Test - 5.0 Release


Test Details:

  • The Cord-Tester container is deployed as a docker container, residing in the headnode of the POD. It is brought up with double vlan tagged interfaces (s-tags and c-tags of subscriber's traffic) to conduct dataplane traffic testing. 
  • Validation on the POD is done at multiple levels. 
    1. VSG Instances in OpenStack Nova are created per subscriber S-tag (An s-tag is allocated to each OLT interface).
    2. VSG Instances are ACTIVE and are reachable via mgmt interface. 
    3. VSG Instances have external connectivity when the headnode is configured as a NAT Gateway for VSG traffic. 
      • This is an additional configuration done during the test builds. 
      • This is required on Physical POD's when an upstream router is not peered via BGP with the VRouter. 
      • This step is NOT required on CIAB
    4. VCPE Containers are running inside each VSG Instance. A vCPE container is created for each Subscriber.
    5. Configures X-Connects for subscribers in onos-fabric for the overlay fabric. 
    6. Configures a dhclient on the Cord-Tester container's interface that is being used as the VSG Subscriber.
    7. Validates a DHCP IP address is received from the VCPE Container and external connectivity is reachable through the VCPE. 


Installation:

  1. Setting up the test environment.  If you have already setup the environment, proceed to step 2.
$ git clone https://gerrit.opencord.org/cord-tester

> Make sure the configuration in /opt/cord/test/cord-tester/src/test/cord-api/Properties/RestApiProperties.py are correct.
 
SERVER_IP = 'localhost'						<the server to where the API calls are made, normally its head node>
SERVER_PORT = '9101'
USER = 'xosadmin@opencord.org'
PASSWD = 'baV9Nmpm6vNiHRACIJ8B'				<password from /opt/credentials/xosadmin@opencord.org>

$ sudo ./src/test/setup/prerequisites.sh --cord

   

     2.  Create test container.  Update the `olt_config.json` file in the `setup` directory to include the s_tag and c_tag used in the Contol-Plane Test with the reserved flag turned on.

$ vi olt_config.json
 
{ "olt" : false,
  "uplink" : 2,
  "vlan" : 0,
  "port_map" : { "num_ports" : 11, "start_vlan" : 1000, "nr_switches": 1 },
  "vcpe" :
  [
        {
          "port" : "fabric", "type" : "reserved", "s_tag" : 222, "c_tag" : 444
        },
        {
          "port" : "fabric", "type" : "reserved", "s_tag" : 333, "c_tag" : 888
        },
        {
          "port" : "fabric", "type" : "reserved", "s_tag" : 555, "c_tag" : 999
        },
        {
          "port" : "fabric", "type" : "reserved", "s_tag" : 666, "c_tag" : 661
        }
      ]
}
$ sudo ./cord-test.py setup -m manifest-onf-cord.json


3. Configuring a VLAN cross connect (valid only for Physical POD)

This is required for the traffic coming into the POD to get forwarded to the correct port where that the compute node in which your VSG Instance has been instantiated at. 

1. Find out the switch id and ports that need to be cross connected: 

  • From the head-node, do ssh -p 8101 onos@onos-fabric and run hosts to find the switch id and port number where the host is connected to and the compute node (the one that has the vsg vm)

2. Find out the VLAN tags for the cross connect: login to the vsg vm and do sudo docker ps to check the vcpe container name which has the double vlan tags.

  • E.g. if we see vsg-333-888 in the docker list we use 333 as the VLAN tag

3. Update netcfg for onos: from the head-node edit /opt/cord_profile/fabric-network-cfg.json to include the following part

"apps": {
 "org.onosproject.segmentrouting": {
   "xconnect": {
     "of:0000cc37abd93769": [{
       "vlan": 333,
       "ports": [1, 2],
       "name": "Test-Container-VLAN"
     }]
   }
 }
}

(Replace switch id, vlan and ports)

4. Reload netcfg. Run the following commands on the headnode

        http -a onos:rocks DELETE http://onos-fabric:8181/onos/v1/network/configuration/
http -a onos:rocks POST http://onos-fabric:8181/onos/v1/network/configuration/ < /opt/cord_profile/fabric-network-cfg.json
http -a onos:rocks DELETE http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active
http -a onos:rocks POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active

 

4. Control Plane Test Execution

      1. Execute Control Plane test to create subscriber. From  `cord-tester/src/test/cord-api/Tests` directory.

$ pybot Ch_SubscriberTest.txt

      2. Execute Control Plane test to create volt-tenants from 'cord-tester/src/test/cord-api/Tests` directory.

$ pybot Ch_VoltTenant.txt


5. Physical POD Data Test Execution 

   1. Validate the data plane connectivity from `cord-tester/src/test/vsg` directory

$ pybot -i pod:qct-pod1.yml vsg_dataplane_test.robot

NOTE: If configuring X-Connect manually, exclude one of the test cases:

$ pybot -e xconnect vsg_dataplane_test.robot


6. CIAB Data Test Execution 

     1. Validate the data plane connectivity from `cord-tester/src/test/vsg` directory

$ pybot -e xconnect vsg_dataplane_test.robot


Attachments: