Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

to find the correct serial number.

Push a Subscriber into CORD

Once you have this information, you can create the subscriber by customizing the following TOSCA and passing it into the POD:

Code Block
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
 - custom_types/rcordsubscriber.yaml
description: Create a test subscriber
topology_template:
 node_templates:
    # A subscriber
 my_house:
 type: tosca.nodes.RCORDSubscriber
 properties:
 name: My House
 c_tag: 111
 s_tag: 222
 onu_device: BRCM1234 # Serial Number of the ONU Device to which this subscriber is connected

Using TOSCA to push to CORD

Once CORD is up and running, a node can be added to a POD using the TOSCA interface by uploading the following recipe:

Code Block
tosca_definitions_version: tosca_simple_yaml_1_0

description: Load a compute node in XOS

imports:
 - custom_types/node.yaml

topology_template:
 node_templates:

    # A compute node
 GratefulVest:
 type: tosca.nodes.Node
 properties:
 name: Grateful Vest

In TOSCA terminology, the above would be called a TOSCA node template.

Where to find the generated specs?

On any running CORD POD, the TOSCA apis are accessible as:

Code Block
$ curl http://<head-node-ip>:<head-node-port>/xos-tosca | python -m json.tool


And it will return a list of all the recipes with the related url:

{
  "image": "/custom_type/image",
  "site": "/custom_type/site",
  ...
}

For examples, to site the TOSCA spec of the Site model, you can use the URL:

Code Block
$ curl http://<head-node-ip>:<head-node-port>/xos-tosca/custom_type/site


If you have a running xos-tosca container you can also find generated copies of the specs in /opt/xos-tosca/src/tosca/custom_types.

How to load a TOSCA recipe in the system

The xos-tosca container exposes two endpoint:

Code Block
POST http://<cluster-ip>:<tosca-port>/run
POST http://<cluster-ip>:<tosca-port>/delete


To load a recipe via curl you can use this command:

Code Block
$ curl -H "xos-username: xosadmin@opencord.org" -H "xos-password: <xos-password>" -X POST --data-binary @<path/to/file> http://<cluster-ip>:<tosca-port>/run

If you installed the xos-core charts without modifications, the tosca-port is 30007.

References