Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Creating a Site for a Customer

    You can create one or more sites for a customer. Site information is stored in Cloud CPE Tenant, Site and Service Manager. Each site has a corresponding virtual network in Contrail. When a user activates a network service for a site, Contrail OpenStack creates a corresponding virtual network.

    This procedure uses the following Cloud CPE Tenant, Site and Service Manager API: http://server -IP-address:9788/csas/sites

    Table 1 shows the fields that you must specify for this procedure.

    Table 1: Required Fields for Creating a Site for a Customer

    Field

    Description

    Example

    fq_name

    Fully qualified name of the site, including the domain, name of the proejct, name of the customer and name of the site.

    "default-domain",
    "Buddhi",
    "Buddhi",
    “Boston”

    properties

    Name and route target of the site virtual network

    left_rt

    64512:12001

    properties

    Name and IP address of the subnet for the site virtual network

    left_subnet_service

    174.1.1.0/24

    To create a site for a customer:

    1. Create an input file.
      For example:
      ubuntu@vm1:~$cat site1.json
      ubuntu@vm1:~$ cat site1.json 
      {
          "site":{
              "fq_name":[
                  "default-domain",
                  "Buddhi",
                  "Buddhi",
                  "Boston"
              ],
              "properties": {
                  "property": [
                      {
                          "name": "left_rt",
                          "value": "64512:12001"
                      },
                      {
                          "name": "left_subnet_service",
                          "value": "174.1.1.0/24"
                      }
                  ]
              }
          }
      }
      
    2. Issue a REST call to create the site.

      The API returns details for the site.
      For example:

      ubuntu@vm1:~$ curl -X POST -H "content-type:application/json" -H "x-auth-token:$OS_TOKEN" http://10.102.56.39:9788/csas/sites -d@site1.json
      {
          "site": {
              "fq_name": [
                  "default-domain",
                  "Buddhi",
                  "Buddhi",
                  "Boston"
              ],
              "href": "http://10.102.56.39:9788/csas/sites/76abd4d5-53a6-4ce7-8e46-320d2470101a",
              "name": "Boston",
              "parent_href": "http://10.102.56.39:9788/csas/customers/d1a671b0-cb18-4975-be60-03057f1056de",
              "parent_uuid": "d1a671b0-cb18-4975-be60-03057f1056de",
              "uuid": "76abd4d5-53a6-4ce7-8e46-320d2470101a"
          }
      }
      

    Modified: 2016-02-01