NAME
App::Manoc::DB::Result::HWAsset - A model object for the parent class of all Hardware assets
VERSION
version 2.99.2
METHODS
server
Return true if this asset is a serverhw
workstation
Return true if this asset is a workstationhw
in_use
Return 1 when there is an associated logical item, 0 otherwise.
is_decommissioned
Return true if decommissioned
is_in_warehouse
Return true if in warehouse
is_in_rack
Return true if in rack
location
Set/get current object location. If needed rack/floor/room/building fields are cleared.
You cannot use this method to decommission an object, use <decommission>.
decommission
Mark object as decommissioned.
restore
Undo decommissionining. Set location to warehouse.
move_to_rack( $rack )
Set location to rack $rack. Parameter $rack can be an id or row object.
move_to_room($building, $floor, $room)
Set location to building $building, floor $floor and room $room.
move_to_warehouse( $warehouse )
Set location to warehouse $warehouse. Parameter $warehouse can be an id or row object.
label
Return a string describing the object
display_type
Return a string describing the object type
display_location
Return a string describing the object location
generate_inventory
Generate a unique inventory identifier and set the inventory field
CONSTANTS
Types
To be used in type
column.
- TYPE_DEVICE
- TYPE_PRINTER
- TYPE_WORKSTATION
- TYPE_SERVER
- TYPE_IPPHONE
Location
- LOCATION_DECOMMISSIONED
- LOCATION_WAREHOUSE
- LOCATION_RACK
- LOCATION_ROOM
AUTHORS
Gabriele Mambrini <gmambro@cpan.org>
Enrico Liguori
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Gabriele Mambrini.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.