Previous page

Next page

Locate page in Contents

Print this page

Creating a Simple Client Application

In this section, we'll create a simple client application that will get you started with Parallels Agent programming. We will be using Perl to write our sample program. The complete program code is included in The Complete Program Code section.

If you are using Linux, you probably have Perl already installed on your machine. If you are using Windows, you can download Perl for Windows from the Internet. As an example, ActivePerl for Windows is available as a free download at http://www.activestate.com.

A client program can communicate with Agent using the secure SLL over TCP/IP or plain TCP/IP connection. The TCP/IP module comes standard with Perl. If you would like to communicate with Agent securely, you will need the IO::Socket::SSL module that provides SSL support for Perl. The module can be downloaded from CPAN here: http://search.cpan.org/~behroozi/IO-Socket-SSL-0.97/SSL.pm.

The SSL package requires another module called Net::SSLeay, which can also be downloaded from CPAN by going to this URL: http://search.cpan.org/~flora/Net_SSLeay.pm-1.30/SSLeay.pm.

Both modules come with extensive documentation and easy-to-follow installation instructions.

Now that we have our development environment set up, we are ready to write our program. The program will be as basic as it can possibly be but it should suffice as an entry point into the Agent programming.

In This Section

Connecting to Agent

Logging In

Retrieving a List of Virtuozzo Containers

Restarting a Virtuozzo Container

Summary

The Complete Program Code

Please send us your feedback on this help page