| ZipTie-Client documentation | view source | Contained in the ZipTie-Client distribution. |
port
Gets an instance of a webservice endpoint. As a shortcut ports can be accessed directly with a method named
the same as the port name.ZipTie::Client - Webservice client for the ZipTie server
Version 1.3
use ZipTie::Client;
my $client = ZipTie::Client->new(username => 'admin', password => 'password', host => 'localhost:8080', );
$client->devices()->createDevice('10.1.2.1', 'Default', 'ZipTie::Adapters::Cisco::IOS');
$client->devicetags()->addTag('HQ'); $client->devicetags()->tagDevices('HQ', '10.1.2.1@Default');
ZipTie::Client is a simple webservice client for a ZipTie server.
username: The ZipTie server username password: The ZipTie server password host: The ZipTie server host and port. (Defaults to 'localhost:8080') scheme: The protocol scheme to use to connect to the server. (Defaults to 'https') on_fault: The method that will be called when there is an error from the server. (Default will call C<die()>)
If no username is specified the ZipTie::Client will try to use $ENV{'ZIPTIE_AUTHENTICATION'} to authenticate. This environment variable is set by the ZipTie server when running script tools. Authors of script tools my simply create an instance of the ZipTie::Client with no options and the authentication will be handled automatically.
port
Gets an instance of a webservice endpoint. As a shortcut ports can be accessed directly with a method named
the same as the port name. # These two lines do the same thing.
$port = $client->port("devices");
$port = $client->devices();
$client->logout();
The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Original Code is ZipTie.
The Initial Developer of the Original Code is AlterPoint. Portions created by AlterPoint are Copyright (C) 2007-2008, AlterPoint, Inc. All Rights Reserved.
lbayer (lbayer@ziptie.org)
Please report any bugs or feature requests through the ziptie bugzilla web interface at http://bugs.ziptie.org/.
| ZipTie-Client documentation | view source | Contained in the ZipTie-Client distribution. |