Code

update, opsi_createLicense automatically creates licenseContracts with ID "c_".softwa...
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Sep 2009 14:21:31 +0000 (14:21 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Sep 2009 14:21:31 +0000 (14:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14342 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/opsi_com.pm

index 241856f474754854fe0425d033897dcfdad6a90a..0dca3ef2422c032a3138b46dd0b4be815e1448eb 100644 (file)
@@ -1766,7 +1766,7 @@ sub opsi_createLicense {
        # Create license contract at Opsi server
     my $callobj = {
         method  => 'createLicenseContract',
-        params  => [ undef, $partner, $conclusionDate, $notificationDate, undef, $notes ],
+        params  => [ "c_".$softwareLicenseId, $partner, $conclusionDate, $notificationDate, undef, $notes ],
         id  => 1,
     };
     my $res = $main::opsi_client->call($main::opsi_url, $callobj);
@@ -2112,7 +2112,6 @@ sub opsi_getPool {
                if ($lContract_err){
                        return &_giveErrorFeedback($msg_hash, "cannot get software license contract information from Opsi server: ".$licenses_res, $session_id);
                }
-
                $license_hash->{$license->{'licenseContractId'}} = [];
                my $licenseContract_hash = { 'conclusionDate' => [$lContract_res->{conclusionDate}],
                        'notificationDate' => [$lContract_res->{notificationDate}],
@@ -2120,11 +2119,8 @@ sub opsi_getPool {
                        'exirationDate' => [$lContract_res->{expirationDate}],
                        'partner' => [$lContract_res->{partner}],
                };
-               
                push( @{$license_hash->{licenseContractData}}, $licenseContract_hash );
 
-print STDERR Dumper $license_hash;
-
                push( @{$res_hash->{hit}}, $license_hash );
        }
        $out_hash->{licenses} = [$res_hash];