Open discordianfish opened 10 years ago
Hi @discordianfish - we had a similar scenario. If you just create the asset directly with the api, without going through the intake process, you shouldn't need to upload lldp information. Let me know if that works for you too.
@Primer42 What do you mean by 'create the asset directly with the api, without going through the intake process'? Here is the workaround I've implemented, any way to improve that by not posting fake lldp data? https://github.com/discordianfish/collins-pxe/commit/efd79306038564ba99aa8f07bf0eb90ab2afe02d
@discordianfish - sorry, I left out a critical step that isn't super well documented. If you put the node into Maintenance mode, it will accept only one of lshw or lldp at a time. So the process really is:
I just ran through these steps and it seemed to work.
curl --basic -u blake:admin:first -X PUT http://localhost:9000/api/asset/tumblrtag30
curl --basic -u blake:admin:first -d status=Maintenance -d reason='moving to Maintenance mode to upload lshw' http://localhost:9000/api/asset/tumblrtag30/status
curl --basic -u blake:admin:first --data-urlencode "lshw@./test/resources/lshw-basic.xml" http://localhost:9000/api/asset/tumblrtag30
curl --basic -u blake:admin:first -d status=Allocated -d reason='done with intake' http://localhost:9000/api/asset/tumblrtag30/status
I think we primarily use this when we upgrade hardware on a node, but I think it should also work in your situation. Let me know if that causes your problems.
AHA! A shame this is not documented, I was about to give up on using LSHW via collins.
@axlroden @discordianfish any objection to closing this?
@byxorna Maybe the documentation should be fixed? But I'm fine with closing it.
Hi,
I have no lldp in my infrastructure but still want to use collins. Unfortunately for updating an asset, both lldp and lshw is required. Moreover, an empty lldp xml file (lldpctl -f xml w/o any neighbours) will result in such (kinda misleading) error:
Talked to @Primer42 and we agreed that there is no reason why collins requires lldp (and even lshw) data to be available when updating a asset.