DMTF-CIM-WSMan

 view release on metacpan or  search on metacpan

lib/DMTF/CIM/WSMan.pm  view on Meta::CPAN

		my $reason=$fault->first_child('s:Reason')->first_child('s:Text')->text;
		my $detail;
		if(defined $fault->first_child('s:Detail')
				&& defined $fault->first_child('s:Detail')->first_child('w:FaultDetail')) {
			$detail=$fault->first_child('s:Detail')->first_child('w:FaultDetail')->text;
		}

		my $errstr=$value;
		$errstr .= ' (' if(defined $sc_val && $sc_val ne '' && defined $errstr && $errstr ne '');
		$errstr .= "$sc_val" if(defined $sc_val && $sc_val ne '');
		$errstr .= ') ' if(defined $sc_val && $sc_val ne '' && defined $value && $value ne '');
		$errstr .= "\n" if(defined $reason && $reason ne '' && defined $errstr && $errstr ne '');
		$errstr .= "$reason " if(defined $reason && $reason ne '');
		$errstr .= "\n($detail)" if(defined $detail && $detail ne '');
		carp "Fault encountered: $errstr\n";
		return 1;
	}
	return 0;
}

1; # Magic true value required at end of module
__END__

=head1 NAME

DMTF::CIM::WSMan - Provides WSMan CIM binding


=head1 VERSION

This document describes DMTF::CIM::WSMan version 0.09


=head1 SYNOPSIS

  use DMTF::CIM::WSMan;

  my $wsman=DMTF::CIM::WSMan->new();
  $wsman->current_uri( 'wsman.wbem://admin:secret@example.com/interop' );
  my @rps=$wsman->class_uris( '/interop:CIM_RegisteredProfile' );


=head1 DESCRIPTION

This module extends the L<DMTF::CIM> class with L<DMTF::WSMan> mapping and binding.
This implements the generic operations documented for L<DMTF::CIM>.

=head1 INTERFACE 

Refer to L<DMTF::CIM> for the generic operation documentation.

=head2 ADDITIONAL METHODS

=over

=item C<< current_uri( [I<new_uri>] ) >>

Gets or sets the current untyped WBEM URI for resource access.  Supported
schemes are 'wsman.wbem', 'wsman.wbems', 'http', and 'https'.  This is the
preferred way to establish a connection with a specific host using specific
credentials (ie: C<< $wsm->current_uri( 'wsman.wbem://user:pass@example.com:623/' >> )

=item C<< current_wsman >>

Returns the L<DMTF::WSMan> object associated with the current URI

=item C<< current_epr >>

Returns the current EPR object derived from the current URI.

=item C<< URItoEPR( I<uri> ) >>

Converts the L<URI> object into an EPR object for L<DMTF::WSMan>.

=item C<< quirks( [I<name> [,I<value>] ) >>

Lists, reads, or sets quirks.  If neither I<name> or I<value> are specified,
returns a list of all known quirks.  If only name is passed, returns the
value of the named quirk.  If both name and value are passed, sets the
named quirk to I<value>.  Refer to INCOMPATIBILITIES for a list of
quirks.

=back

=head1 DIAGNOSTICS

This class carp()s and returns undef (or empty list) on all errors.


=head1 CONFIGURATION AND ENVIRONMENT

DMTF::CIM::WSMan requires no configuration files or environment variables.


=head1 DEPENDENCIES

=over

=item L<DMTF::WSMan> (available from the same location as this module)

=item L<DMTF::CIM> (available from the same location as this module)

=item L<URI> (available from CPAN)

=item L<URI::Escape> (available from CPAN)

=item L<XML::Twig> (available from CPAN)

=item L<DateTime> (available from CPAN)

=back

=head1 INCOMPATIBILITIES

The Broadcom TruManage implementations 1.52.0.4 and older do not support
the corrected String[] octet string representation and require the
incorrect_string_octetstring quirk to be set to true using
$ws->quirk('incorrect_string_octetstring', 1);

The Microsoft winrm servers up to at least the 3.0 Beta do not support
an EndpointReference in the Object tag of an association querey and



( run in 1.981 second using v1.01-cache-2.11-cpan-39bf76dae61 )