diff options
Diffstat (limited to 'lib/Net/Plesk/Method')
-rw-r--r-- | lib/Net/Plesk/Method/client_add.pm | 108 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/client_get.pm | 82 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/client_ippool_add_ip.pm | 79 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/domain_add.pm | 85 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/domain_del.pm | 76 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/domain_get.pm | 80 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/mail_add.pm | 87 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/mail_remove.pm | 83 | ||||
-rw-r--r-- | lib/Net/Plesk/Method/mail_set.pm | 96 |
9 files changed, 776 insertions, 0 deletions
diff --git a/lib/Net/Plesk/Method/client_add.pm b/lib/Net/Plesk/Method/client_add.pm new file mode 100644 index 0000000..6cda065 --- /dev/null +++ b/lib/Net/Plesk/Method/client_add.pm @@ -0,0 +1,108 @@ +package Net::Plesk::Method::client_add; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw ( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::client_add - Perl extension for Plesk XML Remote API client addition + +=head1 SYNOPSIS + + use Net::Plesk::Method::client_add + + my $p = new Net::Plesk::client_add ( $clientID, 'client.com' ); + +=head1 DESCRIPTION + +This module implements an interface to construct a request for a client +addition using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk client_add object. The I<login> and I<password> +options are required. + +=cut + +sub init { + my ($self, $pname, $login, $passwd, $phone, $fax, $email, $address, $city, + $state, $pcode, $country) = @_; + $$self = join ( "\n", ( + '<client>', + '<add>', + '<gen_info>', + '<pname>', + $self->encode($pname), + '</pname>', + '<login>', + $self->encode($login), + '</login>', + '<passwd>', + $self->encode($passwd), + '</passwd>', + '<phone>', + $self->encode($phone), + '</phone>', + '<fax>', + $self->encode($fax), + '</fax>', + '<email>', + $self->encode($email), + '</email>', + '<address>', + $self->encode($address), + '</address>', + '<city>', + $self->encode($city), + '</city>', + '<state>', + $self->encode($state), + '</state>', + '<pcode>', + $self->encode($pcode), + '</pcode>', + '<country>', + $self->encode($country), + '</country>', + '</gen_info>', + '</add>', + '</client>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/client_get.pm b/lib/Net/Plesk/Method/client_get.pm new file mode 100644 index 0000000..5118ea7 --- /dev/null +++ b/lib/Net/Plesk/Method/client_get.pm @@ -0,0 +1,82 @@ +package Net::Plesk::Method::client_get; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::client_get - Perl extension for Plesk XML Remote API client + retrieval + +=head1 SYNOPSIS + + use Net::Plesk::Method::client_get + + my $p = new Net::Plesk::Method::client_get ( $login ); + + $request = $p->endcode; + +=head1 DESCRIPTION + +This module implements an interface to construct a request for a client +retrieval using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk client_get object. The I<login> options is required. + +=cut + +sub init { + my ($self, $login) = (shift, shift); + $$self = join ( "\n", ( + '<client>', + '<get>', + '<filter>', + '<login>', + $self->encode($login), + '</login>', + '</filter>', + '<dataset>', + '<gen_info/>', + '</dataset>', + '</get>', + '</client>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/client_ippool_add_ip.pm b/lib/Net/Plesk/Method/client_ippool_add_ip.pm new file mode 100644 index 0000000..bafd5dd --- /dev/null +++ b/lib/Net/Plesk/Method/client_ippool_add_ip.pm @@ -0,0 +1,79 @@ +package Net::Plesk::Method::client_ippool_add_ip; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::client_ippool_add_ip - Perl extension for Plesk XML +Remote API client ippool addition + +=head1 SYNOPSIS + + use Net::Plesk::Method::client_ippool_add_ip + + my $p = new Net::Plesk::Method::client_ippool_add_ip ( $clientID, $ipaddress ); + +=head1 DESCRIPTION + +This module implements an interface to construct a request for a ippool +addition to a client using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk client ippool_add_ip. The I<clientID> and I<ipaddress> +options are required. + +=cut + +sub init { + my ($self, $clientid, $ipaddress) = @_; + $$self = join ( "\n", ( + '<client>', + '<ippool_add_ip>', + '<client_id>', + $self->encode($clientid), + '</client_id>', + '<ip_address>', + $self->encode($ipaddress), + '</ip_address>', + '</ippool_add_ip>', + '</client>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/domain_add.pm b/lib/Net/Plesk/Method/domain_add.pm new file mode 100644 index 0000000..cfe55be --- /dev/null +++ b/lib/Net/Plesk/Method/domain_add.pm @@ -0,0 +1,85 @@ +package Net::Plesk::Method::domain_add; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::domain_add - Perl extension for Plesk XML Remote API domain addition + +=head1 SYNOPSIS + + use Net::Plesk::Method::domain_add + + my $p = new Net::Plesk::Method::domain_add ( $clientID, 'domain.com' ); + + $request = $p->endcode; + +=head1 DESCRIPTION + +This module implements an interface to construct a request for a domain +addition using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk domain_add object. The I<domain>, I<client>, and +$<ip_address> options are required. + +=cut + +sub init { + my ($self, $domain, $client, $ip) = @_; + $$self = join ( "\n", ( + '<domain>', + '<add>', + '<gen_setup>', + '<name>', + $self->encode($domain), + '</name>', + '<client_id>', + $self->encode($client), + '</client_id>', + '<ip_address>', + $self->encode($ip), + '</ip_address>', + '</gen_setup>', + '</add>', + '</domain>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/domain_del.pm b/lib/Net/Plesk/Method/domain_del.pm new file mode 100644 index 0000000..76112f9 --- /dev/null +++ b/lib/Net/Plesk/Method/domain_del.pm @@ -0,0 +1,76 @@ +package Net::Plesk::Method::domain_del; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::domain_del - Perl extension for Plesk XML Remote API domain deletion + +=head1 SYNOPSIS + + use Net::Plesk::Method::domain_del + + my $p = new Net::Plesk::Method::domain_del ( 'domain.com' ); + +=head1 DESCRIPTION + +This module implements an interface to construct a request for a domain +addition using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk domain_del object. The I<domain> option is required. + +=cut + +sub init { + my ($self, $domain) = @_; + $$self = join ( "\n", ( + '<domain>', + '<del>', + '<filter>', + '<domain_name>', + $self->encode($domain), + '</domain_name>', + '</filter>', + '</del>', + '</domain>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/domain_get.pm b/lib/Net/Plesk/Method/domain_get.pm new file mode 100644 index 0000000..fabfcb2 --- /dev/null +++ b/lib/Net/Plesk/Method/domain_get.pm @@ -0,0 +1,80 @@ +package Net::Plesk::Method::domain_get; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::domain_get - Perl extension for Plesk XML Remote API domain + information retreival + +=head1 SYNOPSIS + + use Net::Plesk::Method::domain_get + + my $p = new Net::Plesk::Method::domain_get ( 'domain.com' ); + +=head1 DESCRIPTION + +This module implements an interface to construct a request for domain +information retreival using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk domain_get object. The I<domain> option is required. + +=cut + +sub init { + my ($self, $domain) = @_; + $$self = join ( "\n", ( + '<domain>', + '<get>', + '<filter>', + '<domain_name>', + $self->encode($domain), + '</domain_name>', + '</filter>', + '<dataset>', + '<gen_info/>', + '</dataset>', + '</get>', + '</domain>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/mail_add.pm b/lib/Net/Plesk/Method/mail_add.pm new file mode 100644 index 0000000..39e8b6f --- /dev/null +++ b/lib/Net/Plesk/Method/mail_add.pm @@ -0,0 +1,87 @@ +package Net::Plesk::Method::mail_add; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::mail_add - Perl extension for Plesk XML Remote API mail addition + +=head1 SYNOPSIS + + use Net::Plesk::Method::mail_add + + my $p = new Net::Plesk::Method::mail_add ( $domainID, $mailbox, $passwd ); + + $request = $p->endcode; + +=head1 DESCRIPTION + +This module implements an interface to construct a request for a mailbox +addition using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk mail_add object. The I<domainID>, I<mailbox>, +and I<passwd> options are required. + +=cut + +sub init { + my ($self, $domainid, $mailbox, $password) = @_; + $$self = join ( "\n", ( + '<mail>', + '<create>', + '<filter>', + '<domain_id>', + $self->encode($domainid), + '</domain_id>', + '<mailname>', + '<name>', + $self->encode($mailbox), + '</name>', + '<password>', + $self->encode($password), + '</password>', + '</mailname>', + '</filter>', + '</create>', + '</mail>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/mail_remove.pm b/lib/Net/Plesk/Method/mail_remove.pm new file mode 100644 index 0000000..49804ab --- /dev/null +++ b/lib/Net/Plesk/Method/mail_remove.pm @@ -0,0 +1,83 @@ +package Net::Plesk::Method::mail_remove; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::mail_remove - Perl extension for Plesk XML Remote API mail removal + +=head1 SYNOPSIS + + use Net::Plesk::Method::mail_remove + + my $p = + new Net::Plesk::Method::mail_remove ( $domainID, $mailbox ); + + $request = $p->endcode; + +=head1 DESCRIPTION + +This module implements an interface to construct a request for a mailbox +removal using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk mail_remove object. The I<domainID> and I<mailbox> +options are required. + +=cut + +sub init { + my ($self, $domainid, $mailbox ) = @_; + $$self = join ( "\n", ( + '<mail>', + '<remove>', + '<filter>', + '<domain_id>', + $self->encode($domainid), + '</domain_id>', + '<name>', + $self->encode($mailbox), + '</name>', + '</filter>', + '</remove>', + '</mail>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + diff --git a/lib/Net/Plesk/Method/mail_set.pm b/lib/Net/Plesk/Method/mail_set.pm new file mode 100644 index 0000000..df574f8 --- /dev/null +++ b/lib/Net/Plesk/Method/mail_set.pm @@ -0,0 +1,96 @@ +package Net::Plesk::Method::mail_set; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::mail_set - Perl extension for Plesk XML Remote API mailbox setting + +=head1 SYNOPSIS + + use Net::Plesk::Method::mail_set + + my $p = new Net::Plesk::Method::mail_set + ( $domainID, $mailbox, $passwd, $enabled ); + + $request = $p->endcode; + +=head1 DESCRIPTION + +This module implements an interface to construct a request for setting a +mailbox using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk mail_set object. The I<domainID>, I<mailbox>, and +I<password> options are required. + +=cut + +sub init { + my ($self, $domainid, $mailbox, $password, $enabled) = @_; + my $enabledflag = $enabled ? "true" : "false"; + $$self = join ( "\n", ( + '<mail>', + '<update>', + '<set>', + '<filter>', + '<domain_id>', + $self->encode($domainid), + '</domain_id>', + '<mailname>', + '<name>', + $self->encode($mailbox), + '</name>', + '<mailbox>', + '<enabled>', + $self->encode($enabledflag), + '</enabled>', + '</mailbox>', + '<password>', + $self->encode($password), + '</password>', + '</mailname>', + '</filter>', + '</set>', + '</update>', + '</mail>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + |