<<

NAME

Inca::AgentClient - A perl module for defining clients of Inca agents.

SYNOPSIS

  use Inca::AgentClient;
  my $client = new Inca::AgentClient(
    host => 'localhost',
    port => 6362,
    auth => 1,
    cert => 'etc/mycert.pem',
    init => 'etc/inca.properties',
    key => 'etc/mykey.pem',
    prefix => 'inca.agent.',
    trusted => 'etc/mycert.pem',
    password => '1ncaD1nkaD00'
  );

DESCRIPTION

This module creates clients for Inca agents. It handles both unauthenticated and (where available) authenticated communication between client and server and implements methods that are supported by the inca depot.

CLASS METHODS

new

Class constructor which returns a new Inca::AgentClient object. The constructor may be called with any of the following named parameters.

auth

A boolean value indicating whether or not the connection to the agent should use certificate-based authentication. The default is false.

cert

The path to the certificate file. Required for authenticated connections.

host

The IP or DNS name of the agent to contact. Required.

init

Optional path to an Inca properties file specifying values for other parameters.

key

The path to the private key file. Required for authenticated connections.

password

The password for decripting the private key file. Required for authenticated connections.

port

The server port to contact. Required.

prefix

Optional prefix for properties in the init file. The constructor ignores properties that lack this prefix and strips the prefix from those that have it. Default 'inca.agent.'.

trusted

The path to the trusted ca certificate file. Required for authenticated connections.

getCatalog($url)

Asks the agent to retrieve and return the package catalog from the reporter repository accessed via $url. An undefined $url indicates that the agent should return a merged catalog for all known repositories. Returns any successful reply from the agent.

getConfig( )

Asks the agent to return XML for the Inca deployment configuration (see the Inca schema). Returns any successful reply from the agent.

getProxy($hostname)

register($hostname)

Registers this Reporter Manager with the agent. $hostname is the fully-qualified DNS name of this host. Returns any successful reply from the agent.

setConfig($xml)

Replaces or updates the Inca deployment configuration based on the contents of $xml (see the Inca schema). Returns any successful reply from the agent.

<<