gilcot / dwpi

DokuWiki plugin phpIPAM
GNU General Public License v3.0
0 stars 0 forks source link

Usage of d2s: Error400: Invalid parameter #5

Open mfr69bs opened 1 year ago

mfr69bs commented 1 year ago

Hi,

thanks for the great plugin.

I want to get a list of all defined devices (API: "/api/my_app/devices/"). As i understand, the d2s attribute stands for it.

The doku has no further information how about to use it. If i write, e.g. <phpipam d2s=1 /> i've got the following error: Error400: Invalid parameter

How do i get this to work?

Best regards

gilcot commented 1 year ago

Hi,

The plugin is centred around IP addresses. So, there's no devices listing except from racks… For a given device, by it's index, you can retrieve attached hosts IP (did or deviceid) or subnets (d2s or d2n)

Having said that, does your requested index exist? I can't remember exactly where and how, but you should be able to found that information in one of the web pages. If it does, can you confirm that <phpipam did=1 /> works for you?

mfr69bs commented 1 year ago

Hi,

Thanks for the fast respond. Ok I understand. I can confirm that did or deviceid works as described.

It's a pity that there is no list of devices. So I currently have ~300 MAC addresses to manage in my private network at home and would like to view it in my local wiki. ;)

But generally there is no link to the corresponding entry in phpmydmin in the lists. That would also be a good feature.

gilcot commented 1 year ago

Hi,

I have to admit that I never though about some lists (devices and others) alone. Because all my needs were around subnets/addresses/racks listing. So it's a feature to add 😄 (but I can't promise any deadline for next release) unless one of the workarounds do the job for you.

Having said that, to see addresses used in your private network, I think you should look at subnet side instead of devices. Better check: sid/nid, net/cidr, s2n/s2s, f2n/f2s.

mfr69bs commented 1 year ago

Thank you for your remarks. That was clear to me. Of course, this all makes sense, especially in relation to your use case.

Your focus is on the display of the IP addresses and racks. However, I have a different use case: I only have one rack but a lot of devices distributed throughout the house. These are several NAS, multimedia devices, switches and Raspberry Pis. In total, arp-scan finds around 300 MAC addresses in 3 VLANs. In addition, there are the devices that are currently no longer in use or retired, which I also maintain in the phpipam device list. ;)

This certainly does not correspond to a "normal household". ;)

On the one hand I have settled my company at home and on the other hand I am active in the field of home automation. Here I am on the board and developer of an open source solution. This may explain the mass of devices in the private sector. ;)

Your plugin now links the IPAM and wiki. This corresponds exactly to my needs to connect entries from IPAM with other content (knowledge base, etc.) on pages of the wiki.

My idea was that I can display a list of all defined devices from phpipam in the Dokuwiki. Ideally, these also have a link to the corresponding device in phpipam.

The name of the device is linked and the columns IP address, Description, Rack, Type, Location, Vendor, Model, Serial, ... (similar to the device overview in phpipam) can optionally be displayed.

But I would also have liked a link to the corresponding entry in phpipam for the IP-based lists. The IP address is linked to the IP and the device is linked to it.

On the other side, i.e. in IPAM, I can then, for example, link an article about the device to the wiki via a user-defined attribute in the device list.

That was my hope when I installed the awesome plugin. ;)