Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: gnustavo/OCS-Client
base: fb3f48e403
...
head fork: gnustavo/OCS-Client
compare: 33602d50ba
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 29 additions and 47 deletions.
  1. +4 −0 Changes
  2. +3 −0  README
  3. +22 −47 lib/OCS/Client.pm
View
4 Changes
@@ -2,6 +2,10 @@ Revision history for OCS-Client. -*- text -*-
{{$NEXT}}
+0.008 2012-04-24 07:51:21 America/Sao_Paulo
+
+ ForceArray to all prunnable sections.
+
0.007 2012-04-21 18:08:31 America/Sao_Paulo
Add a custom READ file to be shown in GitHub.
View
3  README
@@ -1,5 +1,8 @@
OCS::Client - A simple interface to OCS's SOAP API.
+OCS (http://www.ocsinventory-ng.org/) is an inventory system for IT
+assets.
+
Copyright (c) 2012 by CPqD (http://www.cpqd.com.br/)
This is free software; you can redistribute it and/or modify it under
View
69 lib/OCS/Client.pm
@@ -124,10 +124,10 @@ sub get_computers_V1 {
shift @computers;
pop @computers;
- return map {XMLin($_, ForceArray => [qw/DRIVES NETWORKS PRINTERS SOFTWARES VIDEOS/])} @computers;
+ return map {XMLin($_, ForceArray => [qw/DRIVES HARDWARE NETWORKS PRINTERS SOFTWARES STORAGES VIDEOS/])} @computers;
}
-=head3 B<computer_iterator> REQUEST-LIST
+=head3 B<computer_iterator> REQUEST-MAP
This method returns a closure that you can use to fetch the computers
one by one until there is no more. It's usefull because the server
@@ -256,60 +256,35 @@ sub prune {
return $computer;
}
-=head2 Constants
+=head2 CONSTANTS
This module defines some constants to make the calling of methods
B<get_computers_V1> and B<computer_iterator> easier and more readable.
These are for their CHECKSUM parameter.
-=over 4
-
-=item HARDWARE => 0x00001
-
-=item BIOS => 0x00002
-
-=item MEMORY_SLOTS => 0x00004
-
-=item SYSTEM_SLOTS => 0x00008
-
-=item REGISTRY => 0x00010
-
-=item SYSTEM_CONTROLLERS => 0x00020
-
-=item MONITORS => 0x00040
-
-=item SYSTEM_PORTS => 0x00080
-
-=item STORAGE_PERIPHERALS => 0x00100
-
-=item LOGICAL_DRIVES => 0x00200
-
-=item INPUT_DEVICES => 0x00400
-
-=item MODEMS => 0x00800
-
-=item NETWORK_ADAPTERS => 0x01000
-
-=item PRINTERS => 0x02000
-
-=item SOUND_ADAPTERS => 0x04000
-
-=item VIDEO_ADAPTERS => 0x08000
-
-=item SOFTWARE => 0x10000
-
-=back
+ 'HARDWARE' => 0x00001,
+ 'BIOS' => 0x00002,
+ 'MEMORY_SLOTS' => 0x00004,
+ 'SYSTEM_SLOTS' => 0x00008,
+ 'REGISTRY' => 0x00010,
+ 'SYSTEM_CONTROLLERS' => 0x00020,
+ 'MONITORS' => 0x00040,
+ 'SYSTEM_PORTS' => 0x00080,
+ 'STORAGE_PERIPHERALS' => 0x00100,
+ 'LOGICAL_DRIVES' => 0x00200,
+ 'INPUT_DEVICES' => 0x00400,
+ 'MODEMS' => 0x00800,
+ 'NETWORK_ADAPTERS' => 0x01000,
+ 'PRINTERS' => 0x02000,
+ 'SOUND_ADAPTERS' => 0x04000,
+ 'VIDEO_ADAPTERS' => 0x08000,
+ 'SOFTWARE' => 0x10000,
And these are for their WANTED parameter.
-=over 4
-
-=item ACOUNTINFO => 0x00001
-
-=item DICO_SOFT => 0x00002
-
-=back
+ 'ACOUNTINFO' => 0x00001,
+ 'DICO_SOFT' => 0x00002,
=cut

No commit comments for this range

Something went wrong with that request. Please try again.