Olli Hollmen > Citrix-0.25 > Module

Download:
Citrix-0.25.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

Module Suite for managing UNIX Citrix Sessions.

DESCRIPTION ^

Citrix "top-level" module loads all Citrix::* modules into runtime for simple use. Citrix::* modules have no problems running in mod_perl based web application.

CLASS VARIABLES ^

The following class variables serve as Global Citrix environment settings.

$Citrix::binpath

Path to Citrix command line utilities (for ctxconnect,ctxdisconnect,ctxlogoff,ctxreset, ctxquery,ctxquser,ctxshadow ... Default: /opt/CTXSmf/bin)

$Citrix::admins

Hash(ref) containing admin usernames set to (dummy) true value. Set this from external configuration files (Optional, No default value). This is provided as convenience for application to store "admin" role for certain users.

$Citrix::farms

Array of hashes for Citrix farms configuration. See Citrix::Farm for Farm hash structure. Load these with Citrix::loadconfig() (see METHODS).

$Citrix::touts

Timeout(s) for Citrix (over-the-network) Operations. Has separate settings for 'host','user','op'. Set these by your network speed and latency.

METHODS ^

my Citrix::loadconfig($fname);

Load Farm Configuration from a file in perl format. The file should "return" an array of (non blessed) Citrix::Farm hashes with keys described in Citrix::Farm module (all this as a result of underlying "require()"). Do not terminate this config file with the traditional "1;" true value (the array returned will be the true value).

This file is expected to be found in Perl library path (@INC). Usually the application current directory is a safe choice for storing config (as '.' is always in @INC).

Behind the scenes the Farm config is stored in Citrix class to be accessed later by getfarms

my $farms = Citrix::getfarms();

Get Handle to farms (array of hashes). Passing keyword param 'idx' set to true values makes getfarms return a hash(ref) keyed by farm id (instead or array(ref) ). Farm id keys are usually chosen to be short name string (Example 'la' for Los Angeles farm), see Citrix::Farm. Passing keyword param 'sort' set to valid Farm attribute value makes getfarms() return farm set array sorted by atribute ('sort' and 'idx' don't work together).

Citrix::loadconfig_db($dbh)

Load Citrix Farms from DB using DBI connection $dbh. Method stores Citrix::Farm entries in $Citrix::farms for later access. Use Citrix::getfarms() to access farm info (see Citrix).

Useful in bigger environments with world-wide multi-farm Citrix system layout. Notice that Citrix::* modules are not tightly coupled with perl DBI, but to use this method you do need DBI to to establish the connection.

AUTHOR ^

Olli Hollmen <ohollmen@broadcom.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009-2011 by Olli Hollmen

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

THANKS ^

Thanks to my daughter Milla Hollmen for proofreading the perldoc.

REFERENCES ^

Citrix Command line commands: http://support.citrix.com/proddocs/index.jsp?topic=/ps-unix/ps-unix-cmd-ref-commands-ctxquery.html

syntax highlighting: