05.02.2013 Views

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>opsi</strong> <strong>manual</strong> <strong>opsi</strong> <strong>version</strong> <strong>4.0.2</strong><br />

– "Type"<br />

is "STRUCTURAL" or "VIRTUAL"<br />

– "Super"<br />

this class which it will be inheriting.<br />

– "Opsi"<br />

gives the name of the class, which will be used later in <strong>opsi</strong> as a display name.<br />

89 / 193<br />

Further more, the class definition can define how the data will be compiled. This information can also be found in the<br />

definition of the Values.<br />

• For the inventory under Linux:<br />

– "Linux": "[]"<br />

Executes the command on the command line, with the argument .<br />

– "Python": ""<br />

Executes the given Python code whose output will be placed in the place holder which is between the "#" signs<br />

(see example below).<br />

• For the Inventory under Windows:<br />

– "WMI": ""<br />

executes WMI when called<br />

– "Cmd": ""<br />

In this case, this is the relative path to the Python executable program, whose output will be placed in the place<br />

holder.<br />

– "Registry": "[] "<br />

The value of will be read from the registry, and given the key name .<br />

The registry must be read in an architecture-specific manner. This means, that the 64 bit sector will be read on<br />

a 64 bit system.<br />

• Value Definition:<br />

– "Type": ""<br />

gives the MySQL database type that will be applied to this value (i.e. a Python string<br />

will be a ""="varchar(200)").<br />

– "Scope": ""<br />

The field will be used in the following way:<br />

"g" means: This attribute is the same in every link of these types.<br />

"i" means: This attribute can have different types of values with these links.<br />

– "Opsi": ""<br />

"" is an internal name of the fields. This can be found in the file located at /etc/<strong>opsi</strong>/hwaudit/locales .<br />

– "WMI": ""<br />

is either the name of a WMI command that prints the value or a single WMI command. If<br />

the WMI command is given in the Class definition (i.e. "select * from Win32_ComputerSystem") , then the<br />

results are assigned to the "WMI" variables in the "Values" class definition. If there is no WMI command, then<br />

the "WMI" variables in the "Values" section are WMI commands (see example below).<br />

– "Linux": ""<br />

This is part of the class definition, is the name of the displayed value when the Linux command is given.<br />

– "Condition": ""<br />

is a condition which must be fulfilled, with which the Value will be determined. So for example if<br />

the is defined as"vendor=[dD]ell*", then the values of "vendor" must contain either Dell or dell.<br />

Here is an example of the class "COMPUTER_SYSTEM":

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!