Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Noprint
Panel
borderColorGreen
bgColorWhite
borderWidth2

Back to Table of Contents

Info
iconfalse

This page describes a typical deployment workflow where a sample "master" Sonus SBC 1000/2000

Spacevars
0product
configuration is to be applied or copied onto hundreds or thousands of Sonus SBC 1000/2000
Spacevars
0product
nodes. This can be very desirable when system administrators are trying to deploy numerous Sonus SBC 1000/2000
Spacevars
0product
systems in a network sharing the exact same configuration for all resources other than the system specific information.

Note: This is only applicable for Sonus SBC 1000/2000

Spacevars
0product
nodes sharing the same hardware configuration and release version.

...

Sample Code to Perform Deployment Workflow

Excerpt Include
Sonus SBC Edge REST API - AuthenticationSonus SBC Edge
REST API - Authentication
nopaneltrue
Table of Contents
maxLevel2
minLevel2
outlinetrue
stylenone
Wiki Markup
{multi-excerpt-include:nopanel=true|pageTitle=Sonus SBC Edge API - Authentication|name=prereq_session}
Wiki Markup
{multi-excerpt-include:nopanel=true|pageTitle=Sonus SBC Edge API - Authentication|name=create_session}

How to Use the Session Token for Import Configuration Request

Code Block
titlePOST on System Resource (/rest/system?action=importconfig) Using the Session Token
// init cURL handle
$curlHandle = curl_init();

$cookieHeader = '';
// previously extracted cookies in $cookieArr (above), is used to add the
// session token in HTTP request header for subsequent REST call
foreach ($cookieArr as $key=>$value) {
    $cookieHeader .= "$key=$value; ";
}
if (!empty($cookieHeader)) {
    curl_setopt($curlHandle, CURLOPT_COOKIE, $cookieHeader);
}

// set other relevant HTTP option as shows in above section _Setting up the HTTP Options_
$headerArr = array('Accept: ' . $this->acceptType, 'Expect: 100-continue');
$requestBody = array('Filename'=>'@'.$fileName);
curl_setopt($this->curlHandle, CURLOPT_POST, true);
curl_setopt($this->curlHandle, CURLOPT_HTTPHEADER, $headerArr);
curl_setopt($this->curlHandle, CURLOPT_POSTFIELDS, $requestBody);

// Sonus SBC 1000/2000 REST system resource URL
$systemResource = "https://ux_host_or_ipaddress/rest/system?action=importconfig";

// set the system resource url in curl
curl_setopt($curlHandle, CURLOPT_URL, $systemResource );

// exec the HTTP/REST request
$response = curl_exec($curlHandle);

Wiki Markup
{multi-excerpt-include:nopanel=true|pageTitle=Sonus SBC Edge API - Authentication|name=close_session}
 

Pagebreak