[ixpmanager] IXPManager API accessed by Ansible inventory plugin/script

Thomas Fritz thomas.fritz at rheintal-ix.net
Thu Dec 22 22:19:24 GMT 2022


Hi Barry!

Thanks for the reference.

A first prototype of an ansible inventory script is alive here.

I am wondering, if there is a better way to get a list of the switches names than to do a GET to https://example.net/api/v4/member-export/ixf/1.0 and then iterate over ['ixp_list'][0]['switch’]?

Best regards,
Thomas

> On 19 Dec 2022, at 22:27, Barry O'Donovan (INEX) <barry.odonovan at inex.ie> wrote:
> 
> Hi Thomas,
> 
> please see: https://github.com/inex/ixp-manager-provisioning
> 
> It's SaltStack rather than Ansible but it should give you an idea on how to do it.
> 
> API's available:
> 
> - https://ixpmanager.example.org/api/v4/provisioner/layer2interfaces/switch-name/{switchname}.yaml
> - https://ixpmanager.example.org/api/v4/provisioner/layer3interfaces/switch-name/{switchname}.yaml
> - https://ixpmanager.example.org/api/v4/provisioner/routing/switch-name/{switchname}.yaml
> - https://ixpmanager.example.org/api/v4/provisioner/switch/switch-name/{switchname}.yaml
> - https://ixpmanager.example.org/api/v4/provisioner/vlans/switch-name/{switchname}.yaml
> 
> You should be able to build out a complete IXP config with these.
> 
>  - Barry
> 
> 
> 
>> Thomas Fritz via ixpmanager
>> 11 December 2022 at 23:13
>> Hi!
>> 
>> Anyone here already using Ansible inventory plugin/script to grab the switches interface data from the IXPManager API…
>> … and willing to share that code?
>> 
>> Thanks,
>> Thomas
>> 
>> _______________________________________________
>> INEX IXP Manager mailing list
>> ixpmanager at inex.ie
>> Unsubscribe or change options here: https://www.inex.ie/mailman/listinfo/ixpmanager
> 
> -- 
> 
> Kind regards, 
> Barry O'Donovan 
> Consultant
> 
> For and on behalf of INEX 
> 
> https://www.inex.ie/support/ 
> +353 1 531 3339
> 
> 



More information about the ixpmanager mailing list