You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2008-01-21 12:51:32

msi
Member
Registered: 2008-01-10
Posts: 9

software-license with/without OCSNG-Import

we started using OCSNG + GLPI for a couple of weeks now.

trying to manage our software-licenses in glpi, we think there are some troubles of handling those properly.
i'll try to summarize our current conclusions:

As a result we would like to do something like this:
- inventory the software that is installed on our computers (in most cases through OCSNG)
- inventory our existing ("bought", free) software licenses (manually)
- refer the installations to the licenses
- get as result: non-licensed-software, under-licensed-software, over-licensed-software and expired licenses

At the moment we figured those points about the "GLPI-way" of handling software, installations and licenses
- any software-installation assumes an exisiting (not necesseraly bought) license or creates one
- a license refers to a software, version, bought-status, etc.
- license-types "free" and "global" are handled special for one version of a software (1 license covers all installations of that software version  *1 (see below)
- moving one (or more) installation (meaning "moving a license") to another license adds that installations (licenses) to the target licenses (except the target being "free" or "global") -> the "target-license-count" gets increased (meaning corrupted when it's a "bought" license)
- software imported through OCSNG is allocated to a "global" or "free" license (as setup in OCSNG-mode) of that version
- "manually" (in GLPI not through OCSNG-import) installing a software on a computer offers the option of assigning this installation to an exisiting license without creating a seperate one -> thus the "target-license-count" stays correct


"feature-request" A with "minor" (?) changes
to handle our installations and (bought-)licenses on the current structure (especially installation=license):

Optionally assign another "special" license-type (e.g. ocs-import) to installed software upon OCSNG-import.
When moving licenses (installations) with this special license-type to an existing bought-license (when target is not "free" or "global"):
- not adding license to the bought license, just assigning as many installations to that bought license as there are remaining licenses in the target-license
- if not enough remaing licenses in the "target-license" assigning (and in this case "adding") the other installations to a new or already exisiting unbought-license of the same type,version,etc. as the target.

"feature-request" B with "non-minor" (?) changes
generally i think, inventoried software (=> installations) should be handled independent (unassigned) to  licenses in order to achieve results as described above in a "logical" way.
as the database-structure doesn't support this at the moment (as far as i interpreted it) this would mean some changes to the database relations



*1
One question on the existing "special" license-types "free" and "global":

I understand that "free" licenses are always handled as "not to buy".
But why are "global" licenses handled in that manner?



Sorry for my partly bad english.
If some of the described issues are already covered (and just a result of wrong usage/setup) i would be happy about any comments.



Greets

Michael

Offline

#2 2008-01-23 13:25:51

msi
Member
Registered: 2008-01-10
Posts: 9

Re: software-license with/without OCSNG-Import

Well,

i "tried" modifying the function for moving licenses (installations) to other licenses.

file: software.function.php
function moveLicensesToLicense

i changed the following behaviour:

case: destination license is a bought license
the function just moves as many installations to the destination license as there are remaining licenses.
the rest are moved to a new/existing unbought license, similar to the destination license
=> the number of the bought licenses doesn't get increased (corrupted)

case: source license is a bought license
the source license of the move action doesn't get removed, even when there are no installations assigned to it are left.
=> the number of the bought licenses doesn't get decreased (corrupted)


i didn't try to get a new license type like described in the OP. it ain't necessary in order to work with imported licenses.
but maybe anyone can give me a hint, how to select software in the software view that has just been newly imported (not edited)


i uploaded the changed file to:
http://rapidshare.com/files/85928311/so … ar.gz.html

Greets
Michael

P.S.:
the changed code isn't wll tested yet. test it, but don't use it in production until someone more skilled php-coder reviewed the code at least
and please be gentle regarding the code quality.
i'm happy i got it to work, taking my non-existing PHP-skills into account. ;-)

Last edited by msi (2008-01-23 13:29:04)

Offline

#3 2008-01-28 12:37:24

msi
Member
Registered: 2008-01-10
Posts: 9

Re: software-license with/without OCSNG-Import

bump

did someone look into this changed "license-moving"?

maybe there is some other way to handle licenses in the described way, we just didn't figure out.
we would rather not use any self changed code. smile

thanks in advance and greets

Michael

Offline

#4 2008-04-10 01:33:33

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

We are attempting to do the exact same thing, and had the same issues.
I just looked at the supplied file, and it appears to be good.

One other issue we've come across after upgrading to 0.70 is that suddenly licenses are split by version #s.

Eg: We've bought a volume license of 10 copies of Office 2007.
But in the license sheet, they're split into 2 groups, since some have the latest patches, and some don't. (different version numbers)

How do we re-combine these? It seems incredibly pointless to split up installs based on minor version differences. (And we create separate software entries for the major ones.)

Offline

#5 2008-04-10 10:35:16

msi
Member
Registered: 2008-01-10
Posts: 9

Re: software-license with/without OCSNG-Import

for your last question i would think of two options.

1. Use the Software dictionary in OCS to group the "minor-versions" into "major-version"  -> additional installations are handled automatically

2. move the installations to another license in GLPI  -> every "group" of installations must be handled manually

Offline

#6 2008-04-10 17:03:37

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

1) We do.
2) That's going to be a huge pain in the ass the first time...

Why was this change made to GLPI anyhow? It makes no practical sense.

Offline

#7 2008-04-10 17:53:35

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

Ok, one tweak was needed to the file provided above. If the expiry of the license is set to null, the SQL won't return the right results. We need to add a check like:
if($tlic['expire'] !== null && strlen($tlic['expire']) > 0)
    $expireSQL = "AND glpi_licenses.expire='".$tlic['expire']."' ";
else
    $expireSQL = "AND glpi_licenses.expire IS NULL ";

Offline

#8 2008-04-11 00:16:35

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

Ok, it appears that the OCS sync repeatedly resets the version number, so moving computers to the correct licenses becomes a daily chore. This is far from acceptable.

How do I get GLPI to ignore version numbers?

Offline

#9 2008-04-11 00:27:25

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

Here's my totally hacked, untested, but hopefully working solution:
Chonge software.class.php, and in the License class's prepareInputForAdd and prepareInputForUpdate functions, set $input['version'] = "N/A"

Offline

#10 2008-05-07 22:27:41

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

Note that does not work. I'm still trying to find a good solution.

Offline

#11 2008-05-08 08:36:56

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: software-license with/without OCSNG-Import

Hi.

A big work on License is on the roadmap (0.72) : https://dev.indepnet.net/glpi/wiki/GlpiLicenses

Main ideas are
- to split "license" and installed software.
- to enable recursivity for software and license (shared between entities)

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#12 2008-05-09 00:17:51

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

Sorry for not being able to tell myself, google translate doesn't work well with technical discussions.

Will the proposed changes allow us to cleanly handle versions again?
eg: I don't need seperate licenses for office 10.322.192 and 10.323.545, but I do for 11.*
Having seperate Software entries for each version that requires seperate licensing is acceptable as well (and probably prefered).

Offline

#13 2009-01-05 20:13:36

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: software-license with/without OCSNG-Import

Any way to get the roadmap in english? I'm still waiting for 0.72, but want to know it's actually going to meet our needs.

Offline

#14 2009-01-08 20:34:41

jp10558
Member
Registered: 2006-10-09
Posts: 101

Re: software-license with/without OCSNG-Import

I could really use this working like described in this thread and the roadmap. Specifically I really need to be able to see:
I need to input how many licenses I've bought

I need to be able to assign licenses and have them NOT INCREMENT what I've bought. I'm never going to input license purchases by buying it, installing it on a computer and waiting for that to increment GLPI. I can't imagine anyone does.

I'd like to be able to have new detected software installs be automatically asigned to a selected License that I've entered, have it decrement that, and create a to buy or increment to buy if the Bought - 1 = < 0. This will of course have to be per software entry. And we will need to be able to specify license revisions that require new licenses vs ones that are free updates.

I'd like to be albe to specify (maybe I can already do this) Global as to buy and get a display of total bought licenses - total assigned licenses - any Global to buy licenses. That is, assume I *HAVE NOT* purchased a license and decrement the total of the licenses I've entered for display.

Offline

Board footer

Powered by FluxBB