Menu

Creating a UPS (Uniterrupted Power Supply) Class

Marco Lima
2021-09-16
2023-12-15
  • Marco Lima

    Marco Lima - 2021-09-16

    Greetings!

    I need to have a class that represents an UPS (Uninterrupted Power Supply) that is effectively a "power source" but that isn't limited in terms of relationships to a particular location. We currently have 6 of these in the building each one handling the infrastructure 3 or more floors (including Network devices like switches and network printers).

    Right now I have used Locations to map out all of the floors and maintenance rooms (where the UPS and switches are located), placing the devices accordingly. I can simulate the UPS as a "Power Source", but then it can only be bound to devices on the same location, when I need to bind it to devices in other locations. Example: UPS01 needs to be a POwer Source for CIs at different locations.

    Thus far I created a "faux" UPS class, as a child of ConnectableCI, which allows to me link to my devices, but I can't get the Depends on/Impacts to show correctly on the graph (regardless of what I set to Uplink or Downlink). But at least the list each other under Devices...so if this is just a graphical thing, I could probably live it.

    Otherwise I have thought of other possible solutions:

    1) Remove the location restriction between Power Source and DatacenterDevices. (I really don't want to do that unless absolutely necessary).

    2)Make a class that inherits from PowerSource and try to the remove the restriction there.

    3)Change my location Strategy altogether: Put every CI into one general Location (Ex. CompanyName) and create custom fields on the uppermost "parent" CI (Physical Device ? ) such as Floor, Room, etc. and use that info to specify location, allowing me to connect any PowerSource to any DatacenterDevice.

    In summary, I'm not too fussed about the intrinsic nature of the Power Supply /Datacenter Device relationship, I simply would like to be able to see the relationship between the UPS and all the devices it sustains on the graph when I use Depends on/Impacts....

    Any help or insight you provide is greatly appreciated, so I thank you in advance!

     
  • Vincent @ Combodo

    Hi Marco,
    I am a bit lost about your true issue.
    I suspect that if you organize your sites in hierarchy (there is an extension which does this), you could modify the filter on DatacenterDevice.PowerSource maybe to say that any UPS located on a parent location of the DatacenterDevice location, is usable.
    For your other strategy with a "faux" UPS class, as a child of ConnectableCI, there is a mean to set Uplink or Downlink through query_down and query_up OQL and even through PHP methods, so I would believe that there is a mean to solve that... you might have to modify the <relations> part for the other end of the Power Source and DatacenterDevices relationship as well.</relations>

     
  • Janusz Uchnast

    Janusz Uchnast - 2023-12-15

    @Marco Lima did You Found or test the best solution ? What do You advise ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.