Programmer's Guide (Supporting ADX v03.1.00) Manual

824 Brocade Virtual ADX XML API Programmer’s Guide
53-1003248-01
Example: Adding and binding a real server and a VIP
B
// Bind real server port to virtual server port
bindTest.bind(virtualPort, realPort);
// Save Configuration
bindTest.saveConfiguration();
}
}
C# example
using System;
using System.Collections.Generic;
using System.Text;
using ConfigureSLB.slb_service;
using ConfigureSLB.sys_service;
using System.Net;
using System.IO;
using System.Management.Automation;
/////////////////////////////////////////////////////////////////////////////
// Name: ConfigureSLB NameSpace
//
// Description: This namespace provides an example to create real servers,
// real server ports, virtual servers, virtual server ports and
// binding real server port with virtual server port
//
// Usage: PS> import-module .\ConfigureSLB.dll
// Configure-SLB -DeviceName <IP> -UserName <UserName> -Password <Password>
//
// Example: import-module .\ConfigureSLB.dll
// Configure-SLB -DeviceName 172.26.64.91 -UserName admin -Password brocade
//
/////////////////////////////////////////////////////////////////////////////
namespace ConfigureSLB
{
/////////////////////////////////////////////////////////////////////////////
// Name: SysService
//
// Description: This class is being derived from AdcSysInfo class which is the
// autogenerated class after adding sys_service.WSDL
//
// Parameters: -
//
/////////////////////////////////////////////////////////////////////////////
public class SysService : AdcSysInfo
{
private String m_HeaderName;
private String m_HeaderValue;
/////////////////////////////////////////////////////////////////////////////
// Name: GetWebRequest
//
// Description: Called by the SOAP client class library, GetWebRequest
will
// add to the underlying request used by the SOAP client when
// making the web method call
//
// Parameters: Uri - the webservice url
//