NAME

Broadworks::OCIP - API for communication with Broadworks OCI-P Interface

VERSION

version 0.08

SYNOPSIS

  use Broadworks::OCIP;

  my $ocip = Broadworks::OCIP->new(params);
  my $res = $ocip->SystemSoftwareVersionGetRequest();

DESCRIPTION

Broadworks::OCIP is a perl interface to the Broadworks OCI-P Provisioning interface. The functions provided reflect the AS OCI-P. The methods supported are documented in the Broadworks::OCIP::Methods module, which is autogenerated from the Broadworks schemas.

Required Parameters

host

The host that is being connected to - either a host name or an IP address.

username

The username to authenticate with on the remote system.

authhash

An authentication hash to use for authenticating the username. Alternatively the password attribute can be set and this is transformed into an appropriate authhash (and the password deleted).

Other attributes

version

Broadworks version - currently defaults to 17sp4.

character_set

The character set to use - currently defaults to ISO-8859-1.

encoder

A character set encoder - uses an instance of Encode returned by "find_encoding" in Encode.

protocol

The protocol to implement - always OCI.

port

The port number to connect to - default 2208.

target

The target to connect to - consists of the host and port linked by a colon.

timeout

The timeout within the connection in seconds - defaults to 8 can be changed during the session.

socket

The connection socket - automatically set.

select

A select object on the connection socket.

session

The session identifier for the session - defaults to a Data::UUID string.

is_authenticated

Are we authenticated. Checking this forces authentication. If authentication fails then we throw an exception.

last_sent

The last sent XML document.

trace

Are we tracing. If this is true then we output sent and received data to STDERR.

METHODS

BUILDARGS

Standard Moose BUILDARGS function. If a single argument is passed this is treated as a config filename (opened with Config::Any) if it is a scalar, or assumed to be a hash reference, which is expanded up.

If a config filename is passed this is opened, and any Broadworks::OCIP is taken as the overall config.

Any password attribute is removed from the config and an authhash is put in its place. This means dumping the object will not reveal the password.

send

Sends an XML document to the Broadworks remote over the socket. Convert the passed string to the correct character set.

send_command_xml

Builds an XML command document from the command passed and the parameters (which are passed as an array ref of pairs).

When the document has been created it is send using the send method.

send_query

Sends an XML command to the Broadworks remote over the socket, and receives and passes back the expected response document. Throws an exception if the reply type is returned.

send_command

Sends an XML command to the Broadworks remote over the socket, and receives and passes back the expected SuccessResponse document. An exception is not thrown if the wrong reply type is returned, however the status_ok attribute should be checked for this.

DEMOLISH

On object destruction, if the system has authenticated, sends a LogoutRequest command and then tears down the socket connection.

AUTHOR

Nigel Metheringham <Nigel.Metheringham@redcentricplc.com>

COPYRIGHT

Copyright 2014 Recentric Solutions Limited. All rights reserved.

AUTHOR

Nigel Metheringham <nigelm@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Nigel Metheringham.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.