Device-Cisco-NXAPI

 view release on metacpan or  search on metacpan

lib/Device/Cisco/NXAPI.pm  view on Meta::CPAN

=cut

sub BUILD {
    my $self = shift;
    
    my $uri = URI->new($self->uri);
    croak "Only http:// or https:// supported." if !($uri->scheme eq 'http' or $uri->scheme eq 'https');

    $self->http_request(HTTP::Request->new(POST => $uri->scheme()."://".$uri->host_port()."/ins"));
    $self->http_request()->content_type("application/json-rpc");
    $self->user_agent()->credentials($uri->host_port(), 'Secure Zone', $self->username, $self->password);
}

=head1 METHODS
 
=head2 tester()

Returns a B<Device::Cisco::NXAPI::Test> object for the switch. This object can be used to run test
cases against the switch.

=cut



( run in 0.328 second using v1.01-cache-2.11-cpan-4d50c553e7e )