I see from time to time people having issues to run demo.sh on an vanilla Openstack (vOS for short) environment. Here are the steps which helped us to get demo.sh running on Ocata:

Rackspace Authentication endpoint

If the first FAIL is mentioned as "access", you might try to authenticate against Rackspace, even if you are using your own vOS instance

  • ssh into the robot_vm
  • Edit /opt/eteshare/config/integration_robot_properties.py
  • at about line 30, there is an assignment to GLOBAL_OPENSTACK_KEYSTONE_SERVER
  • change this to GLOBAL_OPENSTACK_KEYSTONE_SERVER=http://<your-controller-ip>:5000
    • be careful to use the correct scheme (the  original scheme is https, your controller might use http)
    • be careful to add the port number

Change POST data template

The Rackspage API seems to differ a bit from the vOS API as it adds a some extra fields in the returned JSON. To get the same from vOS, you need to change the template used for the token request to vOS

SSL error during run

Sometimes demo.sh fails with ssl errors. If that happens, you can add two lines in the python file to avoid this.


AAI bulk add request getting failed


Rackspace needs tenant id( or may be name and id is same hence doesn’t make a difference in Rackspace) for authentication whereas Openstack Mitaka (we are using Mitaka for Other openstack version this might not be the case ) is using the tenant name for authentication.

Because of which at the Heat Bridge step we were getting authentication error. We changed few python files to overcome this error.

  1.   robot\library\heatbridge\HeatBridge.py (adding extra parameter tenantName )

   Before :

    def init_bridge(self, openstack_identity_url, username, password, tenant, region, owner):

        self.om = OpenstackManager(openstack_identity_url, OpenstackContext(username, password, tenant, region, owner));

        self.am = AAIManager(OpenstackContext(username, password, tenant, region, owner));

  After :

           def init_bridge(self, openstack_identity_url, username, password, tenant, region, owner, tenantName):

           self.om = OpenstackManager(openstack_identity_url, OpenstackContext(username, password, tenantName, region, owner,tenantName));

           self.am = AAIManager(OpenstackContext(username, password, tenant, region, owner,tenantName));

2. robot\library\heatbridge\OpenstackContext.py (adding extra parameter tenantName )

class OpenstackContext:

    """OpenstackContext is a simple class that holds the provided information that heatbridge uses."""   

    #this holds the info of the openstack clients

    username = None;

    password = None;

    tenant = None;

    region = None;

    owner = None;

    tenantName= None;

    def __init__(self, username, password, tenant, region, owner,tenantName):

        self.username = username;

        self.password = password;

        self.tenant = tenant;

        self.region = region;

        self.owner = owner;

        self.tenantName = tenantName;

3. \robot\resources\heatbridge.robot

Init Bridge    ${openstack_identity_url}    ${user}    ${pass}    ${tenant_id}    ${region}   ${GLOBAL_AAI_CLOUD_OWNER}   ${GLOBAL_VM_PROPERTIES['openstack_tenant']}

4. /share/config/vm_properties.py

"openstack_tenant" : "<your tenant Name>",


API version Error

 \robot\library\heatbridge\OpenstackManager.py (adding api version) 

self.__neutron_client.action_prefix = "/v2.0"; 




/opt/demo.sh appc <DemoModule>

Running ./demo.sh appc DemoModule you might also end up with an error like "error KeyError: 'tenantId'". See a solution from kranthi here: ./demo.sh appc DemoModule returns an error KeyError: 'tenantId'

Running ./demo.sh appc DemoModule you might also end up with an error like "error KeyError: 'public'". See a solution from kranthi here: ./demo.sh appc DemoModule returns an error KeyError: u'public'


Heat file changes :

For vfw and vlb we faced few issues related to images we were using. I have attached the heat files here for reference incase you need. 

  1. SSH login was not getting successful during the validation stage so we had to add below lines to the files. 

  cat /root/.ssh/authorized_keys | awk {'print $14" "$15" "$16'} > /tmp/authorized_keys

            cp /tmp/authorized_keys /root/.ssh/authorized_keys 

     2.  Adding default gateway and interface  to the iptable 

    route del -net 0.0.0.0/0

            route add -net 0.0.0.0/0 gw <public gateway ip>

            echo "auto eth2" >> /etc/network/interfaces

            echo "iface eth2 inet dhcp" >> /etc/network/interfaces

            echo "auto eth3" >> /etc/network/interfaces

            echo "iface eth3 inet dhcp" >> /etc/network/interfaces

            ifup eth2

            ifup eth3       

    3. Maven dependency failure with error “Peer not authenticated.” Added below statement to all mvn commands. 

mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf:sample-distribution:$DEMO_ARTIFACTS_VERSION:tar.gz:hc -Dtransitive=false -Ddest=. -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true 

   4. Flush all the iptable rules which was filtering the packets from flowing.

            iptables -F

            iptables -P INPUT ACCEPT

            iptables -P FORWARD ACCEPT

            iptables -P OUTPUT ACCEPT


asdc.rar


  • No labels

3 Comments

  1. Hi,
    I added the above changes, but for my PUT request for "Demonstration" customer I receive

    put response: {"requestError":{"serviceException":{"messageId":"SVC3003","text":"Failed to make edge to missing target node of type %3 with keys %4 performing %1 on %2 (msg=%5) (ec=%6)","variables":["PUT","business/customers/customer/Demonstration","tenant","/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/0e0287ca5ec847989447a5827b36a799","Error making edge to target node:Node of type tenant. Could not find object at: /cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/0e0287ca5ec847989447a5827b36a799","ERR.5.4.6129"]}}}

    The tenant shouldn't be created first?
    And the request body was:

    Arguments: [ 'aai' | '/aai/v8/business/customers/customer/Demonstration' | data={'global-customer-id': 'Demonstration', 'service-subscriptions': {'service-subscription': [{'relationship-list': {'relationship': [{'related-to': 'tenant', 'relationship-data': [{'relationship-key': 'cloud-region.cloud-owner', 'relationship-value': 'Rackspace'}, {'relationship-key': 'cloud-region.cloud-region-id', 'relationship-value': 'RegionOne'}, {'relationship-key': 'tenant.tenant-id', 'relationship-value': '0e0287ca5ec847989447a5827b36a799'}]}]}, 'service-type': 'vFW'}, {'relationship-list': {'relationship': [{'related-to': 'tenant', 'relationship-data': [{'relationship-key': 'cloud-region.cloud-owner', 'relationship-value': 'Rackspace'}, {'relationship-key': 'cloud-region.cloud-region-id', 'relationship-value': 'RegionOne'}, {'relationship-key': 'tenant.tenant-id', 'relationship-value': '0e0287ca5ec847989447a5827b36a799'}]}]}, 'service-type': 'vLB'}]}, 'subscriber-name': 'Demonstration', 'subscriber-type': 'INFRA'} | headers={'Accept': 'application/json', 'Content-Type': 'application/json', 'X-FromAppId': 'robot-ete', 'X-TransactionId': 'robot-ete-28cae245-8722-4bdf-b38d-5660904564b9'} ]

    Can somebody help me?

    1. I think I figured it out,

      When I execute the following request:

      GET /aai/v8/cloud-infrastructure/cloud-regions HTTP/1.1
      Host: <AAI-IP>:8443
      X-FromAppId: AAI
      Authorization: Basic QUFJOkFBSQ==
      Cache-Control: no-cache
      Postman-Token: f4ba5ae5-a2b5-34b0-204d-2f6e0e11ca07

      I received :

      <?xml version="1.0" encoding="UTF-8"?>
      <cloud-regions xmlns="http://org.openecomp.aai.inventory/v8">
      <cloud-region>
      <cloud-owner>Rackspace</cloud-owner>
      <cloud-region-id>regionOne</cloud-region-id>
      <cloud-type>SharedNode</cloud-type>
      <owner-defined-type>OwnerType</owner-defined-type>
      <cloud-region-version>v1</cloud-region-version>
      <cloud-zone>CloudZone</cloud-zone>
      <resource-version>1501850323</resource-version>
      <tenants>
      <tenant>
      <tenant-id>0e0287ca5ec847989447a5827b36a799</tenant-id>
      <tenant-name>ONAP</tenant-name>
      <resource-version>1501850323</resource-version>
      </tenant>
      </tenants>
      </cloud-region>
      </cloud-regions>


      After a closer look, I noticed that the "cloud-region-id" is regionOne, with lower "R".

      I worked this out by changing in /opt/eteshare/config/vm_properties.py file the property "region" : "regionOne"


  2. @All,

    Michael O'Brien - (deprecated as of 20170508) - use obrienlabs

    We are running the robot init testcase, we found the below error.

    1. Could you please share the content/ data that need to be filled in the zip file for VFW ?

          2. Got the error for the keyword.py. I went on checking the the below mentioned files:

    In the heatbridge.py and OpenstackContext.py file, I can notice, that the changes mentioned in the section ( AAI bulk add request getting failed) for tenantName ( to be appended at the end) are not present.


    Could you please let m eknow if we need to add those changes. This page was last edited in June/July, 2017.


    root@robot-2602768995-511hf:/# find . -name HeatBridge.py
    ./var/opt/OpenECOMP_ETE/robot/library/heatbridge/HeatBridge.py
    ./var/opt/OpenECOMP_ETE/testsuite/heatbridge/heatbridge/heatbridge/HeatBridge.py
    root@robot-2602768995-511hf:/# find . -name OpenstackContext.py
    ./var/opt/OpenECOMP_ETE/robot/library/heatbridge/OpenstackContext.py
    ./var/opt/OpenECOMP_ETE/testsuite/heatbridge/heatbridge/heatbridge/OpenstackContext.py
    root@robot-2602768995-511hf:/# find . -name heatbridge.robot
    ./var/opt/OpenECOMP_ETE/robot/resources/heatbridge.robot
    root@robot-2602768995-511hf:/# find . -name vm_properties.py
    ./share/config/vm_properties.py

    So started following the current page to resolve the (RequestsKeywords.py ) error.


    Screenshot from HeatBridge.py file ( tenantName not present )

    Best Regards,

    Shubhra